Nondeterministic finite automaton
ID: nondeterministic-finite-automaton
A nondeterministic finite automaton allows a set of possible destinations for each automaton state and input symbol. Without the extra moves permitted in an Epsilon-NFA, replace the DFA function by , where is the power set. A word is accepted when at least one path consumes all its symbols and ends in an accepting automaton state. These choices express existential quantification, not probability: no chance of choosing a particular path is assigned. One successful path suffices even if other paths fail.
Consider a three-state NFA accepting exactly the words of binary digits ending in . Its initial automaton state loops on both and ; it also has an automaton transition , followed by . Only is accepting, and all unlisted automaton transitions are absent. Staying at skips an arbitrary beginning; leaving it guesses that the current zero starts the final two symbols.
The word accepts along . The word accepts along . The word rejects: a path reaching after cannot consume the remaining zero, while the other paths end outside . Thus finding somewhere is insufficient; it must occur at the end.
To simulate the NFA deterministically, retain the set of all currently possible automaton states. The powerset construction updates by taking the union of the destinations of its members. Here only , , and are reachable, although the full power set has eight members. Reading gives , which rejects. In general, an -state NFA yields a DFA with at most automaton states. Nondeterminism can simplify a description, while the powerset construction keeps the memory finite.
The second generator checks all 511 words of up to eight binary digits against the direct test of whether their final two symbols are . Exactly 127 accept, and only the three listed sets of automaton states occur. In particular, the empty word rejects for this NFA.
Michael O. Rabin and Dana Scott's 1959 paper studied finite-state machines as recognizers with finite internal memory. Its section 5 defines NFAs through successful paths, and theorem 11 proves their equivalence to DFAs by the powerset construction. This gives a historical source for the distinction between many possible paths and greater recognition power: [ref]
https://www.cs.cmu.edu/~lblum/flac/Handouts_pdf/rs.pdf. Rabin and Scott, Finite Automata and Their Decision Problems, pp. 120–121
. New to topics? Read the docs here!
