CS151 Complexity Theory Lecture 12 May 10, 2019.

Slides:



Advertisements
Similar presentations
Complexity Theory Lecture 6
Advertisements

COMPLEXITY THEORY CSci 5403 LECTURE XVI: COUNTING PROBLEMS AND RANDOMIZED REDUCTIONS.
Complexity Theory Lecture 7
Lecture 16: Relativization Umans Complexity Theory Lecturess.
CS151 Complexity Theory Lecture 17 May 27, CS151 Lecture 172 Outline elements of the proof of the PCP Theorem counting problems –#P and its relation.
Complexity class NP Is the class of languages that can be verified by a polynomial-time algorithm. L = { x in {0,1}* | there exists a certificate y with.
CS151 Complexity Theory Lecture 5 April 13, 2015.
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.
CS151 Complexity Theory Lecture 7 April 20, 2004.
CS151 Complexity Theory Lecture 5 April 13, 2004.
CS151 Complexity Theory Lecture 12 May 6, CS151 Lecture 122 Outline The Polynomial-Time Hierarachy (PH) Complete problems for classes in PH, PSPACE.
CS151 Complexity Theory Lecture 7 April 20, 2015.
CS151 Complexity Theory Lecture 2 April 3, Time and Space A motivating question: –Boolean formula with n nodes –evaluate using O(log n) space?
CS151 Complexity Theory Lecture 13 May 11, CS151 Lecture 132 Outline Natural complete problems for PH and PSPACE proof systems interactive proofs.
CS151 Complexity Theory Lecture 15 May 18, CS151 Lecture 152 Outline IP = PSPACE Arthur-Merlin games –classes MA, AM Optimization, Approximation,
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
The Polynomial Hierarchy By Moti Meir And Yitzhak Sapir Based on notes from lectures by Oded Goldreich taken by Ronen Mizrahi, and lectures by Ely Porat.
CS151 Complexity Theory Lecture 2 April 1, CS151 Lecture 22 Time and Space A motivating question: –Boolean formula with n nodes –evaluate using.
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.
May 9, New Topic The complexity of counting.
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,
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
Fall 2013 CMU CS Computational Complexity Lecture 7 Alternating Quantifiers, PH, PSPACE. These slides are mostly a resequencing of Chris Umans’
Fall 2013 CMU CS Computational Complexity Lectures 8-9 Randomness, communication, complexity of unique solutions These slides are mostly a resequencing.
CS151 Complexity Theory Lecture 16 May 20, The outer verifier Theorem: NP  PCP[log n, polylog n] Proof (first steps): –define: Polynomial Constraint.
Umans Complexity Theory Lectures Lecture 1c: Robust Time & Space Classes.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
The NP class. NP-completeness
More NP-Complete and NP-hard Problems
P & NP.
Umans Complexity Theory Lectures
Computational Complexity Theory
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Umans Complexity Theory Lectures
Umans Complexity Theory Lectures
CS151 Complexity Theory Lecture 11 May 8, 2017.
NP-Completeness Yin Tat Lee
CS21 Decidability and Tractability
Intro to Theory of Computation
Intro to Theory of Computation
CS151 Complexity Theory Lecture 2 April 5, 2017.
CS151 Complexity Theory Lecture 13 May 15, 2017.
CS151 Complexity Theory Lecture 3 April 10, 2017.
CS21 Decidability and Tractability
NP-Completeness Yin Tat Lee
Umans Complexity Theory Lectures
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS21 Decidability and Tractability
The Polynomial Hierarchy
CS21 Decidability and Tractability
Theory of Computability
Umans Complexity Theory Lectures
CSE 589 Applied Algorithms Spring 1999
CS151 Complexity Theory Lecture 7 April 23, 2019.
CS151 Complexity Theory Lecture 11 May 7, 2019.
Instructor: Aaron Roth
Instructor: Aaron Roth
CS151 Complexity Theory Lecture 5 April 16, 2019.
CS151 Complexity Theory Lecture 4 April 12, 2019.
Intro to Theory of Computation
CS151 Complexity Theory Lecture 4 April 8, 2004.
Lecture 23 NP-Hard Problems
Presentation transcript:

CS151 Complexity Theory Lecture 12 May 10, 2019

Alternating quantifiers Nicer, more usable version: L∈Σi iff expressible as L = { x | ∃y1 ∀y2 ∃y3 …Qyi (x, y1,y2,…,yi)∈R } where Q= ∀/∃ if i even/odd, and R∈P L∈Πi iff expressible as L = { x | ∀y1 ∃y2 ∀y3 …Qyi (x, y1,y2,…,yi)∈R } where Q= ∃/∀ if i even/odd, and R∈P May 10, 2019

Alternating quantifiers Pleasing viewpoint: “∃∀∃∀∃∀∃…” PSPACE const. # of alternations poly(n) alternations PH Δ3 Σ2 Π2 “∃∀” “∀∃” “∃∀∃ …” Σi “∀∃∀ …” Πi Δ2 Σ3 “∃∀∃” “∀∃∀” Π3 NP coNP “∃” “∀” P May 10, 2019

Complete problems three variants of SAT: QSATi (i odd) = {3-CNFs φ(x1, x2, …, xi) for which ∃x1∀x2 ∃x3 … ∃xi φ(x1, x2, …, xi) = 1} QSATi (i even) = {3-DNFs φ(x1, x2, …, xi) for which ∃x1 ∀x2 ∃x3 … ∀xi φ(x1, x2, …, xi) = 1} QSAT = {3-CNFs φ for which ∃x1 ∀x2 ∃x3 … Qxn φ(x1, x2, …, xn) = 1} May 10, 2019

{ x | ∃y1 ∀y2 ∃y3 … ∃yi (x, y1,y2,…,yi) ∈ R } QSATi is Σi-complete Theorem: QSATi is Σi-complete. Proof: (clearly in Σi) assume i odd; given L ∈ Σi in form { x | ∃y1 ∀y2 ∃y3 … ∃yi (x, y1,y2,…,yi) ∈ R } …x… …y1… …y2… …y3… … …yi… C CVAL reduction for R 1 iff (x, y1,y2,…,yi) ∈ R May 10, 2019

QSATi is Σi-complete Problem set: can construct 3-CNF φ from C: …x… …y1… …y2… …y3… … …yi… C 1 iff (x, y1,y2,…,yi) ∈ R CVAL reduction for R Problem set: can construct 3-CNF φ from C: ∃z φ(x,y1,…,yi, z) = 1 ⇔ C(x,y1,…,yi) = 1 we get: ∃y1 ∀y2… ∃yi ∃z φ(x,y1,…,yi, z) = 1 ⇔ ∃y1 ∀y2… ∃yi C(x,y1,…,yi) = 1 ⇔ x ∈ L May 10, 2019

{ x | ∃y1 ∀y2 ∃y3 … ∀yi (x, y1,y2,…,yi) ∈ R } QSATi is Σi-complete Proof (continued) assume i even; given L ∈ Σi in form { x | ∃y1 ∀y2 ∃y3 … ∀yi (x, y1,y2,…,yi) ∈ R } …x… …y1… …y2… …y3… … …yi… C CVAL reduction for R 1 iff (x, y1,y2,…,yi) ∈ R May 10, 2019

QSATi is Σi-complete Problem set: can construct 3-DNF φ from C: …x… …y1… …y2… …y3… … …yi… C 1 iff (x, y1,y2,…,yi) ∈ R CVAL reduction for R Problem set: can construct 3-DNF φ from C: ∀z φ(x,y1,…,yi, z) = 1 ⇔ C(x,y1,…,yi) = 1 we get: ∃y1 ∀y2… ∀yi ∀z φ(x,y1,y2,…,yi, z) = 1 ⇔ ∃y1 ∀y2… ∀yi C(x,y1,y2,…,yi) = 1 ⇔ x ∈ L May 10, 2019

QSAT is PSPACE-complete Theorem: QSAT is PSPACE-complete. Proof: ∀x1 ∃x2 ∀x3 … Qxn φ(x1, x2, …, xn)? in PSPACE: ∃x1 ∀x2 ∃x3 … Qxn φ(x1, x2, …, xn)? “∃x1”: for each x1, recursively solve ∀x2 ∃x3 … Qxn φ(x1, x2, …, xn)? if encounter “yes”, return “yes” “∀x1”: for each x1, recursively solve ∃x2 ∀x3 … 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 May 10, 2019

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. May 10, 2019

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…Qwm φ(w1,…,wm) REACH(START, ACCEPT, nk) May 10, 2019

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

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 … May 10, 2019

QSAT is PSPACE-complete Key observation #1: REACH(A, B, i+1) ⇔ ∃Z [REACH(A, Z, i) ∧ REACH(Z, B, i)] cannot define ψi+1(A, B) to be ∃Z [ψi(A, Z) ∧ ψi(Z, B)] (why?) May 10, 2019

QSAT is PSPACE-complete Key idea #2: use quantifiers couldn’t do ψi+1(A, B) = ∃Z [ψi(A, Z)∧ψi(Z, B)] define ψi+1(A, B) to be ∃Z∀X∀Y [((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) May 10, 2019

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[((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 May 10, 2019

PH collapse Theorem: if Σi = Πi then for all j > i NP coNP Σ3 Π3 Δ3 PH Σ2 Π2 Δ2 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 May 10, 2019

R = { (x,y) | ∃ z ((x, y), z) ∈ R’ } PH collapse recall: L ∈ Σi+1 iff expressible as L = { x | ∃ y (x, y) ∈ R } where R ∈ Πi since Πi = Σi, R expressible as R = { (x,y) | ∃ z ((x, y), z) ∈ R’ } where R’ ∈ Πi-1 together: L = { x | ∃ (y, z) (x, (y, z)) ∈ R’} conclude L ∈ Σi May 10, 2019

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 May 10, 2019

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 May 10, 2019

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. May 10, 2019

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

Natural complete problems in PSPACE Theorem: GEOGRAPHY is PSPACE-complete. Proof: in PSPACE easily expressed with alternating quantifiers PSPACE-hard reduction from QSAT May 10, 2019

Natural complete problems in 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? May 10, 2019

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 ⇒ PH collapses to P, same as if SAT ∈ P May 10, 2019

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 : ∀y ∃z (x, y, z) ∈ R} with R ∈ P. May 10, 2019

Karp-Lipton L = { x : ∀y ∃z (x, y, z) ∈ R} given (x, y), “∃z (x, y, z) ∈ R?” is in NP pretend C solves SAT, use self-reducibility Claim: if SAT ∈ P/poly, then L = { x : ∃C ∀y [use C repeatedly to find some z for which (x, y, z) ∈ R; accept iff (x, y, z) ∈ R] } poly time May 10, 2019

Karp-Lipton L = { x : ∀y ∃z (x, y, z) ∈ R} {x : ∃C ∀y [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 ⇒ ∃C ∀y […] accepts x ∉ L: ∃y ∀z (x, y, z) ∉ R ⇒ ∀C ∃y […] rejects May 10, 2019

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 much weaker May 10, 2019

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) May 10, 2019

BPP ⊆ PH view y’ = (w, z), each of length n/2 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…00 000…01 000…10 … 111…11 x∈L 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 … 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 x∉L 1 … 1 1 1 1 1 May 10, 2019

BPP ⊆ PH proof (continued): strong error reduction: # bad y’ < 2n/3 y’ = (w, z) with |w| = |z| = n/2 Claim: L = {x : ∃w ∀z M’(x, (w, z)) = 1 } x∈L: suppose ∀w∃z M’(x, (w, z)) = 0 implies ≥ 2n/2 0’s; contradiction x∉L: suppose ∃w∀z M’(x, (w, z)) = 1 implies ≥ 2n/2 1’s; contradiction May 10, 2019

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 : ∃w ∀z M’(x, (w, z)) = 1} thus BPP ⊆ Σ2 BPP closed under complement ⇒ BPP ⊆ Π2 conclude: BPP ⊆ (Π2∩Σ2) May 10, 2019

New Topic The complexity of counting May 10, 2019

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? May 10, 2019

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 ? May 10, 2019

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? May 10, 2019

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 f1(x) f2(y) May 10, 2019

Reductions problem f is #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 f1(x) f2(y) May 10, 2019

#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 May 10, 2019

#SAT f(x) = |{y : (x, y) ∈ R}| C CVAL reduction for R 1 iff (x, y) ∈ R 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}| May 10, 2019

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. May 10, 2019

Relationship to other classes Question: is #P hard because it entails finding NP witnesses? …or is counting difficult by itself? May 10, 2019