Theory of Computation · NFA
Formal Definition of NFA as a Quintuple
Overview
A non-deterministic finite automaton (NFA) is formally specified as a quintuple of five components, exactly parallel in structure to the DFA tuple. The decisive difference from a DFA lies in the transition function , whose precise form is the key point to understand.
Key concepts
- Quintuple: An NFA is defined as a set of five items, .
- — set of states: The same as in the DFA; because this is a finite automaton, must be finite.
- — input alphabet: Must be a finite set.
- — transition function: Its exact form is explained separately, by taking an example of an NFA.
- — start state: The single start state.
- — set of final (accepting) states.
- Non-determinism vs. determinism: A non-deterministic machine can sometimes be implemented even by a deterministic machine; it is somewhat difficult, but it can be done.
How it works
- Specify the finite set of states .
- Specify the finite input alphabet .
- Specify the transition function — the distinguishing component of the NFA versus the DFA; its precise definition is the key point to understand.
- Specify the start state .
- Specify the set of final states .
Drawing the diagram…
Formulas
- — : finite set of states; : finite input alphabet; : transition function; : start state; : set of final (accepting) states.
Revision summary
- An NFA is a quintuple of exactly five components, just like the DFA tuple.
- must be finite because it is a finite automaton.
- must be a finite set.
- is the single start state; is the set of final states.
- The distinguishing component of the NFA versus the DFA is , the transition function.
- Non-determinism can, in principle, always be implemented by a deterministic machine, though it may be difficult.
Previous-year exam insights
- In an NFA, may be the empty set (no transition on that symbol), may contain one state, or may contain several states; a DFA requires exactly one state for every (state, symbol) pair.
Asked inUGC NET 2013 - An NFA accepts a string if there exists at least one path from some start state to some final state labelled by that string (existential acceptance); a DFA accepts if its unique path ends in a final state.
Asked inUGC NET 2013 - Every NFA (with or without -moves) can be converted to an equivalent DFA by the subset construction, where DFA states are subsets of NFA states; hence NFAs and DFAs accept exactly the same class of languages (the regular languages).
Asked inUGC NET 2013 - The number of states of the minimal DFA for a language is unique; minimization is done by removing unreachable states, then merging equivalent states (e.g. via Hopcroft's or the table-filling/Myhill-Nerode method).
Asked inUGC NET 2013 - -closure of a state is the set of states reachable from it using only -transitions (including the state itself); it is needed to compute the language of an -NFA and in the subset construction.
- A language is regular iff it is accepted by some DFA, some NFA, or some -NFA, and iff it is denoted by some regular expression; these models are all equivalent in power.