Conversion of Nfa Into Dfa: Transition Table
Conversion of Nfa Into Dfa: Transition Table
Since A is the start state and state C is the only accepting state then, the transition table is,
Input symbol
State
a b
A B C
B B C
C B C
a a b
Start A a b
B C
a 3
2 ε
start 0 ε 1 ε 6 ε 7 a 8 b 9 b 10
ε ε
4 b 5
Since A is the start state and state E is the only accepting state then, the transition table is,
Input symbol
State
a b
A B C
B B D
C B C
D B E
E B C
C
b
b a
a
start A a B c D b E
a
a
MINIMIZATION OF STATES
Problem 1: Construct a minimum state DFA for a regular expression (a/b)* abb
Solution:-
1. The NFA of (a/b)*abb is
a 3
2 ε
start 0 ε 1 ε 6 ε 7 a 8 b 9 b 10
ε ε
4 b 5
2. Construct a DFA:
Since A is the start state and state E is the only accepting state then, the transition table is,
Input symbol
State
a b
A B C
B B D
C B C
D B E
E B C
Let Π = ABCDE
The initial partition Π consists of two groups.
Π1 = ABCD ( that is the non – accepting states)
Π2 = E ( that is the accepting state)
AB
a a
A B B B
b b
A C B D
AC
a a
A B C B
b b
A C C C
b b
A C D E
On input “a” each of these states has a transition to B, so they could all remain in one group as
far as input a is concerned.
On input “b” A,B,C go to members of the group Π1 (ABCD) while D goes to Π2 (E) . Thus Π1
group is split into two new groups.
Π1 = ABC Π2 = D , Π3 = E
So, (ABC) (D) (E)
AB
a a
A B B B
b b
A C B D
Here B goes to Π2. Thus Π1 group is again split into two new groups. The new groups are,
Π1 = AC Π2 = B , Π3 = D, Π4 = E
So, (AC) (B) (D) (E)
Here we cannot split any of the groups consisting of the single state. The only possibility is try to
split only (AC)
For AC
a a
A B C B
b b
A C C C
But A and C go the same state B on input a, and they go to the same state C on input b.
Hence after this,
(AC) (B) (D) (E)
Here we choose A as the representative for the group AC.
Thus A is the start state and state E is the only accepting state.
b
b
a
start A a B b D b E
a
a
______________________________________________________________________________