1. Gyanastra
  2. Theory of Computation
  3. Epsilon NFA and Conversions
  4. Definition and Formal Model of Epsilon NFA
Free lesson, no account needed 4 min read 5 practice questions after it

Theory of Computation · Epsilon NFA and Conversions

Definition and Formal Model of Epsilon NFA

Overview

An ε-NFA is a finite automaton whose transitions may be labelled with the empty string ε, so the machine can change state without consuming any input symbol.
It differs from an ordinary NFA only in the transition function, which is why its formal model and the resulting ε-closure concept matter for later conversions.

Key concepts

  • ε (epsilon): the empty string.
  • ε-NFA: a special kind of NFA — a finite automaton whose transitions may be labelled with ε. The machine can change state without consuming any input symbol.
  • Only difference from an ordinary NFA: in an ε-NFA a transition may contain ε, i.e. ε-moves exist. In a DFA or an ordinary NFA there are no ε-moves.
  • Drawing: an ε-NFA is drawn exactly like a DFA/NFA — states as circles, arrows for transitions, initial state marked, final states double-circled — with the extra feature that some arrows are labelled ε.
  • ε-closure: the set of states reachable from a state using only ε-moves.

How it works

  1. The machine is specified as the 5-tuple M=(Q,Σ,δ,q0,F)M = (Q, \Sigma, \delta, q_0, F).
  2. QQ, Σ\Sigma, q0q_0 and FF keep their usual meaning; only δ\delta changes.
  3. In an ordinary NFA, δ\delta maps a state and an input symbol to a subset of states.
  4. In an ε-NFA, δ\delta is extended so that ε is also allowed as a "symbol" on which a move can be made.
  5. Consequence: from a state, on seeing a symbol, the machine can go to some state, or from a state, without seeing anything (without consuming input), a transition is possible. This "move without input" is the key new behaviour.
  6. The states reachable from a state using only ε-moves form its ε-closure.
Figure. Notice the epsilon arrows from q0 to q1 and q1 to q2 consume no input. Only delta changes from an ordinary NFA, since epsilon joins the domain of the transition function.

Formulas

  • M=(Q,Σ,δ,q0,F)M = (Q, \Sigma, \delta, q_0, F) — the 5-tuple defining an ε-NFA; QQ = set of states, Σ\Sigma = input alphabet, δ\delta = transition function, q0q_0 = initial (start) state, FF = set of final (accepting) states.

  • δ:Q×Σ→2Q\delta : Q \times \Sigma \to 2^Q — transition function of an ordinary NFA: from a state and an input symbol to a subset of QQ (2Q2^Q = power set of QQ).

  • δ:Q×(Σ∪{ε})→2Q\delta : Q \times (\Sigma \cup \{\varepsilon\}) \to 2^Q — transition function of an ε-NFA: same, but ε is also permitted as the "input", so a move is possible without consuming a symbol. For a state qq and a symbol a∈Σa \in \Sigma, δ(q,a)⊆Q\delta(q, a) \subseteq Q as usual; and δ(q,ε)⊆Q\delta(q, \varepsilon) \subseteq Q gives the states reachable from qq without reading any input.

Comparison

FeatureDFA / NFAε-NFA
Transitions labelled εNot allowedAllowed
Input consumed on every moveYesNo — an ε-move consumes nothing
Transition functionδ:Q×Σ→2Q\delta : Q \times \Sigma \to 2^Q (NFA)δ:Q×(Σ∪{ε})→2Q\delta : Q \times (\Sigma \cup \{\varepsilon\}) \to 2^Q
States, alphabet, start state, final statesQQ, Σ\Sigma, q0q_0, FFQQ, Σ\Sigma, q0q_0, FF (same)

Revision summary

  • ε means the empty string, not a symbol of the input alphabet.
  • The only difference from an ordinary NFA is the presence of ε-moves (moves made without reading input).
  • QQ, Σ\Sigma, q0q_0, FF have the same meaning as in DFA/NFA; only δ\delta changes.
  • In an NFA, δ\delta maps Q×ΣQ \times \Sigma into 2Q2^Q (a subset of states); in an ε-NFA, ε is added to the domain.
  • The states reachable from a state using only ε-moves form its ε-closure.
  • A DFA or ordinary NFA has no ε-moves.

Previous-year exam insights

  • ε-closure is extended to sets: ε-closure(S) = union of ε-closure(q) for all q in S;
    and ε-closure is idempotent, i.e. ε-closure(ε-closure(S)) = ε-closure(S).
  • For an ε-NFA, the move on a symbol a from state q is ε-closure(δ(δ̂-style step)): first take ε-closure of q, then follow a-transitions, then take ε-closure again — i.e. δ̂(q, a) = ε-closure(δ(ε-closure(q), a)).
  • A string is accepted by an ε-NFA if some state reachable after reading the string (with ε-closures applied) is in F; in particular ε is accepted iff ε-closure(q0) contains a final state.
  • Every ε-NFA is equivalent to an NFA without ε-moves and to a DFA (subset construction), so ε-NFAs accept exactly the regular languages; ε-moves add convenience, not power.
  • In the subset construction for ε-NFA to DFA, each DFA state is an ε-closed subset of NFA states: start state is ε-closure(q0), and a subset is final if it contains any final state of the ε-NFA.
  • Trap: ε is not a member of Σ; the alphabet Σ of an ε-NFA never contains ε, and ε-transitions are not counted as consuming input when checking string length or acceptance.
Pages 1–2 of 2