Non-deterministic Finite Automaton

2 min read Updated Fri Apr 24 2026 03:46:02 GMT+0000 (Coordinated Universal Time)

Aka. NFA. Has multiple transitions for the same input symbol are allowed. Can have multiple possible starting states.

More flexible in terms of construction and may simplify the process of creating an FA for a regular language. Useful for theorem-proving.

Transition Function

Defined as δ:Q×Σ2Q\delta: Q \times \Sigma \rightarrow 2^Q. The function maps a state and an input symbol to a set of possible next states, rather than a single state as in DFA.

Extended Transition Function

Defined as δ:Q×Σ2Q\delta^*: Q \times \Sigma^* \rightarrow 2^Q. It handles strings instead of individual symbols. δ(q,x)\delta^*(q, x) is the set of states reachable from state qq after reading string xx.

Rules:

  • δ(q,λ)={q}\delta^*(q, \lambda) = \{q\}
  • δ(q,ya)=pδ(q,y)δ(p,a)\delta^*(q, ya) = \bigcup_{p \in \delta^*(q, y)} \delta(p, a)
    Union of the sets of states reachable from each state in δ(q,y)\delta^*(q, y) after reading symbol aa.

Acceptance by a NFA

Let M=(Q,Σ,q0,A,δ)M = (Q, \Sigma, q_0, A, \delta).

A string xΣx \in \Sigma^* is accepted iff δ(q0,x)A\delta^*(q_0, x) \cap A \neq \varnothing.

A string is accepted if at least one of the states reachable from the start state after reading the string is an accepting state.