Work in progress!
Nondeterministic finite automata (NFAs) are a type of finite state machine.
Unlike DFAs, they may be in many states at once and allow for transitions on the null symbol.
Depicted is the state-transition diagram for an NFA that recognizes unary strings with less than three symbols.
The initial state is q0.
The final states are q1, q2, and q4.
Formally, we say S = q0 and F = { q1, q2, q4 }
There are four transitions:
Recall that ε is a special symbol denoting a null word.
Here, it means the NFA can undergo a transition from q0 to q1 without reading an input symbol.
This type of transition cannot be performed by a DFA, which must read an input symbol on every transition.
The NFA can undergo a transition from q0 to q1 and q2 on the same input symbol "1".
After reading this symbol, the NFA will be in both states at once.
This type of transition also cannot be performed by a DFA, which can only be in one state at at time.
Due to this flexibility:
Because NFAs are less restrictive than DFAs, they can be easier to construct from natural language descriptions.
There is no limit to the size of a sandwich.
The kitchen contains the following ingredients: Σ = { Bread, Cheese, Ham, Lettuce, Mayo, Mustard, Tomato, Turkey }
A sandwich always starts and ends with a slice of bread.