The counting class #P #
#P (sharp-P) is the class of functions that count the accepting leaves of a polynomial-time nondeterministic computation tree (roadmap track L5).
This is deliberately distinct from NTM.acceptCount, which counts fixed-length
choice strings for probabilistic semantics. If a machine halts early, all
extensions of that random string must retain their multiplicity when computing a
probability, but the halted computation is only one leaf of a nondeterministic
tree. NTM.acceptLeafCount implements the latter convention and is invariant
under extending any clock by which every path has halted.
Main definitions and results #
SharpP— the counting classNTM.acceptCount_le— a machine has at most2 ^ Taccepting fixed-clock choice strings among the2 ^ Tlength-TstringsNTM.acceptLeafCount_eq_of_le_of_allPathsHaltIn— accepting-leaf counts do not depend on the choice of a sufficient clockSharpP.le_two_pow— every#Pfunction is bounded by2 ^ T(|x|)for its polynomial clockT
Count accepting leaves in the nondeterministic computation tree rooted at
c, truncated after at most T transitions. A halted configuration contributes
one leaf, rather than one copy for every unused suffix of the choice string.
Equations
Instances For
Number of accepting leaves reached from the initial configuration within
T transitions. Unlike acceptCount, this counts an early-halting path once.
Equations
- tm.acceptLeafCount x T = tm.acceptLeafCountFrom T (tm.initCfg x)
Instances For
Once every path has halted by T, extending the observation clock to any
T' ≥ T leaves the accepting-leaf count unchanged.
A pointwise-larger sufficient clock gives the same accepting-leaf count.
#P (sharp-P): the class of functions f : List Bool → ℕ counting the
accepting leaves of a polynomial-time nondeterministic machine. f ∈ SharpP
when some NTM halts on every path within a polynomial time bound T and
f x equals its accepting-leaf count. Unlike fixed-clock PTM probability,
unused choice bits after an early halt do not duplicate a computation leaf.
Equations
- One or more equations did not get rendered due to their size.
Instances For
GapP: the class of integer-valued functions expressible as the difference
of two #P functions (equivalently, accepting minus rejecting paths of a
polynomial-time nondeterministic machine).