Documentation

CslibFrontier.Computability.Complexity.FineGrained.Padding

Exponential time by padding #

A decision procedure that runs in polynomial time on padded inputs (a, 2 ^ ν a), with the padding in unary, gives a decision procedure for the original instances within time 2 ^ (δ μ a) times a polynomial, for an exponent ν ≤ μ computable in unary in polynomial time (Cslib.Complexity.DecidableInExpTime.of_computableInPolyTime_pad). The machine writes the padding and runs the polynomial-time procedure (Turing.MultiTapeTM.ComputableInPolyTime.exists_computableInO_pad). The constant δ comes from the degree of the polynomial bound, and is not explicit.

This is how a dynamic program over 2 ^ k states, polynomial-time in the number of its states, is stated as an exponential-time or fpt algorithm in the parameter k on multi-tape machines. A padding length can also majorize a sublinear power exponential times a polynomial while remaining computable in a sublinear power exponential time bound. This lets a randomized algorithm allocate a common seed length given a bound on the seed lengths of all its calls.

Main results #

theorem Cslib.Complexity.DecidableInExpTime.of_computableInPolyTime_pad {α : Type} {enc : α ↪ List Bool} {A : Set α} {μ ν : α → ℕ} {Ψ : α × ℕ → Bool} (hΨ : Turing.MultiTapeTM.ComputableInPolyTime Ψ (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encUnary) Turing.MultiTapeTM.encBool) (hν : Turing.MultiTapeTM.ComputableInPolyTime ν enc Turing.MultiTapeTM.encUnary) (hνμ : ∀ (a : α), ν a ≤ μ a) (hA : ∀ (a : α), a ∈ A ↔ Ψ (a, 2 ^ ν a) = true) :
∃ (δ : ℝ), DecidableInExpTime A enc μ δ

Exponential time by padding. If Ψ is polynomial-time on pairs (a, N) with N in unary, and A is decided by Ψ on the padded inputs (a, 2 ^ ν a), for a unary exponent ν ≤ μ computable in polynomial time, then A is decidable within time 2 ^ (δ μ a) times a polynomial, for some δ.

theorem Cslib.Complexity.exists_computableInPowerExpTime_unary_majorant {α : Type} {enc : α ↪ List Bool} {μ : α → ℕ} (hμ : Turing.MultiTapeTM.ComputableInPolyTime μ enc Turing.MultiTapeTM.encUnary) {p : ℝ} (hp : p < 1) (A e : ℕ) :
∃ (q : ℝ) (pad : α → ℕ), p < q ∧ 0 < q ∧ q < 1 ∧ ComputableInPowerExpTime pad enc Turing.MultiTapeTM.encUnary μ q ∧ ∀ (a : α), 2 ^ (↑A * (↑(μ a) + 1) ^ p) * (↑(enc a).length + 1) ^ e ≤ ↑(pad a)

Given a polynomial-time unary parameter, a sublinear power-exponential bound times an input-length polynomial has a unary majorant computable in time of the same form at some power strictly between the original power and one. The majorant uses integer powers of fixed bases and the ceiling logarithm of the parameter.