- Alternating Turing machine
In

computational complexity theory , an**alternating Turing machine**(**ATM**) is anon-deterministic Turing machine (**NTM**) with a rule for accepting computations that generalizes the rules used in the definition of thecomplexity class es NP andco-NP . The concept of an ATM was set forth by Chandra and Stockmeyer in 1976 (see References).**Definitions****Informal Description**The definition of NP uses the "existential mode" of computation: if "any" choice leads to an accepting state, then the whole computation accepts. The definition of co-NP uses the "universal mode" of computation: only if "all" choices lead to an accepting state, then the whole computation accepts. An alternating Turing machine (or to be more precise, the definition of acceptance for such a machine) alternates between these modes.

An

**alternating Turing machine**is anon-deterministic Turing machine whose states are divided into two sets: "existential states" and "universal states". An existential state is accepting if some transition leads to an accepting state; a universal state is accepting if every transition leads to an accepting state. (Thus a universal state with no transitions accepts unconditionally; an existential state with no transitions rejects unconditionally). The machine as a whole accepts if the initial state is accepting.**Formal Definition**Formally, a (one-tape)

**alternating Turing machine**is a 5-tuple $M=(Q,Gamma,delta,q\_0,g)$ where* $Q$ is the finite set of states

* $Gamma$ is the finite tape alphabet

* $delta:Q\; imesGamma\; ightarrowmathcal\{P\}(Q\; imesGamma\; imes\{L,R\})$ is called the transition function ("L" shifts the head left and "R" shifts the head right)

* $q\_0in\; Q$ is the initial state

* $g:Q\; ightarrow\{wedge,vee,accept,reject\}$ specifies the type of each stateIf "M" is in a state $qin\; Q$ with $g(q)=accept$ then that configuration is said to be "accepting", and if $g(q)=reject$ the configuration is said to be "rejecting". A configuration with $g(q)=wedge$ is said to be accepting if all configurations reachable in one step are accepting, and rejecting if some configuration reachable in one step is rejecting. A configuration with $g(q)=vee$ is said to be accepting when there exists some configuration reachable in one step which is accepting and rejecting when all configurations reachable in one step are rejecting (this is the type of all states in an NTM). "M" is said to accept an input string "w" if the initial configuration of "M" (the state of "M" is $q\_0$, the head is at the left end of the tape, and the tape contains "w") is accepting, and to reject if the initial configuration is rejecting.

**Machine with "k" alternations**An

**alternating Turing machine with "k" alternations**is an alternating Turing machine which switches from an existential to a universal state or vice versa no more than "k-1" times. (It is an alternating Turing machine whose states are divided into "k" sets. The states in even-numbered sets are universal and the states in odd-numbered sets are existential (or vice versa). The machine has no transitions between a state in set "i" and a state in set "j" < "i".)For example, consider the

circuit minimization problem : given a circuit "A" computing aBoolean function "f" and a number "n", determine if there is a circuit with at most "n" gates that computes the same function "f". An alternating Turing machine, with one alternation, starting in an existential state, can solve this problem in polynomial time (by guessing a circuit "B" with at most "n" gates, then switching to a universal state, guessing an input, and checking that the output of "B" on that input matches the output of "A" on that input).An alternating Turing machine, with "k" alternations, starting in an existential (respectively, universal) state can decide all the problems in the class $Sigma\_k\; m\{P\}$ (respectively, $Pi\_k\; m\{P\}$) in polynomial time. See the

polynomial hierarchy article.**Resource bounds**When deciding if a configuration of an ATM is accepting or rejecting using the above definition, it is not necessary to examine all configurations reachable from the current configuration. In particular, an existential configuration can be labelled as accepting if any future configuration is found to be accepting, and a universal configuration can be labelled as rejecting if any future configuration is found to be rejecting.

An ATM decides a

Formal language in time $t(n)$ if, on any input of length $n$, examining configurations only up to $t(n)$ steps is sufficient to label the initial configuration as accepting or rejecting. An ATM decides a language in space $s(n)$ if examining configurations which do not modify tape cells beyond the $s(n)$ cell from the left is sufficient.A language which is decided by some ATM in time $ccdot\; t(n)$ for some constant $c>0$ is said to be in the class $\{\; m\; ATIME\}(t(n))$, and a language decided in space $ccdot\; s(n)$ is said to be in the class $\{\; m\; ASPACE\}(s(n))$.

**Example**Perhaps the simplest problem for alternating machines to solve is the

quantified boolean formula problem , which is a generalization of theboolean satisfiability problem in which each variable can be bound by either an existential or a universal quantifier. The alternating machine branches existentially to try all possible values of an existentially quantified variable and universally to try all possible values of a universally quantified variable, in the left-to-right order in which they are bound. After deciding a value for all quantified variables, the machine accepts or rejects according as the resulting boolean formula evaluates to true or false. Thus at an existentially quantified variable the machine is accepting if a value can be substituted for the variable which renders the remaining problem satisfiable, and at a universally quantified variable the machine is accepting if any value can be substituted and the remaining problem is satisfiable.Such a machine decides quantified boolean formulas in time $n^2$ and space $n$.

The boolean satisfiability problem can be viewed as the special case where all variables are existentially quantified, allowing ordinary nondeterminism, which uses only existential branching, to solve it efficiently.

**Complexity classes and comparison to deterministic Turing machines**The following

complexity classes are useful to define for ATMs:* $\{\; m\; AP\}=igcup\_\{k0\}\{\; m\; ATIME\}(n^k)$ are the languages decidable in polynomial time

* $\{\; m\; APSPACE\}=igcup\_\{k0\}\{\; m\; ASPACE\}(n^k)$ are the languages decidable in polynomial space

* $\{\; m\; AEXPTIME\}=igcup\_\{k0\}\{\; m\; ATIME\}(k^n)$ are the languages decidable in exponential timeThese are similar to the definitions of P,

PSPACE , andEXPTIME , considering the resources used by an ATM rather than a deterministic Turing machine. Chandra, Kozen, and Stockmeyer proved the theorems*

* APSPACE = EXPTIME

* AEXPTIME =EXPSPACE This is expressed by the

Parallel Computation Thesis .**References*** [

*http://portal.acm.org/citation.cfm?id=322243&coll=Portal&dl=ACM&CFID=60283170&CFTOKEN=44928981 Chandra, A.K. and Kozen, D.C. and Stockmeyer, L.J., 'Alternation'*] , Journal of the ACM, Volume 28, Issue 1, pp. 114-133, 1981.

* Section 10.3: Alternation, pp.348–354.

* Section 10.3: Alternation, pp.380–386.

* Section 16.2: Alternation, pp.399–401.

*Wikimedia Foundation.
2010.*

### Look at other dictionaries:

**Turing machine equivalents**— Turing machine(s) Machina Universal Turing machine Alternating Turing machine Quantum Turing machine Read only Turing machine Read only right moving Turing Machines Probabilistic Turing machine Multi track Turing machine Turing machine… … Wikipedia**Turing machine**— For the test of artificial intelligence, see Turing test. For the instrumental rock band, see Turing Machine (band). Turing machine(s) Machina Universal Turing machine Alternating Turing machine Quantum Turing machine Read only Turing machine… … Wikipedia**Probabilistic Turing machine**— Turing machine(s) Machina Universal Turing machine Alternating Turing machine Quantum Turing machine Read only Turing machine Read only right moving Turing Machines Probabilistic Turing machine Multi track Turing machine Turing machine… … Wikipedia**Non-deterministic Turing machine**— Turing machine(s) Machina Universal Turing machine Alternating Turing machine Quantum Turing machine Read only Turing machine Read only right moving Turing Machines Probabilistic Turing machine Multi track Turing machine Turing machine… … Wikipedia**Multi-track Turing machine**— Turing machine(s) Machina Universal Turing machine Alternating Turing machine Quantum Turing machine Read only Turing machine Read only right moving Turing Machines Probabilistic Turing machine Multi track Turing machine Turing machine… … Wikipedia**List of computability and complexity topics**— This is a list of computability and complexity topics, by Wikipedia page. Computability theory is the part of the theory of computation that deals with what can be computed, in principle. Computational complexity theory deals with how hard… … Wikipedia**List of terms relating to algorithms and data structures**— The [http://www.nist.gov/dads/ NIST Dictionary of Algorithms and Data Structures] is a reference work maintained by the U.S. National Institute of Standards and Technology. It defines a large number of terms relating to algorithms and data… … Wikipedia**Список терминов, относящихся к алгоритмам и структурам данных**— Это служебный список статей, созданный для координации работ по развитию темы. Данное предупреждение не устанавливается на информационные списки и глоссарии … Википедия**Список терминов**— Список терминов, относящихся к алгоритмам и структурам данных Это сл … Википедия**True quantified Boolean formula**— The language TQBF is a formal language in computer science that contains True Quantified Boolean Formulas. A fully quantified boolean formula is a formula in first order logic where every variable is quantified (or bound), using either… … Wikipedia