Unambiguous finite automaton
- 3 min read
- 6 chapters
Related on Lably
Through Tuple
Formal definition
An NFA is represented formally by a 5-tuple, . An UFA is an NFA such that, for each word , there exists at most one sequence of states , in with the following conditions:
- ;
- for ;
- .
In words, those conditions state that, if is accepted by , there is exactly one accepting path, that is, one path from an initial state to a final state that is labelled by .
Sign in to keep reading
5 more chapters are free with a Lably account.
Example
Let 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.
The minimal DFA accepting has 2n states, one for each subset of {1...n}. There is an UFA of states which accepts : it guesses the nth last letter, and then verifies that only letters remain. It is indeed unambiguous as there exists only one nth last letter.
Inclusion, universality, equivalence
Three PSPACE-hard problems for general NFA belong to PTIME for DFA and are now considered.
Inclusion
It is decidable in polynomial-time whether an UFA's language is a subset of another UFA's language.
Universality, equivalence
The problem of universality and of equivalence, also belong to PTIME, by reduction to the inclusion problem.
Checking whether an automaton is unambiguous
For a nondeterministic finite automaton with states and an letter alphabet, it is decidable in time whether is unambiguous.
Some properties
- Given a UFA A and an integer n, one can count in polynomial time the number of words of size n that are accepted by A. This can be done by a simple dynamic programming algorithm: for every state q of A and , compute the number of words of size n-i having a run starting at q and ending in a final state. By contrast, the same problem is #P-hard for NFAs.
- The cartesian product (intersection) of two UFAs is a UFA.
- The notion of unambiguity extends to finite state transducers and weighted automata. If a finite state transducer T is unambiguous, then each input word is associated by T to at most one output word. If a weighted automaton A is unambiguous, then the set of weight does not need to be a semiring, instead it suffices to consider a monoid. Indeed, there is at most one accepting path.
State complexity
Mathematical proofs that every UFA for a language needs a certain number of states were pioneered by Schmidt. Leung proved that a DFA equivalent to an -state UFA requires states in the worst case, and that a UFA equivalent to a finitely ambiguous -state NFA requires states in the worst case.
Jirásek, Jirásková and Šebej researched state complexity of basic regular operations on languages represented by UFA. They proved in particular that for every -state UFA where , the complement of the language it accepts is accepted by a UFA with at most states. This result was later improved by Indzhev and Kiefer to at most states for all .
Raskin 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.
For a one-letter alphabet Okhotin proved that a DFA equivalent to an -state UFA requires states in the worst case.

