Jump to content

Unambiguous finite automaton

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jochen Burghardt (talk | contribs) at 20:40, 10 January 2016 (References: notes; open url at least for presentation slides). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 recognizes 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.[clarification needed] UFAs are a mix of both worlds, in some case, they lead to smaller automata and quicker algorithms.[vague]

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

  • The notion of unambiguity extends to finite state transducers and weighted automata. If a finite state transducer T is unambigous, 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.
  • For A an automaton with n states and a letter, it is decidable in time O(n2a) whether the automaton is unambiguous.[clarification needed]

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?
  • Christof Lödig, Unambiguous Finite Automata, Developments in Language Theory, (2013) pp.29-30 (Slides)