Exact counting in polynomial space #
Enumerate certificates with a fixed-width binary counter and keep the number accepted in a
binary accumulator. The exponentially many iterations reuse their workspace: a certificate of
length m needs m cells and its acceptance count has at most m + 1 bits. This is the usual
polynomial-space simulation of counting [AB09]. The interactive-proof simulation counts
its accepting coins with the same counter (Cslib.Complexity.Interaction.countAccepts).
Main definitions #
Cslib.Complexity.acceptCountStep: one round of the count: test, accumulate, advance the counter.Cslib.Complexity.streamAcceptCount: the count obtained by running every value of the counter.
Main results #
Cslib.Complexity.streamAcceptCount_eq_acceptCount: the streaming count isacceptCount.Cslib.Complexity.computableInPolySpace_acceptCount: count accepted certificates of a polynomial-time unary length, with binary output.Cslib.Complexity.SharpP.computableInPolySpace: every #P function is computable within polynomial space, with binary output.Cslib.Complexity.GapP.computableInPolySpace: evaluate integer gaps in binary.
References #
The number of certificates of length t that V accepts together with a, counted by running
acceptCountStep over all 2 ^ t values of a t-bit binary counter. It equals acceptCount V a t
(streamAcceptCount_eq_acceptCount) and needs only the counter and the accumulator as workspace.
Instances For
Count the accepted certificates of a polynomial-time unary length in polynomial space. The result uses binary natural-number output, including when the certificate length is zero.