CSE596 Problem Set 8 Answer Key Fall 2015

advertisement
CSE596
Problem Set 8 Answer Key
Fall 2015
(A) Discussion Problem: Suppose we try to “improve” the DSPACE hierarchy theorem as
follows: Take a fixed TM M2 that space-constructs the function s2 (n) in the theorem as a
“clock.” Let MU on inputs w = hz, vi first attempt to decode z as a TM M with 1 worktape
plus M2 as an attached “space clock.” If this fails—in particular if M does not include M2 as
an attached space clock metering its main worktape—then MU rejects w. Else it runs M (w)
to completion—since M is space-clocking itself—and accepts w iff M rejects w. Then L(MU )
belongs to DSPACE[s2 (n)] but is different from every language L(Me ) in DSPACE[s2 (n)]. Thus
we have a “poof” by diagonalization that DSPACE[s2 (n)] 6= DSPACE[s2 (n)].
What has gone wrong?? Find the “lie.” Note also some key similarities to the discussion
problem with “P, Q” on Problem Set 5: MU is “P ” with the slight difference that its input is
not exactly “z” but a padded input w = hz, vi that contains z. Q is the step of MU above
that verifies the presence of the M2 space clock which incidentally guarantees that the machine
M decoded from z is total. The last part of MU simulates M (w) and inverts the answer the
same way P does. Does all of complexity crumble into contradiction? (3 pts. checkoff credit
for giving a short summary of the flaw.)
Answer: The hitch is in the way we are treating the theorem that every language L in
DSPACE[s2 (n)] can be accepted by a deterministic TM M with just 1 worktape. This requires
the alphabet of M to be as large as desired, but when the codes of various machines M are
given as input to MU , arbitrarily large alphabets cannot be used verbatim. They must be
“decompressed” into a fixed alphabet such as {0, 1, B}—exactly as ASCII and UNICODE give
binary codes—but this expands the space used arbitrarily. MU cannot use c · s2 (n) space over
its binary alphabet for any constant c fixed in advance for all M . Hence MU does not use
O(s2 (n)) space, so while L(Mu ) ∈
/ DSPACE[s2 (n)] is true it is not a contradiction.
This shows the reason for the technical care taken in our textbook and also why one cannot
be glib about “linear speedup and compression.”
(1) For each of the following stated relationships between complexity classes, say whether
it is known to be true or not. In all cases where it is “known,” you can prove it by applying
theorems in Homer-Selman, section 5.4. Where you say “not known,” explain why the theorem
comparing the two complexity measures involved fails to yield the stated relationship. Note
O(1)
that E = DTIME[2O(n) ] and EXP = DTIME[2n ]. (5 × 6 = 30 pts., items overleaf)
(a) NP ⊆ EXP.
(b) PSPACE ⊆ E.
(c) NSPACE[(log n)2 ] ⊆ P.
(d) P ⊆ DSPACE[n2 ].
(e) NTIME[n + 1] ⊆ E.
Answers: (a) True and known: For any fixed k,
k
NTIME[nk ] ⊆ NSPACE[nk ] ⊆ DTIME[2O(n ) ] ⊆ EXP.
NP equals the union of the left-hand side over k, but this stays within EXP on the right-hand
side, so NP ⊆ EXP.
O(1)
(b) Not known: We get PSPACE ⊆ DTIME[2n ] from the theorems but E =
DTIME[2O(n) ].
2
(c) Also not known: the theorems give us NSPACE[(log n)2 ] ⊆ DTIME[2O((log n) ) ]. The
2
function 2log n is not bounded by a polynomial—it is called a “quasi-polynomial.”
(d) Once again not known. The theorems in section 5.4 give
P = DTIME[nO(1) ] ⊆ NTIME[nO(1) ] ⊆ DSPACE[nO(1) ],
but this goes beyond DSPACE[n2 ] on the right-hand side. If true it would imply P 6= PSPACE
which is unknown.
(e) True and known: NTIME[n + 1] ⊆ NLBA = NSPACE[O(n)] ⊆ DTIME[2O(n) ] = E.
(2) A collection { Ci } of complexity classes forms a proper hierarchy if given any Ci and Cj
with i 6= j, one of them is properly contained in the other. Which of the following collections
are proper hierarchies? Justify your answers, mainly by verifying the relevant “little-o” or “Θ”
relations between time bounds. Here Q+ stands for the positive rational numbers.
(a) { DTIME[nc ] : c ∈ Q+ , c ≥ 1 }.
(b) { DTIME[(n + c)3 ] : c ∈ Q+ , c ≥ 1 }.
(c) { DTIME[2cn ] : c ∈ Q+ }.
1/c
(d) { DTIME[2n ] : c ∈ Q+ , c ≥ 1 }.
(24 pts. total)
Answer: All of the functions involved are time constructible, since c and d are rational.
Hence we need only check, for each case of a time bound t(n, c) and given c < d, whether
t(n, c) log t(n, c) = o(t(n, d)), i.e. whether t(n, c) log t(n, c)/t(n, d) −→ 0 as n −→ ∞. For
convenience we assume that logs are to base e; in none of these cases does the base of the
logarithms matter.
(a) { DTIME[nc ] : c ∈ Q+ , c ≥ 1 }: We get nc log(nc )/nd = c(log n)/nd−c . One application
of L’Hôpital’s Rule turns the ratio into (c0 /n)/(d − c)nd−c−1 , where c0 = c give-or-take a
factor of log2 e I-forget-which, and this equals (c0 /(d − c)) times 1/(n · nd−c−1 ). Ignoring
the constants leaves 1/nd−c , which goes to 0 since d > c. So this is a proper hierarchy.
(b) { DTIME[(n + c)3 ] : c ∈ Q+ , c ≥ 1 }: For all c and d, (n + c)3 and (n + d)3 are both Θ(n3 ),
since the highest-powered term is n3 . By the “Linear Speed-Up Theorem,” all of these
classes are equal, so there is no proper hierarchy.
(c) { DTIME[2cn ] : c ∈ Q+ }: We get 2cn · cn/2dn = cn/2(d−c)n . A trip to the L’Hôpital
eliminates the numerator and leaves the denominator 1/2(d−c)n times some constants, and
again this −→ 0 as n −→ ∞. So this is a proper hierarchy.
1/c
(d) { DTIME[2n ] : c ∈ Q+ , c ≥ 1 }: Note that here higher d makes the time bound smaller,
1/d
1/c
1/c
1/d
so we get 2n n1/d /2n = n1/d /2n −n . L’Hôpital gets messy here, but a permissible
handwave is to reason that for all d > c, there exists an n0 such that for all n > n0 ,
1/c
n1/d < n1/c /2. For such n the ratio is bounded above by n1/d /2n /2 . Since d > 1 this
1/c
is certainly also bounded above by n/2n /2 . Now L’Hôpital kills the numerator like in
(c), and the denominator stays something that clearly goes to ∞ as n does. Hence this
bounding ration goes to 0, taking the original ratio down with it. Thus this is a proper
hierarchy.
(3) First, use padding-and-translation to show that if NLBA is contained in NP then
PSPACE = NP. Then, after quoting theorems to explain why NLBA ⊂ PSPACE (proper
containment), show how the same if-then implication follows from PSPACE being the closure
of NLBA under downward ≤pm -reductions. (12 + 9 = 21 pts., for 78 on the set including the 3
pts. for A).
Answer:
We know PSPACE ⊆ NP from lectures on section 5.4. Let any language A ∈ PSPACE be
given; then it suffices to show that A ∈ N P . By A ∈ PSPACE there is a polynomial p(n) such
that A ∈ DSPACE[p(n)], and we may suppose p(n) ≥ n + 1 for convenience. Define
B = {x10p(|x|)−|x|−1 : x ∈ A}.
Then by padding B ∈ NLBA—in fact, B ∈ DLBA. By the assumption that NLBA is contained
in NP we have B ∈ NP. We also have A ≤pm B via the polynomial-time computable function
f (x) = x10p(|x|)−|x|−1 . Hence A ≤pm B where B ∈ NP, so A ∈ NP as required.
Put the second way, NLBA ⊆ DSPACE[n2 ] by Savitch’s Theorem and DSPACE[n2 ] ⊂
PSPACE by the DSPACE hierarchy theorem, so NLBA ⊂ PSPACE. Or alternately, PSPACE =
NSPACE[nO(1) ] by Savitch and NLBA ⊂ NSPACE[nO(1) ] by the hierarchy theorem for the
NSPACE complexity measure (which was not proved in class). By assumption we have NLBA ⊆
NP. It follows that the closure of the left-hand side is contained in the closure of the right-hand
side. The closure of the left-hand side is PSPACE, but the closure of the right-hand side stays
put as being NP. Hence we get the consequence PSPACE ⊆ NP, which as noted at the outset
suffices to show NP = PSPACE.
Download