1 / 21

CS21 Decidability and Tractability

CS21 Decidability and Tractability. Lecture 24 March 5, 2014. Outline. the class PSPACE a PSPACE-complete problem PSPACE and 2-player games. Space complexity. Definition : the space complexity of a TM M is a function f: N → N

vanida
Download Presentation

CS21 Decidability and Tractability

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. CS21 Decidability and Tractability Lecture 24 March 5, 2014 CS21 Lecture 24

  2. Outline • the class PSPACE • a PSPACE-complete problem • PSPACE and 2-player games CS21 Lecture 24

  3. Space complexity Definition: the space complexity of a TM M is a function f:N→ N where f(n) is the maximum number of tape cells M scans on any input of length n. • “M uses space f(n),” “M is a f(n) space TM” CS21 Lecture 24

  4. Space complexity Definition: SPACE(t(n)) = {L : there exists a TM M that decides L in space O(t(n))} PSPACE = k ≥ 1 SPACE(nk) CS21 Lecture 24

  5. PSPACE coNP EXP PSPACE • NP  PSPACE, coNP  PSPACE (proof?) • PSPACE  EXP (proof?) • containments believed to be proper decidable languages P NP CS21 Lecture 24

  6. PSPACE • A PSPACE-complete problem: • Quantified Satisfiability: QSAT = {φ : φ is a 3-CNF, and x1x2x3x4x5…xn φ(x1, x2, x3, … xn) } • example: φ = (x1x2x3)(x2x3) x1x2x3φ? YES: x1=T; if x2=T, set x3=F; if x2=F, set x3=T CS21 Lecture 24

  7. PSPACE • A PSPACE-complete problem: • Quantified Satisfiability: QSAT = {φ : φ is a 3-CNF, and x1x2x3x4x5…xn φ(x1, x2, x3, … xn) } • example: φ = (x1x2x3)(x2) x1x2x3φ? NO: x1=T; if x2=T…; x1=F; if x2=T… CS21 Lecture 24

  8. QSAT is PSPACE-complete Theorem: QSAT is PSPACE-complete. • Proof: • in PSPACE: x1x2x3… Qxn φ(x1, x2, …, xn)? • “x1”: for both x1 = 0, x1 = 1, recursively solve x2x3 … Qxn φ(x1, x2, …, xn)? • if at least one “yes”, return “yes”; else return “no” • “8x1”: for both x1 = 0, x1 = 1, recursively solve x2x3 … Qxn φ(x1, x2, …, xn)? • if at least one “no”, return “no”; else return “yes” • base case: evaluating a 3-CNF expression • poly(n) recursion depth • poly(n) bits of state at each level CS21 Lecture 24

  9. 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. CS21 Lecture 24

  10. 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 w1w2 …9wm φ(w1,…,wm) • REACH(START, ACCEPT, nk) CS21 Lecture 24

  11. QSAT is PSPACE-complete • for i = 0, 1, … nk produce quantified Boolean expressionsψi(A, B, W) such that 8 A,B: w1w2 … ψi(A, B, W)  REACH(A, B, i) • convert ψnkto 3-CNF φ • add variables V • hardwire A = START, B = ACCEPT w1w2 … V φ(W, V)  x  L CS21 Lecture 24

  12. 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 … CS21 Lecture 24

  13. QSAT is PSPACE-complete • Key observation: REACH(A, B, i+1)  9 Z[REACH(A, Z, i)  REACH(Z, B, i)] • cannot define ψi+1(A; B; Z, W, W’) to be 9 Z [w1w2 … ψi(A, Z, W) w1’ 8w2’… ψi(Z, B, W’)] (why?) CS21 Lecture 24

  14. QSAT is PSPACE-complete • Key idea: use quantifiers • couldn’t do ψi+1(A; B; Z, W, W’) = 9 Z [w1w2 … ψi(A, Z, W) w1’ 8w2’… ψi(Z, B, W’)] • define ψi+1(A; B; Z, X, Y, W) to be 9Z 8X 8Y[((X=AY=Z)(X=ZY=B))  w1w2 … ψi(X, Y, W)] • ψi(X, Y, W) is preceded by quantifiers • move to front (they don’t involve X,Y,Z,A,B) CS21 Lecture 24

  15. QSAT is PSPACE-complete ψo(A, B) = true iff A = B or A yields B in 1 step ψi+1(A; B; Z, X, Y, W) = 9Z 8X 8Y[((X=AY=Z)(X=ZY=B))  w1w2 … ψi(X, Y, W)] • |ψ0| = O(nk) • |ψi+1| = O(nk) + |ψi| • total size of ψnk is O(nk)2 = poly(n) • reduction runs in polynomial time CS21 Lecture 24

  16. PSPACE and games QSAT = {φ : φ is a 3-CNF, and x1x2x3x4x5…xn φ(x1, x2, x3, … xn) } • Think of as 2-player game (player 1 trying to satisfy φ; player 2 adversary): • player 1 picks truth value for x1 • player 2 picks truth value for x2 • player 1 picks truth value for x3… • φ  QSAT iff player 1 can win no matter what player 2 does. CS21 Lecture 24

  17. PSPACE and games • 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} CS21 Lecture 24

  18. PSPACE Theorem: GEOGRAPHY is PSPACE-complete. Proof: • in PSPACE (proof?) • PSPACE-hard. reduction from QSAT. CS21 Lecture 24

  19. GEOGRAPHY is PSPACE-complete • We are reducing from the language: QSAT = {φ : φ is a 3-CNF, and x1x2x3x4x5…xn φ(x1, x2, x3, … xn) } to the language: GEOGRAPHY = {(G, s) : G is a directed graph and player I can win from node s} CS21 Lecture 24

  20. PSPACE x1x2x3x4x5…xn φ(x1, x2, …, xn)? clause choice gadget true false variable gadget for xi … C1 C2 Cm CS21 Lecture 24

  21. PSPACE x1x2x3 …(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? CS21 Lecture 24

More Related