Indirect Method:
In this method,
Step 01: Convert NFA with ∈ moves to NFA without ∈ moves.
Step 02: Than NFA without ∈ moves is converted to the DFA.
RGPV PYQs:
Convert the following NFA with ε in to DFA using the indirect method of conversion.
Solution:
Step 01: Convert NFA with ∈ moves to NFA without ∈ moves.
- ∈-Closure of q0: {q0, q1, q2}
- ∈-Closure of q1: {q1, q2}
- ∈-Closure of q2: {q2}
State | a | b | C |
è q0 | {q0, q1, q2} | {q1, q2} | {q2} |
q1 | Φ | {q1, q2} | {q2} |
q2 | Φ | Φ | {q2} |
Step 02: NFA without ∈ moves is converted to the DFA using the subset construction method.
State | a | b | C |
{q0} | {q0, q1, q2} | {q1, q2} | {q2} |
{q1} | DeadState | {q1, q2} | {q2} |
{q2} | DeadState | DeadState | {q2} |
{q0, q1, q2} | {q0, q1, q2} | {q1, q2} | {q2} |
{q1, q2} | DeadState | {q1, q2} | {q2} |
DeadState | DeadState | DeadState | DeadState |