Sampling a random string and running a verifier, within explicit time #
A fair-coin machine can draw a uniformly random string w of length ℓ a and output the verdict
V (a, w) of a deterministic verifier on the pair (a, w), within the time it takes to write
ℓ a in unary and to run the verifier, up to constant factors
(Cslib.Complexity.exists_machine_sampleVerify_of_bound). The machine is a closed fair-coin
composition:
- a deterministic machine writes
frame (enc a)followed byℓ aones; - the fixed sampler
Turing.MultiTapePTM.pairSamplercopies the framed instance and replaces the ones by fair coins; - a deterministic machine runs the verifier.
Every run halts within the clock, and the output is distributed as [V (a, w)] for w uniform of
length ℓ a. Read nondeterministically, the machine guesses and verifies a certificate
(Cslib.Complexity.setOf_exists_mem_NTIME); read probabilistically, it samples and verifies
(Cslib.Complexity.mem_PromiseBPTIME_of_verifier). Unlike the polynomial compiler of PPT
programs (Cslib.Probability.IsPPTOn.exists_halting_machine), the clock keeps the time bound up to
constant factors.
Main results #
Cslib.Complexity.exists_machine_sampleVerify_of_bound: the sample-and-verify machine withinO(B a)steps for a per-instance boundB, with its output distribution.Cslib.Complexity.exists_machine_sampleVerify: the same withinO(t n)steps on inputs of lengthn.
Sample and verify, within a per-instance bound. If a verifier V is computable within
time T (a, w) on encoded pairs, the length ℓ a of the random string is computable in unary
within time Tℓ a, and (enc a).length + Tℓ a + T (a, w) ≤ B a for every string w of length
ℓ a, then a fair-coin machine with a binary alphabet and finitely many states halts on every run
within time c * B a + c and outputs [V (a, w)] for a uniformly random w of length ℓ a.
Sample and verify, within explicit time. If a verifier V is computable within time
T (a, w) on encoded pairs, and the length ℓ a of the random string is computable in unary
within time Tℓ a, and (enc a).length + Tℓ a + T (a, w) ≤ C * t (enc a).length + C for every
string w of length ℓ a, then a fair-coin machine with a binary alphabet and finitely many
states halts on every run within time c₁ * t (enc a).length + c₂ and outputs [V (a, w)] for a
uniformly random w of length ℓ a.