Polynomial Hierarchy
Total Page:16
File Type:pdf, Size:1020Kb
Polynomial Hierarchy Klaus Sutner Carnegie Mellon University 2020/04/02 1 The Polynomial Hierarchy 2 Alternating Turing Machines Recall: Arithmetical Hierarchy 2 Recall that there is a natural hierarchy beyond the fundamental classes of decidable and semidecidable problems. ∆4 Σ3 Π3 ∆3 Σ2 Π2 ∆2 Σ1 Π1 ∆1 The hierarchy is proper, and there are fairly straightforward complete problems such as FIN, TOT, REC and so on. Knowldege Transfer 3 We can think of P and NP as an analogue to decidable versus semidecidable (the classes ∆1 versus Σ1 in the AH). This makes it tempting to try and construct a polynomial time hierarchy (PH) analogous to the AH. We mentioned this PH briefly when we first introduced NP, here is some more information. Dire Warning: Note that we will not be able to prove an analogue to Post's hierarchy theorem this time around. Still, it may be interesting to study this putative hierarchy: reducibilities, complete problems, relation to other classes ... Recall: Definition PH 4 p p Σ0 = Π0 = P p p Σn+1 = projP (Πn) p p Πn = comp(Σn) p p p ∆n = Σn \ Πn [ p PH = Σn Here projP refers to polynomially bounded projections: the witness is required to have length polynomial in the length of the witness. comp is just plain complement (unchanged from AH). An Example 5 The standard Independent Set problem looks like so: Problem: Independent Set (IS) Instance: A ugraph G, a number k. Question: Does G have an independent set of size k? The following version makes as much sense: Problem: Maximum Independent Set (MIS) Instance: A ugraph G, a number k. Question: Does the largest independent set in G have size k? Of course, a graph theorist would probably prefer the function version: given G, compute the size of the largest independent set. But, we are trying to stick to decision problems. The Difference 6 It is clear that IS is in NP: guess the set, and verify easily in polynomial time. But MIS seems qualitatively different: we could guess a set I of size k and verify that it is independent, but that does not rule out the existence of an independent set of size > k. The number of subsets of V of size > k is exponential, so it seems doubtful that we could check all of them in polynomial time. MIS seems to belong to a class larger than NP. Boolean Example 7 It is most natural to try to find the smallest Boolean formula equivalent to a given one. This remains a challenge even if we limit the formulae under consideration to, say, DNF. Problem: Minimum Equivalent DNF (MEQDNF) Instance: A Boolean formula Φ in DNF, a bound k. Question: Is Φ equivalent to a DNF formula with at most k literals? We could nondeterministically guess the smallest formula Φ0, but then we need to verify that it is equivalent to Φ, an apparently exponential task. Also note that we are not really gunning for the smallest possible DFN, just one that has at most k literals (the usual trick to get a decision problem). In a more general version of this problem we could consider arbitrary formulae. Automata Example 8 A pattern π is an expression formed from strings in 2? and variables, using only concatenation. We can generate a language L(π) by replacing the variables by strings over 2?. Given (finite) languages P [N] of positive[negative] examples, we would like a pattern that is consistent with P and N. Problem: Pattern Consistency Instance: Two finite languages P; N ⊆ 2?. Question: Is there a pattern π such that P ⊆ L(π) ⊆ N? Again, we could perform a simple nondeterministic guess, but it seems that the guess would have to be followed by an exponential brute-force verification. Graph Example 9 Problem: Node Deletion Instance: Two graphs G and H, a number k. Question: Can one delete at most k vertices from G to obtain a graph that does not contain H as a subgraph? We could nondeterministically guess the vertices that determine the subgraph G0, and then verify that G0 has no subgraph isomorphic to H. Again, the second part seems exponential. p The Class Σ2 10 p Here is an explicit definition of the class Σ2. Definition p L is in Σ2 if there is a polynomial time decidable relation R and a polynomial p such that x 2 L () 9 u 2 2p(jxj) 8 v 2 2p(jxj) R(u; v; x): p So from the definition NP; co-NP ⊆ Σ2. p But there seems to be more: MEQDNF 2 Σ2, since we can guess the desired DNF formula (using the existential quantifiers) and then verify equivalence (using the universal quantifiers). Clearly R can be handled by a deterministic polynomial time Turing machine. p Not only have we seen examples of problems in Σ2, the examples are all complete for this class: Maximum Independent Set Minimum Equivalent DNF Pattern Consistency Node Deletion p TM So Σ2 seems to be a reasonable class that contains at least some RealWorld problems. More Classes 12 p For Σ2 we have one block of existential quantifiers followed by one block of universal quantifiers. Of course, this generalizes: p Σk: k alternating blocks of quantifiers, starting with existential p Πk: k alternating blocks of quantifiers, starting with universal p So e.g. L is in Π3 iff x 2 L () 8 u 2 2p(jxj) 9 v 2 2p(jxj) 8 w 2 2p(jxj) R(u; v; w; x): Note that this description also lends itself nicely to finding a class in the PH that contains a particular given problem: write things down concisely, then count quantifiers. Validity Testing 13 p It is clear from the definitions that Σk is closely connected to the problem of p testing the validity of a Σk Boolean formula (and similarly Πk for Πk): we can express the workings of the Turing machine acceptor as a Boolean formula as in the Cook-Levin theorem. Theorem p Validity of Σk Boolean formulae is Σk-complete wrto polynomial time reductions. p Validity of Πk Boolean formulae is Πk-complete wrto polynomial time reductions. Example: Integer Expressions 14 Define an integer expression to be composed of numbers (written in binary), and binary operations [ and ⊕ where A ⊕ B = f a + b j a 2 A; b 2 B g Write L(E) ⊆ N for the finite set associated with the expression E. An interval in L(E) is a subset [a; b] ⊆ L(E). Problem: Integer Expression Intervals Instance: An integer expression E, a number k. Question: Does L(E) have an interval of length k? Lemma p Integer Expression Intervals is Σ3-complete. More Oracles 15 We know how to attach an oracle A ⊆ Σ? to a Turing machine M. If we do this systematically for all machines in a certain class C, we obtained a relativized class CA. The oracle may vary over a class D: D [ A C = C A2D SAT For example, PP = P and PNP = P . Similar definitions can be obtained for function classes, and function oracles. Alternative Polynomial Hierarchy 16 We can now check that our original definition of PH in terms of projections and complements can also be expressed in terms of oracles like so: p p Σ0 = Π0 = P p p Σn ∆n+1 = P p p Σn Σn+1 = NP p p Πn = comp(Σn) [ p PH = Σn Exercise Verify that our two definitions are really equivalent. There is no analogue to the hierarchy theorem for the arithmetical hierarchy, but it is still true that p p p p p Σk [ Πk ⊆ ∆k+1 ⊆ Σk+1 \ Πk+1 Also, if there is a glitch at some level k ≥ 1, then the rest of the hierarchy collapses: p p p Σk = Πk implies Σk = PH p p p Σk = Σk+1 implies Σk = PH This leaves open the possibility that, say, the first 42 levels are proper, and the rest collapses. Versus PSPACE 18 Lemma PH ⊆ PSPACE. PH = PSPACE implies the polynomial hierarchy collapses. Proof. To see why, recall that QBF Validity is in PSPACE, and subsumes all the Σk Validity problems. If we had equality, then QBF Validity would already be equivalent to Σk Validity for some k. 2 Completeness 19 p We have Σk-complete problems for all levels k ≥ 1, generic as well as concrete. But note that the last argument seems to rule out the existence of p PH-complete problems: if L were PH-complete, then L 2 Σk for some k simply by the definition of the polynomial hierarchy. But then the hierarchy collapses at level k{which sounds less than plausible. Famous last words. Back To Equivalence 20 Recall the question of how small a DNF formula can be made: Problem: Minimum Equivalent DNF Instance: A Boolean formula Φ in DNF, a bound k. Question: Is Φ equivalent to a DNF formula with at most k literals? Here we assume that our language has Boolean variables, constants, and the usual connectives. This version uses the standard leaf-count complexity, there are other analogous measures. Intuitively, MEQDNF seems harder than SAT or TAUT. Let's consider the version where the instance is an arbitrary Boolean formula. SAT to MEQ 21 Lemma SAT is polynomial time Turing reducible to MEQDNF. Proof. Let Φ be an instance of SAT, say, a Boolean formula in CNF. It is easy to check if Φ is a tautology (locally for each clause). If not, Φ is satisfiable iff it is not equivalent to a formula with 0 literals: the constant ?, in which case we are dealing with a contradiction (constant > is ruled out since Φ is not a tautology).