EECS 20 Lecture 15 (February 21, 2001) Tom Henzinger Simulation.

Slides:



Advertisements
Similar presentations
Theory of Computing Lecture 23 MAS 714 Hartmut Klauck.
Advertisements

1 The 2-to-4 decoder is a block which decodes the 2-bit binary inputs and produces four output All but one outputs are zero One output corresponding to.
4b Lexical analysis Finite Automata
CSC 361NFA vs. DFA1. CSC 361NFA vs. DFA2 NFAs vs. DFAs NFAs can be constructed from DFAs using transitions: Called NFA- Suppose M 1 accepts L 1, M 2 accepts.
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
1 State Assignment Using Partition Pairs 2  This method allows for finding high quality solutions but is slow and complicated  Only computer approach.
Digital Logic Design Lecture 27.
Basic Properties of Relations
Behavioral Equivalence Hossein Hojjat Formal Lab University of Tehran.
EECS 20 Chapter 3 Sections Defining Signals and Systems Last time we Found ways to define functions and systems Defined many example systems Today.
EECS 20 Lecture 14 (February 16, 2001) Tom Henzinger Nondeterminism.
EECS 20 Lecture 11 (February 9, 2001) Tom Henzinger Feedback.
EECS 20 Lecture 38 (April 27, 2001) Tom Henzinger Review.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Finite Automata and Non Determinism
Transparency No. 2-1 Formal Language and Automata Theory Chapter 2 Deterministic Finite Automata (DFA) (include Lecture 3 and 4)
ECE 331 – Digital System Design State Reduction and State Assignment (Lecture #22) The slides included herein were taken from the materials accompanying.
EECS 20 Lecture 13 (February 14, 2001) Tom Henzinger Minimization.
Transparency No Formal Language and Automata Theory Chapter 10 The Myhill-Nerode Theorem (lecture 15,16 and B)
EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger Determinization.
EECS 20 Lecture 1 (January 17, 2001) Tom Henzinger Motivation.
EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger State Machines.
FSM Decomposition using Partitions on States 290N: The Unknown Component Problem Lecture 24.
EECS 20 Lecture 9 (February 5, 2001) Tom Henzinger Transition Diagrams.
EECS 20 Lecture 6 (January 29, 2001) Tom Henzinger Transducive Systems.
Modeling and the simulator of Digital Circuits in Object-Oriented Programming Stefan Senczyna Department of Fundamentals of Technical Systems The Silesian.
EECS 20 Lecture 7 (January 31, 2001) Tom Henzinger Reactive Systems.
Transparency No Formal Language and Automata Theory Chapter 10 The Myhill-Nerode Theorem (lecture 15,16 and B)
Week 4 1.More examples 2.Nondeterminism, equivalence, simulation (Ch 3) 3.Composition (Ch 4)
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
01/27/2005 Combinationality of cyclic definitions EECS 290A – Spring 2005 UC Berkeley.
EECS 20 Chapter 4 Sections Connecting State Machines Last time we Introduced the nondeterministic state machine Highlighted differences between.
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
Discrete Mathematics Lecture#11.
EECS 20 Lecture 4 (January 24, 2001) Tom Henzinger Block Diagrams.
EECS 20 Lecture 36 (April 23, 2001) Tom Henzinger Safety Control.
EECS 20 Lecture 37 (April 25, 2001) Tom Henzinger Progress Control.
EECS 20 Chapter 3 Sections State Machines Continued Last time we Introduced the deterministic finite state machine Discussed the concept of state.
EECS 20 Lecture 12 (February 12, 2001) Tom Henzinger Equivalence.
Transparency No. 8-1 Formal Language and Automata Theory Chapter 8 DFA state minimization (lecture 13, 14)
Chapter 2: Boolean Algebra and Logic Functions
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Rosen 5th ed., ch. 11 Ref: Wikipedia
Zvi Kohavi and Niraj K. Jha 1 Capabilities, Minimization, and Transformation of Sequential Machines.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
Module 2 : Behavioral modeling TOPIC : Modeling a Digital pulse UNIT 1: Modeling and Simulation.
A relation is an operation, or series of operations, that maps one number onto another.
Turing Machines. Intro to Turing Machines A Turing Machine (TM) has finite-state control (like PDA), and an infinite read-write tape. The tape serves.
Synchronous Protocol Automata. Formal definitions Definition 1 A synchronous protocol automaton P is defined as a tuple (Q,S,D,V,A,->,clk,q0,qf) Channels.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
Structures for Discrete-Time Systems
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 10 Automata, Grammars and Languages.
UNIT 4 : State Minimization: Completely Specified Machines
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 41 May 7, 2008.
Lecture #4 Thinking of designing an abstract machine acts as finite automata. Advanced Computation Theory.
EE611 Deterministic Systems State Observers Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Turing’s Thesis.
Lexical analysis Finite Automata
Fundamentals & Ethics of Information Systems IS 201
Motivation EECS 20 Lecture 1 (January 17, 2001) Tom Henzinger.
Regular Expression Manipulation FSM Model
4b Lexical analysis Finite Automata
Variations of the Turing Machine
State Machines EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger.
4b Lexical analysis Finite Automata
Presentation transcript:

EECS 20 Lecture 15 (February 21, 2001) Tom Henzinger Simulation

Deterministic Reactive System: for every input signal, there is exactly one output signal. DetSys : [ Time  Inputs ]  [ Time  Outputs ] Function:

Nondeterministic Reactive System: for every input signal, there is one or more output signals. NondetSys  [ Time  Inputs ]  [ Time  Outputs ] such that  x  [ Time  Inputs ],  y  [ Time  Outputs ], (x,y)  NondetSys Binary relation: Every pair (x,y)  NondetSys is called a behavior.

System S1 refines system S2 iff 1. Time [S1] = Time [S2], 2. Inputs [S1] = Inputs [S2], 3. Outputs [S1] = Outputs [S2], 4. Behaviors [S1]  Behaviors [S2]. S1 is a more detailed description of S2; S2 is an abstraction or property of S1.

Systems S1 and S2 are equivalent iff 1. Time [S1] = Time [S2], 2. Inputs [S1] = Inputs [S2], 3. Outputs [S1] = Outputs [S2], 4. Behaviors [S1] = Behaviors [S2].

Nondeterministic causal discrete-time reactive systems can be implemented by nondeterministic state machines.

Nondeterministic State Machine Inputs Outputs States possibleInitialStates  States possibleUpdates : States  Inputs  P( States  Outputs ) \ Ø receptiveness (i.e., machine must be prepared to accept every input)

Lossy Channel without Delay LCwD Nats 0  Bins  Nats 0  Bins … 0  1 0   1 1 … 0 / 0 0 /  1 / 1 1 / 

Channel that never drops two in a row NotTwice Nats 0  Bins  Nats 0  Bins … 0  1 0  0  1 … a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / 1

Typical Exam Questions A. Convert between three (possibly nondeterministic) system representations: 1. Input-output definition Deterministic case: define S: [Nats 0  Inputs]  [Nats 0  Outputs] such that for all x  [Nats 0  Inputs] and all y  Nats 0, (S(x))(y) = … Nondeterministic case: define S  [Nats 0  Inputs]  [Nats 0  Outputs] such that for all x  [Nats 0  Inputs] and all y  [Nats 0  Outputs], (x,y)  S iff … 2. Transition diagram 3. Block diagram B. Equivalence, bisimulation, minimization of deterministic state machines

Refinement, simulation, and minimization of nondeterministic state machines

Theorem : The nondeterministic state machines M1 refines the nondeterministic state machine M2 if there exists a simulation of M1 by M2. condition on behaviors relation between states

Theorem : The nondeterministic state machines M1 refines the nondeterministic state machine M2 if there exists a simulation of M1 by M2. Not “if-and-only-if” ! Not symmetric ! (We say that “M2 simulates M1”.)

In the following, assume Inputs [M1] = Inputs [M2] Outputs [M1] = Outputs [M2]

A binary relation S  States [M1]  States [M2] is a simulation of M1 by M2 iff 1.  p  possibleInitialStates [M1],  q  possibleInitialStates [M2], ( p, q )  S and 2.  p  States [M1],  q  States [M2], if ( p, q )  S, then  x  Inputs,  y  Outputs,  p’  States [M1], if ( p’, y )  possibleUpdates [M1] ( p, x ) then  q’  States [M2], ( q’, y )  possibleUpdates [M2] ( q, x ) and ( p’, q’ )  S.

p q p’ x / y S

p q p’ x / y q’ x / y S

p q p’ x / y q’ x / y S

NotTwice refines Lossy Channel without Delay 0 / 0 0 /  1 / 1 1 /  q a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / 1

NotTwice is simulated by Lossy Channel without Delay 0 / 0 0 /  1 / 1 1 /  q a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / 1 Simulation S = { (a, q), (b, q) }

Lossy Channel without Delay is not simulated by NotTwice 0 / 0 0 /  1 / 1 1 /  q a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / 1 Not a simulation S’ = { (q, b) }

Lossy Channel without Delay is not simulated by NotTwice 0 / 0 0 /  1 / 1 1 /  q a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / 1 Not a simulation S” = { (q, a), (q, b) }

Channel that drops every third zero Nats 0  Bins  Nats 0  Bins …  … ThirdZero

Channel that drops every third zero Nats 0  Bins  Nats 0  Bins …  … ThirdZero State between time t-1 and time t: 3 third zero from now will be dropped 2 second zero from now will be dropped 1 next zero will be dropped

Channel that drops every third zero /  0 / 0 1 / 1

ThirdZero refines NotTwice a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / /  0 / 0 1 / 1

ThirdZero is simulated by NotTwice a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / /  0 / 0 1 / 1 Simulation S = { (3,b),

ThirdZero is simulated by NotTwice a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / /  0 / 0 1 / 1 Simulation S = { (3,b), (2,b),

ThirdZero is simulated by NotTwice a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / /  0 / 0 1 / 1 Simulation S = { (3,b), (2,b), (1,b),

ThirdZero is simulated by NotTwice a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / /  0 / 0 1 / 1 Simulation S = { (3,b), (2,b), (1,b), (3,a) }

NotTwice is not simulated by ThirdZero a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / /  0 / 0 1 / 1

NotTwice is not simulated by ThirdZero a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / /  0 / 0 1 / 1 X 0 / 

Special cases of nondeterministic state machines 1.Deterministic 2.Output-deterministic (“almost deterministic”) For these machines, simulations can be found easily (provided they exist).

A state machine is output-deterministic iff 1.there is only one initial state, and 2.for every state and every input-output pair, there is only one successor state. For example, LCwD and NotTwice are output-deterministic; ThirdZero is deterministic. Deterministic implies output-deterministic, but not vice versa.

Deterministic: for every input signal x, there is exactly one run of the state machine. Output-deterministic: for every behavior (x,y), there is exactly one run.

If M2 is an output-deterministic state machine, then a simulation S of M1 by M2 can be found as follows: 1. If p  possibleInitialStates [M1] and possibleInitialStates [M2] = { q }, then (p,q)  S. 2. If (p,q)  S and (p’,y)  possibleUpdates [M1] (p,x) and possibleUpdates [M2] (q,x) = { q’ }, then (p’,q’)  S.

If M2 is a deterministic state machine, then M1 is simulated by M2 iff M1 is equivalent to M2.

If M2 is a deterministic state machine, then M1 is simulated by M2 iff M1 is equivalent to M2. “if and only if” M1 refines M2, and M2 refines M1

If M2 is a nondeterministic state machine, then M1 is simulated by M2 implies M1 refines M2, but M2 may not refine M1. ( Recall M1 = ThirdZero and M2 = NotTwice.)

If M2 is a nondeterministic state machine, then M1 is simulated by M2 implies M1 refines M2, but M1 refine M2 even if M1 is not simulated by M2.

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1 is equivalent to Two behaviors: 00000…, 01000… Same two behaviors: 00000…, 01000…

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1 is simulated by Simulation S = { (a, x),

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1 is simulated by Simulation S = { (a, x), (b, y), (c, y),

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1 is simulated by Simulation S = { (a, x), (b, y), (c, y), (d, z), (e, u) }

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1 does not simulate

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1 does not simulate

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1 does not simulate  / 1 X

a u z yx e d c b M1 M2  / 0  / 1  / 0  / 1 does not simulate  / 0 X