Nondeterministic Finite Automata (NFA)
A type of Finite Automaton which is nondeterministic. This means that the transition Function may contain zero, one, or more output for each possible character in the Alphabet.
Definition
Formally, an FA is a 5-tuple :
- : a finite Set of states
- : a finite Alphabet
- : a transition Relation
- : the start state
- : a set of accepting states
Human Definition An NFA is like a DFA, but:
- From one state and input, the machine may have multiple possible next states.
- It may even move without consuming input (ε-transitions).
- A String is accepted if at least one path leads to an accepting state once the entire string is consumed.
Example 1
An NFA that accepts strings of that end in :

Formally defined as: where
& 0 & 1 \\ \hline q_0 & \set{q_0,q_1} & \set{q_0} \\ q_1 & \varnothing & \set{q_2} \\ q_{2} & \varnothing & \varnothing \\ \end{array}$$ Example of processing: ![[99 Attachments/Pasted image 20250917170730.png]] As at least one path accepting the string, this string is accepted by the NFA. ## Example 2 Example containing [[10 Zettels/20250917-171108|Epsilon Transitions]] ![[99 Attachments/Pasted image 20250917171246.png]] The above state machine matches any set of strings (build of capital letters) ending in "ING" or "ER".