Alternating finite automaton

From HandWiki - Reading time: 3 min

In automata theory, an alternating finite automaton (AFA) is a nondeterministic finite automaton whose transitions are divided into existential and universal transitions. For example, let A be an alternating automaton.

  • For an existential transition [math]\displaystyle{ (q, a, q_1 \vee q_2) }[/math], A nondeterministically chooses to switch the state to either [math]\displaystyle{ q_1 }[/math] or [math]\displaystyle{ q_2 }[/math], reading a. Thus, behaving like a regular nondeterministic finite automaton.
  • For a universal transition [math]\displaystyle{ (q, a, q_1 \wedge q_2) }[/math], A moves to [math]\displaystyle{ q_1 }[/math] and [math]\displaystyle{ q_2 }[/math], reading a, simulating the behavior of a parallel machine.

Note that due to the universal quantification a run is represented by a run tree. A accepts a word w, if there exists a run tree on w such that every path ends in an accepting state.

A basic theorem states that any AFA is equivalent to a deterministic finite automaton (DFA), hence AFAs accept exactly the regular languages.

An alternative model which is frequently used is the one where Boolean combinations are in disjunctive normal form so that, e.g., [math]\displaystyle{ \{\{q_1\},\{q_2,q_3\}\} }[/math] would represent [math]\displaystyle{ q_1 \vee (q_2 \wedge q_3) }[/math]. The state tt (true) is represented by [math]\displaystyle{ \{\emptyset\} }[/math] in this case and ff (false) by [math]\displaystyle{ \emptyset }[/math]. This representation is usually more efficient.

Alternating finite automata can be extended to accept trees in the same way as tree automata, yielding alternating tree automata.

Formal definition

An alternating finite automaton (AFA) is a 5-tuple, [math]\displaystyle{ (Q, \Sigma, q_0, F, \delta) }[/math], where

  • [math]\displaystyle{ Q }[/math] is a finite set of states;
  • [math]\displaystyle{ \Sigma }[/math] is a finite set of input symbols;
  • [math]\displaystyle{ q_0\in Q }[/math] is the initial (start) state;
  • [math]\displaystyle{ F\subseteq Q }[/math] is a set of accepting (final) states;
  • [math]\displaystyle{ \delta\colon Q\times\Sigma\times\{0,1\}^Q\to\{0,1\} }[/math] is the transition function.

For each string [math]\displaystyle{ w\in\Sigma^* }[/math], we define the acceptance function [math]\displaystyle{ A_w\colon Q\to\{0,1\} }[/math] by induction on the length of [math]\displaystyle{ w }[/math]:

  • [math]\displaystyle{ A_\epsilon(q)=1 }[/math] if [math]\displaystyle{ q\in F }[/math], and [math]\displaystyle{ A_\epsilon(q)=0 }[/math] otherwise;
  • [math]\displaystyle{ A_{aw}(q)=\delta(q,a,A_w) }[/math].

The automaton accepts a string [math]\displaystyle{ w\in\Sigma^* }[/math] if and only if [math]\displaystyle{ A_w(q_0)=1 }[/math].

This model was introduced by Chandra, Kozen and Stockmeyer.[1]

State complexity

Even though AFA can accept exactly the regular languages, they are different from other types of finite automata in the succinctness of description, measured by the number of their states.

Chandra et al.[1] proved that converting an [math]\displaystyle{ n }[/math]-state AFA to an equivalent DFA requires [math]\displaystyle{ 2^{2^n} }[/math] states in the worst case, though a DFA for the reverse language can be constructued with only [math]\displaystyle{ 2^n }[/math] states. Another construction by Fellah, Jürgensen and Yu.[2] converts an AFA with [math]\displaystyle{ n }[/math] states to a nondeterministic finite automaton (NFA) with up to [math]\displaystyle{ 2^n }[/math] states by performing a similar kind of powerset construction as used for the transformation of an NFA to a DFA.

Computational complexity

The membership problem asks, given an AFA [math]\displaystyle{ A }[/math] and a word [math]\displaystyle{ w }[/math], whether [math]\displaystyle{ A }[/math] accepts [math]\displaystyle{ w }[/math]. This problem is P-complete.[3] This is true even on a singleton alphabet, i.e., when the automaton accepts a unary language.

The non-emptiness problem (is the language of an input AFA non-empty?), the universality problem (is the complement of the language of an input AFA empty?), and the equivalence problem (do two input AFAs recognize the same language) are PSPACE-complete for AFAs[3]:Theorems 23, 24, 25.

References

  1. 1.0 1.1 Chandra, Ashok K.; Kozen, Dexter C.; Stockmeyer, Larry J. (1981). "Alternation". Journal of the ACM 28 (1): 114–133. doi:10.1145/322234.322243. ISSN 0004-5411. 
  2. Fellah, A.; Jürgensen, H.; Yu, S. (1990). "Constructions for alternating finite automata∗". International Journal of Computer Mathematics 35 (1–4): 117–132. doi:10.1080/00207169008803893. ISSN 0020-7160. 
  3. 3.0 3.1 Theorem 19 of Holzer, Markus; Kutrib, Martin (2011-03-01). "Descriptional and computational complexity of finite automata—A survey" (in en). Information and Computation 209 (3): 456–470. doi:10.1016/j.ic.2010.11.013. ISSN 0890-5401. 




Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/Alternating_finite_automaton
1 views |
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF