# Polynomial hierarchy

In computational complexity theory, the polynomial hierarchy is a hierarchy of complexity classes that generalize the classes P, NP and co-NP to oracle machines.

 Contents

## Definitions

There are two equivalent definitions of the classes of the polynomial hierarchy: the "oracle" characterization and the "existential/universal" characterization.

1. For the oracle definition of the polynomial hierarchy, define
[itex]\Delta_0\rm{P} := \Sigma_0\mbox{P} := \Pi_0\mbox{P} := \mbox{P}[itex]
Then for i ≥ 0 define
[itex]\Delta_{i+1}\mbox{P} := \mbox{P}^{\Sigma_i\rm{P}}[itex]
[itex]\Sigma_{i+1}\mbox{P} := \mbox{NP}^{\Sigma_i\rm{P}}[itex]
[itex]\Pi_{i+1}\mbox{P} := \mbox{co-NP}^{\Sigma_i\rm{P}}[itex]
Where AB is the set of decision problems solvable by a Turing machine in class A augmented by an oracle for some problem in class B. For example, Σ1P = NP, Π1P = co-NP, and Δ2P = PNP is the class of problems solvable in polynomial time with an oracle for some problem in NP.
2. For the existential/universal definition of the polynomial hierarchy, let [itex]L[itex] be a language, let [itex]p[itex] be a polynomial, and define
[itex] \exists^p L := \left\{ x \in \{0,1\}^* \ \left| \ \left( \exists w \in \{0,1\}^{\leq p(|x|)} \right) \langle x,w \rangle \in L \right. \right\} [itex]
In other words, [itex]L[itex] represents a set of ordered pairs of strings, where the first string [itex]x[itex] is a member of [itex]\exists^p L[itex], and the second string [itex]w[itex] is a "short" ([itex] \leq p(|x|) [itex]) witness testifying that [itex]x[itex] is a member of [itex]\exists^p L[itex]. In other words, [itex]x \in \exists^p L[itex] if and only if there exists a short witness [itex]w[itex] such that [itex] \langle x,w \rangle \in L [itex]. Similarly, define
[itex] \forall^p L := \left\{ x \in \{0,1\}^* \ \left| \ \left( \forall w \in \{0,1\}^{\leq p(|x|)} \right) \langle x,w \rangle \in L \right. \right\} [itex]
Note that deMorgan's Laws hold: [itex] \left( \exists^p L \right)^c = \forall^p L^c [itex] and [itex] \left( \forall^p L \right)^c = \exists^p L^c [itex], where [itex] L^c [itex] is the complement of [itex]L[itex]. Let [itex]\mathcal{C}[itex] be a class of languages. Extend these operators to work on whole classes of languages by the definition
[itex]\exists^{\rm P} \mathcal{C} := \left\{ \exists^p L \ | \ p \mbox{ is a polynomial and } L \in \mathcal{C} \right\}[itex]
[itex]\forall^{\rm P} \mathcal{C} := \left\{ \forall^p L \ | \ p \mbox{ is a polynomial and } L \in \mathcal{C} \right\}[itex]
Note that deMorgan's Laws hold: [itex] {\rm co} \exists^{\rm P} \mathcal{C} = \forall^{\rm P} {\rm co} \mathcal{C} [itex] and [itex] {\rm co} \forall^{\rm P} \mathcal{C} = \exists^{\rm P} {\rm co} \mathcal{C} [itex], where [itex]{\rm co}\mathcal{C} = \left\{ L^c | L \in \mathcal{C} \right\}[itex]. The classes NP and co-NP can be defined as [itex] {\rm NP} = \exists^{\rm P} {\rm P} [itex], and [itex] {\rm coNP} = \forall^{\rm P} {\rm P} [itex], where P is the class of all feasibly (polynomial-time) decidable languages. The polynomial hierarchy can be define recursively as
[itex] \Sigma_0^{\rm P} := \Pi_0^{\rm P} := {\rm P} [itex]
[itex] \Sigma_{k+1}^{\rm P} := \exists^{\rm P} \Pi_k^{\rm P} [itex]
[itex] \Pi_{k+1}^{\rm P} := \forall^{\rm P} \Sigma_k^{\rm P} [itex]
Note that [itex] {\rm NP} = \Sigma_1^{\rm P} [itex], and [itex] {\rm coNP} = \Pi_1^{\rm P} [itex]. This definition reflects the close connection between the polynomial hierarchy and the arithmetical hierarchy, where DEC (decidable languages) and CE (computably enumerable languages) play roles analogous to P and NP, respectively.

## Relations between complexity classes

The definitions imply the relations:

[itex]\Sigma_i\mbox{P} \subseteq \Delta_{i+1}\mbox{P} \subseteq \Sigma_{i+1}\mbox{P}[itex]
[itex]\Pi_i\mbox{P} \subseteq \Delta_{i+1}\mbox{P} \subseteq \Pi_{i+1}\mbox{P}[itex]

It is an open question whether any of these containments are proper (most people expect that they all are). If any [itex]\Sigma_k\rm{P} = \Sigma_{k+1}\rm{P}[itex], then the hierarchy collapses to level k: for all [itex]i > k[itex], [itex]\Sigma_i\rm{P} = \Sigma_k\rm{P}[itex]. In particular, if P = NP, then the hierarchy collapses completely.

An equivalent definition in terms of alternating Turing machines defines [itex]\Sigma_k\rm{P}[itex] (respectively, [itex]\Pi_k\rm{P}[itex]) as the set of decision problems solvable in polynomial time on an alternating Turing machine with [itex]k[itex] alternations starting in an existential (respectively, universal) state.

The union of all classes in the polynomial hierarchy is the complexity class PH.

The polynomial hierarchy is an analogue (at much lower complexity) of the exponential hierarchy and arithmetical hierarchy.

It is known that PH is contained within PSPACE, but it is not known whether the two classes are equal. One useful reformulation of this problem is that PH = PSPACE if and only if second order logic gains no additional power from the addition of a transitive closure operator.

If the polynomial hierarchy has any complete problems, then it has only finitely many distinct levels. Since PSPACE is known to contain PSPACE-complete problems, we know that if PSPACE = PH, then the polynomial hierarchy must collapse.

## Problems in polynomial hierarchy

• An example of a natural problem in [itex]\Sigma_2^P[itex] is circuit minimization: given a circuit A computing a Boolean function f and a number k, determine if there is a circuit with at most k gates that computes the same function f. Let [itex] \mathcal{C} [itex] be the set of all boolean circuits. The language

[itex] L = \left\{ \langle A,k,B,x \rangle \in \mathcal{C} \times \mathbb{N} \times \mathcal{C} \times \{0,1\}^*
\left| B \mbox{ has at most } k \mbox{ gates, and } A(x)=B(x) \right. \right\} [itex] <p> is decidable in polynomial time. The language <p>
[itex] CM = \left\{ \langle A,k \rangle \in \mathcal{C} \times \mathbb{N}
\left| \begin{matrix} \mbox{there exists a circuit } B \mbox{ with at most } k \mbox{ gates } \\ \mbox{ such that } A \mbox{ and } B \mbox{ compute the same function} \end{matrix} \right. \right\} [itex] <p> is the circuit minimization language. [itex] CM \in \Sigma_2^P (= \exists^{\rm P} \forall^{\rm P} {\rm P}) [itex] because, given [itex] \langle A,k \rangle [itex], if and only if there exists a circuit [itex]B[itex] with at most [itex]k[itex] gates, such that for all inputs [itex]x[itex], [itex] \langle A,k,B,x \rangle \in L [itex], then [itex] \langle A,k \rangle \in CM[itex], and because [itex]L[itex] is decidable in polynomial time.
• A complete problem for ΣkP is satisfiability for quantified Boolean formulas with k alternations of quantifiers (abbreviated QBFk or QSATk). In this problem, we are given a Boolean formula f with variables partitioned into k sets X1, ..., Xk. We have to determine if it is true that
[itex] \exists X_1 \forall X_2 \exists X_3 \ldots f[itex]
That is, is there an assignment of values to variables in X1 such that, for all assignements of values in X2, there exists an assignement of values to variables in X3, ... f is true? The variant above is complete for ΣkP. The variant in which the first quantifier is "for all", the second is "exists", etc., is complete for ΠkP. </ul>

## References

1. L. Stockmeyer. The polynomial hierarchy. Theoretical Computer Science, vol.3, pp.1-22, 1976. The paper which introduced the polynomial hierarchy.
2. C. Papadimitriou. Computational Complexity. Addison-Wesley, 1994. Chapter 17. Polynomial hierarchy. A commonly used textbook

• Art and Cultures
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Space and Astronomy