Complement Classes and the Polynomial Time Hierarchy
Total Page:16
File Type:pdf, Size:1020Kb
CSCI 1590 Intro to Computational Complexity Complement Classes and the Polynomial Time Hierarchy John E. Savage Brown University February 9, 2009 John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 1 / 17 1 Review of Space Complexity 2 Complements of Complexity Classes 3 coNP 4 Polynomial Time Hierarchy John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 2 / 17 Overview We introduce classes of language complements and define the polynomial time hierarchy. We show that all languages in this hierarchy are contained in PSPACE. We introduce TQBF (totally quantified Boolean formulas). Later we show that it is PSPACE-complete. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 3 / 17 Review: Space Complexity Classes Class Space By Note L Logarithmic DTM NL Logarithmic NDTM L ⊆ NL L2 Square Log DTM PSPACE Polynomial DTM NPSPACE Polynomial NTM PSPACE ⊆ NPSPACE John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 4 / 17 Review: Savitch's Theorem and Its Consequences Theorem (Savitch) reachability is in SPACE(log 2n), n = jV j. Construct an algorithm to compute PATH(a; b; 2k ). Corollary If r(n) proper, r(n) = Ω(log n), then NSPACE(r(n)) ⊆ SPACE(r 2(n)). Construct configuration graph for NDTM recognizing L in NSPACE(r(n)). Theorem PSPACE = NPSPACE. Proof Easy to show that PSPACE ⊆ NPSPACE. From Corollary to Savitch's theorem, NPSPACE ⊆ PSPACE from which the result follows. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 5 / 17 Important Complexity Classes Time classes: P, NP, EXPTIME, NEXPTIME Space classes: L, NL, L2, PSPACE, NPSPACE. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 6 / 17 Complements of Decision Problems sat Instance: Literals X = fx1; x1; x2; x2;:::; xn; xng, and clauses C = (c1; c2;:::; cm) where each clause ci is a subset of X . Answer: \Yes" if for some assignment of Booleans to variables in fx1; x2;:::; xng, at least one literal in each clause has value 1. Definition The complement of a decision problem L, denoted coL, is the set of \No" instances of a decision problem. Note ∗ ∗ coL 6= L¯ = Σ − L. In fact, L [ coL = WFL ⊂ Σ where WFL is the set of well-formed strings describing \Yes" and \No" instances. That is, coL = WFL − L. Can recognize in PTIME whether a string is in WFL. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 7 / 17 Complements of Complexity Classes Definition The complement of a complexity class is the set of complements of languages in the class. Example coNP is set of languages consisting of \No" instances of NP languages. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 8 / 17 Complements of Complexity Classes Theorem Let If C1 ⊆ C2, coC1 ⊆ coC2. If C1 = C2, coC1 = coC2 Proof. If coL 2 coC1, L 2 C1. Thus, L 2 C2. This implies that coL 2 coC2. Note: coC is very different from languages not in C. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 9 / 17 Complements of Important Classes P = coP For deterministic Turing Machines, flip accept and reject states. PSPACE = coPSPACE As with P and coP, PSPACE= coPSPACE NPSPACE= coNPSPACE By Savitch's theorem NPSPACE = PSPACE, so coNPSPACE = coPSPACE = PSPACE What about coNP? If P = NP, then since P = coP, NP = coNP. Thus, if we can show that NP 6= coNP, then P 6= NP. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 10 / 17 Closure under Complements of Nondeterministic Space Classes coSPACE(s(n)) ⊆ coNSPACE(s(n)) follows from previous theorem. Combining with Savitch's theorem, we have NSPACE(s(n)) ⊆ SPACE(s(n)2) ⊆ coNSPACE(s(n)2) If the space to recognize a set of languages is at least logarithmic, a stronger result is known: Theorem (Immerman-Scelepscenyi) If r(n) = Ω(log n) is proper, NSPACE(r(n)) = coNSPACE(r(n)) Proof See textbooks. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 11 / 17 coNP Theorem Let L be an NP-complete language. coL is coNP-complete. Proof ∗ ∗ 0 By definition, if L ⊆ Σ1 is in NP, coL ⊆ Σ2 is in coNP. Any language L in NP can be reduced to L using some polynomial time reduction, f (x). f also reduces L¯0 to L¯ in PTIME. By assumption the sets of instances of L0 and L, denoted WFL0 and WFL, respectively, are PTIME recognizable. It ∗ ∗ follows that there exists a PTIME computable function g :Σ1 7! Σ2 such 0 that x 2 coL , g(x) 2 coL obtained by rejecting strings not in WFL0 and applying f to those in WFL0 . Again, if NP 6= coNP, then P 6= NP. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 12 / 17 Languages in coNP The language BF is the set of Boolean formulas fb(x)g that can have value true, denoted 9u b(u). coBF is the set of Boolean formulas that cannot have value true, denoted :9u b(u) = 8u b¯(u) where b¯(u), the Boolean complement of u, is another boolean formula b0(u). Since sat is NP-complete, so is BF. coBF is coNP-complete. coBF, or tautology, is the set of formulas that are true for all assignments of values to its variables, denoted 8u b0(u). Because tautology (or coBF) is coNP-complete, if tautology is in P, then P = coNP. It is highly improbable that there is a PTIME algorithm to show that a Boolean formula is not satisfiable by any input. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 13 / 17 Polynomial Time Hierarchy A language is in NP(coNP) if and only if it can be reduced in polynomial time to a statement of the form 9x b(x)(8x b(x)) What about additional levels of alternation? For two alternations 8x1 9x2 b(x1; x2) 9x1 8x2 b(x1; x2) The sets of languages reducible to statements of this form are denoted p p Π2 = f8x1 9x2 b(x1; x2)g and Σ2 = f9x1 8x2 b(x1; x2)g respectively. More generally, we can consider any constant number of alternations, p p i, and denote these sets of languages Πi and Σi . Here Π (Σ) signals that the outermost operator is universal (existential) quantification. The subscript indicates the number of levels of quantification. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 14 / 17 The Polynomial Time Hierarchy Definition The Polynomial Hierarchy (PH) is defined as [ p PH = Σi i Just as it is believed that P 6= NP and coNP 6= NP, it is conjectured that all levels of PH are distinct. p p As with sat and tautology, notice that Πi = coΣi . p p p If for i,Πi = Σi , PH = Σi , meaning PH collapses at the ith level. E.g. if 8u3 9u2 8u1 b(u3; u2; u1) = 9u3 8u2 9u1 b(u3; u2; u1) then 9u4 8u3 9u2 8u1 b(u3; u2; u1) = 9u4 9u3 8u2 9u1 b(u3; u2; u1) 9u4;u3 8u2 9u1 b(u3; u2; u1) p p If P = NP,Π1 = Σ1 and PH = P. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 15 / 17 PH and PSPACE It is not hard to see that PH 2 PSPACE. A language L is PH-complete if L 2 PH and all languages in PH are ptime reducible to L. Theorem If there is a language that is PH-complete, the polynomial hierarchy p collapses, that is, for some i, PH ⊆ Σi . Proof. S p p To see why, since PH = i Σi there is some i such that L 2 Σi . Since L p is PH-complete, we can reduce every language in PH to it and to Σi . p Thus, PH ⊆ Σi . John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 16 / 17 More Alternations An instance of tqbf is a quantified boolean formula with an unbounded number of alternations. In otherwords, each variable can be quantified separately. Any language in PH can be reduced to tqbf. tqbf 2 PSPACE. Later, we show tqbf is PSPACE-complete, that is, all languages in PSPACEcan be reduced to tqbf in polynomial time. John E. Savage (Brown University) CSCI 1590 Intro to Computational Complexity February 9, 2009 17 / 17.