Documentation

CslibFrontier.Computability.Complexity.Classes.Counting.Space

Counting classes within polynomial space #

Exact #P counts have polynomially many binary digits and can be evaluated in polynomial space. Comparing the count to a majority threshold therefore gives PP ⊆ PSPACE. For modular classes, divisibility is tested by a polynomially long binary quotient certificate, searched in polynomial space. This works for every fixed modulus, including the degenerate moduli zero and one.

The oracle corollaries use languages over words with their identity encoding. They make no claim that the image of an arbitrary encoding is decidable.

Main results #

References #

theorem Cslib.Complexity.PP_subset_PSPACE {α : Type} {enc : α ↪ List Bool} :
PP enc ⊆ PSPACE enc

Majority counting is decidable in polynomial space by evaluating the exact count in binary and comparing it with the threshold [AB09].

theorem Cslib.Complexity.coModP_subset_PSPACE {α : Type} {enc : α ↪ List Bool} (k : ℕ) :
coModP k enc ⊆ PSPACE enc

Testing whether a fixed modulus divides a #P count is in polynomial space. A quotient has at most one more bit than the verifier's certificate length, even for moduli zero and one.

theorem Cslib.Complexity.ModP_subset_PSPACE {α : Type} {enc : α ↪ List Bool} (k : ℕ) :
ModP k enc ⊆ PSPACE enc

Nonzero-modular counting is in polynomial space, for every fixed modulus.

Polynomial time with a PP word oracle stays within polynomial space.

Nondeterministic polynomial time with a PP word oracle stays within polynomial space.