The ε-closure of each state is:
Suppose the NFA is in state q1. If a "1" is read, it undergoes a transition to state q2. However, this is not the only state reachable reading only one symbol. Any state in ε-closure(q1) is reachable before reading the symbol.
Consider the set { δ(q, 1) | q ∈ ε-closure(q1) }, or "the set of all states reachable from ε after reading the symbol "1".
From this set, more states can be reached without reading any more input symbols. The union of the ε-closure of all states in this set are all of the states reachable after reading a "1" from state q1.
Consider for any state q and symbol "a" the transition δ(q, ε*aε*), where the word "ε*aε*" denotes an arbitrary number of ε-transitions followed by a single "a" followed by another arbitrary number of ε-transitions.
This transition represents the ε-closure of all states reachable from ε-closure(q) after reading the symbol "a".
For example: δ(q1, ε*1ε*) = δ(q1, 1ε*) ∪ δ(q2, 1ε*) ∪ δ(q3, 1ε*)
This is a complete set of states reachable from q1 after only reading the symbol "1".
To convert an ε-NFA to an NFA without ε-transitions, simply determine this transition for every state-symbol pair.
| 0 | 1 | |
| q0 | { q0 } | { q1, q2, q3 } |
| q1 | { q1, q2, q3 } | { q2, q3 } |
| q2 | ∅ | { q2, q3 } |
| q3 | ∅ | ∅ |
This table represents the transitions in the equivalent NFA without ε-transitions.
The items in the new transition table are sets of states in the powerset of Q = { q0, q1, q2, q3 }. These sets can be treated as labels for new states. Begin with all of the states reachable from the initial state q0.
Now we must find the union of all states reachable from { q1, q2, q3 } after reading symbols "0" and "1".
The process is repeated for the new state { q2, q3 }.
The previously observed transitions can be reused.
Now the DFA is not missing any transitions, it is missing final states.
q3 was the only final state in the original NFA.
All states containing q3 are marked final.