6.2 Time and Space Complexity 295
(a) x E A; or
(b) There exists a partition II: = ~1~2, where $1 and x2 are nonempty, suchthat ~1 E A and ~2 E A*.
So, we can build a table T of suffixes y of X, in the increasing order of the
length of the suffix, indicating whether y E A*, and use this table to determine
whether ;I: E A*. The following is the algorithm:
(1) Let T(n + 1) := 1.
(2) For each i, starting from n down to 1, do the following:
If,forsomej,i<j<n,substr(z,i,j-i+l) ~AandT(j+l)=l,then let T(i) :=j; otherwise, let T(i) := 0.
(3) Accept x if T(1) = 1.We observe that the above algorithm needs to simulate M for O(n2) times.
Therefore, the total time of simulation and bookkeepping is bounded by
O(n2(p&) +n)) = O(n3 -p&Q), w h’ ic is h ’ b ounded by a polynomial function
q(n). We conclude that A* E P. 0
Similar to class P, PSPACE is a mathematical representation of the class
of languages which are solvable by machines using a feasible amout of storage
space. It is, however, not considered a faithful representation of feasibly
solvable problems, since a TM using a polynomial amount of space may use
more than a polynomial amount of time. The following example shows thata language in PSPACE can be solved using an exponential amount of time.
Whether this upper bound on time can be reduced is a major open questionin complexity theory. In particular, it is not known whether PSPACE = P.
Example 6.15 PSPACE C - EXPPOLY.
Proof. Suppose that A E PSPACE; that is, A is accepted by a one-worktape
DTM A4 with space bound nc for some constant c > 0. Let us count how
many different configurations M can have on an input of length n. First,
since we are working on a decision problem, we can ignore the output tape of
the machine A&. Next, there are at most PC possible different tape configu-
rations in the work tape of A4, where d is the number of tape symbols. (The
input tape is read-only and so has a unique tape configuration.) For each