360 likes | 455 Views
CS151 Complexity Theory. Lecture 12 May 6, 2004. Outline. The Polynomial-Time Hierarachy ( PH ) Complete problems for classes in PH , PSPACE BPP and the PH non-uniformity and the PH. The Polynomial-Time Hierarchy. Σ 0 = Π 0 = P Δ 1 =P P Σ 1 = NP Π 1 = coNP
E N D
CS151Complexity Theory Lecture 12 May 6, 2004
Outline • The Polynomial-Time Hierarachy (PH) • Complete problems for classes in PH, PSPACE • BPP and the PH • non-uniformity and the PH CS151 Lecture 12
The Polynomial-Time Hierarchy Σ0= Π0 =P Δ1=PP Σ1=NPΠ1=coNP Δ2=PNP Σ2=NPNPΠ2=coNPNP Δi+1=PΣiΣi+i=NPΣiΠi+1=coNPΣi Polynomial HierarchyPH = iΣi CS151 Lecture 12
The Polynomial-Time Hierarchy Σ0= Π0 = P Δi+1=PΣiΣi+i=NPΣiΠi+1=coNPΣi • Example: • MIN CIRCUIT: given Boolean circuit C, integer k; is there a circuit C’ of size at most k that computes the same function C does? • MIN CIRCUIT Σ2 CS151 Lecture 12
The Polynomial-Time Hierarchy Σ0= Π0 = P Δi+1=PΣiΣi+i=NPΣiΠi+1=coNPΣi • Example: • EXACT TSP: given a weighted graph G, and in integer k; is the k-th bit of the length of the shortest TSP tour in G a 1? • EXACT TSP Δ2 CS151 Lecture 12
The PH EXP PSPACE PSPACE: generalized geography, 2-person games… 3rd level: V-C dimension… 2nd level: MIN CIRCUIT, Succinct Set Cover, BPP… 1st level: SAT, UNSAT, factoring, etc… PH Σ3 Π3 Δ3 Σ2 Π2 Δ2 NP coNP P CS151 Lecture 12
Useful characterization • Recall: L NP iff expressible as L = { x | y, |y| ≤ |x|k, (x, y) R } where R P. • Corollary: L coNP iff expressible as L = { x | y, |y| ≤ |x|k, (x, y) R } where R P. CS151 Lecture 12
Useful characterization Theorem: L Σi iff expressible as L = { x | y, |y| ≤ |x|k, (x, y) R } where R Πi-1. • Corollary: L Πi iff expressible as L = { x | y, |y| ≤ |x|k, (x, y) R } where R Σi-1. CS151 Lecture 12
Useful characterization • Proof of Theorem: • induction on i • base case on previous slide ( ) • we know Σi=NPΣi-1 = NPΠi-1 • guess y, ask oracle if (x, y) R CS151 Lecture 12
Useful characterization • Proof (continued): ( ) • given L Σi = NPΣi-1decided by ONTM M running in time nk • try: R = { (x, y) : y describes valid path of M’s computation leading to qaccept } • but how to recognize valid computation path when it depends on result of oracle queries? CS151 Lecture 12
Useful characterization • Proof (continued): • try: R = { (x, y) : y describes valid path of M’s computation leading to qaccept } • valid path = step-by-step description including correctyes/no answer for each A-oracle query zj (A Σi-1) • verify “no” queries in Πi-1: e.g: z1 A z3 A … z8 A • for each “yes” query zj: wj, |wj| ≤ |zj|kwith (zj, wj) R’ for some R’ Πi-2by induction. • for each “yes” query zj put wj in description of path y CS151 Lecture 12
Useful characterization • Proof (continued): • single language R in Πi-1 : (x, y) R all “no” zj A and all “yes” zj have (zj, wj) R’ and y is a path leading to qaccept. • Note: AND of Πi-1 predicates is in Πi-1. CS151 Lecture 12
Alternating quantifiers Nicer, more usable version: • LΣi iff expressible as L = { x | y1y2y3 …Qyi (x, y1,y2,…,yi)R } where Q=/ if i even/odd, and RP • LΠi iff expressible as L = { x | y1y2y3 …Qyi (x, y1,y2,…,yi)R } where Q= / if i even/odd, and RP CS151 Lecture 12
Alternating quantifiers • Proof: • ( )induction on i • base case: true for Σ1=NP and Π1=coNP • consider LΣi: L = {x | y1 (x, y1) R’ }, for R’ Πi-1 L = {x | y1y2y3 …Qyi (x, y1,y2,…,yi)R} • same argument for L Πi • ( ) exercise. CS151 Lecture 12
Alternating quantifiers Pleasing viewpoint: “…” PSPACE const. # of alternations poly(n) alternations PH Δ3 Σ2 Π2 “” “” Σi Πi “…” “…” Δ2 Σ3 Π3 “” “” NP coNP “” “” P CS151 Lecture 12
Complete problems • Recall: MIN CIRCUIT: given Boolean circuit C, integer k; is there a circuit C’ of size at most k that computes the same function C does? { (C, k) | C’ x (|C’| ≤ k and C’(x) = C(x)) } • Conclude: in Σ2 • (open whether it is complete for Σ2) CS151 Lecture 12
Complete problems • three variants of SAT: • QSATi(i odd) = {3-CNFs φ(x1, x2, …, xi) for which x1x2x3 … xi φ(x1, x2, …, xi) = 1} • QSATi(i even) = {3-DNFs φ(x1, x2, …, xi) for which x1x2x3 … xi φ(x1, x2, …, xi) = 1 } • QSAT = {3-CNFs φ for which x1x2x3 … Qxn φ(x1, x2, …, xn) = 1} CS151 Lecture 12
QSATi is Σi-complete Theorem: QSATi is Σi-complete. • Proof: (clearly in Σi) • assume i odd; given L Σi in form { x | y1y2y3 … yi (x, y1,y2,…,yi) R } …x… …y1… …y2… …y3… … …yi… C CVAL reduction for R 1 iff (x, y1,y2,…,yi) R CS151 Lecture 12
QSATi is Σi-complete …x… …y1… …y2… …y3… … …yi… • Problem set: can construct 3-CNF φfrom C: zφ(x,y1,…,yi,z) = 1 C(x,y1,…,yi) = 1 • we get: y1y2…yizφ(x,y1,…,yi,z) = 1 • y1y2…yiC(x,y1,…,yi) = 1 x L C 1 iff (x, y1,y2,…,yi) R CVAL reduction for R CS151 Lecture 12
QSATi is Σi-complete • Proof (continued) • assume i even; given L Σi in form { x | y1y2y3 … yi (x, y1,y2,…,yi) R } …x… …y1… …y2… …y3… … …yi… C CVAL reduction for R 1 iff (x, y1,y2,…,yi) R CS151 Lecture 12
QSATi is Σi-complete …x… …y1… …y2… …y3… … …yi… • Problem set: can construct 3-DNF φfrom C: zφ(x,y1,…,yi,z) = 1 C(x,y1,…,yi) = 1 • we get: y1y2… yizφ(x,y1,y2,…,yi,z) = 1 y1y2…yiC(x,y1,y2,…,yi) = 1 x L C 1 iff (x, y1,y2,…,yi) R CVAL reduction for R CS151 Lecture 12
QSAT is PSPACE-complete Theorem: QSAT is PSPACE-complete. • Proof: • in PSPACE: x1x2x3 … Qxn φ(x1, x2, …, xn)? • “x1”: for each x1, recursively solve x2x3 … Qxn φ(x1, x2, …, xn)? • if encounter “yes”, return “yes” • “x1”: for each x1, recursively solve x2x3 … 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 CS151 Lecture 12
QSAT is PSPACE-complete • Proof (continued): • given TM M deciding L PSPACE; input x • configuration graph has 2nknodes • recall: PATH(X, Y, i) path from X to Y of length at most 2i • goal: 3-CNF φ(w1,w2,w3,…,wm) w1w2…Qwm φ(w1,…,wm) • PATH(START, ACCEPT, nk) CS151 Lecture 12
QSAT is PSPACE-complete • for i = 0, 1, … nk produce quantified Boolean expressionsψi(A, B) w1w2… ψi(A, B, W) PATH(A, B, i) • convert ψnkto 3-CNF φ • add variables V • hardwire START, ACCEPT w1w2… Vφ(W, V) x L CS151 Lecture 12
QSAT is PSPACE-complete • Proof (continued): • ψo(A, B) = 1 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 … CS151 Lecture 12
QSAT is PSPACE-complete • recall Savitch’s algorithm: PATH(A, B, i+1) Z[PATH(A, Z, i) PATH(Z, B, i)] • cannot define ψi+1(A, B) to be Z [ψi(A, Z) ψi(Z, B)] (why?) CS151 Lecture 12
QSAT is PSPACE-complete • Proof (continued): • Key: reuse expressions just as Savitch reuses stack records… • define ψi+1(A, B) to be ZXY [((X=AY=Z)(X=ZY=B)) ψi(X, Y)] • ψi(X, Y) is preceded by quantifiers • move to front (they don’t involve X,Y,Z,A,B) CS151 Lecture 12
QSAT is PSPACE-complete ψo(A, B) = 1 iff A = B or A yields B in 1 step ZXY [((X=AY=Z)(X=ZY=B)) ψi(X, Y)] • |ψ0| = O(nk) • |ψi+1| = O(nk) + |ψi| • total size of ψnk is O(nk)2 = poly(n) • logspace reduction CS151 Lecture 12
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 CS151 Lecture 12
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 CS151 Lecture 12
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? CS151 Lecture 12
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 level CS151 Lecture 12
Natural complete problems • MIN CIRCUIT • good candidate, still open • MIN DNF: given DNF φ, integer k; is there a DNF φ’ of size at most k computing same function φ does? • example: x1x2x3 x1x2x3x4 CS151 Lecture 12
Natural complete problems • MIN CIRCUIT • good candidate, still open • MIN DNF: given DNF φ, integer k; is there a DNF φ’ of size at most k computing same function φ does? • example: x1x2x3 x1x2x3 x4 x1x2 x4 CS151 Lecture 12
Simpler version of MIN DNF Theorem (U): MIN DNF is Σ2-complete. • we’ll consider a simpler variant: • IRREDUNDANT: given DNF φ, integer k; is there a DNF φ’ consisting of at most k terms of φ computing same function φ does? CS151 Lecture 12
Simpler version of MIN DNF • analogy with an NP-complete problem: • SET COVER: given subsets S1,S2,...,Sm U, integer k, is there a collection of at most k sets that cover U. φ-1(0) φ-1(1) U terms of φ sets Si {0,1}n CS151 Lecture 12