Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Alternating Turing machine
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Abstract computation model}} {{turing}} {{more footnotes|date=May 2011}} {{null|date=May 2011}} In [[computational complexity theory]], an '''alternating Turing machine''' ('''ATM''') is a [[non-deterministic Turing machine]] ('''NTM''') with a rule for accepting computations that generalizes the rules used in the definition of the [[complexity class]]es [[NP (complexity)|NP]] and [[co-NP]]. The concept of an ATM was set forth by [[Ashok K. Chandra|Chandra]] and [[Larry Stockmeyer|Stockmeyer]]<ref name=chasto>{{Cite conference|doi=10.1109/SFCS.1976.4|last1=Chandra|first1=Ashok K.|last2=Stockmeyer|first2=Larry J.|title=Alternation|book-title=Proc. 17th IEEE Symp. on Foundations of Computer Science|location=Houston, Texas|year=1976|pages=98–108}}</ref> and independently by [[Dexter Kozen|Kozen]]<ref name=kozen>{{cite conference|doi=10.1109/SFCS.1976.20|last=Kozen|first=D.|title=On parallelism in Turing machines|book-title=Proc. 17th IEEE Symp. on Foundations of Computer Science|location=Houston, Texas|year=1976|pages=89–97|hdl=1813/7056|hdl-access=free}}</ref> in 1976, with a joint journal publication in 1981.<ref name=alternation>{{Cite journal|doi=10.1145/322234.322243 |last1=Chandra |first1=Ashok K. |last2=Kozen |first2=Dexter C. |last3=Stockmeyer |first3=Larry J. |title=Alternation |url=http://users.cis.fiu.edu/~giri/teach/5420/f01/papers/p114-chandra.pdf |journal=[[Journal of the ACM]] |volume=28 |issue=1 |pages=114–133 |year=1981 |s2cid=238863413 |url-status=dead |archive-url=https://web.archive.org/web/20160412232110/http://users.cis.fiu.edu/~giri/teach/5420/f01/papers/p114-chandra.pdf |archive-date=April 12, 2016 }}</ref> == 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]] 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]] <math>M=(Q,\Gamma,\delta,q_0,g)</math> where * <math>Q</math> is the finite set of states * <math>\Gamma</math> is the finite tape alphabet * <math>\delta:Q\times\Gamma\rightarrow\mathcal{P}(Q\times\Gamma\times\{L,R\})</math> is called the transition function (''L'' shifts the head left and ''R'' shifts the head right) * <math>q_0\in Q</math> is the initial state * <math>g:Q\rightarrow\{\wedge,\vee,accept,reject\}</math> specifies the type of each state If ''M'' is in a state <math>q\in Q</math> with <math>g(q)=accept</math> then that configuration is said to be ''accepting'', and if <math>g(q)=reject</math> the configuration is said to be ''rejecting''. A configuration with <math>g(q)=\wedge</math> 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 <math>g(q)=\vee</math> 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 <math>q_0</math>, 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 time <math>t(n)</math> if, on any input of length {{mvar|n}}, examining configurations only up to <math>t(n)</math> steps is sufficient to label the initial configuration as accepting or rejecting. An ATM decides a language in space <math>s(n)</math> if examining configurations that do not modify tape cells beyond the <math>s(n)</math> cell from the left is sufficient. A language that is decided by some ATM in time <math>c\cdot t(n)</math> for some constant <math>c>0</math> is said to be in the class <math>\mathsf{ATIME}(t(n))</math>, and a language decided in space <math>c\cdot s(n)</math> is said to be in the class <math>\mathsf{ASPACE}(s(n))</math>. == 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 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 <math>n^2</math> and space <math>n</math>. 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: * <math>\mathsf{AP}=\bigcup_{k>0}\mathsf{ATIME}(n^k)</math> are the languages decidable in polynomial time * <math>\mathsf{APSPACE}=\bigcup_{k>0}\mathsf{ASPACE}(n^k)</math> are the languages decidable in polynomial space * <math>\mathsf{AEXPTIME}=\bigcup_{k>0}\mathsf{ATIME}(2^{n^k})</math> are the languages decidable in exponential time These are similar to the definitions of [[P (complexity)|P]], [[PSPACE]], and [[EXPTIME]], considering the resources used by an ATM rather than a deterministic Turing machine. Chandra, Kozen, and Stockmeyer<ref name=alternation /> proved that, for all <math>f(n)\ge\log(n)</math> and <math>g(n)\ge\log(n)</math>: * <math>\mathsf{ASPACE}(f(n))=\bigcup_{c>0}\mathsf{DTIME}(2^{cf(n)})=\mathsf{DTIME}(2^{O(f(n))})</math> * <math>\mathsf{ATIME}(g(n))\subseteq \mathsf{DSPACE}(g(n))</math> * <math>\mathsf{NSPACE}(g(n))\subseteq\bigcup_{c>0}\mathsf{ATIME}(c\times g(n)^2),</math> In particular: * ALOGSPACE = P * AP = PSPACE * APSPACE = EXPTIME * AEXPTIME = [[EXPSPACE]] A more general form of these relationships is expressed by the [[parallel computation thesis]]. == Bounded alternation == ===Definition=== {{Unreferenced section|date=October 2013}} 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''.) <math>\mathsf{ATIME}(C,j)=\Sigma_j \mathsf{TIME}(C)</math> is the class of languages decidable in time <math>f\in C</math> by a machine beginning in an existential state and alternating at most <math>j-1</math> times. It is called the {{mvar|j}}th level of the <math>\mathsf{TIME}(C)</math> hierarchy. <math>\mathsf{coATIME}(C,j)=\Pi_j \mathsf{TIME}(C)</math> is defined in the same way, but beginning in a universal state; it consists of the complements of the languages in <math>\mathsf{ATIME}(f,j)</math>. <math>\mathsf{ASPACE}(C,j)=\Sigma_j \mathsf{SPACE}(C)</math> 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 {{mvar|j}} if every language in level <math>k\ge j</math> of the hierarchy is in its level {{mvar|j}}. As a corollary of the [[Immerman–Szelepcsényi theorem]], the logarithmic space hierarchy collapses to its first level.<ref>{{Cite journal|first1=Neil|last1=Immerman|url=http://www.cs.umass.edu/~immerman/pub/space.pdf|title=Nondeterministic space is closed under complementation|journal=[[SIAM Journal on Computing]]|volume=17|issue=5|year=1988|pages=935–938|doi=10.1137/0217058|citeseerx=10.1.1.54.5941}}</ref> As a corollary the <math>\mathsf{SPACE}(f)</math> hierarchy collapses to its first level when <math>f=\Omega(\log)</math> is [[space constructible]]{{Citation needed|date=August 2010}}. ===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 <math>\Sigma_k^p</math> (respectively, <math>\Pi_k^p</math>).<ref>{{cite book|last=Kozen|first=Dexter|author-link=Dexter Kozen|title=Theory of Computation|url=https://archive.org/details/theorycomputatio00koze|url-access=limited|publisher=[[Springer-Verlag]]|year=2006|page=[https://archive.org/details/theorycomputatio00koze/page/n67 58]|isbn=9781846282973}}</ref> These classes are sometimes denoted <math>\Sigma_k\rm{P}</math> and <math>\Pi_k\rm{P}</math>, respectively. See the [[polynomial hierarchy]] article for details. Another special case of time hierarchies is the [[LH (complexity)|logarithmic hierarchy]]. == References == {{Reflist}} == Further reading == * {{cite book|author = Michael Sipser | year = 2006 | title = Introduction to the Theory of Computation | publisher = PWS Publishing | edition = 2nd | isbn = 978-0-534-95097-2| author-link = Michael Sipser }} Section 10.3: Alternation, pp. 380–386. * {{cite book|author = Christos Papadimitriou | year = 1993 | title = Computational Complexity | publisher = Addison Wesley | edition = 1st | isbn = 978-0-201-53082-7| author-link = Christos Papadimitriou }} Section 16.2: Alternation, pp. 399–401. * {{Citation |last=Balcázar |first=José Luis |title=Alternation |date=1990 |work=Structural Complexity II |pages=63–96 |editor-last=Balcázar |editor-first=José Luis |url=https://link.springer.com/chapter/10.1007/978-3-642-75357-2_4 |access-date=2025-05-19 |place=Berlin, Heidelberg |publisher=Springer |language=en |doi=10.1007/978-3-642-75357-2_4 |isbn=978-3-642-75357-2 |last2=Díaz |first2=Josep |last3=Gabarró |first3=Joaquim |editor2-last=Díaz |editor2-first=Josep |editor3-last=Gabarró |editor3-first=Joaquim}} * {{cite book|author1=Bakhadyr Khoussainov|author2=Anil Nerode|author-link2=Anil Nerode|title=Automata Theory and its Applications|url=https://books.google.com/books?id=wR_oBwAAQBAJ|year = 2012|publisher=Springer Science & Business Media|isbn=978-1-4612-0171-7}} {{DEFAULTSORT:Alternating Turing Machine}} [[Category:Models of computation]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite conference
(
edit
)
Template:Cite journal
(
edit
)
Template:More footnotes
(
edit
)
Template:Mvar
(
edit
)
Template:Null
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Turing
(
edit
)
Template:Unreferenced section
(
edit
)