These problems all concern complexity measures and complexity classes. Questions are in black, solutions in blue.
Let N be a polytime NDTM whose language is {x:A(x)}, so that there exists a guess string y such that N accepts x on string y iff A(x) is true. We define a poly-time NDTM M' as follows, such that L(M') = L(M). M' begins with a guess phase, where it guesses a string z and then guesses strings y_1,... y_t where t is the length of z. Then in its determistic phase it verifies that (1) M, on guess string z, accepts the input x of M' if all the strings it queries (which we will call w_1,...,w_t) satisfy A[w_i], and (b) for each i, N accepts w_i with guess string y_i. The input x is in L(M) iff some string z and strings w_1,...,w_t exist such that (a) holds, by the definition of M. The strings w_i each satisfy A[w_i] iff a guess string y_i exists that makes N accept w_i, so all the strings satisfy A(w_i) iff (b) holds. So x is in L(M) iff (a) and (b) both hold iff x is in L(M'). Since M' is an ordinary poly-time NDTM, L(M) is in NP.
We redefine N to be a poly-time NDTM whose language is A-bar. Again let
y_1,...,y_t be guess strings needed to cause N to accept w_i,...,w_t.
Now the input x is in L(M) iff (a) a string z exists such that M accepts x
with guess string z, provided that the strings w_1,...,w_t are in A, and
(b) there does not exist an i and a y_i such that N accepts w_i with guess
string y_i.
The second-order boolean query is (∃z,w_1,...,w_t)(∀
y_1,...,y_t)(M accepts x with guess string z while querying w_1,...,w_t
and for each i, N does not accept w_i with guess string y_i).
The ATM game has White name z, w_1,..., w_t, then has Black name
y_1,...,y_t. It then simulates M on input x with guess string z. If it
rejects, Black wins. If it accepts, the machine continues by simulating
N on each w_i with guess string y_i. If any accept, Black wins -- if all
reject, then White wins.
Bounded-Tiling is in NP because we can have a poly-time NDTM guess the
s by s square array of tiles and then verify that the horizontal and vertical
constraints are met at every point and that the specified squares are as
they should be. There is an accepting computation of this NDTM iff the
Bounded-Tiling problem is soluble.
To prove that Bounded-Tiling is NP-complete, we reduce the bounded one-tape
NDTM problem {(M,x,1^t): There exists an accepting computation of M on x with
at most t steps} to Bounded-Tiling. We design a set of tiles to represent
all possible contents of one square of the tableau from the Fagin or
Cook-Levin proof. We design constraints so that an s by s array of tiles
can meet the constraints iff it represents an accepting tableau of M on input
x with exactly s steps. (I will skip the details of this, but we can have
a separate tile type for each of the characters in x, and constraints forcing
them to come on the t=0 row of the tableau in the proper order.) Then our
reduction maps (M,x,i^t) to (T,1^t) where T is this set of tiling rules.
one-tape A
This question was a bit unfair, in that you should have been able to
prove that COLORS is in either INAPPROX or APPROX but you need
to quote more advanced results to say that it is in INAPPROX.
The reason is cannot have a PTAS is that if there were a 1/4
approximation scheme, you could use this scheme to test 3-COLOR, an
NP-complete problem, in poly time and thus P would equal NP.
Given a graph G and a poly-time 1/4 approximation scheme, run the
scheme on the graph and answer "yes" to 3-COLOR iff the scheme claims
that the answer is 3 or fewer colors. If G is 3-colorable, the scheme
must give and answer of at most 3(1 + 1/4) = 15/4, that is at most 3
because it must answer an integer. If the graph requires 4 or more
colors the scheme cannot give an answer less than 4 (because no such
feasible solution exists) so we say that the graph is not 3-colorable,
which is correct.
For each position (x,y)
in the grid, for each of the eight directions, see whether
the next four squares in that direction from (x,y) have the same contents
(X or O) as the square (x,y). If this never happens the position is open.
If it happens more than once (except for the two ends of the same five-in-a-row
situation) the position is invalid.
Performing this test requires a loop through all squares (x,y), which
requires O(log n) space for counters for x and y. For each value of (x,y)
we must inspect at most 33 positions in the grid -- (x,y) itself and up to
four neighbors in each direction. This takes only constant space once x and
y are recorded. We can also do this with a first-order query, using
first-order variables for x and y and boolean operators to collect the results
of the 33 tests.
The ATM will have an array of variables in its read-write memory to
represent the entire game position. The players will alternate making
moves to the grid in accordance with the rules of the game. The ATM will
check after each move that the rules were followed (a player who cheats
loses immediately) and checks whether either player has won.
The game can be played on an n by n board in O(n^2) time, because each
move can be processed in constant time. (To do this we have to specialize
the victory test, so that it just makes the up to 33 tests needed to see
whether the last move created a five-in-a-row. Otherwise the running time
would be some larger polynomial.) Note that we are also using O(n^2)
bits of space. We have thus put the testing of a position in the class
ATIME(n^2), which is equal to DSPACE(n^2), contained within PSPACE. It is
not clear how one could decide a position in P, but I don't know whether
this particular problem has been proved to be PSPACE-complete.
Last modified 26 December 2004