<s>
In	O
computational	O
complexity	O
theory	O
,	O
an	O
alternating	B-Application
Turing	I-Application
machine	I-Application
(	O
ATM	O
)	O
is	O
a	O
non-deterministic	O
Turing	O
machine	O
(	O
NTM	O
)	O
with	O
a	O
rule	O
for	O
accepting	O
computations	O
that	O
generalizes	O
the	O
rules	O
used	O
in	O
the	O
definition	O
of	O
the	O
complexity	O
classes	O
NP	O
and	O
co-NP	O
.	O
</s>
<s>
An	O
alternating	B-Application
Turing	I-Application
machine	I-Application
(	O
or	O
to	O
be	O
more	O
precise	O
,	O
the	O
definition	O
of	O
acceptance	O
for	O
such	O
a	O
machine	O
)	O
alternates	O
between	O
these	O
modes	O
.	O
</s>
<s>
An	O
alternating	B-Application
Turing	I-Application
machine	I-Application
is	O
a	O
non-deterministic	O
Turing	O
machine	O
whose	O
states	O
are	O
divided	O
into	O
two	O
sets	O
:	O
existential	B-Application
states	I-Application
and	O
universal	B-Application
states	I-Application
.	O
</s>
<s>
An	O
existential	B-Application
state	I-Application
is	O
accepting	O
if	O
some	O
transition	O
leads	O
to	O
an	O
accepting	O
state	O
;	O
a	O
universal	B-Application
state	I-Application
is	O
accepting	O
if	O
every	O
transition	O
leads	O
to	O
an	O
accepting	O
state	O
.	O
</s>
<s>
(	O
Thus	O
a	O
universal	B-Application
state	I-Application
with	O
no	O
transitions	O
accepts	O
unconditionally	O
;	O
an	O
existential	B-Application
state	I-Application
with	O
no	O
transitions	O
rejects	O
unconditionally	O
)	O
.	O
</s>
<s>
Perhaps	O
the	O
most	O
natural	O
problem	O
for	O
alternating	O
machines	O
to	O
solve	O
is	O
the	O
quantified	O
Boolean	O
formula	O
problem	O
,	O
which	O
is	O
a	O
generalization	O
of	O
the	O
Boolean	B-Algorithm
satisfiability	I-Algorithm
problem	I-Algorithm
in	O
which	O
each	O
variable	O
can	O
be	O
bound	O
by	O
either	O
an	O
existential	O
or	O
a	O
universal	O
quantifier	O
.	O
</s>
<s>
The	O
Boolean	B-Algorithm
satisfiability	I-Algorithm
problem	I-Algorithm
can	O
be	O
viewed	O
as	O
the	O
special	O
case	O
where	O
all	O
variables	O
are	O
existentially	O
quantified	O
,	O
allowing	O
ordinary	O
nondeterminism	O
,	O
which	O
uses	O
only	O
existential	O
branching	O
,	O
to	O
solve	O
it	O
efficiently	O
.	O
</s>
<s>
A	O
more	O
general	O
form	O
of	O
these	O
relationships	O
is	O
expressed	O
by	O
the	O
parallel	B-Operating_System
computation	I-Operating_System
thesis	I-Operating_System
.	O
</s>
<s>
An	O
alternating	B-Application
Turing	I-Application
machine	I-Application
with	O
k	O
alternations	B-Application
is	O
an	O
alternating	B-Application
Turing	I-Application
machine	I-Application
that	O
switches	O
from	O
an	O
existential	O
to	O
a	O
universal	B-Application
state	I-Application
or	O
vice	O
versa	O
no	O
more	O
than	O
k−1	O
times	O
.	O
</s>
<s>
(	O
It	O
is	O
an	O
alternating	B-Application
Turing	I-Application
machine	I-Application
whose	O
states	O
are	O
divided	O
into	O
k	O
sets	O
.	O
</s>
<s>
is	O
the	O
class	O
of	O
languages	O
decidable	O
in	O
time	O
by	O
a	O
machine	O
beginning	O
in	O
an	O
existential	B-Application
state	I-Application
and	O
alternating	O
at	O
most	O
times	O
.	O
</s>
<s>
is	O
defined	O
in	O
the	O
same	O
way	O
,	O
but	O
beginning	O
in	O
a	O
universal	B-Application
state	I-Application
;	O
it	O
consists	O
of	O
the	O
complements	O
of	O
the	O
languages	O
in	O
.	O
</s>
<s>
Consider	O
the	O
circuit	O
minimization	O
problem	O
:	O
given	O
a	O
circuit	O
A	O
computing	O
a	O
Boolean	O
function	O
f	O
and	O
a	O
number	O
n	O
,	O
determine	O
if	O
there	O
is	O
a	O
circuit	O
with	O
at	O
most	O
n	O
gates	O
that	O
computes	O
the	O
same	O
function	O
f	O
.	O
An	O
alternating	B-Application
Turing	I-Application
machine	I-Application
,	O
with	O
one	O
alternation	B-Application
,	O
starting	O
in	O
an	O
existential	B-Application
state	I-Application
,	O
can	O
solve	O
this	O
problem	O
in	O
polynomial	O
time	O
(	O
by	O
guessing	O
a	O
circuit	O
B	O
with	O
at	O
most	O
n	O
gates	O
,	O
then	O
switching	O
to	O
a	O
universal	B-Application
state	I-Application
,	O
guessing	O
an	O
input	O
,	O
and	O
checking	O
that	O
the	O
output	O
of	O
B	O
on	O
that	O
input	O
matches	O
the	O
output	O
of	O
A	O
on	O
that	O
input	O
)	O
.	O
</s>
<s>
An	O
alternating	B-Application
Turing	I-Application
machine	I-Application
in	O
polynomial	O
time	O
with	O
k	O
alternations	B-Application
,	O
starting	O
in	O
an	O
existential	O
(	O
respectively	O
,	O
universal	O
)	O
state	O
can	O
decide	O
all	O
the	O
problems	O
in	O
the	O
class	O
(	O
respectively	O
,	O
)	O
.	O
</s>
