The Polynomial Hierarchy

Similar documents
Polynomial Hierarchy

MTAT Complexity Theory October 20th-21st, Lecture 7

Lecture 9: Polynomial-Time Hierarchy, Time-Space Tradeoffs

1 PSPACE-Completeness

Notes on Complexity Theory Last updated: October, Lecture 6

Lecture 8: Alternatation. 1 Alternate Characterizations of the Polynomial Hierarchy

Lecture 7: Polynomial time hierarchy

DRAFT. Diagonalization. Chapter 4

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

Umans Complexity Theory Lectures

: Computational Complexity Lecture 3 ITCS, Tsinghua Univesity, Fall October 2007

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

COMPLEXITY THEORY. Lecture 17: The Polynomial Hierarchy. TU Dresden, 19th Dec Markus Krötzsch Knowledge-Based Systems

Time-Space Tradeoffs for SAT

Lecture 8. MINDNF = {(φ, k) φ is a CNF expression and DNF expression ψ s.t. ψ k and ψ is equivalent to φ}

CSE200: Computability and complexity Space Complexity

Algorithms & Complexity II Avarikioti Zeta

Lecture 16: Time Complexity and P vs NP

Lecture 2 (Notes) 1. The book Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak;

Review of Basic Computational Complexity

Better Time-Space Lower Bounds for SAT and Related Problems

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

CS154, Lecture 17: conp, Oracles again, Space Complexity

CSCI 1590 Intro to Computational Complexity

Computational Complexity: A Modern Approach. Draft of a book: Dated January 2007 Comments welcome!

Lecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement

Technische Universität München Summer term 2010 Theoretische Informatik August 2, 2010 Dr. J. Kreiker / Dr. M. Luttenberger, J. Kretinsky SOLUTION

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

Lecture 3: Nondeterminism, NP, and NP-completeness

P = k T IME(n k ) Now, do all decidable languages belong to P? Let s consider a couple of languages:

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

conp, Oracles, Space Complexity

Notes on Complexity Theory Last updated: December, Lecture 2

Notes on Computer Theory Last updated: November, Circuits

Finish K-Complexity, Start Time Complexity

2 P vs. NP and Diagonalization

Space is a computation resource. Unlike time it can be reused. Computational Complexity, by Fu Yuxi Space Complexity 1 / 44

Lecture 22: PSPACE

Lecture Notes Each circuit agrees with M on inputs of length equal to its index, i.e. n, x {0, 1} n, C n (x) = M(x).

Lecture 3: Reductions and Completeness

CS154, Lecture 13: P vs NP

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

Definition: conp = { L L NP } What does a conp computation look like?

Computability and Complexity CISC462, Fall 2018, Space complexity 1

Lecture 21: Space Complexity (The Final Exam Frontier?)

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005

Could we potentially place A in a smaller complexity class if we consider other computational models?

Lecture 20: conp and Friends, Oracles in Complexity Theory

Non-Deterministic Time

Lecture 3 (Notes) 1. The book Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak;

1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions

CS154, Lecture 13: P vs NP

Lecture 18: PCP Theorem and Hardness of Approximation I

Lecture 10: Boolean Circuits (cont.)

Space and Nondeterminism

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

Introduction to Complexity Theory. Bernhard Häupler. May 2, 2006

COMPLEXITY THEORY. PSPACE = SPACE(n k ) k N. NPSPACE = NSPACE(n k ) 10/30/2012. Space Complexity: Savitch's Theorem and PSPACE- Completeness

satisfiability (sat) Satisfiability unsatisfiability (unsat or sat complement) and validity Any Expression φ Can Be Converted into CNFs and DNFs

Chapter 7: Time Complexity

De Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2.

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

Lecture 2. 1 More N P-Compete Languages. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz

Complexity Theory Final Exam

Lecture 19: Finish NP-Completeness, conp and Friends

2 Evidence that Graph Isomorphism is not NP-complete

NP Complete Problems. COMP 215 Lecture 20

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

CSCI 1590 Intro to Computational Complexity

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

NP-completeness was introduced by Stephen Cook in 1971 in a foundational paper.

Time Complexity. Definition. Let t : n n be a function. NTIME(t(n)) = {L L is a language decidable by a O(t(n)) deterministic TM}

ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017

CS 151 Complexity Theory Spring Solution Set 5

Ταουσάκος Θανάσης Αλγόριθμοι και Πολυπλοκότητα II 7 Φεβρουαρίου 2013

Lecture 20: PSPACE. November 15, 2016 CS 1010 Theory of Computation

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

NP, polynomial-time mapping reductions, and NP-completeness

Definition: Alternating time and space Game Semantics: State of machine determines who

Polynomial Time Computation. Topics in Logic and Complexity Handout 2. Nondeterministic Polynomial Time. Succinct Certificates.

The space complexity of a standard Turing machine. The space complexity of a nondeterministic Turing machine

Principles of Knowledge Representation and Reasoning

Lecture 4. 1 Circuit Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz

Notes for Lecture 3... x 4

INAPPROX APPROX PTAS. FPTAS Knapsack P

Computational Complexity: A Modern Approach. Draft of a book: Dated January 2007 Comments welcome!

Time Complexity. CS60001: Foundations of Computing Science

Randomized Computation

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

The Cook-Levin Theorem

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 9/6/2004. Notes for Lecture 3

Parallelism and Machine Models

CSCI 1590 Intro to Computational Complexity

1 From previous lectures

MTAT Complexity Theory October 13th-14th, Lecture 6

The Complexity of Optimization Problems

Lecture 3. 1 Terminology. 2 Non-Deterministic Space Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, 2005.

Transcription:

The Polynomial Hierarchy Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee

Motivation..synthesizing circuits is exceedingly difficulty. It is even more difficult to show that a circuit found in this way is the most economical one to realize a function. The difficulty springs from the large number of essentially different networks available. Claude Shannon, 1949 This lecture discusses the polynomial hierarchy, a generalization of P, NP and conp. We will provide four equivalent definitions for the polynomial hierarchy, using: quantified predicates, alternating Turing machines, oracle Turing machines, and uniform families of circuits (next lecture). We also use the hierarchy to show that solving the SAT problem requires either super-logarithmic space or super-linear time. 2

INDSET and EXACTINDSET To understand the need for going beyond nondeterminism, lets recall an NP problem INDSET, for which we do have a short certificate of membership: INDSET = { G, k : Graph G has an independent set of size k.}. Consider a slight modification to the above problem, namely, determining the largest independent set in a graph (phrased as a decision problem): EXACTINDSET = { G, k : The largest ind. set in G has size exactly k}. Now there seems to be no short certificate for membership: G, k EXACTINDSET iff there exists an independent set of size k in G and every other independent set has size at most k. 3

MIN DNF Similarly, consider the language MIN DNF, the decision version of a problem in circuit minimization, a topic of interest in electrical engineering. We say that two boolean formulae are equivalent if they have the same set of satisfying assignments. MIN DNF = {ϕ: ϕ is a DNF not equivalent to any smaller DNF.} = {ϕ: ψ, ψ < ϕ, s: ψ(s) ϕ(s)}. Again, there is no obvious notion of a certificate of membership. Note that both the above problems are in PSPACE, but neither is believed to be PSPACE-complete. 4

The classes Σ p 2 and Πp 2 Def.: The class Σ p 2 is the set of all languages L for which there exists a poly-time M and a polynomial q such that for every x {0, 1} : x L u {0, 1} q( x ) v {0, 1} q( x ) : M(x, u, v) = 1. Def.: The class Π p 2 is the set of all languages L for which there exists a poly-time M and a polynomial q such that for every x {0, 1} : x L u {0, 1} q( x ) v {0, 1} q( x ) : M(x, u, v) = 1. It follows from the definitions that: NP, conp Σ p 2 Πp 2 ; L Π p 2 iff L Σp 2. 5

Examples EXACTINDSET Σ p 2 : Since a pair G, k is in EXACTINDSET iff: S S : S is an ind-set of size k and S is not a ind-set of size k + 1. EXACTINDSET Π p 2 : Since a pair G, k is in EXACTINDSET iff: S S : if S k+1 then S is not an ind-set, but S is an ind-set of size k. MIN DNF Π p 2 : Since a pair ϕ is in MIN DNF iff: ψ s: ψ < ϕ ψ(s) ϕ(s). MIN DNF is conjectured to be complete for Π p 2. 6

The Polynomial Hierarchy Def. 5.4 (Polynomial Hierarchy): For every i 1, a language L is in Σ p i if there exists a poly-time M and a polynomial q such that for every x {0, 1} : x L u 1 C, u 2 C... Q i u i C : M(x, u 1,..., u i ) = 1, where C = {0, 1} q( x ) and Q i denotes or depending on whether i is even or odd respectively. We say that L is in Π p i if there exists a poly-time M and a polynomial q such that for every x {0, 1} : x L u 1 C, u 2 C... Q i u i C : M(x, u 1,..., u i ) = 1, where Q i denotes or depending on whether i is odd or even respectively. The polynomial hierarchy is the set PH = i Σ p i. Remark: Σ p 1 = NP and Πp 1 = conp. More generally, Πp i = coσp i. Note also that that Σ p i Πp i+1, and so PH = iπ p i. 7

Properties of the Polynomial Hierarchy We believe that P NP and NP conp. An appealing generalization of these conjectures is that for every i, the class Σ p i is strictly contained in Σ p i+1. This is called the conjecture that the polynomial hierarchy does not collapse. If the polynomial hierarchy does collapse this means that there is i such that Σ p i = jσ p j = PH. In this case, we say that the polynomial hierarchy has collapsed to the i-th level. The smaller i is, the weaker, and hence more plausible, is the conjecture that PH does not collapse to the i-th level. Theorem: For every i 1, if Σ p i = Πp i then PH = Σp i, i.e. PH collapses to the i th level. If P = NP then PH = P, i.e. PH collapses to P. Proof : We do the second part: the first part is similar and also easy. Assuming P = NP, we prove by induction on i that Σ p i, Πp i P. Clearly, this 8

is true for i = 1 since under our assumption NP = P = cop = conp. We assume it is true for i 1 and prove it for i. Assuming L Σ p i, we will show that L P. By definition, there is a poly-time M and a polynomial q such that (if every certificate u i C = {0, 1} q( x ) ): x L u 1 u 2... Q i u i : M(x, u 1,..., u i ) = 1. Define the language L as follows: (x, u) L u 2... Q i u i : M(x, u, u 2,..., u i ) = 1, i.e. x L iff there is u 1 such that (x, u 1 ) L. By assumptions, L Π p i 1 = P and so there is a poly-time M such that M (x, u) = 1 (x, u) L. Hence, x L u 1 : M (x, u 1 ) = 1, which means that L NP = P. 8

Complete Problems for Levels of PH Def.: For every i, we say that a language L is Σ p i -complete if L Σp i and L p L for every L Σ p i. We define Πp i -completeness and PHcompleteness in the same way. We will show that for every i N, both Σ p i and Πp i have complete problems. In contrast the polynomial hierarchy itself is believed not to have a complete problem, as is shown by the following simple claim: Claim: Suppose that there exists a language L that is PH-complete, then there exists an i such that PH = Σ p i and hence the hierarchy collapses to its ith level. Proof sketch: Since L PH = i Σ p i, there exists i such that L Σp i. 9

Since L is PH-complete, we can reduce every language of PH to Σ p i to L, and thus PH Σ p i. Remark: It is not hard to see that PH PSPACE. A simple corollary of the Claim is that unless the polynomial hierarchy collapses, PH PSPACE. Indeed, otherwise the problem TQBF would be PH-complete. Example: For every i 1, the class Σ p i has the following complete problem Σ i SAT involving quantified boolean expression with limited number of alternations: u 1 u 2 u 3... Q i u i ϕ(u 1, u 2,..., u i ) = 1, where ϕ is a Boolean formula (not necessarily in CNF-form, although this does not make much difference), each u i is a vector of boolean variables, and Q i is or depending on whether i is odd or even. Notice that this is 9

a special case of the TQBF problem. One can similarly define a problem Π i SAT that is Π p i -complete. Example: In the SUCCINCT SET COVER problem we are given a collection S = {ϕ 1, ϕ 2,..., ϕ m } of 3-DNF formulae on n variables, and an integer k. We need to determine whether there is a subset S {1, 2,..., m} of size at most k for which i S ϕ i is a tautology. Umans showed that this problem is Σ p 2 -complete. 9

Alternating Turing Machines (ATM) ATMs are generalizations of nondeterministic Turing machines. Alternating TMs are similar to NDTMs in the sense that they have two transition functions between which they can choose in each step, but they also have the additional feature that: Every internal state except q accept and q halt is labeled with either or. Similar to the NDTM, an ATM can evolve at every step in two possible ways. Recall that a non-deterministic TM accepts its input if there exists some sequence of choices that leads it to the state q accept. In an ATM, the exists quantifier over each choice is replaced with the appropriate quantifier according to the labels. 10

Def. Let M be an alternating TM. For a function T : N N, we say that M is an T (n)-time ATM if for every input x {0, 1} and for every possible sequence of transition function choices, M will halt after at most T ( x ) steps. For every x {0, 1}, we let G M,x be the configuration graph of x, whose vertices are the configurations of M on input x and there is an edge from configuration C to C if C can be obtained from C in one step using one of the two transition functions. Recall that this is a directed acyclic graph. We label some of the nodes in the graph by ACCEPT by repeatedly applying the following rules until they cannot be applied anymore: The configuration C accept where the machine is in q accept is labeled ACCEPT. If a configuration C is in a state labeled and one of the configurations C reachable from it in one step is labeled ACCEPT then we label C ACCEPT. If a configuration C is in a state labeled and both the configurations C, C reachable from it in one step is labeled ACCEPT then we label C ACCEPT. 11

We say that M accepts x if at the end of this process the starting configuration C start is labeled ACCEPT. The language accepted by M is the set of all x-s such that M accepts x. We denote by ATIME(T (n)) the set of all languages accepted by some T (n)-time ATM. 11

For every i N, we define Σ i TIME(T (n)) (resp. Π i TIME(T (n)) to be the set of languages accepted by a T (n)-time ATM M whose initial state is labeled (resp. ) and on which every input and sequence of choices leads M to change at most i 1 times from states with one label to states with the other label. The following claim is left as an easy exercise: Claim: For every i N: Σ p i = cσ i TIME(n c ), Π p i = cπ i TIME(n c ). 12

Unlimited number of alternations? What if we consider poly-time alternating Turing machines with no a priori bound on the number of quantifiers? We define the class AP to be c ATIME(n c ). We have the following theorem: Theorem: AP = PSPACE. Proof : PSPACE AP follows since TQBF is trivially in AP (just guess values for each existentially quantified variable using an state and for universally quantified variables using a state) and every PSPACE language reduces to TQBF. AP PSPACE follows using a recursive procedure similar to the one used to show that TQBF PSPACE. Similarly, one can consider alternating Turing machines that run in polynomial space. The class of languages accepted by such machines is called 13

APSPACE. We can prove that APSPACE = EXP. One can similarly consider alternating log-space machines; the set of languages accepted by them is exactly P. 13

The Padding Argument If CL 1 (f(n)) and CL 2 (g(n)) are complexity classes that are characterized by the resources (time of space) they allow to spend to the machines that accept languages belonging to these classes. The resources are measured by functions f(n) and g(n) respectively (with O-precision), where n is the input size. Theorem: If CL 1 (f(n)) CL 2 (g(n)) then CL 1 (f(n c )) CL 2 (g(n c )) for every constant c N. Proof : Let L CL 1 (f(n c )) and M be a machine that decides L in f(n c )- time(or space). If c = 1, the statement is trivial. Otherwise, if c 2, define a new language L = {x01 x c x 1 : x L}. 14

Define a new machine M (y) that accepts iff y is in the form x01 x c x 1 and M(x) = 1. Machine M works with resources f( x c ) = f( y ) and hence, L CL 1 (f(n)) CL 2 (g(n)). Hence, there is a CL 2 -machine N that decides L in g(n)-time (or space). Finally, define a machine N(x) N (x01 x c x 1), which decides L with resources Hence, L CL 2 (g( x c )). g( x01 x c x 1 ) = g( x c ). Corollary: If NTIME(n) DTIME(n 1.2 ) then NTIME(n 10 ) DTIME(n 12 ). 14

Time-Space Tradeoffs for SAT Despite the fact that SAT is widely believed to require exponential (or at least super-polynomial) time to solve, and to require linear (or at least super-logarithmic) space, we currently have no way to prove these conjectures. In fact, as far as we know, SAT may have both a linear time algorithm and a logarithmic space one. Nevertheless, we can prove that SAT does not have an algorithm that runs simultaneously in linear time and logarithmic space. In fact, we can prove the following stronger theorem: Theorem 5.13: For functions S, T : N N, define TISP(T (n), S(n)) to be the set of languages decided by a TM M that on every input x takes at most O(T ( x )) steps and uses at most O(S( x )) cells of its read/write tapes. Then, SAT TISP(n 1.1, n 0.1 ). 15

Remark: The class TISP(T (n), S(n)) is typically defined with respect to TM s with RAM memory (i.e., TM s that have random access to their tapes; such machines can be defined in a similar way to the definition of oracle TM s). The proof carries over for that model as well. We also note that a stronger result is known for both models: for every c < ( 5 + 1)/2, there exists d > 0 such that SAT TISP(n c, n d ) and furthermore, d approaches 1 from below as c approaches 1 from above. Proof of Theorem: We will show that NTIME(n) TISP(n 1.2, n 0.2 ). This implies the result for SAT by following the ideas of the proof of the Cook-Levin Theorem. A careful analysis of that proof yields a reduction from the task of deciding membership in an NTIME(T (n))-language to the task deciding whether an O(T (n) log T (n))-sized formula is satisfiable, such that every output bit of this reduction can be computed in poly-logarithmic time and space. Hence, if SAT TISP(n 1.1, n 0.1 ) then NTIME(n) TISP(n 1.1 polylog(n), n 0.1 polylog(n)). 16

Replacing Time with Alternations The main step in proving NTIME(n) TISP(n 1.2, n 0.2 ) is: Claim 5.14.1: TISP(n 12, n 2 ) Σ 2 TIME(n 8 ). Proof : The proof is similar to the proofs of Savitchs Theorem and the PSPACE-completeness of TQBF. Suppose that L is decided by a machine M using n 12 time and n 2 space. For every x {0, 1}, consider the configuration graph G M,x of M on input x. Each configuration in this graph can be described by a string of length O(n 2 ) and x is in L if and only if there is a path of length n 12 in this graph from the starting configuration C start to an accepting configuration. There is such a path if and only if there exist n 6 configurations C 1,..., C n 6 (requiring O(n 8 ) to specify) such that if we let C = C start then C n 6 is accepting and for every i {1,..., n 6 } the configuration C i is computed from C i 1 within n 6 steps. Because this condition can be verified in n 6 time, we can we get an O(n 8 )-time Σ 2 -TM for deciding membership in L. 17

Next step: if NTIME(n) TISP(n 1.2, n 0.2 ) does not hold, and hence NTIME(n) TISP(n 1.2, n 0.2 ), we can replace alternations with time: Claim 5.14.2: If NTIME(n) DTIME(n 1.2 ) then Σ 2 TIME(n 8 ) NTIME(n 9.6 ). Proof : Using the characterization of the PH by alternating machines, L is in Σ 2 TIME(n 8 ) if and only if there is an O(n 8 )-time M such that: x L u {0, 1} c x 8 v {0, 1} d x 8 : M(x, u, v) = 1. for some constants c, d. Yet if NTIME(n) DTIME(n 1.2 ), then by the padding argument we have a deterministic algorithm D that on inputs x, u with x = n and u = cn 8 runs in time O((n 8 ) 1.2 ) = O(n 9.6 ) and returns 1 if there is v {0, 1} dn8 such that M(x, u, v) = 0. Thus, x L u {0, 1} c x 8 : D(x, u) = 0. implying that L NTIME(n 9.6 ). 18

Final Proof : Claims 5.14.1 and 5.14.2 show that the assumption that NTIME(n) TISP(n 1.2, n 0.2 ) NB! DTIME(n 1.2 ) leads to a contradiction: by the padding argument, it implies that NTIME(n 10 ) TISP(n 12, n 2 ) which by Claim 5.14.1 implies that NTIME(n 10 ) Σ 2 TIME(n 8 ). But together with Claim 5.14.2 this implies that NTIME(n 10 ) NTIME(n 9.6 ), contradicting the non-deterministic time hierarchy theorem. 19

Defining PH with Oracle Machines Recall that oracle machines are executed with access to queries of the form is q O for some language O. For every O {0, 1}, an oracle machine M and input x, we denote by M O (x) the output of M on x with access to O as an oracle. We have the following characterization of the polynomial hierarchy: Theorem 5.15: For every i 2, Σ p i = NP Σ i 1SAT, where the latter class denotes the set of languages decided by poly-time non-deterministic machines with access to the oracle Σ i 1 SAT. Remark: Because having oracle access to a complete language for a class allows to solve every language in that class, some texts use the class name instead of the complete language in the notation for the oracle. Thus, some texts denote the class Σ p 2 = NPSAT by NP NP, the class Σ p 3 by NP NPNP, etc. 20

What have we learned? The polynomial hierarchy is the set of languages that can be defined via a constant number of alternating quantifiers. It also has equivalent definitions via alternating TMs and oracle TMs. It contains several natural problems that are not known (or believed) to be in NP. We conjecture that the hierarchy does not collapse in the sense that each of its levels is distinct from the previous ones. We can use the concept of alternations to prove that SAT cannot be solved simultaneously in linear time and logarithmic space. 21