While this submission is a draft, it cannot be used by other submissions.

From exact running times to complexity classes

Lax434175.ResultTransfer · concepts/Lax434175/ResultTransfer.lean · lax-434175

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    An algorithm stated with its exact running time — one program deciding the decision version within O(T(x))O(T(x)) instructions on the word of every instance xx (Results.DecidesWithinResults.DecidesWithin) — gives the coarser results by bounding TT alone, without looking at the program again. Let ∣u∣|u| be the bit size of the word uu of an instance xx with a threshold, and MM its largest number.

    Theorem.

    1. If T(x)≤c (∣u∣+1)dT(x) \le c\,(|u|+1)^d, the problem is in P.
    2. If T(x)≤c (M+1)e (∣u∣+1)dT(x) \le c\,(M+1)^e\,(|u|+1)^d, it is solvable in pseudo-polynomial time.
    3. If T(x)≤c (∣u∣+1)g(κ)T(x) \le c\,(|u|+1)^{g(\kappa)} for a function gg of the parameter κ\kappa, it is in P for every fixed value of κ\kappa.
    4. If T(x)≤f(κ) (∣u∣+1)dT(x) \le f(\kappa)\,(|u|+1)^d for a computable ff and the parameter is computable in polynomial time on the words, it is fixed-parameter tractable in κ\kappa.

    Theorem. A program deciding within exactly T(x)T(x) instructions decides within O(T(x))O(T(x)) (Results.DecidesExactResults.DecidesExact).

    Theorem. A program deciding within O(T(x))O(T(x)) decides within O(T(x))O(T(x)) with wide words (Results.DecidesWithinWideResults.DecidesWithinWide): the wide words are among the short ones.

    Concept map
    26 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    Lean source view on GitHub

    1import Lax434175.Results
    2
    3/-!
    4---
    5title: From exact running times to complexity classes
    6type: theorem
    7---
    8An algorithm stated with its exact running time — one program deciding the
    9decision version within O(T(x))O(T(x)) instructions on the word of every instance
    10xx (`Results.DecidesWithin`) — gives the coarser results by bounding TT alone,
    11without looking at the program again. Let ∣u∣|u| be the bit size of the word uu of
    12an instance xx with a threshold, and MM its largest number.
    13
    14**Theorem.**
    15
    161. If T(x)≤c (∣u∣+1)dT(x) \le c\,(|u|+1)^d, the problem is in P.
    172. If T(x)≤c (M+1)e (∣u∣+1)dT(x) \le c\,(M+1)^e\,(|u|+1)^d, it is solvable in pseudo-polynomial time.
    183. If T(x)≤c (∣u∣+1)g(κ)T(x) \le c\,(|u|+1)^{g(\kappa)} for a function gg of the parameter κ\kappa,
    19 it is in P for every fixed value of κ\kappa.
    204. If T(x)≤f(κ) (∣u∣+1)dT(x) \le f(\kappa)\,(|u|+1)^d for a computable ff and the parameter is
    21 computable in polynomial time on the words, it is fixed-parameter tractable
    22 in κ\kappa.
    23
    24**Theorem.** A program deciding within exactly T(x)T(x) instructions decides within
    25O(T(x))O(T(x)) (`Results.DecidesExact`).
    26
    27**Theorem.** A program deciding within O(T(x))O(T(x)) decides within O(T(x))O(T(x)) with wide words
    28(`Results.DecidesWithinWide`): the wide words are among the short ones.
    29-/
    30
    31namespace Lax434175.ResultTransfer
    32open Lax434175.Problems Lax434175.Results Lax759944.BinaryWordEncoding
    33open Lax496464.WH_A2_FptReductions
    34
    35variable {P : Problem} (R : PReading P)
    36
    37axiom decidesWithin_of_exact {T : P.Inst → ℕ} (h : DecidesExact R fun x _ => T x) : DecidesWithin R T
    38
    39axiom decidesWithinWide_of_decidesWithin {T : P.Inst → ℕ} (h : DecidesWithin R T) :
    40 DecidesWithinWide R T
    41
    42axiom inP_of_decidesWithin {T : P.Inst → ℕ} (h : DecidesWithin R T)
    43 (hT : ∃ c d : ℕ, ∀ u x D, EncodesDecision R u x D → T x ≤ c * (bitSize u + 1) ^ d) :
    44 InP R
    45
    46axiom pseudoPoly_of_decidesWithin {T : P.Inst → ℕ} (h : DecidesWithin R T)
    47 (hT : ∃ c e d : ℕ, ∀ u x D, EncodesDecision R u x D →
    48 T x ≤ c * (maxEntry u + 1) ^ e * (bitSize u + 1) ^ d) :
    49 PseudoPoly R
    50
    51axiom inPFixed_of_decidesWithin {T : P.Inst → ℕ} (κ : TParameter P) (h : DecidesWithin R T)
    52 (hT : ∃ (c : ℕ) (g : ℕ → ℕ), ∀ u x D, EncodesDecision R u x D →
    53 T x ≤ c * (bitSize u + 1) ^ g (κ x D)) :
    54 InPFixed R κ
    55
    56axiom isFPT_of_decidesWithin {T : P.Inst → ℕ} (κ : TParameter P) (h : DecidesWithin R T)
    57 (hκ : IsParameterized (parameterized R κ))
    58 (hT : ∃ (f : ℕ → ℕ) (d : ℕ), Computable f ∧ ∀ u x D, EncodesDecision R u x D →
    59 T x ≤ f (κ x D) * (bitSize u + 1) ^ d) :
    60 IsFPT R κ
    61
    62end Lax434175.ResultTransfer
    63
    Show ProofShow ProofShow ProofShow ProofShow ProofShow Proof
    Builds on
    Used by

    none

    From Mathlib

    none

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…