EECS 20 - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

EECS 20

Description:

The Block Diagram of a State Machine. Nats0 Inputs. Nats0 ... The Transition Table of a Finite-State Machine ( Parity ) Current state Input Next state Output ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 31
Provided by: valued86
Category:

less

Transcript and Presenter's Notes

Title: EECS 20


1

State Machines
EECS 20 Lecture 8 (February 2, 2001) Tom
Henzinger
2
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

3
Parity
t, t, t, f, f, t, t,
t, f, t, f, f, f, t,
4
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 lt y ? x
(z) true
5
Count
t, t, f, f, f, t, t,
t, t, t, t, t, f, t,
6
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) lt falseValues (x,y)

where falseValues (x,y) z ? Nats0 z lt y ?
x (z) false
7
An Implementation of the Parity System
Bools
?
Dt
Bools
8
An Implementation of the Parity System
f
t
t, f, t,
Dt
t
?
9
An Implementation of the Parity System
f
f
t, f, t,
?
t, f
Dt
10
An Implementation of the Parity System
t
f
t, f, t,
?
t, f, f
Dt
11
An Implementation of the Parity System
t
t, f, t,
?
t, f, f, t
Dt
12
An Implementation of the Parity System
t
t, f, t,
?
t, f, f, t
Dt
Memory state of the system
13
Systems with finite memory are naturally
implemented as finite state machines ( or finite
transition systems ) .
14
An Implementation of the Count System
Ints
Ints
Bools
pos

D0
Bools
15
Bools ? Ints ? Ints such that ? x ?
Bools, ? y ? Ints, (x,y)
y1 if x true y-1 if x
false

pos Ints ? Bools such that ? x ? Ints,
pos (x)
true if x ? 0 false if x lt 0

16
An Implementation of the Count System
3
t, t, t,
pos

D0
t, t, t, t
17
An Implementation of the Count System
3
t, t, t,
pos

D0
t, t, t, t
infinite state
18
Systems with countable ( integer ) memory are
naturally implemented as infinite state
machines ( or infinite transition systems ) .
19
( Systems with uncountable ( real ) memory, such
as continuous-time delay, are not naturally
viewed naturally as transition systems. )
20
A Discrete-Time Reactive System
F
Nats0 ? Inputs
Nats0 ? Outputs
F Nats0 ? Inputs ? Nats0 ? Outputs
21
State-Based Implementation
F
2
2
Update
Nats0 ? Inputs
Nats0 ? Outputs
1
1
Dc
Nats0 ? States
Nats0 ? States
Update memory-free Memory States
22
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 )
23
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
24
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)
25
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
26
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.
27
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.
28
The Block Diagram of a State Machine
2
2
Update
Nats0 ? Inputs
Nats0 ? Outputs
1
1
DinitialState
Nats0? States
Nats0? States
29
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
30
The Transition Diagram of a State Machine (
Parity )
true / true
true
false
true / false
false / false
false / true
States Bools Inputs Bools Outputs
Bools
Write a Comment
User Comments (0)
About PowerShow.com