Unbounded-error probabilistic time #
Cslib.Complexity.PPTIME enc t consists of the problems decided by strict majority within time
O(t n), that is c₁ * t n + c₂ for constants c₁ and c₂, by a fair-coin machine with a
binary alphabet and finitely many states (Turing.MultiTapePTM.DecidesByMajorityInTime): every
run on that many coins has halted, and a ∈ A exactly when the run outputs [true] with
probability more than 1 / 2. It is the unbounded-error counterpart of
Cslib.Complexity.BPTIME, with the same machines and clocks.
Convention. Unbounded-error probabilistic computation goes back to Gill [Gil77]. The timed
predicate here is this library's convention, not a transcription of a source definition: acceptance
is strict and ties reject. A nonmember may output [true] with probability exactly 1 / 2, and
its other outputs are unconstrained, so it need not output [false] with probability more than
1 / 2. This is the threshold of the library's verifier-based PP
(Cslib.Complexity.DecidesByMajority), and the two agree at polynomial time
(Cslib.Complexity.mem_PP_iff_exists_mem_PPTIME). That equivalence is a union over all polynomial
clocks; for a fixed time bound, no comparison with conventions that require a strict majority of
[false] on nonmembers is proved here.
A fair-coin machine draws one coin per live step, so its acceptance probability within the clock
t is the number of accepting coin strings of length t divided by 2 ^ t. Deciding by majority
is therefore the comparison 2 ^ t < 2 * count of that count, an Cslib.Complexity.acceptCount
of the coin replay Turing.MultiTapePTM.runClosedCoins
(Turing.MultiTapePTM.decidesByMajorityInTime_iff).
PP (Cslib.Complexity.PP) is defined through polynomial-time verifiers reading random strings.
It is the union of the classes PPTIME (n ^ k) (Cslib.Complexity.mem_PP_iff_exists_mem_PPTIME),
by the argument for BPP and BPTIME (Cslib.Complexity.mem_BPP_iff_exists_mem_BPTIME): a
verifier run on sampled coins is a fair-coin machine with a halting polynomial clock, and a
fair-coin machine halting within T steps is a verifier replaying T coins. A bounded-error
decider decides by majority (Cslib.Complexity.BPTIME_subset_PPTIME).
Main definitions #
Turing.MultiTapePTM.DecidesByMajorityInTime: strict majority within a clock.Cslib.Complexity.PPTIME: unbounded-error probabilistic time.
Main results #
Turing.MultiTapePTM.decidesByMajorityInTime_iff: the majority condition as a count of accepting coin strings.Cslib.Complexity.PPTIME_mono:PPTIMEis monotone in the time bound.Cslib.Complexity.BPTIME_subset_PPTIME: bounded error is a strict majority.Cslib.Complexity.mem_PP_iff_exists_mem_PPTIME:PPis the union of the classesPPTIME (n ^ k).
References #
machine decides A by strict majority within t, relative to the encoding enc: on every
encoded instance enc a, every run of t a steps with fair coins has halted, and a ∈ A exactly
when the run outputs [true] with probability more than 1 / 2. Ties reject, and outputs other
than [true] are unconstrained; this is the library's convention, described in the module
docstring.
Instances For
Time bounds can be increased: a halted run ignores further coins.
Deciding by majority is a count comparison. A fair-coin machine decides A by strict
majority within t exactly when, on every instance, every run has halted by the clock and
a ∈ A exactly when more than half of the coin strings of length t a make the coin replay
Turing.MultiTapePTM.runClosedCoins output [true].
The problems decidable by strict majority within time O(t n), that is c₁ * t n + c₂ for
constants c₁ and c₂, on instances whose encoding under enc has length n, by a fair-coin
machine with a binary alphabet and finitely many states: every run of that many steps has halted,
and a ∈ A exactly when the run outputs [true] with probability more than 1 / 2. Ties reject
(Turing.MultiTapePTM.DecidesByMajorityInTime).
Instances For
PP is the union of the classes PPTIME (n ^ k): a polynomial-time
verifier run on uniformly sampled random strings is a fair-coin machine halting within a
polynomial clock, and a fair-coin machine halting within the clock T is a verifier replaying
random strings of length T.