Math 2.0

Computer science Definition

Nondeterministic finite automaton

Builds on AlphabetStringFormal languagePower setDeterministic finite automaton

Definition

A nondeterministic finite automaton (NFA) is a tuple N=(Q,Σ,Δ,q0,F)N = (Q, \Sigma, \Delta, q_0, F) where:

  1. QQ is a nonempty finite set of states;
  2. Σ\Sigma is an alphabet;
  3. Δ ⁣:Q×Σ→𝒫(Q)\Delta \colon Q \times \Sigma \to \mathcal{P}(Q) is the transition function, with values in the power set of QQ;
  4. q0∈Qq_0 \in Q is the initial state;
  5. F⊆QF \subseteq Q is the set of accepting states.

The NFA NN accepts a string w=a1a2⋯anw = a_1 a_2 \cdots a_n with ai∈Σa_i \in \Sigma when there are states r0,r1,…,rn∈Qr_0, r_1, \ldots, r_n \in Q with r0=q0r_0 = q_0, ri∈Δ(ri−1,ai)r_i \in \Delta(r_{i-1}, a_i) for 1≤i≤n1 \le i \le n, and rn∈Fr_n \in F. The language of NN is the formal language L(N)L(N) of all strings that NN accepts.

Remarks

Example: over Σ={a,b}\Sigma = \set{a, b}, take Q={0,1,2}Q = \set{0, 1, 2}, q0=0q_0 = 0, F={2}F = \set{2}, Δ(0,a)={0,1}\Delta(0, a) = \set{0, 1}, Δ(0,b)={0}\Delta(0, b) = \set{0}, Δ(1,a)=Δ(1,b)={2}\Delta(1, a) = \Delta(1, b) = \set{2} and Δ(2,a)=Δ(2,b)=∅\Delta(2, a) = \Delta(2, b) = \emptyset. A run ends in state 22 exactly when it moves to state 11 on the second-to-last letter, and that letter is aa. So L(N)L(N) is the set of words whose second-to-last letter is aa. Non-example: an automaton with a transition that reads no symbol, an ε\varepsilon-move, is not an NFA in this sense, because Δ\Delta is only defined on Q×ΣQ \times \Sigma; it is an ε\varepsilon-NFA. A DFA (Q,Σ,δ,q0,F)(Q, \Sigma, \delta, q_0, F) is the NFA with Δ(q,a)={δ(q,a)}\Delta(q, a) = \set{\delta(q, a)}. Some authors allow a set of initial states instead of a single one; this does not change the class of accepted languages.

Reading path

To understand this page from the ground up, read these 6 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Alphabet concept
  2. Deterministic finite automaton concept
  3. Formal language concept
  4. Power set concept
  5. String concept
  6. Nondeterministic finite automaton definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton
About this page
TagZWCSB3YHWM
URIm2://ZWCSB3YHWM
Kinddefinition
WritingW0 stub
MSC68Q45
DefinesNondeterministic finite automaton
UsesAlphabet, String, Formal language, Power set, Deterministic finite automaton
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.