4.NDFA To DFA Conversion
4.NDFA To DFA Conversion
Problem Statement
Let X = (Qx, ∑, δx, q0, Fx) be an NDFA which accepts the language
L(X). We have to design an equivalent DFA Y = (Qy, ∑, δy, q0, Fy) such
that L(Y) = L(X). The following procedure converts the NDFA to its
equivalent DFA −
Algorithm
Input − An NDFA
Step 3 − Mark the start state of the DFA by q0 (Same as the NDFA).
Step 4 − Find out the combination of States {Q0, Q1,... , Qn} for each
possible input alphabet.
Step 5 − Each time we generate a new DFA state under the input
alphabet columns, we have to apply step 4 again, otherwise go to
step 6.
Step 6 − The states which contain any of the final states of the
NDFA are the final states of the equivalent DFA.
Example
a {a,b,c,d,e} {d,e}
b {c} {e}
c ∅ {b}
d {e} ∅
e ∅ ∅
Using the above algorithm, we find its equivalent DFA. The state
table of the DFA is shown in below.
q δ(q,0) δ(q,1)
[d,e] [e] ∅
[e] ∅ ∅
[c, e] ∅ [b]
[c] ∅ [b]