NFA To DFA Conversion
NFA To DFA Conversion
Afsana Afrin
Lecturer
Dept of Computer Science and Engineering
Bangladesh Army University of Science & Technology
Let X = (Qx, ∑, δx, q0, Fx) be an NFA 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 NFA
to its equivalent DFA −
Algorithm
Input − An NFA
Output − An equivalent DFA
0 1
→q0 {q0} {q1}
q1 {q1, q2} {q1}
*q2 {q2} {q1, q2}
δ({q0}, 0) = {q0}
δ({q0}, 1) = {q1}
0 1
→{q0} {q0} {q1}
{q1} {q1, q2} {q1}
*{q1,q2} {q1,q2} {q1, q2}