The counting classes #P and GapP #
#P is defined through polynomial-time verifiers, like NP (Cslib.Complexity.NP)
Valiant, Arora and Barak, Chapter 17: f ∈ SharpP enc when there
are a polynomial 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 f a is the number of strings
w of length p (enc a).length with V (a, w) = true, the count Cslib.Complexity.acceptCount
of CslibFrontier.Computability.Complexity.AcceptCount. The problems in NP are exactly the sets
where functions in #P are nonzero (mem_NP_iff_exists_SharpP).
GapP consists of the differences of two functions in #P. Fenner, Fortnow and Kurtz define it
through the differences between the numbers of accepting and rejecting paths of nondeterministic
machines, and show that this gives the differences of functions in #P
Fenner, Fortnow and Kurtz; here that characterisation is the
definition. Classes.SharpP.Machine proves that both polynomial-clock terminal counts of a
fixed finite-control list-choice machine are in #P, and their difference is in GapP.
Classes.SharpP.Characterization supplies the actual reverse verifier construction and the
bidirectional #P machine characterization. Classes.SharpP.GapMachine supplies balanced
signed routing and the corresponding bidirectional GapP characterization.
Main definitions #
Main results #
Cslib.Complexity.mem_NP_iff_exists_SharpP:NPconsists of the supports of functions in#P.Cslib.Complexity.SharpP.exists_le_two_pow: functions in#Pare at most exponential.Cslib.Complexity.GapP.exists_abs_le_two_pow: everyGapPfunction is bounded in absolute value by2 ^ p(|x|)for a polynomialp.Cslib.Complexity.GapP.neg_mem:GapPis closed under negation.
References #
A function in #P is at most exponential in the length of the encoded instance.