The polynomial hierarchy #
The levels Σₖ and Πₖ of the polynomial hierarchy are defined like NP
(Cslib.Complexity.NP), through polynomial-time verifiers, now with k alternating quantifiers
over certificates Arora and Barak, Definition 5.3, Wrathall:
A ∈ SigmaP k enc when there are polynomials p₁, …, pₖ and a function
V : α × List Bool → Bool, computable in polynomial time on inputs
encPair enc encBits (a, w) = frame (enc a) ++ w, such that
a ∈ A ↔ ∃ w₁, ∀ w₂, ∃ w₃, …, V (a, w₁ ++ w₂ ++ ⋯ ++ wₖ) = true, where wᵢ ranges over the
strings of length pᵢ (enc a).length. PiP k enc is the same with a universal quantifier
first, and PH enc is the union of the levels SigmaP k enc Stockmeyer.
Two choices make the inclusions between levels hold with the same verifier, and hence without any facts about polynomial time:
- The certificates are concatenated into one string, as in
NP, so thatSigmaP 1 enc = NP enc(SigmaP_one). - Each block of certificates has its own length
pᵢ, where Arora and Barak use one polynomial for all blocks. A block of length0is a vacuous quantifier, so adding one at either end of the quantifier prefix showsSigmaP k ∪ PiP k ⊆ SigmaP (k + 1) ∩ PiP (k + 1). The two definitions give the same classes, since padding every block to the largest length only needs a verifier that skips the padding.
The zero levels are P: a decider can ignore its certificate, and a verifier with no quantifiers
can be run on the empty certificate. That Πₖ consists of the complements of the problems in
Σₖ follows from quantifier duality (not_alternation) and closure of polynomial time under
Boolean negation. These transformations use the polynomial-time machine calculus.
Main definitions #
Cslib.Complexity.Alternation: alternating quantifiers over binary strings of given lengths.Cslib.Complexity.IsAlternatingVerifier: the verifier condition.Cslib.Complexity.SigmaP,Cslib.Complexity.PiP,Cslib.Complexity.PH.
Main results #
Cslib.Complexity.not_alternation: the duality of alternating quantifiers.Cslib.Complexity.SigmaP_zero,Cslib.Complexity.PiP_zero:Σ₀ = Π₀ = P.Cslib.Complexity.PiP_eq_preimage_compl_SigmaP:Πₖ = coΣₖ.Cslib.Complexity.SigmaP_one:Σ₁ = NP;Cslib.Complexity.PiP_one_eq_coNP:Π₁ = coNP.Cslib.Complexity.SigmaP_subset_SigmaP_succ,Cslib.Complexity.SigmaP_subset_PiP_succ,Cslib.Complexity.PiP_subset_SigmaP_succ,Cslib.Complexity.PiP_subset_PiP_succ: the inclusions between consecutive levels.Cslib.Complexity.PH_eq_iUnion_PiP:PH = ⋃ Πₖ.Cslib.Complexity.P_subset_PH,Cslib.Complexity.NP_subset_PH,Cslib.Complexity.coNP_subset_PH.
References #
Alternating quantifiers #
Alternating quantifiers over binary strings: Alternation q [n₁, …, nₖ] P says
Q₁ w₁, Q₂ w₂, …, Qₖ wₖ, P (w₁ ++ w₂ ++ ⋯ ++ wₖ), where wᵢ ranges over the strings of length
nᵢ and the quantifiers Qᵢ alternate, starting with ∃ if q is true and with ∀ if q is
false.
Instances For
Alternating verifiers #
V verifies A through alternating quantifiers over certificates whose lengths are the
polynomials ps, evaluated at the length of the encoded instance, starting with ∃ if q is
true and with ∀ if q is false: a ∈ A iff Q₁ w₁, Q₂ w₂, …, V (a, w₁ ++ w₂ ++ ⋯).
Instances For
Negating the verifier verifies the complement with every quantifier swapped.
A block of certificates of length 0 can be added at the end.
A block of certificates of length 0 can be added at the start, as a quantifier of the other
kind.
The levels of the hierarchy #
The level Σₖ of the polynomial hierarchy, with respect to the encoding enc of instances:
the problems verified in polynomial time through k alternating blocks of polynomially long
certificates, the first existential Arora and Barak, Definition 5.3,
Wrathall.
Instances For
The level Πₖ of the polynomial hierarchy, with respect to the encoding enc of instances:
the problems verified in polynomial time through k alternating blocks of polynomially long
certificates, the first universal Arora and Barak, Definition 5.3,
Wrathall.
Instances For
The polynomial hierarchy: the union of the levels Σₖ Stockmeyer,
Arora and Barak, Definition 5.3.