State Machines EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger.

Slides:



Advertisements
Similar presentations
10/2/0810/2/2008ECE 561 -ECE Lecture 51 State Machine Implementation 10/2/20081ECE Lecture 5.
Advertisements

Counters. In class excercise How to implement a “counter”, which will count as 0,3,1,4,5,7,0,3,1,…… Q2Q1Q0D2D1D
January 5, 2015CS21 Lecture 11 CS21 Decidability and Tractability Lecture 1 January 5, 2015.
EECS 20 Chapter 3 Sections Defining Signals and Systems Last time we Found ways to define functions and systems Defined many example systems Today.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
EECS 20 Lecture 14 (February 16, 2001) Tom Henzinger Nondeterminism.
EECS 20 Lecture 11 (February 9, 2001) Tom Henzinger Feedback.
Week 1 Chapter 1 + Appendix A Signals carry information Signals are represented by functions Systems transform signals Systems are represented by functions,
EECS 20 Lecture 38 (April 27, 2001) Tom Henzinger Review.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
EECS 20 Lecture 15 (February 21, 2001) Tom Henzinger Simulation.
EECS 20 Lecture 13 (February 14, 2001) Tom Henzinger Minimization.
CS 140 Lecture 9 Professor CK Cheng 4/30/02. Part II. Sequential Network 1.Memory 2.Specification 3.Implementation S XY s i t+1 = g i (S t, x t )
Week 2/3 1.System interconnections (block diagrams) 2.Finite State Machines (Chapter 3)
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.
EECS 20 Lecture 9 (February 5, 2001) Tom Henzinger Transition Diagrams.
EECS 20 Lecture 3 (January 22, 2001) Tom Henzinger Sets, Tuples, Functions.
EECS 20 Lecture 6 (January 29, 2001) Tom Henzinger Transducive Systems.
EECS 20 Lecture 7 (January 31, 2001) Tom Henzinger Reactive Systems.
EECS 20 Lecture 2 (January 19, 2001) Tom Henzinger Mathematical Language.
Week 1 1.websitewebsite 2.takehome examtakehome 3.Chapter Appendix A.
 x (x 2  0) 1. True2. False.  x (3x + 2 = 12) 1. True2. False.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
EECS 20 Lecture 4 (January 24, 2001) Tom Henzinger Block Diagrams.
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.
04/25/13 Halting Problem Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
COM S 207 While-Loop Statement Instructor: Ying Cai Department of Computer Science Iowa State University
Real Numbers Week 1 Topic 1. Real Numbers  Irrational Numbers  Numbers that cannot be written as a fraction  √2, π  Rational Numbers  Numbers that.
Functions Definition & purpose Notation Functions on binary / returning binary values Finite automaton model We haven’t completely left the world of counting.
Lecture 18 More Moore/Mealy machines.
Counters. In class excercise How to implement a “counter”, which will count as 0,3,1,4,5,7,0,3,1,…… Q2Q1Q0D2D1D
Relations, Functions, and Countability
INFIINITE SETS CSC 172 SPRING 2002 LECTURE 23. Cardinality and Counting The cardinality of a set is the number of elements in the set Two sets are equipotent.
Lecture 7: Making Decisions Professor: Dr. Miguel Alonso Jr. Fall 2008 CGS2423/COP1220.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
1 RELATIONS Learning outcomes Students are able to: a. determine the properties of relations – reflexive, symmetric, transitive, and antisymmetric b. determine.
CSE 311: Foundations of Computing Fall 2014 Lecture 27: Cardinality.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
Set Builder Notation. If you recall, a set is a collection of objects which we write using brackets and name using a capital letter. Remember also that:
CSE 105 theory of computation
Discrete Mathematics CS 2610
Finite State Machine, Memory Systems
CEN352 Dr. Nassim Ammour King Saud University
Sequential logic design principles
Introduction to Advanced Digital Design (14 Marks)
Discrete Mathematics and its Applications
10.3 Finite State Machines.
Counting Sets.
Jeremy R. Johnson Mon. Apr. 3, 2000
Discrete Mathematics and its Applications
§11.2 – Finite State Machines with Output
Lecture 4: Discrete-Time Systems
Discrete Mathematics and its Applications
Finite State Machines.
Guest Lecture by David Johnston
Discrete Mathematics CS 2610
Counters.
Discrete Mathematics and its Applications
CSE 140 Lecture 9 Sequential Networks
Chapter 2 Sets Active Learning Lecture Slides
State Machines and Infinity
Mathematical Language
Discrete Mathematics and its Applications
Presentation transcript:

State Machines EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger

Finite-Memory Systems Discrete-Time Delay: remember last input value Discrete-Time Moving Average: remember last 2 input values Parity: remember if number of past inputs “true” is even Infinite-Memory Systems Count: remember if number of past inputs “true” is greater than number of past inputs “false”

t, t, t, f, f, t, t, … Parity t, f, t, f, f, f, t, …

{ The Parity System Parity : [ Nats0  Bools ]  [ Nats0  Bools ] such that  x  [ Nats0  Bools ] ,  y  Nats0 , ( Parity (x) ) (y) = true if | trueValues (x,y) | is even false if | trueValues (x,y) | is odd { where trueValues (x,y) = { z  Nats0 | z < y  x (z) = true }

t, t, f, f, f, t, t, … Count t, t, t, t, t, f, t, …

{ The Count System Count : [ Nats0  Bools ]  [ Nats0  Bools ] such that  x  [ Nats0  Bools ] ,  y  Nats0 , ( Count (x) ) (y) = true if | trueValues (x,y) |  | falseValues (x,y) | false if | trueValues (x,y) | < | falseValues (x,y) | { where falseValues (x,y) = { z  Nats0 | z < y  x (z) = false }

An Implementation of the Parity System Bools  Dt Bools

An Implementation of the Parity System t, f, t, …  Dt t

An Implementation of the Parity System t, f, t, …  Dt t, f

An Implementation of the Parity System t, f, t, …  Dt t, f, f

An Implementation of the Parity System t, f, t, …  Dt t, f, f, t

An Implementation of the Parity System t, f, t, …  Dt t, f, f, t Memory = “state” of the system

Systems with finite memory are naturally implemented as finite state machines ( or finite transition systems ) .

An Implementation of the Count System Ints Ints Bools pos ± D0 Bools

{ { ± : Bools  Ints  Ints such that  x  Bools,  y  Ints, ± (x,y) = y+1 if x = true y-1 if x = false { pos : Ints  Bools such that  x  Ints, pos (x) = true if x  0 false if x < 0 {

An Implementation of the Count System 3 t, t, t, … pos ± D0 t, t, t, t

An Implementation of the Count System 3 t, t, t, … pos ± D0 t, t, t, t infinite state

Systems with countable ( integer ) memory are naturally implemented as infinite state machines ( or infinite transition systems ) .

( Systems with uncountable ( real ) memory, such as continuous-time delay, are not naturally viewed naturally as transition systems. )

A Discrete-Time Reactive System F Nats0  Inputs Nats0  Outputs F : [ Nats0  Inputs ]  [ Nats0  Outputs ]

State-Based Implementation F 2 2 Update Nats0  Inputs Nats0  Outputs 1 1 Dc Nats0  States Nats0  States Update: memory-free Memory = States

update : States  Inputs  States  Outputs State Implementation F 2 2 Update Nats0  Inputs Nats0  Outputs 1 1 Dc Nats0  States Nats0  States update : States  Inputs  States  Outputs c  States ( “initial state” )

State Implementation of the Parity System Inputs = Bools Outputs = Bools States = Bools initialState = true update : States  Inputs  States  Outputs such that  q  States,  x  Inputs, update (q,x) 1 = ( q  x ) update (q,x) 2 = q

State Implementation of the Count System Inputs = Bools Outputs = Bools States = Ints initialState = 0 update : States  Inputs  States  Outputs such that  q  States,  x  Inputs, update (q,x) 1 = ± (x,q) update (q,x) 2 = pos (q)

A State Machine Inputs ( set of possible input values ) Outputs ( set of possible output values ) States ( set of states ) initialState  States update : States  Inputs  States  Outputs

A state machine is finite iff States is a finite set. Parity : can be implemented by a two-state machine. Count : cannot be implemented by finite-state machine.

Discrete-Time Reactive Systems Every memory-free system can be implemented by a one-state machine. Every causal system can be implemented by a state machine ( take as state the entire history of inputs ), and every system that can be implemented by a state machine is causal.

The Block Diagram of a State Machine 2 2 Update Nats0  Inputs Nats0  Outputs 1 1 DinitialState Nats0 States Nats0 States

The Transition Table of a Finite-State Machine ( Parity ) Current state Input Next state Output true true false true true false true true false true true false false false false false

The Transition Diagram of a State Machine ( Parity ) true / true true false true / false false / false false / true States = Bools Inputs = Bools Outputs = Bools