372 Solutions to Selected Miscellaneo us Exercises
pebble on the start state of each M
i
, then guess an input string symbol
by symbol, moving pebbles on the states of the M
i
according to their
transition functions. We do not have to remember the guessed string,
just the states that the M
i
are currently in. We accept if we ever get to
a situation in which all pebbles occupy accept states of their respective
automata. Because the pebble configuration can be represented in poly-
nomial space, this is a nondeterministic PSPACE computation. It can
be made deterministic by Savitch’s theorem.
To show that the problem is hard for PSPACE ,letN be an arbitrary
deterministic n
k
-space bounded TM. Assume without loss of generality
that N has a unique accept configuration. Given an input x of length
n, we build a family of n
k
deterministic finite automata M
i
with O(n
k
)
states each whose intersection is the set of accepting computation his-
tories of N on input x.Then
i
L(M
i
)=∅ iff N does not accept x.
Recall that an accepting computation history of N on input x of length
n is a string of the form
#α
0
#α
1
#α
2
# ··· #α
m−1
#α
m
#, (14)
where each α
i
is a string of length n
k
over some finite alphabet ∆ en-
coding a configuration of N on input x, such that
(i) α
0
is the start configuration of N on x,
(ii) α
m
is the accept configuration of N on x,and
(iii) each α
i+1
follows from α
i
according to the transition rules of N.
If a string is an accepting computation history, then it must be of the
correct format (14) and must satisfy (i), (ii), and (iii). Checking that
the input string is of the form (14) requires checking that the input
string is in the regular set (#∆
n
k
)
∗
#, plus some other simple format
checks (exactly one state of N per configuration, each configuration
begins and ends with endmarkers, etc.). This requires an automaton
with O(n
k
) states. Checking (i) or (ii) involves just checking whether
the input begins or ends with a certain fixed string of length n
k
. Again,
each of these conditions can be checked by an automaton with O(n
k
)
states. Finally, to check (iii), recall from the proof of the Cook–Levin
theorem that there is a finite set of local conditions involving the j −1st,
jth, and j + 1st symbols of α
i
and the jth symbol of α
i+1
such that (iii)
holds iff these local conditions are satisfied for all j,1≤ j ≤ n
k
.The
local conditions depend only on the description of N . To check that (iii)
holds, we use n
k
automata with O(n
k
) states. The jth of these automata
scans across and checks for all i that the local condition involving the
j − 1st, jth, and j + 1st symbols of α
i
and the jth symbol of α
i+1
is