Unambiguous finite automaton

In automata theory, an unambigous finite automaton (UFA) is a special kind of a nondeterministic finite automaton (NFA). Each deterministic finite automaton (DFA) is an UFA, but not vice versa. DFA, UFA, and NFA recognize exactly the same class of formal languages.

On the one hand, an NFA can be exponentially smaller than an equivalent DFA. On the other hand, some problems are exponentially quicker on DFA than on UFA. UFAs are a mix of both worlds; in some cases, they lead to smaller automata and quicker algorithms.

Formal definition

An NFA is represented formally by a 5-tuple, A=(Q, Σ, Δ, q0, F). An UFA is an NFA such that, for each word w = a1a2 … an, there exists at most one sequence of states r0,r1, …, rn, in Q with the following conditions:

  1. r0 = q0
  2. ri+1 ∈ Δ(ri, ai+1), for i = 0, …, n−1
  3. rnF.

In words, those conditions state that, if w is accepted by A, there is exactly one accepting path, that is, one path from an initial state to a final state, labelled by w.

Example

Let L be the set of words over the alphabet {a,b} whose nth last letter is an a. The figures show a DFA and a UFA accepting this language for n=2.

Deterministic automaton (DFA) for the language L for n=2
Unambiguous finite automaton (UFA) for the language L for n=2

The minimal DFA accepting L has 2n states, one for each subset of {1...n}. There is an UFA of n+1 states which accepts L: it guesses the nth last letter, and then verifies that only n-1 letters remain. It is indeed unambigous as there exists only one nth last letter.

Some properties

References

  1. i.e.: given a UFA, does it accept every string at all?
  2. i.e.: given two UFAs, do they accept the same set of strings?
  3. i.e.: given two UFAs, does the second one accept each string accepted by the first?

This article is issued from Wikipedia - version of the Wednesday, January 27, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.