You are on page 1of 15

Finite State

Machine
Minimization
Advanced
Methods based on triangular
table and binate covering
Example 1. Minimize the following Mealy Finite State Machine
Input state or
x combination of
A X 1 X 2 X 3 X 4 input signals
3 4 2
1 1 1 1
4
2 0
6 6
3 0 1
6 1 5 Output states or
4 0 0 1 signal
Internal
2
state or 5 1 combinations
combination 3 2 3
of memory 6 0 0 1
signals

Fig 5.17bcd
b)
x Triangular Table
2
A X1 X2 X3 X4
3 4 2
1 1 1 1 3 3, 6 4, 6
4
2 0
4
6 6
3 0 1
6 1 5 5 2, 4
4 0 0 1
2 1, 2
5 1 6 3, 4
3, 5
3 2 3
6 0 0 1 1 2 3 4 5

c) Group {1,2,3,5}
2

Compatibility Graph 1 3
obtained from the 4 Maximum
Triangular Table 66 44 cliques
5
Fig 3.16 Max cliques are:1235,36,24,46
b )
x 2
A X1 X2 X3 X4 Can I take {1,2,3,5} and {4,6}??
3 4 2 3 3 , 6 4 , 6
1 1 1 1
2 4
4
No, because {1,2,3,5} implies states
0
6 6 {3,6} to be in one group.
3 0 1 5 2 , 4
6 1 5
4 0 0 1 1 , 2
6 3 , 4
2 3 , 5
5 1
3 2 3 1 2 3 4 5
6 0 0 1
c)
2
Solution is to split {1,2,3,5} to
I can take all 1 3
{1,2} and {3,5}
max cliques but 66 44

solution will be 5
{1,2} implies nothing, {3,5}
not minimal implies nothing, {4,6} implies {1,2}
and {3,5}

Solution : {1,2}, {3,5}, {4,6}


There are other
solutions But how I know to split this way? Heuristics!
In any case creating Maximum Compatible Groups is useful!

Systematic Method of Creating Maximum Compatible Groups


a)
C o lu m n N o n - c a n c e lle d r o w s G r o u p s o f c o m p a tib le s ta te s

4 {6 } {4 ,6 }

3 {5 ,6 } {3 ,5 } {3 ,6 }

2 {3 ,4 ,5 } {2 ,3 ,5 } {2 ,4 }

1 {2 ,3 ,5 } {1 ,2 ,3 ,5 }

= { {4 ,6 } , {1 ,2 ,3 ,5 } , {3 ,6 } , {2 ,4 } }

This method is systematic and creates For small FSMs


all maximum compatible groups you can find
them by visual
(cliques)
Fig5.17a inspection
Complete and Closed Subgraph

• Complete = all state numbers


have been used at least once
inside it
• Closed = there is no arrow going
out of this graph
Closure graph for compatibility pairs
This method selects subsets of maximum cliques in order to
satisfy the completeness and closure conditions for state
numbers
{1 ,5 } {2 ,4 }
This way we
found other
{1 ,3 } {3 ,6 }
solutions.
Please draw
machines {1 ,2 }
{4 ,6 } {2 ,3 } {2 ,5 }
{3 ,5 }
Combining groups of compatibles from the cover to single state

This is a final stage of state table minimization


It can be done with:
1) ALL groups of compatible states or
2) with the set of complete and closed groups of compatible states
Method to combine State
Minimization and State
Assignment
• The method shown now is a small modification to state
minimization discussed before.

• However, the differences may be large since we combine state


assignment procedure into state minimization loop.

• We make such choices of compatibles that allow to find a better


state assignment.

• Any state assignment method can be used in this loop.


Now let us go back to fast method, remember that it is not optimal
Combining ALL groups of compatibles from the cover to single state
b) x c) x
A X1 X2 X3 X4 A X1 X2 X3 X4
3 4 2 {4 ,6 } {3 ,6 } {2 ,4 } 2
1 1 1 1 A = {1 ,2 ,3 ,5 } 0 1 1 1
4 {3 ,6 } 6 2 3
2 0 B = {3 ,6 } 0 1 0 1
6 6 4 6 1 5
3 0 1 C = {2 ,4 } 0 0 0 1
2 3 6 {1 ,2 } {3 ,5 }
5 1 D = {4 ,6 } 0 0 0 1
6 6 x
3 0 1
This is non- 3 2 3 A X1 X2 X3 X4
deterministic 6 0 0 1 d)
FSM, you can 4 A D 0 B 1 C 1 A ,C 1
make a choice to 2 0
simplify state 6 1 5 B B B ,D A ,C A ,B
assignment 4 0 0 1
0 1
A
0
A
1

6 1 5 C C ,D B ,D
4 0 0 1 A ,B
0 0 0 1

3 2 3 D B ,D A A
6 0 0 1
0 0 0 1
Combining ALL groups of compatibles from the cover to single state

Select states Select B


in whole Select A
from groups to in whole
create large column
column
groups of the
same state Select C
x
x X 1 X 2 X 3 X 4
X1 X2 X3 X4 A D B C A ,C
0 1 1 1
A D
0
B
1
C
1
A ,C
1

B B B ,D A ,C A ,B B B
0
B ,D
1
A ,C
0
A ,B
1
0 1 0 1
A A
C C ,D
0
B ,D
0
A
0
A
1
C C ,D
0
B ,D
0 0 1
A ,B
D
A ,B
0
B ,D
0
A
0
A
1 D 0
B ,D
0
A
0
A
1

As you see, it is a good idea to combine FSM minimization


and state assignment. Many methods are based on this idea.
Creating new table by combining
states from groups of compatible
states

• The same method of combining states can be


applied to any set of compatible and closed
Problem for possible homework: Find an FSM table for
which the following triangular table exists:

2
3
4 1 ,2

3 ,4 3 ,4
5 2 ,6 2 ,6
3 ,4 3 ,4
6 2 ,5 2 ,5

1 2 3 4 5
Fig.5.18
Example 3 of FSM Minimization 1 4/- 6/0
2 3/1 8/0 {1,6} 1 4/0 1/0
b
3 4/0 8/0 {2,7} 2 3/1 8/0
)
2 3 ,4
4 3/0 1/0 {3} 3 4/0 8/0
5 -/- 6/0
{4,5} 4
6 ,8

3 6 ,8
3/0 1/0
6 5/0 1/0
{8} 8
3 ,4
4 1 ,6
1 ,8
2/1 1/1
5 v 6 ,8 6 ,8 1 ,6
7 3/1 -/-
4 ,5
6 4 ,5
1 ,8
3 ,5 1 ,6
8 2/1 1/1
7 3 ,4 v v

8 2 ,3

1 2 3 4 5 6 7

c d
) )
8 1 {5 ,6 } {1 ,6 } {1 ,5 }

7 2 {5 ,7 }
{4 ,5 }
6 3
{2 ,7 } {3 } {8 }
5 4
Fig.5.21.bcd
Homework Problems

• Use a method of combined state


minimization and state assignment to realize
machines from this and previous lectures
and compare the cost of logic circuit
realized as a PLA.
• Write a program for state minimization
reducing the problem to binate covering and
using existing software for binate covering.

You might also like