# Polynomial hierarchy

In computational complexity theory, the polynomial hierarchy (sometimes called the polynomial-time hierarchy) is a hierarchy of complexity classes that generalize the classes P, NP and co-NP to oracle machines. It is a resource-bounded counterpart to the arithmetical hierarchy and analytical hierarchy from mathematical logic.

## Definitions

There are multiple equivalent definitions of the classes of the polynomial hierarchy.

## Relations between classes in the polynomial hierarchy

Pictorial representation of the polynomial time hierarchy. The arrows denote inclusion.

The definitions imply the relations:

${\displaystyle \Sigma _{i}^{\rm {P}}\subseteq \Delta _{i+1}^{\rm {P}}\subseteq \Sigma _{i+1}^{\rm {P}}}$
${\displaystyle \Pi _{i}^{\rm {P}}\subseteq \Delta _{i+1}^{\rm {P}}\subseteq \Pi _{i+1}^{\rm {P}}}$
${\displaystyle \Sigma _{i}^{\rm {P}}={\rm {co}}\Pi _{i}^{\rm {P}}}$

Unlike the arithmetic and analytic hierarchies, whose inclusions are known to be proper, it is an open question whether any of these inclusions are proper, though it is widely believed that they all are. If any ${\displaystyle \Sigma _{k}^{\rm {P}}=\Sigma _{k+1}^{\rm {P}}}$, or if any ${\displaystyle \Sigma _{k}^{\rm {P}}=\Pi _{k}^{\rm {P}}}$, then the hierarchy collapses to level k: for all ${\displaystyle i>k}$, ${\displaystyle \Sigma _{i}^{\rm {P}}=\Sigma _{k}^{\rm {P}}}$. In particular, if P = NP, then the hierarchy collapses completely.

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

## Properties

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 over finite structures 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 there are PSPACE-complete problems, we know that if PSPACE = PH, then the polynomial hierarchy must collapse, since a PSPACE-complete problem would be a ${\displaystyle \Sigma _{k}^{\rm {P}}}$-complete problem for some k.

Each class in the polynomial hierarchy contains ${\displaystyle \leq _{\rm {m}}^{\rm {P}}}$-complete problems (problems complete under polynomial-time many-one reductions). Furthermore, each class in the polynomial hierarchy is closed under ${\displaystyle \leq _{\rm {m}}^{\rm {P}}}$-reductions: meaning that for a class ${\displaystyle {\mathcal {C}}}$ in the hierarchy and a language ${\displaystyle L\in {\mathcal {C}}}$, if ${\displaystyle A\leq _{\rm {m}}^{\rm {P}}L}$, then ${\displaystyle A\in {\mathcal {C}}}$ as well. These two facts together imply that if ${\displaystyle K_{i}}$ is a complete problem for ${\displaystyle \Sigma _{i}^{\rm {P}}}$, then ${\displaystyle \Sigma _{i+1}^{\rm {P}}=\left(\Sigma _{i}^{\rm {P}}\right)^{K_{i}}}$, and ${\displaystyle \Pi _{i+1}^{\rm {P}}=\left(\Pi _{i}^{\rm {P}}\right)^{K_{i}^{\rm {c}}}}$. For instance, ${\displaystyle \Sigma _{2}^{\rm {P}}={\rm {NP}}^{\rm {SAT}}}$. In other words, if a language is defined based on some oracle in ${\displaystyle {\mathcal {C}}}$, then we can assume that it is defined based on a complete problem for ${\displaystyle {\mathcal {C}}}$. Complete problems therefore act as "representatives" of the class for which they are complete.

Sipser–Lautemann theorem states that the class BPP is contained in second level of polynomial hierarchy.

Kannan's theorem states that for any k, ${\displaystyle \Sigma _{2}}$ is not contained in SIZE(nk).

Toda's theorem states that the polynomial hierarchy is contained in P#P.

## Problems in the polynomial hierarchy

{{safesubst:#invoke:list|bulleted}}