Design an NFA which accepts all the strings over {0,1} which ends with '01'. Construct the equivalent DFA of this NFA.
Solution:
Here,
L={set of all strings over {0,1} that ends with '01'}
So, the NFA will be:
Here, A is the initial state and C is the final state.
The transition table of the NFA will be as follows:
|
0 |
1 |
A |
A,B |
A |
B |
φ |
C |
C |
φ |
φ |
Now, the transition table of DFA can be made from the transition table of NFA as folllows:
|
0 |
1 |
A |
AB |
A |
AB |
AB |
AC |
AC |
AB |
A |
The equivalent DFA will be:
0 Comments