HOME

TheInfoList



OR:

In
computational complexity theory In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved ...
, an alternating Turing machine (ATM) is a
non-deterministic Turing machine In theoretical computer science, a nondeterministic Turing machine (NTM) is a theoretical model of computation whose governing rules specify more than one possible action when in some given situations. That is, an NTM's next state is ''not'' comp ...
(NTM) with a rule for accepting computations that generalizes the rules used in the definition of the
complexity class In computational complexity theory, a complexity class is a set of computational problems of related resource-based complexity. The two most commonly analyzed resources are time and memory. In general, a complexity class is defined in terms of ...
es NP and co-NP. The concept of an ATM was set forth by
Chandra Chandra ( sa, चन्द्र, Candra, shining' or 'moon), also known as Soma ( sa, सोम), is the Hindu god of the Moon, and is associated with the night, plants and vegetation. He is one of the Navagraha (nine planets of Hinduism) an ...
and Stockmeyer and independently by Kozen in 1976, with a joint journal publication in 1981.


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 does the whole computation accept. 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 a
non-deterministic Turing machine In theoretical computer science, a nondeterministic Turing machine (NTM) is a theoretical model of computation whose governing rules specify more than one possible action when in some given situations. That is, an NTM's next state is ''not'' comp ...
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 In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
M=(Q,\Gamma,\delta,q_0,g) where * Q is the finite set of states * \Gamma is the finite tape alphabet * \delta:Q\times\Gamma\rightarrow\mathcal(Q\times\Gamma\times\) is called the transition function (''L'' shifts the head left and ''R'' shifts the head right) * q_0\in Q is the initial state * g:Q\rightarrow\ specifies the type of each state If ''M'' is in a state q\in 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 that is accepting and rejecting when all configurations reachable in one step are rejecting (this is the type of all states in a classical NTM except the final state). ''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. Note that it is impossible for a configuration to be both accepting and rejecting, however, some configurations may be neither accepting or rejecting, due to the possibility of nonterminating computations.


Resource bounds

When deciding if a configuration of an ATM is accepting or rejecting using the above definition, it is not always necessary to examine all configurations reachable from the current configuration. In particular, an existential configuration can be labelled as accepting if any successor configuration is found to be accepting, and a universal configuration can be labelled as rejecting if any successor configuration is found to be rejecting. An ATM decides a
formal language In logic, mathematics, computer science, and linguistics, a formal language consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules. The alphabet of a formal language consists of sy ...
in time t(n) if, on any input of length , 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 that do not modify tape cells beyond the s(n) cell from the left is sufficient. A language that is decided by some ATM in time c\cdot t(n) for some constant c>0 is said to be in the class \mathsf(t(n)), and a language decided in space c\cdot s(n) is said to be in the class \mathsf(s(n)).


Example

Perhaps the most natural problem for alternating machines to solve is the quantified Boolean formula problem, which is a generalization of the
Boolean satisfiability problem In logic and computer science, the Boolean satisfiability problem (sometimes called propositional satisfiability problem and abbreviated SATISFIABILITY, SAT or B-SAT) is the problem of determining if there exists an interpretation that satisfie ...
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 if the resulting Boolean formula evaluates to true, and rejects if it evaluates to false. Thus at an existentially quantified variable the machine is accepting if a value can be substituted for the variable that 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: * \mathsf=\bigcup_\mathsf(n^k) are the languages decidable in polynomial time * \mathsf=\bigcup_\mathsf(n^k) are the languages decidable in polynomial space * \mathsf=\bigcup_\mathsf(2^) are the languages decidable in exponential time These are similar to the definitions of P,
PSPACE In computational complexity theory, PSPACE is the set of all decision problems that can be solved by a Turing machine using a polynomial amount of space. Formal definition If we denote by SPACE(''t''(''n'')), the set of all problems that can b ...
, and
EXPTIME In computational complexity theory, the complexity class EXPTIME (sometimes called EXP or DEXPTIME) is the set of all decision problems that are solvable by a deterministic Turing machine in exponential time, i.e., in O(2''p''(''n'')) time, wh ...
, considering the resources used by an ATM rather than a deterministic Turing machine. Chandra, Kozen, and Stockmeyer proved the theorems * ALOGSPACE = P * AP = PSPACE * APSPACE = EXPTIME * AEXPTIME =
EXPSPACE In computational complexity theory, is the set of all decision problems solvable by a deterministic Turing machine in exponential space, i.e., in O(2^) space, where p(n) is a polynomial function of n. Some authors restrict p(n) to be a linear fun ...
* \mathsf(f(n))=\bigcup_\mathsf(2^)=\mathsf(2^) * \mathsf(g(n))\subseteq \mathsf(g(n)) * \mathsf(g(n))\subseteq\bigcup_\mathsf(c\times g(n)^2), when f(n)\ge\log(n) and g(n)\ge\log(n). A more general form of these relationships is expressed by the
parallel computation thesis In computational complexity theory, the parallel computation thesis is a hypothesis which states that the ''time'' used by a (reasonable) parallel machine is polynomially related to the ''space'' used by a sequential machine. The parallel computati ...
.


Bounded alternation


Definition

An alternating Turing machine with ''k'' alternations is an alternating Turing machine that 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''.) \mathsf(C,j)=\Sigma_j \mathsf(C) is the class of languages decidable in time f\in C by a machine beginning in an existential state and alternating at most j-1 times. It is called the th level of the \mathsf(C) hierarchy. \mathsf(C,j)=\Pi_j \mathsf(C) is defined in the same way, but beginning in a universal state; it consists of the complements of the languages in \mathsf(f,j). \mathsf(C,j)=\Sigma_j \mathsf(C) is defined similarly for space bounded computation.


Example

Consider the circuit minimization problem: given a circuit ''A'' computing a Boolean 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).


Collapsing classes

It is said that a hierarchy ''collapses'' to level if every language in level k\ge j of the hierarchy is in its level . As a corollary of the
Immerman–Szelepcsényi theorem In computational complexity theory, the Immerman–Szelepcsényi theorem states that nondeterministic space complexity classes are closed under complementation. It was proven independently by Neil Immerman and Róbert Szelepcsényi in 1987, for ...
, the logarithmic space hierarchy collapses to its first level. As a corollary the \mathsf(f) hierarchy collapses to its first level when f=\Omega(\log) is
space constructible In complexity theory, a time-constructible function is a function ''f'' from natural numbers to natural numbers with the property that ''f''(''n'') can be constructed from ''n'' by a Turing machine in the time of order ''f''(''n''). The purpose of ...
.


Special cases

An alternating Turing machine in polynomial time with ''k'' alternations, starting in an existential (respectively, universal) state can decide all the problems in the class \Sigma_k^p (respectively, \Pi_k^p). These classes are sometimes denoted \Sigma_k\rm and \Pi_k\rm, respectively. See the
polynomial hierarchy In computational complexity theory, the polynomial hierarchy (sometimes called the polynomial-time hierarchy) is a hierarchy of complexity classes that generalize the classes NP and co-NP. Each class in the hierarchy is contained within PSPACE ...
article for details. Another special case of time hierarchies is the logarithmic hierarchy.


References


Further reading

* Section 10.3: Alternation, pp. 380–386. * Section 16.2: Alternation, pp. 399–401. * {{DEFAULTSORT:Alternating Turing Machine Models of computation