1 / 45

CS151 Complexity Theory

CS151 Complexity Theory. Lecture 12 May 9, 2013. Useful characterization. Recall: L  NP iff expressible as L = { x | 9 y, |y| ≤ |x| k , (x, y)  R } where R  P . Corollary: L  coNP iff expressible as L = { x | 8 y, |y| ≤ |x| k , (x, y)  R } where R  P.

arvin
Download Presentation

CS151 Complexity Theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS151Complexity Theory Lecture 12 May 9, 2013

  2. Useful characterization • Recall: L  NP iff expressible as L = { x | 9y, |y| ≤ |x|k, (x, y)  R } where R  P. • Corollary: L  coNP iff expressible as L = { x | 8y, |y| ≤ |x|k, (x, y)  R } where R  P.

  3. Useful characterization Theorem: L  Σi iff expressible as L = { x | 9 y, |y| ≤ |x|k, (x, y)  R } where R  Πi-1. • Corollary: L  Πi iff expressible as L = { x | 8 y, |y| ≤ |x|k, (x, y)  R } where R  Σi-1.

  4. Alternating quantifiers Nicer, more usable version: • LΣi iff expressible as L = { x | 9y1 8y29y3 …Qyi (x, y1,y2,…,yi)R } where Q= 8/9if i even/odd, and RP • LΠi iff expressible as L = { x | 8y19y2 8y3 …Qyi (x, y1,y2,…,yi)R } where Q= 9/8 if i even/odd, and RP

  5. Alternating quantifiers • Proof: • ( )induction on i • base case: true for Σ1=NP and Π1=coNP • consider LΣi: L = {x | 9y1 (x, y1)  R’ }, for R’  Πi-1 L = {x | 9y1 8y2 9y3 …Qyi ((x, y1), y2,…,yi)R} L = {x | 9y1 8y2 9y3 …Qyi (x, y1,y2,…,yi)R} • same argument for L Πi • ( ) exercise.

  6. Alternating quantifiers Pleasing viewpoint: “9898989…” PSPACE const. # of alternations poly(n) alternations PH Δ3 Σ2 Π2 “98” “89” Σi Πi “989…” “898…” Δ2 Σ3 Π3 “898” “989” NP coNP “8” “9” P

  7. Complete problems • three variants of SAT: • QSATi(i odd) = {3-CNFs φ(x1, x2, …, xi) for which 9x18x29x3 … 9xi φ(x1, x2, …, xi) = 1} • QSATi(i even) = {3-DNFs φ(x1, x2, …, xi) for which 9x18x29x3 … 8xi φ(x1, x2, …, xi) = 1} • QSAT = {3-CNFs φ for which 9x18x29x3 … Qxn φ(x1, x2, …, xn) = 1}

  8. QSATi is Σi-complete Theorem: QSATi is Σi-complete. • Proof: (clearly in Σi) • assume i odd; given L  Σi in form { x | 9y18y29y3 … 9yi (x, y1,y2,…,yi)  R } …x… …y1… …y2… …y3… … …yi… C CVAL reduction for R 1 iff (x, y1,y2,…,yi)  R

  9. QSATi is Σi-complete …x… …y1… …y2… …y3… … …yi… • Problem set: can construct 3-CNF φfrom C: 9zφ(x,y1,…,yi, z) = 1  C(x,y1,…,yi) = 1 • we get: 9y18y2…9yi9zφ(x,y1,…,yi, z) = 1 • 9y18y2…9yi C(x,y1,…,yi) = 1 x  L C 1 iff (x, y1,y2,…,yi)  R CVAL reduction for R

  10. QSATi is Σi-complete • Proof (continued) • assume i even; given L  Σi in form { x | 9y18y29y3 … 8yi (x, y1,y2,…,yi)  R } …x… …y1… …y2… …y3… … …yi… C CVAL reduction for R 1 iff (x, y1,y2,…,yi)  R

  11. QSATi is Σi-complete …x… …y1… …y2… …y3… … …yi… • Problem set: can construct 3-DNF φfrom C: 8zφ(x,y1,…,yi, z) = 1  C(x,y1,…,yi) = 1 • we get: 9y18y2… 8yi8zφ(x,y1,y2,…,yi, z) = 1  9y18y2…8yi C(x,y1,y2,…,yi) = 1  x  L C 1 iff (x, y1,y2,…,yi)  R CVAL reduction for R

  12. QSAT is PSPACE-complete Theorem: QSAT is PSPACE-complete. • Proof: 8x19x28x3 … Qxn φ(x1, x2, …, xn)? • in PSPACE: 9x18x29x3 … Qxn φ(x1, x2, …, xn)? • “9x1”: for each x1, recursively solve 8x29x3 … Qxn φ(x1, x2, …, xn)? • if encounter “yes”, return “yes” • “8x1”: for each x1, recursively solve 9x28x3 … Qxn φ(x1, x2, …, xn)? • if encounter “no”, return “no” • base case: evaluating a 3-CNF expression • poly(n) recursion depth • poly(n) bits of state at each level

  13. QSAT is PSPACE-complete • given TM M deciding L  PSPACE; input x • 2nkpossible configurations • single START configuration • assume single ACCEPT configuration • define: REACH(X, Y, i)  configuration Y reachable from configuration X in at most 2i steps.

  14. QSAT is PSPACE-complete REACH(X, Y, i)  configuration Y reachable from configuration X in at most 2i steps. • Goal: produce 3-CNF φ(w1,w2,w3,…,wm) such that 9w18w2…Qwm φ(w1,…,wm) • REACH(START, ACCEPT, nk)

  15. QSAT is PSPACE-complete • for i = 0, 1, … nk produce quantified Boolean expressionsψi(A, B, W) 9w18w2… ψi(A, B, W)  REACH(A, B, i) • convert ψnkto 3-CNF φ • add variables V • 9w18w2… 9V φ(A, B, W, V)  REACH(A, B, nk) • hardwire A = START, B = ACCEPT 9w18w2… 9Vφ(W, V)  x  L

  16. QSAT is PSPACE-complete • ψo(A, B) = true iff • A = B or • A yields B in one step of M Boolean expression of size O(nk) … config. A STEP STEP STEP STEP config. B …

  17. QSAT is PSPACE-complete • Key observation #1: REACH(A, B, i+1)  9Z[REACH(A, Z, i)  REACH(Z, B, i)] • cannot define ψi+1(A, B) to be 9Z [ψi(A, Z)  ψi(Z, B)] (why?)

  18. QSAT is PSPACE-complete • Key idea #2: use quantifiers • couldn’t do ψi+1(A, B) = 9Z [ψi(A, Z)  ψi(Z, B)] • define ψi+1(A, B) to be 9Z8X8Y[((X=AY=Z)(X=ZY=B))  ψi(X, Y)] • ψi(X, Y) is preceded by quantifiers • move to front (they don’t involve X,Y,Z,A,B)

  19. QSAT is PSPACE-complete ψo(A, B) = true iff A = B or A yields B in 1 step ψi+1(A, B) = 9Z8X8Y[((X=AY=Z)(X=ZY=B))  ψi(X, Y)] • |ψ0| = O(nk) • |ψi+1| = O(nk) + |ψi| • total size of ψnk is O(nk)2 = poly(n) • logspace reduction

  20. PH Σ3 Π3 Δ3 Σ2 Π2 Δ2 NP coNP P PH collapse Theorem: if Σi = Πi then for all j > i Σj = Πj = Δj= Σi “the polynomial hierarchy collapses to the i-th level” • Proof: • sufficient to show Σi = Σi+1 • then Σi+1= Σi = Πi =Πi+1;apply theorem again

  21. PH collapse • recall: L  Σi+1 iff expressible as L = { x | 9 y (x, y)  R } where R  Πi • since Πi = Σi, R expressible as R = { (x,y) | 9z((x, y), z) R’ } where R’  Πi-1 • together: L = { x | 9 (y, z) (x, (y, z))  R’} • conclude L  Σi

  22. Oracles vs. Algorithms A point to ponder: • given poly-time algorithm for SAT • can you solve MIN CIRCUIT efficiently? • what other problems? Entire complexity classes? • given SAT oracle • same input/output behavior • can you solve MIN CIRCUIT efficiently?

  23. Natural complete problems • We now have versions of SAT complete for levels in PH, PSPACE • Natural complete problems? • PSPACE: games • PH: almost all natural problems lie in the second and third level

  24. Natural complete problems in PH • MIN CIRCUIT • good candidate to be 2-complete, still open • MIN DNF: given DNF φ, integer k; is there a DNF φ’ of size at most k computing same function φ does? Theorem (U): MIN DNF is Σ2-complete.

  25. Natural complete problems in PSPACE • General phenomenon: many 2-player games are PSPACE-complete. • 2 players I, II • alternate pick- ing edges • lose when no unvisited choice pasadena auckland athens davis san francisco oakland • GEOGRAPHY = {(G, s) : G is a directed graph and player I can win from node s}

  26. Natural complete problems in PSPACE Theorem: GEOGRAPHY is PSPACE-complete. Proof: • in PSPACE • easily expressed with alternating quantifiers • PSPACE-hard • reduction from QSAT

  27. Natural complete problems in PSPACE 9x18x29x3…(x1x2x3)(x3x1)…(x1x2) I false alternately pick truth assignment true x1 II I II x2 true false I II I I x3 true false pick a clause II II … I I pick a true literal?

  28. Karp-Lipton • we know that P = NP implies SAT has polynomial-size circuits. • (showing SAT does not have poly-size circuits is one route to proving P ≠ NP) • suppose SAT has poly-size circuits • any consequences? • might hope: SAT  P/poly PHcollapses to P, same as if SAT  P

  29. Karp-Lipton Theorem (KL): if SAT has poly-size circuits then PH collapses to the second level. • Proof: • suffices to show Π2 Σ2 • L Π2 implies L expressible as: L = {x : 8y 9z (x, y, z)  R} with R  P.

  30. Karp-Lipton L = {x : 8y 9z (x, y, z)  R} • given (x, y), “9z (x, y, z)  R?” is in NP • pretend C solves SAT, use self-reducibility • Claim: if SAT  P/poly, then L = { x : 9C 8y [use C repeatedly to find some z for which (x, y, z)  R; accept iff (x, y, z)  R] } poly time

  31. Karp-Lipton L = {x : 8y 9z (x, y, z)  R} {x : 9C 8y [use C repeatedly to find some z for which (x,y,z)  R; accept iff (x,y,z)  R] } • x  L: • some C decides SAT  9C 8y[…] accepts • x  L: • 9y 8z (x, y, z)  R  9C 8y[…] rejects

  32. BPP PH • Recall: don’t know BPP different from EXP Theorem (S,L,GZ): BPP (Π2Σ2) • don’t know Π2Σ2 different from EXP but believe muchweaker

  33. BPP PH • Proof: • BPP language L: p.p.t. TM M: x  L  Pry[M(x,y) accepts] ≥ 2/3 x  L  Pry[M(x,y) rejects] ≥ 2/3 • strong error reduction: p.p.t. TM M’ • use n random bits (|y’| = n) • # strings y’ for which M’(x, y’) incorrect is at most 2n/3 • (can’t achieve with naïve amplification)

  34. BPP PH so many ones, some disk is all ones so few ones, not enough for whole disk • view y’ = (w, z), each of length n/2 • consider output of M’(x, (w, z)): w =000…00000…01000…10 … 111…11 xL 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 … 0 1 1 1 0 1 1 0 1 1 1 1 0 1 0 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 0 1 1 0 1 xL 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 … 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

  35. BPP PH • proof (continued): • strong error reduction: # bad y’ < 2n/3 • y’ = (w, z) with |w| = |z| = n/2 • Claim: L = {x : 9w 8z M’(x, (w, z)) = 1 } • xL: suppose 8w9z M’(x, (w, z)) = 0 • implies  2n/2 0’s; contradiction • xL: suppose 9w8z M’(x, (w, z)) = 1 • implies  2n/2 1’s; contradiction

  36. BPP PH • given BPP language L: p.p.t. TM M: x  L  Pry[M(x,y) accepts] ≥ 2/3 x  L  Pry[M(x,y) rejects] ≥ 2/3 • showed L = {x : 9w 8z M’(x, (w, z)) = 1} • thus BPP  Σ2 • BPP closed under complement BPP  Π2 • conclude: BPP (Π2Σ2)

  37. New Topic The complexity of counting

  38. Counting problems • So far, we have ignored function problems • given x, compute f(x) • important class of function problems: counting problems • e.g. given 3-CNF φ how many satisfying assignments are there?

  39. Counting problems • #P is the class of function problems expressible as: input x f(x) = |{y : (x, y)  R}| where R  P. • compare to NP(decision problem) input x f(x) = y : (x, y)  R ? where R  P.

  40. Counting problems • examples • #SAT: given 3-CNF φ how many satisfying assignments are there? • #CLIQUE: given (G, k) how many cliques of size at least k are there?

  41. Reductions • Reduction from function problem f1 to function problem f2 • two efficiently computable functions Q, A x (prob. 1) Q y (prob. 2) f1 f2 A f2(y) f1(x)

  42. Reductions • problem fis #P-complete if • f is in #P • every problem in #P reduces to f • “parsimonious reduction”: A is identity • many standard NP-completeness reductions are parsimonious • therefore: if #SAT is #P-complete we get lots of #P-complete problems Q x (prob. 1) y (prob. 2) f1 f2 A f2(y) f1(x)

  43. #SAT #SAT: given 3-CNF φ how many satisfying assignments are there? Theorem: #SAT is #P-complete. • Proof: • clearly in #P: (φ, A)  R  A satisfies φ • take any f  #P defined by R  P

  44. #SAT …x… …y… • add new variables z, produce φ such that z φ(x, y, z) = 1  C(x, y) = 1 • for (x, y) such that C(x, y) = 1 this z is unique • hardwire x • # satisfying assignments = |{y : (x, y)  R}| f(x) = |{y : (x, y)  R}| C CVAL reduction for R 1 iff (x, y)  R

  45. Relationship to other classes • To compare to classes of decision problems, usually consider P#P which is a decision class… • easy: NP, coNP  P#P • easy: P#P  PSPACE Toda’s Theorem (homework):PH  P#P.

More Related