Inclusions between complexity classes #
The inclusions between the standard classes that papers cite in their preliminaries
Arora and Barak, Chapters 2, 4, 5 and 7, Sipser, Chapters 8 and 10.
This module proves the inclusions that need several classes at once and imports the narrower
modules for the others: P ⊆ BPP is in CslibFrontier.Computability.Complexity.Classes.BPP, the
closure properties of PP in CslibFrontier.Computability.Complexity.Classes.PP.Closure, and those
of PSPACE in CslibFrontier.Computability.Complexity.Classes.Space.Closure.
P ⊆ BPP(Cslib.Complexity.P_subset_BPP): a decider ignores its random string.NP ⊆ PP(Cslib.Complexity.NP_subset_PP): accept on half of the random strings outright, and on the other half run the verifier, so the majority accepts exactly when some certificate does.PPis closed under complement (Cslib.Complexity.compl_mem_PP): with two more random bits, accept on a quarter of the random strings and one more, and on half of them reject what the verifier accepts; the majority accepts exactly when the verifier accepts at most half of its random strings.NP ⊆ PSPACE(Cslib.Complexity.NP_subset_PSPACE): a nondeterministic machine visits at most one new cell per step on each work tape (Turing.MultiTapeNTM.RunsInTime.runsInSpace), soNPis withinNPSPACE, which isPSPACEby Savitch's theorem (Cslib.Complexity.NPSPACE_subset_PSPACE).PSPACE ⊆ EXP(Cslib.Complexity.PSPACE_subset_EXP): Savitch's decider runs within time exponential in a polynomial (Cslib.Reachability.computableInO_savitch).PH ⊆ PSPACE(Cslib.Complexity.PH_subset_PSPACE):PSPACEcontainsP, is closed under complement (Cslib.Complexity.compl_mem_PSPACE), under polynomial-time reductions (Cslib.Complexity.PolyTimeReducible.mem_PSPACE) and under polynomially bounded existential quantification (Cslib.Complexity.setOf_exists_mem_PSPACE), so it evaluates the alternating quantifiers of every level of the hierarchy one at a time. The existential quantifier over the wordswof lengthℓis reachability within two steps from the all-zero word to the all-one word of widthℓ + 1, along edges totrue :: wfor the acceptedwand from every word starting withtrueto the all-one word; Savitch's algorithm decides it at depth1, enumerating the candidates in place and reusing the space of the decider for each.
With Cslib.Complexity.P_subset_NP, these give the chain P ⊆ NP ⊆ PSPACE ⊆ EXP. The other
inclusions of the chains are elsewhere: P ⊆ PSPACE (Cslib.Complexity.P_subset_PSPACE),
NPSPACE = PSPACE (Cslib.Complexity.NPSPACE_eq_PSPACE), RP ⊆ NP
(Cslib.Complexity.RP_subset_NP), BPP ⊆ PP (Cslib.Complexity.BPP_subset_PP), BPP ⊆ Σ₂ ∩ Π₂
(Cslib.Complexity.BPP_subset_SigmaP_two_inter_PiP_two), L ⊆ NL ⊆ P
(Cslib.Complexity.L_subset_NL, Cslib.Complexity.NL_subset_P), P ⊆ EXP and its strictness
(Cslib.Complexity.P_subset_EXP, Cslib.Complexity.P_ssubset_EXP).
Main results #
Cslib.Complexity.NP_subset_NPSPACE,Cslib.Complexity.NP_subset_PSPACE.Cslib.Complexity.PSPACE_subset_EXP,Cslib.Complexity.NP_subset_EXP.Cslib.Complexity.SigmaP_subset_PSPACE,Cslib.Complexity.PH_subset_PSPACE.Cslib.Complexity.SigmaP_subset_EXP,Cslib.Complexity.SigmaP_subset_NEXP.
References #
Space #
NP ⊆ PSPACE Arora and Barak, Theorem 4.2: NP ⊆ NPSPACE, and
NPSPACE = PSPACE by Savitch's theorem.
PSPACE ⊆ EXP Arora and Barak, Theorem 4.2,
Sipser, Section 8.2: a problem in PSPACE is decided by a nondeterministic machine
within polynomial space (Cslib.Complexity.PSPACE_subset_NPSPACE), and Savitch's decider for it
runs within time exponential in a polynomial: its codes have polynomial width w, and it runs
2 ^ ((w + 2) * (w + 1)) rounds of polynomial cost
(Cslib.Reachability.computableInO_savitch).
The polynomial hierarchy #
PH ⊆ PSPACE Arora and Barak, Chapter 5,
Stockmeyer: the quantifiers of a level of the hierarchy are evaluated one at a
time, reusing the space for every certificate.