CS21 Decidability and Tractability

Slides:



Advertisements
Similar presentations
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Advertisements

INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
1 Space Complexity. 2 Def: Let M be a deterministic Turing Machine that halts on all inputs. Space Complexity of M is the function f:N  N, where f(n)
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
March 2, 2015CS21 Lecture 231 CS21 Decidability and Tractability Lecture 23 March 2, 2015.
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
CS151 Complexity Theory Lecture 12 May 6, CS151 Lecture 122 Outline The Polynomial-Time Hierarachy (PH) Complete problems for classes in PH, PSPACE.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
CS151 Complexity Theory Lecture 13 May 11, CS151 Lecture 132 Outline Natural complete problems for PH and PSPACE proof systems interactive proofs.
February 25, 2015CS21 Lecture 211 CS21 Decidability and Tractability Lecture 21 February 25, 2015.
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
PSPACE-Completeness Section 8.3 Giorgi Japaridze Theory of Computability.
Definition: Let M be a deterministic Turing Machine that halts on all inputs. Space Complexity of M is the function f:N  N, where f(n) is the maximum.
1 Chapter 9 PSPACE: A Class of Problems Beyond NP Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
CS151 Complexity Theory Lecture 13 May 11, Outline proof systems interactive proofs and their power Arthur-Merlin games.
CS151 Complexity Theory Lecture 12 May 6, QSAT is PSPACE-complete Theorem: QSAT is PSPACE-complete. Proof: 8 x 1 9 x 2 8 x 3 … Qx n φ(x 1, x 2,
Fall 2013 CMU CS Computational Complexity Lecture 7 Alternating Quantifiers, PH, PSPACE. These slides are mostly a resequencing of Chris Umans’
A Problem That Is Complete for PSPACE (Polynomial Space) BY TEJA SUDHA GARIGANTI.
Umans Complexity Theory Lectures Lecture 1c: Robust Time & Space Classes.
NPC.
Complexity ©D.Moshkovits 1 2-Satisfiability NOTE: These slides were created by Muli Safra, from OPICS/sat/)
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
Chapter 9 PSPACE: A Class of Problems Beyond NP
NP-Completeness A problem is NP-complete if: It is in NP
CS21 Decidability and Tractability
(xy)(yz)(xz)(zy)
Umans Complexity Theory Lectures
Umans Complexity Theory Lectures
CS21 Decidability and Tractability
Intro to Theory of Computation
Intro to Theory of Computation
Summary.
Geography Game Geography. Amy names capital city c of country she is in. Bob names a capital city c' that starts with the letter on which c ends. Amy.
CS151 Complexity Theory Lecture 2 April 5, 2017.
Where Can We Draw The Line?
CS21 Decidability and Tractability
Computability & Complexity I
CS21 Decidability and Tractability
CSC 4170 Theory of Computation Space complexity Chapter 8.
CS154, Lecture 13: P vs NP.
CS21 Decidability and Tractability
CS21 Decidability and Tractability
Umans Complexity Theory Lectures
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS21 Decidability and Tractability
More NP-complete problems
Theory of Computability
CSE 589 Applied Algorithms Spring 1999
CS151 Complexity Theory Lecture 12 May 10, 2019.
Instructor: Aaron Roth
Instructor: Aaron Roth
CS151 Complexity Theory Lecture 5 April 16, 2019.
CS151 Complexity Theory Lecture 4 April 12, 2019.
LECTURE 2-9 PSPACE-Complete
Intro to Theory of Computation
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

CS21 Decidability and Tractability Lecture 24 March 8, 2019 March 8, 2019 CS21 Lecture 24

Outline The complexity class PSPACE a PSPACE-complete problem PSPACE and 2-player games March 8, 2019 CS21 Lecture 24

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” March 8, 2019 CS21 Lecture 24

Space complexity PSPACE = ∪k ≥ 1 SPACE(nk) Definition: SPACE(t(n)) = {L : there exists a TM M that decides L in space O(t(n))} PSPACE = ∪k ≥ 1 SPACE(nk) March 8, 2019 CS21 Lecture 24

PSPACE NP ⊆ PSPACE, coNP ⊆ PSPACE (proof?) PSPACE ⊆ EXP (proof?) decidable languages P NP NP ⊆ PSPACE, coNP ⊆ PSPACE (proof?) PSPACE ⊆ EXP (proof?) containments believed to be proper March 8, 2019 CS21 Lecture 24

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 March 8, 2019 CS21 Lecture 24

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… March 8, 2019 CS21 Lecture 24

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” “∀x1”: 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 March 8, 2019 CS21 Lecture 24

QSAT is PSPACE-complete given TM M deciding L ∈ PSPACE; input x 2nk possible configurations single START configuration assume single ACCEPT configuration define: REACH(X, Y, i) ⇔ configuration Y reachable from configuration X in at most 2i steps. March 8, 2019 CS21 Lecture 24

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 … ∃wm φ(w1,…,wm) ⇔ REACH(START, ACCEPT, nk) March 8, 2019 CS21 Lecture 24

QSAT is PSPACE-complete for i = 0, 1, … nk produce quantified Boolean expressions ψi(A, B, W) such that ∀ A,B: ∃w1∀w2 … ψi(A, B, W) ⇔ REACH(A, B, i) convert ψnk to 3-CNF φ add variables V hardwire A = START, B = ACCEPT ∃w1∀w2 … ∃V φ(W, V) ⇔ x ∈ L March 8, 2019 CS21 Lecture 24

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 … March 8, 2019 CS21 Lecture 24

QSAT is PSPACE-complete Key observation: REACH(A, B, i+1) ⇔ ∃Z[REACH(A, Z, i) ∧ REACH(Z, B, i)] cannot define ψi+1(A; B; Z, W, W’) to be ∃Z [∃w1∀w2 … ψi(A, Z, W) ∧ ∃w1’ ∀w2’… ψi(Z, B, W’) ] (why?) March 8, 2019 CS21 Lecture 24

QSAT is PSPACE-complete Key idea: use quantifiers couldn’t do ψi+1(A; B; Z, W, W’) = ∃Z [∃w1∀w2 … ψi(A, Z, W) ∧ ∃w1’ ∀w2’… ψi(Z, B, W’) ] define ψi+1(A; B; Z, X, Y, W) to be ∃Z∀X∀Y[((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) March 8, 2019 CS21 Lecture 24

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) = ∃Z∀X∀Y[((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 March 8, 2019 CS21 Lecture 24

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. March 8, 2019 CS21 Lecture 24

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 san francisco davis oakland GEOGRAPHY = {(G, s) : G is a directed graph and player I can win from node s} March 8, 2019 CS21 Lecture 24

PSPACE Theorem: GEOGRAPHY is PSPACE-complete. Proof: in PSPACE (proof?) PSPACE-hard. reduction from QSAT. March 8, 2019 CS21 Lecture 24

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} March 8, 2019 CS21 Lecture 24

∃x1∀x2∃x3∀x4∃x5… ∀xn φ(x1, x2, x3, … xn)? PSPACE ∃x1∀x2∃x3∀x4∃x5… ∀xn φ(x1, x2, x3, … xn)? clause choice gadget true false variable gadget for xi … C1 C2 Cm March 8, 2019 CS21 Lecture 24

∃x1∀x2∃x3 …(¬x1∨x2∨¬x3)∧(¬x3∨x1)∧…∧(x1∨¬x2) 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? March 8, 2019 CS21 Lecture 24