Documentation

CslibFrontier.Computability.Complexity.Classes.Hierarchy.LazyDiagonal

Lazy diagonalization against nondeterministic time #

A diagonal for nondeterministic time cannot simply negate the answer of the machine it simulates: that answer is an existential over certificates. Lazy diagonalization Žák negates it only once per interval of lengths, where the input is long enough to try every certificate. This module holds the construction and its lower bound, shared by the nondeterministic time hierarchies (Cslib.Complexity.lazyDiagonal, Cslib.Complexity.expLazyDiagonal). It is parameterized by a step budget β, a certificate length L and a horizon H.

An input carries a word w framed at its start, and w carries the description of a deterministic verifier on pairs, followed by padding that gives each description infinitely many words w. The interval of w runs from the length P of frame w to 2 ^ H P - 1. Below its end, the verifier Cslib.Complexity.Diagonal.lazyVerifier β L H runs the described verifier on the input one bit longer for β steps with the universal function (Cslib.Complexity.Diagonal.lazyAccepts); at its end, it accepts when the described verifier accepts no certificate of length L P on frame w. The problem Cslib.Complexity.Diagonal.lazyLanguage β L H consists of the inputs x with an accepted certificate of length L (x.length + 1). A nondeterministic machine deciding it within time O(T) has a deterministic verifier on pairs within linear time, accepting certificates of every length at least c * T n + c (Cslib.Complexity.exists_verifier_of_mem_NTIME). When certificates of length L and β simulated steps eventually suffice for it, the universal function runs it exactly on the interval of a word w describing it with enough padding. Then each input of the interval is in the problem exactly when the next one is, and the last exactly when the first is not.

Arora and Barak enumerate nondeterministic machines and use one global sequence of intervals Arora and Barak, Theorem 3.3; this construction gives each word w its own interval instead, and diagonalizes against verifiers.

Main definitions #

Main results #

References #

The machine described by c, run as a verifier on the pair (y, v) (encoded as frame y ++ v) for β y v steps with the universal function, has halted with output [true].

The verifier of the lazy diagonal with step budget β, certificate length L and horizon H, on an input x of length n and a certificate v. The input carries a word w framed at its start, and w carries the description unframe w framed at its start. When the description is short (Cslib.Complexity.Diagonal.shortDesc w), let P = 2 * w.length + 1; the lengths from P to 2 ^ H P - 1 form the interval of w.

  • If n + 1 < 2 ^ H P, below the end of the interval, accept when the described verifier accepts v on the input one bit longer.
  • If n + 1 = 2 ^ H P, at the end of the interval, accept when the described verifier accepts no certificate of length L P on frame w, by trying them all.
  • Otherwise, and when the description is not short, reject.

The lazy diagonal problem: the words x with a certificate of length L (x.length + 1) accepted by Cslib.Complexity.Diagonal.lazyVerifier β L H.

theorem Cslib.Complexity.Diagonal.exists_length_ge_lazyLanguage_disagree {β : List Bool → List Bool → ℕ} {L H T : ℕ → ℕ} (hL : ∀ (c : ℕ), ∃ (M : ℕ), ∀ (m : ℕ), M ≤ m → c * T m + c ≤ L m) (hβ : ∀ (c₂ : ℕ), ∃ (M : ℕ), ∀ (y v : List Bool), M ≤ y.length → v.length = L y.length → c₂ * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (y, v)).length + 1) ≤ β y v) (hH : ∀ (P : ℕ), P + 1 < 2 ^ H P) {B : Set (List Bool)} (hB : B ∈ NTIME Turing.MultiTapeTM.encBits T) (N₀ : ℕ) :
∃ (y : List Bool), N₀ ≤ y.length ∧ ¬(y ∈ lazyLanguage β L H ↔ y ∈ B)

Every problem in nondeterministic time O(T) differs from the lazy diagonal at arbitrarily large lengths, once certificates of length L (hL) and β simulated steps (hβ) eventually suffice for the linear-time verifiers of Cslib.Complexity.exists_verifier_of_mem_NTIME, and every interval is nonempty (hH). The diagonal therefore also lies outside every class of problems that agree with a member of NTIME encBits T on all long enough inputs.

theorem Cslib.Complexity.Diagonal.lazyLanguage_notMem_NTIME {β : List Bool → List Bool → ℕ} {L H T : ℕ → ℕ} (hL : ∀ (c : ℕ), ∃ (M : ℕ), ∀ (m : ℕ), M ≤ m → c * T m + c ≤ L m) (hβ : ∀ (c₂ : ℕ), ∃ (M : ℕ), ∀ (y v : List Bool), M ≤ y.length → v.length = L y.length → c₂ * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (y, v)).length + 1) ≤ β y v) (hH : ∀ (P : ℕ), P + 1 < 2 ^ H P) :

The lazy diagonal is not decidable in nondeterministic time O(T) once certificates of length L (hL) and β simulated steps (hβ) eventually suffice for the linear-time verifiers of Cslib.Complexity.exists_verifier_of_mem_NTIME, and every interval is nonempty (hH).