Lecture 13 State Minimization of Sequential Machines
Lecture 13 State Minimization of Sequential Machines
Lecture 13
State Minimization
of Sequential Machines
State Minimization
State machines may contain redundant states, i.e. states whose
function can be accomplished by other states.
5
Theorems
6
Machine Equivalence
Two machines, M1 and M2, are said to be equivalent if and only if, for every
state in M1, there is a corresponding state in M2, and vice versa
• The machine that contains no equivalence states and is equivalent to M is
called the minimal, or reduced, form of M
7
Machine Equivalence (Contd.)
Example: Machine M2 Machine M2
8
Determine the minimal state table equivalent to the
following:
Determine the minimal state table equivalent to the following
one.
P0 = (ABCDEFGH)
P1 = (ACGH)(BDE)(F)
P2=(AH)(CG)(BDE)(F)
P3 = (AH)(CG)(BDE)(F)
(AH)A, (BDE)B, (CG)C, (F) F
Find the shortest input sequence that takes the
machine from state A to state G. State table is given
below.
Incompletely Specified Machines
Next states and/or outputs are not specified for all states
Applicable input sequences: an input sequence is applicable to state,
Si, of an incompletely specified circuit if and only if when the circuit is in
state Si and the input sequence is applied, all next states are specified
except for possible the last input of the sequence.
Compatible states: two states Si and Sj are compatible if and only if for
each input sequence applicable to both states the same output
sequence will be produced when the outputs are specified.
Compatible states: two states Si and Sj are compatible if and only if the
following conditions are satisfied for any possible input Ip
The outputs produced by Si and Sj are the same, when both are specified
The next states Sk and Sl are compatible, when both are specified.
Incompatible states: two states are said to be incompatible if they are
not compatible.
Nonuniqueness of Reduced Machines
Example: Machine M4
• Both reduced machines cover M4: thus reduced machines are nonunique
• States A and B of M4 are compatible, C and D are also compatible, so are
A and E. However, B and E are 1-distinguishable, hence incompatible: 24
thus compatibility relation is not an equivalence relation
Implication Table Method
The implication table method of determining state
equivalence can be summarized as follows:
25
Implication Table Method
26
Merger Table
Merger table: more convenient alternative to the merger graph
B EF
AC,
C BC
EF
D EF
CD,
E
CF
AB, BC, BC,
F DE BD
DF DE CD
A B C D E
27
Finding the Set of Maximal Compatibles
28
Maximal Compatibles (Contd.)
Example: B EF
AC,
C BC
EF
Column E: (EF)
D EF Column D: (EF), (DE)
CD, Column C: (CEF), (CDE)
E
CF
Column B: (CEF), (CDE), (BC)
AB, BC, BC,
F DE
DF DE
BD
CD Column A: (CEF), (CDE), (ABC), (AF)
A B C D E
29
Implication Table Method / Merger Table
method
a ≡ b iff
d ≡ f and c≡h
a ≡ d iff
a ≡ d and c≡e
30
Implication Chart
31
Implication Chart
32
Implication Chart
33
Determination of Equivalent States
d is replaced with a
e is replaced with c
d and e are removed
34
Minimize the machine using implication
table method.
N.S.
PS X=0 X=1 OUTPUT
A E E 1
B C E 1
C I H 0
D H A 1
E I F 0
F E G 0
G H B 1
H C D 0
I F B 1
N.S.
PS X=0 X=1
A F,0 B,0
B F,0 G,0
C C,0 G,0
D A,1 B,0
E E,0 D,0
F A,0 B,0
G F,1 B,0
CSM ICSM
Reduced machine is Reduced machine is
unique. not unique.
Classes of partition Subsets of
have no common compatibles may be
state. overlapping.
D
Nine compatible pairs: (AB), (AC), (AD), (BC), (BD), (BE), (CD), (CF), (EF)
Set of maximal compatibles: {(ABCD), (BE), (CF), (EF)} – complete polygons 39
Closed Sets of Compatibles
A set of compatibles for machine M is said to be closed if: for every
compatible contained in the set, all its implied compatibles are also
contained in the set
• A closed set of compatibles, which contains all states of M, is called a
closed covering
Example: {(ABCD), (EF)} has the minimal number of compatibles covering
all states of M6
• It defines a lower bound on the number of states in the minimal machine
that covers M6
• However, if we select maximal compatible (ABCD) to be a state in the
reduced machine: then its I2- and I3-successors, (CF) and (BE), must also
be selected – since these are not in the above set, set {(ABCD), (EF)}
cannot be used to define the states of a minimal machine for M6
A
F (CE) B
(AB) (EF)
(CD) (CF)
E (BE) C
40
D
Closed Covering
A
Example (contd.): Closed covers:
• {(AD), (BE), (CF)} F (CE) B
• {(AB), (CD), (EF)} (AB) (EF)
(CD) (CF)
E (BE) C
Closed covering is not unique
• Aim is to find a closed covering that with a minimum
D number of compatibles
• Set of all maximal compatibles: clearly a closed covering
– This defines an upper bound on the number of states in the machine
that covers the original one:
» The upper bound is meaningless when the number of maximal
compatibles is larger than the number of states in the original
machine
• For the example: the lower bound is 2 and upper bound 4
– Thus, a closed covering with three compatibles defines a minimal
machine
41
Compatibility Graph
Compatibility graph: a directed graph whose vertices correspond to all
compatible pairs, and an arc leads from (SiSj) to (SpSq) if and only if (SiSj)
implies (SpSq)
Example: Machine M7 Merger graph Compatibility graph
A (AC)
(CE)
E (BC) B
(AD) (BE)
(AE)
(BC)
(BE) (AD)
(BC) (BC)
D (AB)
(DE) (CD)
C (DE)
A subgraph of the compatibility graph is closed: if, for every vertex in the
subgraph, all outgoing arcs and their terminating vertices also belong to it
• If every state of the machine is covered by at least one vertex of the
subgraph: then the subgraph forms a closed covering
– {(BC), (AD), (BE)}; {(AC), (BC), (AD), (BE)}; {(DE), (BC), (AD), (BE)}
Minimal machine
42
Maximal Compatibles (Contd.)
(BC)
(CF)
(AB)
(AF)
(EF)
(DE) (CD)
43