Nondeterministic time through verifiers, with explicit bounds #
This module characterizes Cslib.Complexity.NTIME enc t by deterministic verifiers, keeping the
time bound up to constant factors. The polynomial characterization of NP
(Cslib.Complexity.mem_NP_iff_decidableInPolyTime) loses the degree in both directions. The
two directions here keep it.
- Guess and verify (
Cslib.Complexity.setOf_exists_mem_NTIME). Suppose a verifierVis computable within timeT (a, w)on encoded pairs, and a certificate lengthℓ ais computable in unary within timeTℓ a. Then the problem{a | ∃ w, w.length = ℓ a ∧ V (a, w) = true}lies inNTIME enc twhenever(enc a).length + Tℓ a + T (a, w)is withinO(t (enc a).length)on certificates of that length. The certificate length may depend on the instance, not only on its encoded length. The machine is the nondeterministic reading of the sample-and-verify machine (Cslib.Complexity.exists_machine_sampleVerify), a closed fair-coin composition that writesframe (enc a)followed byℓones, replaces the ones by fair coins with the fixed samplerTuring.MultiTapePTM.pairSampler, and runs the verifier. Its computation paths are exactly the coin replays, so it accepts exactly when some certificate is accepted, and every branch halts within the clock. - Verifiers from nondeterministic time (
Cslib.Complexity.exists_verifier_of_mem_NTIME). A problem inNTIME enc thas a verifier that is computable in linear time on encoded pairs: check that the certificate, read as coins of the choice table (Turing.MultiTapeNTM.checkChoices), replays an accepting computation. Every certificate length of at leastc * t (enc a).length + cworks, for a constantc.
These are explicit-time forms of the guess-and-verify characterization of nondeterministic polynomial time Arora and Barak: the choices of an accepting computation are a certificate, and a certificate can be guessed and then checked.
Main results #
Cslib.Complexity.setOf_exists_mem_NTIME: guess and verify within explicit time.Cslib.Complexity.exists_verifier_of_mem_NTIME: a linear-time verifier for a problem inNTIME, with certificates of every sufficient length.
References #
Guess and verify, within explicit time. If a verifier V is computable within time
T (a, w) on encoded pairs, and the certificate length ℓ a is computable in unary within time
Tℓ a, then the problem of instances with an accepted certificate of that length is in
NTIME enc t, provided (enc a).length + Tℓ a + T (a, w) ≤ C * t (enc a).length + C for every
certificate w of that length.
A linear-time verifier for nondeterministic time. A problem in NTIME enc t has a
verifier computable in linear time on encoded pairs. For a constant c, every certificate length
L ≥ c * t (enc a).length + c works: a ∈ A exactly when some certificate of length L is
accepted. The verifier checks that the certificate, read as coins of the choice table, replays an
accepting computation.