Minimization of automata - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Minimization of automata

Description:

Two internal states Si, Sj are Compatible, if for each input v they have ... All non-crossed cells correspond to compatible pairs: ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 33
Provided by: God76
Category:

less

Transcript and Presenter's Notes

Title: Minimization of automata


1
Minimization of automata
Minimization of number of states
Automata are equivalent Often initial
specification is not minimal
We reduce the number of flip-flops
2
Minimization of FSM
Compatibility relation on set of states
S (pairs of compatible states)
Maximal compatibles (Maximal sets of compatible
pairs)
  • Selection of sets satisfying the following
  • Cover condition
  • Closure condition

3
Basic Concepts
Two internal states Si, Sj are Compatible, if for
each input v they have consistent output states,
and their successors are the same or compatible.
Two internal states Si, Sj are conditionally
compatible, if their output states are consistent
and for some v ? V pairs of successors of Si, Sj
(denote Sk, Sl) (Si, Sj) ? (Sk, Sl)
States Si, Sj are incompatible, if for some v ? V
the states of their outputs are inconsistent.
4
Compatibility relation
Because of conditional compatibility we use
triangular table in all calculations
Triangular table has as many cells as there are
possible pairs of states.
5
Triangular table
We fill the cells of triangular table as follows
6
Triangular table example
v
36
46
v
v
v
24
1,2 3,5
v
34
7
Triangular table - example
After filling the table we check if the pairs of
incompatible states (denoted by ?) do exist as
pairs of successor states.
If there are such pairs, they should be
crossed out (i.e. denote by ?). This process
should be repeated until all crosses are checked
out.
All non-crossed cells correspond to compatible
pairs
(1,2) (1,3) (1,5) (2,3) (2,4) (2,5) (3,5)
(3,6) (4,6).
8
Calculating MCC
After calculating the set of pairs of compatible
states, we Calculate the following
Maximal sets of compatible states.
Maximal classes of compatibility (MCC)
...we know how to do it!
9
...we return to the example
Compatible pairs (1,2) (1,3) (1,5) (2,3)
(2,4) (2,5) (3,5) (3,6) (4,6)
MCC 1,2,3,5
v v v v v v
1,2 1,3 1,5 2,3 2,4 2,5 3,5 3,6 4,6
1,2,3
1,2,5 1,3,5 2,3,5
2,4 3,6 4,6
MCC 1,2,3,5, 2,4, 3,6, 4,6
10
Minimization Algorithm
1) Find all pairs of compatible states,
2) Calculate maximal sets of compatible states
(MCC),
3) Select sets that satisfy the so-called
Covering condition (a) and closure condition (b)
a) Each state must be in at least one class
b) For each input symbol all succesors (next
states) of each class must be included into one
class.
11
Covering Condition - example
MCC 1,2,3,5, 3,6, 2,4, 4,6
To satisfy covering condition we should select
1,2,3,5, 4,6
12
Closure condition - example
For selected classes 1,2,3,5,4,6 we
calculate their successors
4,6
3,6
2,4
2
3,6!
2,4!
3
6
1,2
3,5
Closure condition is not satisfied!
13
Condition of covering and closure second try
MCC 1,2,3,5, 3,6, 2,4, 4,6
Selection
1,2, 3,5, 4,6
14
One more example
46
56
45
v
v
v
37
v
v
37
68
v
v
48
58
v
v
v
15
One more example continued
1,3 1,7 2,5 2,8 3,4 3,5 3,6 4,5 4,6 4,7 5,7 5,8 6,
7 6,8
Compatibles
MCC
2,5,8
3,4,5
3,4,6 4,5,7 4,6,7 1,3 1,7 6,8
16
One more example continued
2,5,8 3,4,5 3,4,6 4,5,7 4,6,7 1,3 1,7 6,8
MCC
Table of successors
3
7
7
2
3
7
2
33
45
1
45
58
58
64
68

17
One more example continued
A
B
C
18
How to improve calculating MCCs?
In order to improve calculating of MCCs we will
introduce two new methods
  • Method based on compatible pairs
  • b) Method based on incompatible pairs


19
Algorithm based on compatible pairs
E compatibility relation (ei,ej) ? E
Rj ei i lt j and (ei,ej) ? E
If CCFk is a family of compatible classes
obtained at the k-th iteration of the algorithm,
then CCFk1 is described by the intersection of
each CC ? CCFk with the set Rk1. There can be
encountered three possible cases
a) Rk1 ?, then CCFk1 is increased by a class
CC k1
b) CC ? Rk1 ?, then the class CC remains
unchanged
c) CC ? Rk1 ? ?, then a new class CC is
created, CC CC ? Rk1? k1
20
Example
Rj ei i lt j oraz (ei,ej) ? E
E
1,2 1,3 1,5 2,3 2,4 2,5 3,5 3,6 4,6
?
R1
R2
1
1,2
R3
R4
2
R5
1,2,3
R6
3,4
21
Example
1
1,2
1,2,3
1,2,3
2,4,
Family of MCCs
1,2,3,5,
2,4
2,5,
3,6,
4,6,
1,2,3,5,
2,4
22
Algorithm based on incompatible pairs
Write pairs as the product of two-element sums
Transform the product of two-element sums to the
form of sum of logical products
Then the maximal compatibles are obtained by
subtracting from the whole set those sets of
elements (states) that are written in separate
products.
23
The same example
Compatible pairs
Incompatible pairs
E
1,2 1,3 1,5 2,3 2,4 2,5 3,5 3,6 4,6
1,4 1,6 2,6 3,4 4,5 5,6
24
Example...
Incompatible pairs (k1, k4), (k1, k6), (k2,
k6), (k3, k4), (k4, k5), (k5, k6)
Boolean expression as product of 2-element
sums (k1 k4) (k1 k6 ) (k2 k6) (k3 k4)
(k4 k5) (k5 k6)
After rearranging (k4 k1) (k4 k3 ) (k4
k5) (k6 k1) (k6 k2) (k6 k5)
we transform this expression to the sum of
products form
k1k3k5)
(k4
(k6
k1k2k5)
k4k6 k1k2k4k5 k1k3k5k6 k1k2k3k5
25
Example...
The maximal compatible classes are obtained by
subtracting from the whole set those sets of
elements (states) that are written in separate
products.
k1,..., k6
k4k6 k1k2k4k5 k1k3k5k6 k1k2k3k5
k1,..., k6 ? k4, k6 k1, k2, k3, k5
k1,...,k6 ? k1, k2 , k4 , k5 k3,
k6 k1,...,k6 ? k1, k3, k5 , k6 k2 ,
k4 k1,...,k6 ? k1, k2, k3, k5 k4, k6
26
Synthesis of sequential circuits
  • Synthesis steps
  • ? From a word description of the problem, form a
    state table
  • ? Simplify the state table (minimization of
    states)
  • ? Assign the codes to the states (input and
    output symbols)
  • ? Derive the excitation and output functions

minimization
state assignment
27
Sequence detector
Design a Mealy machine with one input and one
output (binary). The machine should analyze the
successive triplets of input symbols.
The input symbol that arises in the third pulse
should be 1, when triplet has the form 001, and
0, when triplet is of a differnt form. The
signal that occurs during the first and second
pulse may be unspecified.
0/0
0/-
1/1
1/-
0/0
0/-
1/0
0/0
01100100110101001
0/-
1/0
1/-
- - 0
- - 1
- - 1
- - 0
- - 0
0/0
1/-
1/0
28
Sequence detector
1/-
0/-
29
Minimization of sequence detector
Many compatibles
We use incompatible pairs to find MCC, since
there is few of them, only two.
30
Minimization of sequence detector
Incompatible pairs we write as a Boolean
expression being a product of logic sums
In sequence detector the incompatibles are (2,
3) (4, 5).
Based on this we write the expression (2 ? 3) (4
? 5), which after multiplication obtains the
form (2 ? 3) (4 ? 5) 2 4 ? 2 5 ? 3 4 ? 3 5
Subtracting from set S 1, 2, 3, 4, 5 of all
states those sets of states that are written in
separate products we obtain the family of all MCC
1, 2, 3, 4, 5 2, 4 1, 3, 5 1, 2, 3, 4,
5 2, 5 1, 3, 4 1, 2, 3, 4, 5 3,
4 1, 2, 5 1, 2, 3, 4, 5 3, 5 1, 2,
4
31
Minimization of sequence detector
MCC 1, 3, 5, 1, 3, 4, 1, 2, 5, 1, 2, 4
Classes 1, 3, 5, 1, 2, 4 satisfy covering
condition,
Transition function for all MCC
But do not satisfy the closure condition the
next states 1,2,5 !
We add the class 1,2,5
Classes 1,3,5, 1, 2, 4, 1, 2, 5 satisfy
closure and covering conditions
Minimal automaton
32
...this is next realized
DGL6 Slides No. 17 to 23!
Whole synthesis process !
Formulation of sequence detector problem
Write a Comment
User Comments (0)
About PowerShow.com