Professional Documents
Culture Documents
Assignment # : 05
Subject : “CS-515-Theory of
Automate”
Q#1.
Problem-01:
Convert the following Non-Deterministic Finite Automata (NFA) to Deterministic Finite
Automata (DFA)-
Solution-
Transition table for the given Non-Deterministic Finite Automata (NFA) is-
Step-01:
Let Q’ be a new set of states of the Deterministic Finite Automata (DFA).
Q={qo , q2 , q3 }
Sub= 23 =8
Let T’ be a new transition table of the DFA.
Step-02:
Add transitions of start state q0 to the transition table T’.
State / Alphabet a b
→q0 q0 {q0, q1}
Step-03:
New state present in state Q’ is {q0, q1}.
Add transitions for set of states {q0, q1} to the transition table T’.
State / Alphabet a b
Step-04:
New state present in state Q’ is {q0, q1, q2}.
Add transitions for set of states {q0, q1, q2} to the transition table T’.
State / Alphabet a b
Step-05:
Since no new states are left to be added in the transition table T’, so we stop.
States containing q2 as its component are treated as final states of the DFA.
Finally, Transition table for Deterministic Finite Automata (DFA) is-
State / Alphabet a b
→q0 q0 {q0, q1}
Note: eps = ∈
Solution:
Step 1:
The start state of equivalent DFA is
-closure(1), which is = {1,2,4}
these are exactly the states reachable from state 1 via -transition.
state1 : -closure(1) = {1,2,4}
Step 2:
-closure(move(state1 ,a))
-closure(3,4) = {3,4,6}
-closure(move(state1 ,b))
-closure(5) ={4,5,6}
-closure(move(State2 ,a))
-closure(4) = {4}
-closure(move(State3,a))
State3 : -closure(5) ={4,5,6} (loop or dead state and final state )
-closure(move(State4 ,a))
Again
Also
-closure(move(State ,b)) (loop state and may be final state and same as
state 5)
a a
1 2 4
b b a
b a a
3 5
b b