Documentation

CslibFrontier.Computability.Complexity.Classes.Time.Verifier

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.

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 #

References #

theorem Cslib.Complexity.setOf_exists_mem_NTIME {α : Type} {enc : α ↪ List Bool} {V : α × List Bool → Bool} {ℓ : α → ℕ} {t : ℕ → ℕ} {Tℓ Sℓ : α → ℕ} {T S : α × List Bool → ℕ} {C : ℕ} (hℓ : Turing.MultiTapeTM.ComputableInO ℓ enc Turing.MultiTapeTM.encUnary Tℓ Sℓ) (hV : Turing.MultiTapeTM.ComputableInO V (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBool T S) (ht : ∀ (a : α) (w : List Bool), w.length = ℓ a → (enc a).length + Tℓ a + T (a, w) ≤ C * t (enc a).length + C) :
{a : α | ∃ (w : List Bool), w.length = ℓ a ∧ V (a, w) = true} ∈ NTIME enc t

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.

theorem Cslib.Complexity.exists_verifier_of_mem_NTIME {α : Type} {enc : α ↪ List Bool} {A : Set α} {t : ℕ → ℕ} (hA : A ∈ NTIME enc t) :

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.