EECS 20 Lecture 14 (February 16, 2001) Tom Henzinger Nondeterminism.

Slides:



Advertisements
Similar presentations
Simulation Examples in EXCEL Montana Going Green 2010.
Advertisements

Digital Techniques Fall 2007 André Deutz, Leiden University
NP-Completeness.
Decomposing Refinement Proofs using Assume-Guarantee Reasoning Tom Henzinger (UC Berkeley) Shaz Qadeer (Compaq Research) Sriram Rajamani (Microsoft Research)
Chapter 6: What Do You Expect? Helpful Links:
Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin With.
Distributed Computing 8. Impossibility of consensus Shmuel Zaks ©
Behavioral Equivalence Hossein Hojjat Formal Lab University of Tehran.
1 Simulator-Model Checker for Reactive Real-Time Abstract State Machines Anatol Slissenko University Paris 12 Pavel Vasilyev University Paris 12 University.
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 11 (February 9, 2001) Tom Henzinger Feedback.
EECS 20 Lecture 38 (April 27, 2001) Tom Henzinger Review.
Introduction to Computability Theory
EECS 20 Lecture 15 (February 21, 2001) Tom Henzinger Simulation.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
EECS 20 Lecture 13 (February 14, 2001) Tom Henzinger Minimization.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
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.
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
EECS 20 Lecture 9 (February 5, 2001) Tom Henzinger Transition Diagrams.
EECS 20 Lecture 6 (January 29, 2001) Tom Henzinger Transducive Systems.
Give qualifications of instructors: DAP
Aho-Corasick String Matching An Efficient String Matching.
Technische Universität München Institut für Informatik D München, Germany Realizability of System Interface Specifications Manfred Broy.
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
11/10/2004EE 42 fall 2004 lecture 301 Lecture #30 Finite State Machines Last lecture: –CMOS fabrication –Clocked and latched circuits This lecture: –Finite.
EECS 20 Lecture 7 (January 31, 2001) Tom Henzinger Reactive Systems.
CS 711 Fall 2002 Programming Languages Seminar Andrew Myers 2. Noninterference 4 Sept 2002.
Week 4 1.More examples 2.Nondeterminism, equivalence, simulation (Ch 3) 3.Composition (Ch 4)
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)
EECS 20 Lecture 4 (January 24, 2001) Tom Henzinger Block Diagrams.
Behavioral Equivalence Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 7 Modifications and updates.
EECS 20 Lecture 36 (April 23, 2001) Tom Henzinger Safety Control.
EECS 20 Lecture 10 (February 7, 2001) Tom Henzinger Product Machines.
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.
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 13 June 22, 2005
Sequential Networks Two major classes of Sequential Circuits 1.Fundamental Mode – A sequential circuit where: Only one input is allowed to change at any.
Section 11.4 Language Classes Based On Randomization
Rosen 5th ed., ch. 11 Ref: Wikipedia
Randomized Turing Machines
Approximate Frequency Counts over Data Streams Gurmeet Singh Manku, Rajeev Motwani Standford University VLDB2002.
Chapter 11 Counting Methods © 2008 Pearson Addison-Wesley. All rights reserved.
Introduction to State Machine
DLD Lecture 26 Finite State Machine Design Procedure.
Functions. What is a Function Relation- a set of ordered pairs (0,3) ( 2,4) ( 4, 5) ( 0,2) ( 0, 3) ( 0, 5)
CS 151  What does the full truth table look like? InputsOutputs D3D3 D2D2 D1D1 D0D0 A1A1 A0A0 V 0000XX
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
CSE 311 Foundations of Computing I Lecture 24 Finite State Machines Autumn 2012 CSE 3111.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
Computer simulation Sep. 9, QUIZ 2 Determine whether the following experiments have discrete or continuous out comes A fair die is tossed and the.
VIS Technology Transfer Course Session 7 Fairness Constraints and Monitors Serdar Tasiran.
Royal Institute of Technology System Specification Fundamentals Axel Jantsch, Royal Institute of Technology Stockholm, Sweden.
CSci 162 Lecture 7 Martin van Bommel. Random Numbers Until now, all programs have behaved deterministically - completely predictable and repeatable based.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
High Performance Embedded Computing © 2007 Elsevier Lecture 4: Models of Computation Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte.
Introduction to distributed systems description relation to practice variables and communication primitives instructions states, actions and programs synchrony.
THE HALTING PROBLEM - PROOF. Review  What makes a problem decidable?  3 properties of an efficient algorithm?  What is the meaning of “complete”, “mechanistic”,
SECTION 10-4 Using Pascal’s Triangle Slide
Non Deterministic Automata
Pushdown Automata.
Motivation EECS 20 Lecture 1 (January 17, 2001) Tom Henzinger.
CSE322 Definition and description of finite Automata
State Machines EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger.
Presentation transcript:

EECS 20 Lecture 14 (February 16, 2001) Tom Henzinger Nondeterminism

0 / 0 0 / 1 1 / 1

Nondeterminism -modeling randomness -modeling abstraction -modeling uncertainty -modeling properties

Modeling Randomness: Coin Tossing Coin Nats 0  { heads, tails }

Modeling Randomness: Coin Tossing  / heads  / tails Coin Nats 0  { heads, tails }

One possible behavior Time Input      Output heads heads tails heads tails Another possible behavior Time Input      Output tails heads tails heads heads

Modeling Abstraction: Channel Latency Channel Nats 0  Bins  0 1   0  1 1   …   0  1 0   1  1 …

 0 1 0/0/ /0/0 /1/1 1/1/ /0/ /0/0 /1/1 1/1/ /0/ /0/0 /1/1 1/1/ 0/01/1/0/01/1/ 1/1/1/1/ 1/1/1/1/ 0/0/0/0/ 0/0/0/0/ // 1/01/0 0/10/1 1/01/0 0/10/1 // 1/01/0 0/10/1 0/00/01/11/1 State = channel contents

One possible run Time Input 0 1  0   Output    0  1 State 

One possible run Time Input 0 1  0   Output    0  1 State  Corresponding behavior Time Input 0 1  0   Output    0  1

Another possible run on the same input signal Input 0 1  0   Output   0 1  0 State   One possible run Time Input 0 1  0   Output    0  1 State 

 0 1 0/0/ /0/0 /1/1 1/1/ /0/ /0/0 /1/1 1/1/ /0/ /0/0 /1/1 1/1/ 0/01/1/0/01/1/ 1/1/1/1/ 1/1 any/  0/0/0/0/ 0/0 any/  any/  1/01/0 0/10/1 1/01/0 0/10/1 1/01/0 0/10/1 0/00/01/11/1 Buffer of size 2 any = { 0, 1,  } Finite state !

Modeling Uncertainty: Lossy Channel LossyCh Nats 0  Bins  0 1   0  1 1   …   0  1    1  1 …

 0 1 0/0/ /0/0 /1/1 1/1/ /0/ /0/0 /1/1 1/1/ /0/ /0/0 /1/1 1/1/ 0/0 1/1 any/  1/1 any/  0/0 any/  any/  1/01/0 0/10/1 1/01/0 0/10/1 1/01/0 0/10/1 0/00/01/11/1

Another possible run on the same input signal Input 0 1  0   Output     0  State     0   One possible run Time Input 0 1  0   Output    0  0 State  

Modeling Properties: Vending Machine VM Nats 0  Dispense  Nats 0  Select  C   D  C   …   C     C … Select = Dispense = { Coke, Diet }

“No-unrequested-soda” property: Whenever the machine dispenses Coke, then the most recent request was for Coke; whenever the machine dispenses Diet, then the most recent request was for Diet. none Coke Diet C/C/ D/D/ C/C/ C/C/ D/D/ D/D/ /D/D // // // /C/C D/DD/D C/CC/CC/CC/C C/CC/C D/DD/D D/DD/D

Another possible run on the same input signal Input C    D  Output      D State n C C C C D n One possible run Time Input C    D  Output    C  D State n C C C n D n

Deterministic Reactive System: for every input signal, there is exactly one output signal. Nondeterministic Reactive System: for every input signal, there is one or more output signals.

Deterministic Reactive System : function DetSys : [ Time  Inputs ]  [ Time  Outputs ] Nondeterministic Reactive System : relation NondetSys  [ Time  Inputs ]  [ Time  Outputs ] such that  x  [ Time  Inputs ],  y  [ Time  Outputs ], (x,y)  NondetSys

Every pair (x,y)  NondetSys is called a behavior of the nondeterministic reactive system NondetSys.

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.

S1 refines S2 Buffer of size 2 Arbitrary channel Vending machine No-unrequested-soda property Fair coin Nondeterministic coin No output signal heads, heads, heads, heads, … or tails, tails, tails, tails, …

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].

Deterministic causal discrete-time reactive systems can be implemented by (deterministic) state machines. Nondeterministic causal discrete-time reactive systems can be implemented by nondeterministic state machines.

Deterministic State Machine Inputs Outputs States initialState  States update : States  Inputs  States  Outputs

Nondeterministic State Machine Inputs Outputs States possibleInitialStates  States possibleUpdates : States  Inputs  P( States  Outputs ) \ Ø receptiveness (i.e., machine cannot prohibit an input)

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

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 …

Channel that never drops two in a row State between time t-1 and time t : a the input at time t-1 was dropped b the input at time t-1 was not dropped, or t = 0 a b 0 / 0 1 / 1 0 / 0 1 /  0 /  1 / 1

Channel that never drops two in a row Inputs = { 0, 1 } Outputs = { 0, 1,  } States = { a, b } possibleInitialStates = { b } possibleUpdates ( a, 0 ) = { ( b, 0 ) } possibleUpdates ( a, 1 ) = { ( b, 1 ) } possibleUpdates ( b, 0 ) = { ( b, 0 ), ( a,  ) } possibleUpdates ( b, 1 ) = { ( b, 1 ), ( a,  ) }

Deterministic state machine: for every input stream, there is exactly one run. Nondeterministic state machine: for every input stream, there is one or more runs. Every run generates an output stream, and therefore every run gives rise to a behavior.