Documentation

CslibFrontier.Computability.Complexity.FineGrained.PowerTime

Time bounds with a power in the exponent #

The reduction rule charges both the reduction itself and the polynomial dependence on the length of its output.

Main definitions #

Main results #

def Cslib.Complexity.ComputableInPowerExpTime {α β : Type} (f : α → β) (encIn : α ↪ List Bool) (encOut : β ↪ List Bool) (μ : α → ℕ) (p : ℝ) :

A function is computable in time 2 ^ (C * (μ a + 1) ^ p) * (L + 1) ^ e up to constant factors, for some constants C and e, where L is the length of the encoded input.

def Cslib.Complexity.DecidableInPowerExpTime {α : Type} (A : Set α) (enc : α ↪ List Bool) (μ : α → ℕ) (p : ℝ) :

Decidability in time 2 ^ (C * (μ a + 1) ^ p) * (L + 1) ^ e up to constant factors, for some constants C and e, with L the length of the encoded input.

theorem Cslib.Complexity.ComputableInPowerExpTime.of_polyBounded_time {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {μA : α → ℕ} {f : α → β} {t s : α → ℕ} {C e : ℕ} {p : ℝ} (hF : Turing.MultiTapeTM.ComputableInO f encA encB t s) (ht : Turing.MultiTapeTM.PolyBounded (fun (a : α) => ⌈2 ^ (↑C * (↑(μA a) + 1) ^ p) * (↑(encA a).length + 1) ^ e⌉₊) t) :
ComputableInPowerExpTime f encA encB μA p

A machine clock that is polynomial in a rounded power-exponential budget yields the same power in the exponent. The overhead changes the exponential coefficient and polynomial degree.

theorem Cslib.Complexity.DecidableInPowerExpTime.mono_measure {α : Type} {encA : α ↪ List Bool} {A : Set α} {μA ν : α → ℕ} {p : ℝ} (h : DecidableInPowerExpTime A encA μA p) (hμ : ∀ (a : α), μA a ≤ ν a) (hp : 0 ≤ p) :

At a nonnegative power, enlarging the instance parameter only relaxes the time bound.

theorem Cslib.Complexity.ComputableInPowerExpTime.prod {α β γ : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {encC : γ ↪ List Bool} {μA : α → ℕ} {f : α → β} {g : α → γ} {p : ℝ} (hf : ComputableInPowerExpTime f encA encB μA p) (hg : ComputableInPowerExpTime g encA encC μA p) :
ComputableInPowerExpTime (fun (a : α) => (f a, g a)) encA (Turing.MultiTapeTM.encPair encB encC) μA p

Computing two functions on the same input and pairing their outputs preserves their common power in the exponent.

theorem Cslib.Complexity.ComputableInPowerExpTime.comp {α β γ : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {encC : γ ↪ List Bool} {μA : α → ℕ} {μB : β → ℕ} {f : α → β} {g : β → γ} {q b p : ℝ} (hg : ComputableInPowerExpTime g encB encC μB p) (hf : ComputableInPowerExpTime f encA encB μA q) {K : ℕ} (hsize : ∀ (a : α), ↑(μB (f a)) + 1 ≤ (↑K + 1) * (↑(μA a) + 1) ^ b) (hp : 0 ≤ p) :
ComputableInPowerExpTime (g ∘ f) encA encC μA (max q (b * p))

Composing a map of power q and parameter blowup O((μA + 1) ^ b) with a function of power p ≥ 0 gives power max q (b * p). The time to compute the first map also bounds the length of the encoded argument supplied to the second.

theorem Cslib.Complexity.ComputableInPowerExpTime.comp_polyTime {α β γ : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {encC : γ ↪ List Bool} {μA : α → ℕ} {μB : β → ℕ} {f : α → β} {g : β → γ} {b p : ℝ} (hg : ComputableInPowerExpTime g encB encC μB p) (hf : Turing.MultiTapeTM.ComputableInPolyTime f encA encB) {K : ℕ} (hsize : ∀ (a : α), ↑(μB (f a)) + 1 ≤ (↑K + 1) * (↑(μA a) + 1) ^ b) (hb : 0 ≤ b) (hp : 0 ≤ p) :
ComputableInPowerExpTime (g ∘ f) encA encC μA (b * p)

Precomposing with a polynomial-time map with parameter blowup O((μA + 1) ^ b) multiplies the power by b.

theorem Cslib.Complexity.DecidableInPowerExpTime.of_reduction {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {A : Set α} {B : Set β} {μA : α → ℕ} {μB : β → ℕ} {f : α → β} {q b p : ℝ} (hf : ∃ (C : ℕ) (d : ℕ), ComputableInTimeO f encA encB fun (a : α) => 2 ^ (↑C * (↑(μA a) + 1) ^ q) * (↑(encA a).length + 1) ^ d) (hmem : ∀ (a : α), a ∈ A ↔ f a ∈ B) {K : ℕ} (hsize : ∀ (a : α), ↑(μB (f a)) + 1 ≤ (↑K + 1) * (↑(μA a) + 1) ^ b) (hp : 0 ≤ p) (h : DecidableInPowerExpTime B encB μB p) :
DecidableInPowerExpTime A encA μA (max q (b * p))

If a many-one reduction takes time exponential in the qth power of its source parameter, times a polynomial in input length, and has parameter blowup O((μA + 1) ^ b), then a target solver with power p ≥ 0 gives a source solver with power max q (b * p).

theorem Cslib.Complexity.DecidableInPowerExpTime.of_polyTime_reduction {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {A : Set α} {B : Set β} {μA : α → ℕ} {μB : β → ℕ} {f : α → β} {b p : ℝ} (hf : Turing.MultiTapeTM.ComputableInPolyTime f encA encB) (hmem : ∀ (a : α), a ∈ A ↔ f a ∈ B) {K : ℕ} (hsize : ∀ (a : α), ↑(μB (f a)) + 1 ≤ (↑K + 1) * (↑(μA a) + 1) ^ b) (hb : 0 ≤ b) (hp : 0 ≤ p) (h : DecidableInPowerExpTime B encB μB p) :
DecidableInPowerExpTime A encA μA (b * p)

Along a polynomial-time many-one reduction with parameter blowup O((μA+1)^b), a target solver with power p gives a source solver with power b*p.