Native machine terminal counts belong to #P #
For each fixed finite-control list-choice machine and polynomial clock, both accepting and
rejecting terminal-branch counts belong to the verifier-defined #P. The binary verifiers are
the actual certified replay programs from MultiTape.Counting.Checker, with one fixed-width
code per occurrence index and uniquely forced terminal padding. Invalid codes count on neither
side. The result does not identify choices with equal actions or equal successor configurations.
The clock counts native transitions. Only branches halted by that clock are counted; the existing
HaltsWithin hypothesis additionally guarantees that every branch halts without getting stuck,
and makes both counts stable at larger clocks. No all-branch halting assumption is needed merely
to count bounded terminal branches. The machine, finite control, number of tapes and block width
are fixed before the input is supplied. Classes.SharpP.Characterization supplies the reverse
verifier construction and the bidirectional #P characterization. Classes.SharpP.GapMachine
supplies balanced signed routing and the bidirectional GapP characterization.
Main results #
Turing.MultiTapeCTM.Checker.acceptCount_checkBinary: exact transfer of either terminal count to the corresponding fixed-length binary verifier count.Turing.MultiTapeCTM.acceptCount_mem_SharpP: polynomial-clock accepting counts belong to #P.Turing.MultiTapeCTM.rejectCount_mem_SharpP: polynomial-clock rejecting counts belong to #P.Turing.MultiTapeCTM.gapCount_mem_GapP: their integer difference belongs to GapP.
References #
- L. Valiant, The complexity of computing the permanent
- S. Fenner, L. Fortnow, S. Kurtz, Gap-definable counting classes
This is the forward counting-machine construction. The shared native machine, binary encoding, finite-storage simulation and certified calculus retain their source credits in their modules.
Every accepting binary word corresponds to exactly one canonical occurrence certificate, for either requested terminal verdict. Invalid words contribute to neither count.
For a fixed finite-control native list-choice machine, the number of accepting branches
halted by a polynomial clock is in #P. A complete all-branch computation additionally uses
HaltsWithin; neither stuck nor unfinished branches are counted.
Rejecting terminal branches have their own valid-certificate #P verifier. It complements the output verdict while retaining validity, so invalid binary words are never counted.
The difference of accepting and rejecting polynomial-clock terminal counts is in GapP.
This is the forward implication; the reverse construction is in Classes.SharpP.GapMachine.