CS151 Complexity Theory Lecture 12 May 6, 2015. 2 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,

Slides:



Advertisements
Similar presentations
Complexity Theory Lecture 6
Advertisements

COMPLEXITY THEORY CSci 5403 LECTURE XVI: COUNTING PROBLEMS AND RANDOMIZED REDUCTIONS.
Complexity Theory Lecture 7
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
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.
Department of Computer Science & Engineering
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
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.
Graphs 4/16/2017 8:41 PM NP-Completeness.
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.
1 Perfect Matchings in Bipartite Graphs An undirected graph G=(U  V,E) is bipartite if U  V=  and E  U  V. A 1-1 and onto function f:U  V is a perfect.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
CS151 Complexity Theory Lecture 2 April 3, Time and Space A motivating question: –Boolean formula with n nodes –evaluate using O(log n) space?
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
CS151 Complexity Theory Lecture 13 May 11, CS151 Lecture 132 Outline Natural complete problems for PH and PSPACE proof systems interactive proofs.
1 On the Computation of the Permanent Dana Moshkovitz.
CS151 Complexity Theory Lecture 15 May 18, CS151 Lecture 152 Outline IP = PSPACE Arthur-Merlin games –classes MA, AM Optimization, Approximation,
CS151 Complexity Theory Lecture 6 April 15, 2004.
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.
CS151 Complexity Theory Lecture 2 April 1, CS151 Lecture 22 Time and Space A motivating question: –Boolean formula with n nodes –evaluate using.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
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.
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.
1 Interactive Proofs proof systems interactive proofs and their power Arthur-Merlin games.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
May 9, New Topic The complexity of counting.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
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.
Computability & Complexity II Chris Umans Caltech.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong The Cook-Levin.
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.
NPC.
Fall 2013 CMU CS Computational Complexity Lecture 2 Diagonalization, 9/12/2013.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
 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
Umans Complexity Theory Lectures
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Umans Complexity Theory Lectures
Perfect Matchings in Bipartite Graphs
Umans Complexity Theory Lectures
CS21 Decidability and Tractability
Intro to Theory of Computation
CS151 Complexity Theory Lecture 13 May 15, 2017.
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS21 Decidability and Tractability
Umans Complexity Theory Lectures
CS151 Complexity Theory Lecture 12 May 10, 2019.
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

CS151 Complexity Theory Lecture 12 May 6, 2015

2 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, …, x n )? –in PSPACE: 9 x 1 8 x 2 9 x 3 … Qx n φ(x 1, x 2, …, x n )? –“ 9 x 1 ”: for each x 1, recursively solve 8 x 2 9 x 3 … Qx n φ(x 1, x 2, …, x n )? if encounter “yes”, return “yes” –“ 8 x 1 ”: for each x 1, recursively solve 9 x 2 8 x 3 … Qx n φ(x 1, x 2, …, x n )? 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 6, QSAT is PSPACE-complete –given TM M deciding L  PSPACE; input x –2 n k possible configurations –single START configuration –assume single ACCEPT configuration –define: REACH(X, Y, i)  configuration Y reachable from configuration X in at most 2 i steps.

May 6, QSAT is PSPACE-complete REACH(X, Y, i)  configuration Y reachable from configuration X in at most 2 i steps. –Goal: produce 3-CNF φ(w 1,w 2,w 3,…,w m ) such that 9 w 1 8 w 2 …Qw m φ(w 1,…,w m )  REACH(START, ACCEPT, n k )

May 6, QSAT is PSPACE-complete –for i = 0, 1, … n k produce quantified Boolean expressions ψ i (A, B, W) 9 w 1 8 w 2 … ψ i (A, B, W)  REACH(A, B, i) –convert ψ n k to 3-CNF φ add variables V 9 w 1 8 w 2 … 9 V φ(A, B, W, V)  REACH(A, B, n k ) –hardwire A = START, B = ACCEPT 9 w 1 8 w 2 … 9 V φ(W, V)  x  L

May 6, QSAT is PSPACE-complete –ψ o (A, B) = true iff A = B or A yields B in one step of M … … STEP config. A config. B Boolean expression of size O(n k )

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

May 6, QSAT is PSPACE-complete –Key idea #2: use quantifiers –couldn’t do ψ i+1 (A, B) = 9 Z [ ψ i (A, Z)  ψ i (Z, B) ] –define ψ i+1 (A, B) to be 9 Z 8 X 8 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 6, QSAT is PSPACE-complete ψ o (A, B) = true iff A = B or A yields B in 1 step ψ i+1 (A, B) = 9 Z 8 X 8 Y [ ((X=A  Y=Z)  (X=Z  Y=B))  ψ i (X, Y) ] –|ψ 0 | = O(n k ) –|ψ i+1 | = O(n k ) + |ψ i | –total size of ψ n k is O(n k ) 2 = poly(n) –logspace reduction

May 6, 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 P NP coNP Σ3Σ3 Π3Π3 Δ3Δ3 PH Σ2Σ2 Π2Π2 Δ2Δ2

May 6, 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) | 9 z ((x, y), z)  R’ } where R’  Π i-1 –together: L = { x | 9 (y, z) (x, (y, z))  R’} –conclude L  Σ i

May 6, 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?

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

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

May 6, Natural complete problems in PSPACE 9 x 1 8 x 2 9 x 3 …(  x 1  x 2  x 3 )  (  x 3  x 1 )  …  (x 1  x 2 ) true false truefalse truefalse … x1x1 x2x2 x3x3 I II I I I I alternately pick truth assignment pick a clause I II I pick a true literal?

May 6, 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 6, 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 : 8 y 9 z (x, y, z)  R} with R  P.

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

May 6, Karp-Lipton L = { x : 8 y 9 z (x, y, z)  R} {x : 9 C 8 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  9 C 8 y […] accepts –x  L: 9 y 8 z (x, y, z)  R  9 C 8 y […] rejects

May 6, 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 6, BPP  PH Proof: –BPP language L: p.p.t. TM M: x  L  Pr y [M(x,y) accepts] ≥ 2/3 x  L  Pr y [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 2 n/3 (can’t achieve with naïve amplification)

May 6, BPP  PH 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LxL xLxL so many ones, some disk is all ones so few ones, not enough for whole disk

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

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

May 6, New Topic The complexity of counting

May 6, 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 6, 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.

May 6, 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 6, Reductions Reduction from function problem f 1 to function problem f 2 –two efficiently computable functions Q, A x (prob. 1) y (prob. 2) f 2 (y) f 1 (x) Q A f2f2 f1f1

May 6, 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 x (prob. 1) y (prob. 2) f 2 (y) f 1 (x) Q A f2f2 f1f1

May 6, #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

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

May 6, 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 6, Relationship to other classes Question: is #P hard because it entails finding NP witnesses? …or is counting difficult by itself?

May 6, Bipartite Matchings Definition: –G = (U, V, E) bipartite graph with |U| = |V| –a perfect matching in G is a subset M  E that touches every node, and no two edges in M share an endpoint

May 6, Bipartite Matchings Definition: –G = (U, V, E) bipartite graph with |U| = |V| –a perfect matching in G is a subset M  E that touches every node, and no two edges in M share an endpoint

May 6, Bipartite Matchings #MATCHING: given a bipartite graph G = (U, V, E) how many perfect matchings does it have? Theorem: #MATCHING is #P-complete. But… can find a perfect matching in polynomial time! –counting itself must be difficult

May 6, Cycle Covers Claim: 1-1 correspondence between cycle covers in G’ and perfect matchings in G –#MATCHING and #CYCLE-COVER parsimoniously reducible to each other G = (U, V, E)G’ = (V, E’)

May 6, Cycle Covers cycle cover: collection of node-disjoint directed cycles that touch every node #CYCLE-COVER: given directed graph G = (V, E) how many cycle covers does it have? Theorem: #CYCLE-COVER is #P-complete. –implies #MATCHING is #P-complete

May 6, Cycle Cover is #P-complete variable gadget: every cycle cover includes left cycle or right cycle xixi xixi clause gadget: cycle cover cannot use all three outer edges – and each of 7 ways to exclude at least one gives exactly 1 cover using those external edges

Cycle Cover is #P-complete May 6,

Cycle Cover is #P-complete May 6,

May 6, Cycle Cover is #P-complete clause gadget corresponding to (A  B  C) has “xor” gadget between outer 3 edges and A, B, C B BB A AA C CC xor gadget ensures that exactly one of two edges can be in cover uv u’v’ xor

May 6, Cycle Cover is #P-complete Proof outline (reduce from #SAT) (  x 1  x 2  x 3 )  (  x 3  x 1 )  …  (x 3  x 2 ) x1x1 x1x1 x2x2 x2x2 x3x3 x3x3... clause gadgets variable gadgets xor gadgets (exactly 1 of two edges is in cover) N.B. must avoid reducing SAT to MATCHING!

May 6, Cycle Cover is #P-complete Introduce edge weights –cycle cover weight is product of weights of its edges “implement” xor gadget by –weight of cycle cover that “obeys” xor multiplied by 4 (mod N) –weight of cycle cover that “violates” xor multiplied by N large integer

May 6, Cycle Cover is #P-complete Weighted xor gadget: –weight of cycle cover that “obeys” xor multiplied by 4 (mod N) –weight of cycle cover that “violates” xor multiplied by N uv u’v’ xor u v’ v u’ N (unlabeled weights are 1)

May 6, Cycle Cover is #P-complete Simulating positive edge weights –need to handle 2, 3, 4, 5, …, N k2k k times

May 6, Cycle Cover is #P-complete (  x 1  x 2  x 3 )  (  x 3  x 1 )  …  (x 3  x 2 ) –m = # xor gadgets; n = # variables; N > 4 m 2 n –# covers (mod N) = (4 m ) ¢ (#sat. assignments) x1x1 x1x1 x2x2 x2x2 x3x3 x3x3... clause gadget variable gadgets: xor gadget (exactly 1 of two edges is in cover)