4.6.3 · D5Theory of Computation
Question bank — NFA — formal definition, epsilon transitions
True or false — justify
TF1. An NFA is strictly more powerful than a DFA — it can recognise languages no DFA can.
False. Both recognise exactly the regular languages; subset construction turns any NFA into an equivalent DFA. NFAs save design effort, not raise power.
TF2. If every computation path of an NFA on dies (reaches ) before finishing, the string is rejected.
True. Rejection means no surviving path reaches ; if all paths die, none can be final, so .
TF3. is a symbol in the input alphabet of an NFA.
False. always. It appears only in 's domain as ; no input string ever contains an symbol.
TF4. Because returns a set, an NFA is always in more than one state at once.
False. The set can have size one (or zero). The machinery allows many states; whether it actually holds many depends on the transitions taken.
TF5. Taking the ε-closure of the start state is what decides whether the empty string is accepted.
True. , so exactly when that closure contains a final state.
TF6. In an NFA, a state that has no outgoing edge for symbol makes the whole machine crash on .
False. just kills that branch; sibling branches continue. Empty error, unlike a DFA where a missing edge is genuinely undefined.
TF7. Every DFA is also (trivially) an NFA.
True. Wrap each DFA target state in a singleton set and use no ε-moves; then with all outputs of size one — a legal NFA.
TF8. If an NFA has no ε-transitions at all, ε-closure of any set is just itself.
True. With zero ε-arrows the only state reachable "for free" from is , so and the closure step becomes a no-op.
TF9. An NFA accepts only if the final state it lands in after the last symbol is unique.
False. It lands in a set; acceptance needs just one member of that set to be in . Uniqueness is irrelevant.
TF10. Adding more accepting states to an NFA can only grow (or keep) its language, never shrink it.
True. Enlarging can only make more intersections non-empty; no previously accepted string is lost.
Spot the error
SE1. "To run xa, take — done."
Missing the ε-closure. The correct step is ; skipping it can drop states reachable for free after reading and wrongly reject.
SE2. " by definition, always."
Wrong. always contains , but (a single one-step move) may be or point to other states. Don't confuse the one-step ε-transition with the closure.
SE3. "Acceptance condition: ."
Should be . The version demands all reached states be final (universal); NFA acceptance is existential — one is enough.
SE4. " is the NFA signature."
The domain is incomplete — it must be . Without in the domain there are no free moves, so this is only an NFA-without-ε.
SE5. "ECLOSE() means all states reachable from by exactly one ε-move."
Wrong — it is zero or more ε-moves, and it includes itself. You can chain ε-arrows arbitrarily and you can also stay put.
SE6. "Since the branch to died on a 0, the whole string is rejected."
A dead branch is ignored, not fatal. As long as another branch survives to a final state, the string is accepted. One death does not sink the ship.
SE7. " means the set of states ."
No — is the power set: the set of all subsets of . That is precisely what lets output "many/zero states."
Why questions
WHY1. Why does include itself?
Because "zero ε-moves" is a valid choice — you can always stay where you are for free — so is trivially reachable from .
WHY2. Why do NFAs and DFAs recognise the same languages if NFAs seem more flexible?
A DFA state can encode a whole subset of NFA states (subset construction), tracking every branch at once. The flexibility is bought back by using exponentially more DFA states, not extra power.
WHY3. Why is the output type rather than ?
Returning a set is exactly what encodes nondeterminism: multiple targets (size ), a dead branch (size ), or a deterministic move (size ) all become one uniform "set of next states."
WHY4. Why must we ε-close after consuming a symbol, not just before?
A newly entered state may sit at the tail of an ε-arrow leading into a final state; failing to slide there for free would miss an accepting path and wrongly reject.
WHY5. Why does adding to 's domain (not to ) make union of two machines so easy?
A fresh start state with ε-arrows into both machines lets the NFA "guess" which branch to take before reading anything, wiring two automata into one without touching their alphabets.
WHY6. Why is NFA acceptance called "existential"?
Because the string is in iff there exists at least one path through the choices ending in . It mirrors the logical , not .
WHY7. Why can an regular expression be turned into an NFA more directly than into a DFA?
The operators (union, concatenation, star) map to ε-glue between small sub-NFAs; nondeterminism absorbs the "which alternative?" choices that a DFA would have to resolve up front.
Edge cases
EC1. An NFA with . What language does it accept?
The empty language . No state is accepting, so for every — nothing is ever accepted.
EC2. An NFA where and there is an ε-arrow with . Is accepted?
Yes. contains , so is accepted regardless of 's status.
EC3. An NFA with an ε-cycle (ε-arrows both ways). Does ECLOSE loop forever?
No. ECLOSE collects a set; once and are both in, revisiting adds nothing new and the computation terminates. It's a reachable-set, not a path enumeration.
EC4. for every state and some symbol . What happens on a string containing ?
Every branch dies the moment is read, so the reached set becomes and stays empty — the string is rejected (no path survives).
EC5. An NFA whose only transitions are ε-transitions (no -edges). Which strings can it accept?
Only itself. With no way to consume an input symbol, any non-empty string dies immediately; acceptance is possible only when the input is empty and ECLOSE of the start hits .
EC6. The start state has no incoming or outgoing edges at all, and . What is ?
. On any input beyond the start there is nowhere to go, and fails too since and its closure is just .
EC7. Can an NFA reach the empty set and then recover to a non-empty set later in the string?
No. Once the reached set is , for all remaining symbols — an empty set is absorbing, the computation is dead for good.
Recall Quick self-check
- Existential or universal acceptance? ::: Existential — one surviving path to suffices.
- Is an error or a dead branch? ::: A dead branch; other branches may still accept.
- Does ECLOSE ever loop forever on an ε-cycle? ::: No — it builds a finite set and stops.
- Once the reached set is , can it recover? ::: Never; is absorbing.