Unambiguous finite automaton

In automata theory, an unambiguous finite automaton (UFA) is a nondeterministic finite automaton (NFA) such that each word has at most one accepting path.

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 easily solved on DFAs and not on UFAs.

For example, given an automaton A, an automaton A′ which accepts the complement of A can be computed in linear time when A is a DFA, whereas it is known that this cannot be done in polynomial time for UFAs.

Hence UFAs are a mix of the worlds of DFA and of NFA; in some cases, they lead to smaller automata than DFA and quicker algorithms than NFA.

, there is exactly one accepting path, that is, one path from an initial state to a final state that is labelled by

be the set of words over the alphabet {a,b} whose nth last letter is an

The figures show a DFA and a UFA accepting this language for n=2.

: it guesses the nth last letter, and then verifies that only

It is indeed unambiguous as there exists only one nth last letter.

Three PSPACE-hard problems for general NFA belong to PTIME for DFA and are now considered.

Then L(A)⊆L(B) if and only if L(A∩B)=L(A), where A∩B denotes the Cartesian product automaton, which can be proven to be also unambiguous.

Now, L(A∩B) is a subset of L(A) by construction; hence both sets are equal if and only if for each length n∈

It can be proved that is sufficient to check each n up to the product of the number of states of A and B.

The number of words of length n accepted by an automaton can be computed in polynomial time using dynamic programming, which ends the proof.

[1] The problem of universality[note 1] and of equivalence,[note 2] also belong to PTIME, by reduction to the inclusion problem.

letter alphabet, it is decidable in time

It suffices to use a fixpoint algorithm to compute the set of pairs of states q and q' such that there exists a word w which leads both to q and to q' .

The automaton is unambiguous if and only if there is no such a pair such that both states are accepting.

There are Θ(n2) state pairs, and for each pair there are m letters to consider to resume the fixpoint algorithm, hence the computation time.

Mathematical proofs that every UFA for a language needs a certain number of states were pioneered by Schmidt.

[4] Leung proved that a DFA equivalent to an

states in the worst case, and that a UFA equivalent to a finitely ambiguous[note 3]

[5] Jirásek, Jirásková and Šebej[6] researched state complexity of basic regular operations on languages represented by UFA.

This result was later improved by Indzhev and Kiefer[7] to at most

Raskin[8] showed that UFAs cannot be complemented in polynomial time, even into NFAs: he shows that, in the worst case, complementing a UFA with n states into an NFA requires a superpolynomial number of states.

This lower bound was later improved by Göös, Kiefer, and Yuan.

[9] For a one-letter alphabet Okhotin proved that a DFA equivalent to an

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