1. Non-deterministic Finite Automata (NFA)
Unlike a DFA, an NFA allows a machine to explore multiple paths simultaneously.
- Definition: For a given state and input symbol, an NFA can transition to zero, one, or multiple states.
- Acceptance: A string is accepted if at least one possible path leads to a final state.
- Flexibility: NFAs are generally easier to construct than DFAs because you don't need to define transitions for every possible input or worry about "dead states".
2. NFA with Epsilon Transitions (
-NFA)
An
-NFA introduces the epsilon (
) move, which allows the machine to change states without consuming any input symbol.
- -Closure: This is a critical Day Three concept. It is the set of all states reachable from a specific state using onlytransitions (including the state itself).
- Use Case: -NFAs are highly useful for combining smaller machines (e.g., when implementing the "union" or "star" operations in Regular Expressions).
3. Equivalence of NFA and DFA (Subset Construction)
The most important takeaway of Day Three is that NFAs and DFAs are equally powerful; they both recognize the same class of languages (Regular Languages).
- Conversion: Any NFA can be converted to an equivalent DFA using the Subset Construction (or Powerset Construction) algorithm.
- State Explosion: While an NFA with states is simpler, its equivalent DFA may have up tostates in the worst case.