52 Lecture 8
Proof. We can determine the truth of a given quantified Boolean formula
with an alternating TM by eliminating the quantifiers using ∨-and∧-
branching, then evaluating the formula on the resulting truth assignment.
Given a suitable encoding, this can be done in alternating linear time. By
Theorem 7.4(i), QBF is in PSPACE.
To show PSPACE -hardness, we encode the computation of polynomial-
time-bounded ATMs. The construction is very similar to the proof of the
Cook–Levin theorem (Theorem 6.2).
Let A be an arbitrary set in PSPACE . We can assume without loss of
generality that A ⊆{0, 1}
∗
, because any set over a larger input alphabet
is trivially ≤
log
m
-reducible to a set over a binary alphabet. By Theorem
7.4(ii), there is a polynomial-time-bounded ATM M accepting A,saywith
time bound n
c
. By Lemma 7.3, we can assume without loss of generality
that M has no ¬-states. We can also assume without loss of generality,
by adding dummy states if necessary, that the computation tree of M is
binary branching and strictly alternates between ∨-and∧-configurations
beginning with ∨.
Let x be an input to M of length n,sayx = x
1
x
2
···x
n
. The computa-
tion tree of M on input x is of depth at most n
c
, and each path is specified
by a binary string y of length n
c
. Exactly as in the proof of Theorem 6.2,
construct a formula B(X
1
,... ,X
n
,Y
1
,... ,Y
n
c
) that has value 1 on a given
instantiation x, y of the Boolean variables X, Y iff the computation path
of M on input x specified by y leads to acceptance. Then M accepts x iff
the quantified Boolean formula
∃Y
1
∀Y
2
∃Y
3
··· Q
n
c
Y
n
c
B(x
1
,... ,x
n
,Y
1
,... ,Y
n
c
)
is true; the alternation of quantifiers in the quantifier prefix of the formula
exactly reflects the alternation of ∨-and∧-configurations in the computa-
tion tree. 2
Complexity of Games
A two-person perfect information game, for our purposes, is a graph G =
(boards, move) and a distinguished start node s ∈ boards.Theedge
relation move is a binary relation on boards that specifies the legal moves
of the game. The game starts at s
0
= s and the players alternate with Player
I moving first. Player I chooses s
1
∈ boards such that move(s
0
,s
1
). Player
II then chooses s
2
∈ boards such that move(s
1
,s
2
), and so forth. A player
wins by forcing the opponent into a position from which no move is possible
(a “checkmate”), that is, a position t such that no u exists with move(t, u).
Most common two-person games—chess, checkers, go—are of this form.
For chess, the set boards consists of
{legal chessboards}×{white, black},