Minimization of DFA using Table Filling method (Myhill -Nerode Theorem)
Minimization of DFA (Table Filling Method)
DFA Minimization is the process of reducing the number of states in a DFA without changing the language accepted by the DFA.
In the Table Filling Method, pairs of states are checked to determine whether they are equivalent or distinguishable.
|
State |
Input 0 |
Input 1 |
|
A |
B |
F |
|
B |
G |
C |
|
C |
A |
C |
|
E |
H |
F |
|
F |
C |
G |
|
G |
G |
E |
|
H |
G |
C |
Final State = {C}
Non-Final States = {A, B, E, F,
G, H}
Step 1: Construct the State
Pair Table
Final State + Non-Final State → Mark(X)
Since C is the only final state, the following pairs are immediately marked:
The remaining pairs are initially left unmarked.
|
B |
Unmarked |
|
||||
|
C |
X |
X |
|
|||
|
E |
Unmarked | Unmarked |
X |
|
||
|
F |
Unmarked |
Unmarked |
X |
Unmarked |
|
|
|
G |
Unmarked |
Unmarked |
X |
Unmarked |
Unmarked |
|
|
H |
Unmarked |
Unmarked |
X |
Unmarked |
Unmarked |
Unmarked |
|
State |
A |
B |
C |
E |
F |
G |
- Compare the next state of A and B for input 0.
- Compare the next state of A and B for input 1.
- If either resulting pair is already marked X, mark the current pair X.
Pair
0
1
Result
(A,B)
(B,G)
(F,C)
X
(A,E)
(B,H)
(F,F)
Blank
(A,F)
(B,C)
(F,G)
X
(A,G)
(B,G)
(F,E)
Blank
(A,H)
(B,G)
(F,C)
X
(B,E)
(G,H)
(C,F)
X
(B,F)
(G,C)
(C,G)
X
(B,G)
(G,G)
(C,E)
X
(B,H)
(G,G)
(C,C)
Blank
(E,F)
(H,C)
(F,G)
X
(E,G)
(H,G)
(F,E)
X
(E,H)
(H,G)
(F,C)
X
(F,G)
(C,G)
(G,E)
X
(F,H)
(C,G)
(G,C)
X
(G,H)
(G,G)
(E,C)
X
Pair
0
1
Result
(A,B)
(B,G)
(F,C)
X
(A,E)
(B,H)
(F,F)
Blank
(A,F)
(B,C)
(F,G)
X
(A,G)
(B,G)
(F,E)
Blank
(A,H)
(B,G)
(F,C)
X
(B,E)
(G,H)
(C,F)
X
(B,F)
(G,C)
(C,G)
X
(B,G)
(G,G)
(C,E)
X
(B,H)
(G,G)
(C,C)
Blank
(E,F)
(H,C)
(F,G)
X
(E,G)
(H,G)
(F,E)
X
(E,H)
(H,G)
(F,C)
X
(F,G)
(C,G)
(G,E)
X
(F,H)
(C,G)
(G,C)
X
(G,H)
(G,G)
(E,C)
X
(A,E), (A,G), (B,H)
All other pairs have been marked X.
B | X | |||||
C | X | X | ||||
E | Unmarked | X | X | |||
F | X | X | X | X | ||
G | Unmarked | X | X | X | X | |
H | X | Unmarked | X | X | X | X |
State | A | B | C | E | F | G |
|
Pair |
0 |
1 |
Result |
|
(A,E) |
(B,H) |
(F,F) |
Blank |
|
(A,G) |
(B,G) |
(F,E) |
X |
|
(B,H) |
(G,G) |
(C,C) |
Blank |
(A,E), (B,H)
B | X | |||||
C | X | X | ||||
E | Unmarked | X | X | |||
F | X | X | X | X | ||
G | X | X | X | X | X | |
H | X | Unmarked | X | X | X | X |
State | A | B | C | E | F | G |
|
Pair |
0 |
1 |
Result |
|
(A,E) |
(B,H) |
(F,F) |
Blank |
|
(B,H) |
(G,G) |
(C,C) |
Blank |
Therefore, the unmarked pairs are equivalent states.
Equivalent States
A ≡ E
A and E → [AE]
B and H → [BH]
The other states remain separate:
C, F, G
Transition Table of Minimized
DFA
State
0
1
[AE]
[BH]
F
[BH]
G
C
C
[AE]
C
F
C
G
G
G
[AE]
State
0
1
[AE]
[BH]
F
[BH]
G
C
C
[AE]
C
F
C
G
G
G
[AE]
Comments
Post a Comment