Nondeterministic Finite Automata (NFA)

a transition to a set of states

The whole formal difference between a DFA and an NFA lives in one place: the type of the transition function δ (delta). In a DFA, δ takes a state and a symbol and gives back exactly one state — δ(q, a) = p. In an NFA, δ takes a state and a symbol and gives back a SET of states — a subset of Q — written δ(q, a) ⊆ Q (a subset of Q). That set may have several members (branching), exactly one member (a forced move), or be empty ∅ (the empty set, meaning a dead end).

So for an NFA over alphabet Σ (Sigma), the signature is δ : Q × Σ -> P(Q), where P(Q) is the power set of Q (the set of all subsets of Q). Reading this in plain terms: from each state, on each symbol, the machine declares the complete set of states it is allowed to move to. The empty set is a perfectly legal value and is how an NFA expresses "no move possible here" without needing an explicit trap state. An epsilon-NFA extends the idea further by also defining transitions on the empty string ε (epsilon).

This set-valued δ is precisely why nondeterminism is so compact to write: instead of carefully routing every (state, symbol) pair to a single destination and inventing dead states to absorb impossible inputs, you list the allowed targets and let the existential acceptance rule do the rest. When you later run the subset construction, this set-valued δ is exactly what becomes the single-valued δ of a DFA whose states ARE sets of NFA states.

Transition table snippet for an NFA: δ(q0, a) = {q0, q1}, δ(q0, b) = {q0}, δ(q1, b) = {q2}, δ(q1, a) = ∅. The empty set in the last cell simply means: from q1, reading a, there is no move — that path dies.

Each cell of an NFA's table holds a SET of states (possibly empty), not a single state.

An empty target set ∅ is legal and means "dead end here" — it is not the same as a DFA's trap state, which is a real state the machine sits in.

Also called
set-valued transition function集合值轉移函數