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

Parameterized problems and fpt-reductions on a word RAM

Lax470956.ParameterizedComplexity · concepts/Lax470956/ParameterizedComplexity.lean · lax-470956

definition

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

    Definition

    A parameterized problem is a set of admissible input words, a yes-instance predicate on them, and a parameter read off the word. It is fixed-parameter tractable if one word RAM program decides it, on every admissible word xx of parameter kk, within cg(k)(x+1)c\,g(k)\,(|x|+1) instructions for a constant cc and a function gg of the parameter alone.

    An fpt-reduction from PP to QQ is a map on words that sends admissible words to admissible words, preserves and reflects yes-instances, raises the parameter by at most a function of it, and is computed by one word RAM program within the same kind of bound. Fpt-reductions compose, and QFPTQ \in \mathrm{FPT} together with PfptQP \le_{\mathrm{fpt}} Q gives PFPTP \in \mathrm{FPT}.

    Concept map
    3 concepts; 8 descendants hidden
    100%
    Proven claimOpen claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Lax808846.RamComputes
    2
    3/-!
    4---
    5title: Parameterized problems and fpt-reductions on a word RAM
    6type: definition
    7---
    8A *parameterized problem* is a set of admissible input words, a yes-instance predicate on
    9them, and a parameter read off the word. It is *fixed-parameter tractable* if one word
    10RAM program decides it, on every admissible word xx of parameter kk, within
    11cg(k)(x+1)c\,g(k)\,(|x|+1) instructions for a constant cc and a function gg of the parameter
    12alone.
    13
    14An *fpt-reduction* from PP to QQ is a map on words that sends admissible words to
    15admissible words, preserves and reflects yes-instances, raises the parameter by at most a
    16function of it, and is computed by one word RAM program within the same kind of bound.
    17Fpt-reductions compose, and QFPTQ \in \mathrm{FPT} together with PfptQP \le_{\mathrm{fpt}} Q
    18gives PFPTP \in \mathrm{FPT}.
    19
    20# Formalization notes
    21
    22The parameter is read off the input word, and the program is fixed before it: the
    23quantifier order puts the program and the constant before the instance, the parameter and
    24the word length. This is the uniformity of the definition. A definition that let the
    25program be chosen after kk would describe a family of programs, one per parameter, which
    26could hide unbounded advice in its literals.
    27
    28`Fits` is the fitting condition, stated as an explicit inequality against `2 ^ w` rather
    29than through logarithms. It says of each entry vv of a word that c(x+v+1)2wc(|x|+v+1) \le 2^w,
    30which makes every entry a word and leaves room for the constant multiple
    31of the length that bounds the addresses and the step count. Entries are not bounded by
    32the length in general: a parameter, a weight or a deadline may be any number at all, so
    33the claim quantifies over the entries instead of assuming they are small.
    34
    35A reduction's *output* has to fit as well. A machine at word length ww reduces what it
    36writes modulo 2w2^w, so a word whose image does not fit is one the program cannot emit;
    37the admissible set therefore constrains the image too. Like every fitting condition here
    38this restricts the inputs rather than appearing as a hypothesis: as a hypothesis it would
    39be empty, since no word length accommodates every encoding of a fixed instance at once.
    40
    41The bound is `c * g k * (x.length + 1)`, elementary rather than asymptotic, with the
    42`+ 1` making it meaningful on the empty word. Its dependence on the length is linear,
    43where the usual definition of FPT allows g(k)xO(1)g(k)\,|x|^{O(1)}, so both notions defined here
    44are the stricter ones: a problem that is fixed-parameter tractable in this sense is so in
    45the usual sense, and a reduction that meets this bound is an fpt-reduction in the usual
    46sense. A membership and a hardness proved against these definitions therefore imply their
    47standard forms. Nothing weaker is defined because nothing weaker is needed — the dynamic
    48program of Theorem 3 and the reduction of Theorem 1 both run within a linear bound.
    49
    50`g` is an arbitrary function of the parameter: it bounds a fixed program's running time
    51rather than defining it, so no computability requirement on `g` is needed or intended.
    52Some presentations of FPT require gg to be computable; the definition here does not, and
    53the gg that Theorem 3 supplies is a closed-form expression in the parameter, so that
    54theorem meets the definitions that require it as well.
    55
    56Only the timed notions are defined. Plain computability is the special case in which the
    57bound is unconstrained, and is not what any statement of this submission needs.
    58-/
    59
    60namespace Lax470956.ParameterizedComplexity
    61
    62open Lax808846.Ram Lax808846.RamComputes
    63
    64/-- A parameterized problem: the words that encode an instance, which of them are
    65yes-instances, and the parameter each one carries. -/
    66structure Problem where
    67 /-- The words that encode an instance. A program may do anything on the others. -/
    68 Domain : Set (List ℕ)
    69 /-- The yes-instances. -/
    70 Yes : List ℕ → Prop
    71 /-- The parameter, read off the word. -/
    72 param : List ℕ → ℕ
    73
    74/-- The word `x` fits at word length `w`, with room for `c` times its length: every
    75entry `v` of `x` satisfies `c * (x.length + v + 1) ≤ 2 ^ w`. -/
    76def Fits (c w : ℕ) (x : List ℕ) : Prop := ∀ v ∈ x, c * (x.length + v + 1) ≤ 2 ^ w
    77
    78open Classical in
    79/-- At every word length, the program decides `P` on every admissible word that fits,
    80within `c * g k * (|x| + 1)` instructions, where `k` is the word's parameter. It writes
    81`1` for a yes-instance and `0` for a no-instance. -/
    82def Decides (P : Problem) (prog : Program) (c : ℕ) (g : ℕ → ℕ) : Prop :=
    83 ∀ w : ℕ, ComputesInTime w prog
    84 {x | x ∈ P.DomainFits c w x}
    85 (fun x => if P.Yes x then [1] else [0])
    86 (fun x => c * g (P.param x) * (x.length + 1))
    87
    88/-- `P` is **fixed-parameter tractable**: one program and one constant decide it within
    89`c * g k * (|x| + 1)` instructions, for some function `g` of the parameter alone. -/
    90def FPT (P : Problem) : Prop := ∃ (prog : Program) (c : ℕ) (g : ℕ → ℕ), Decides P prog c g
    91
    92/-- The map `f` is an fpt-reduction from `P` to `Q`, computed by `prog` within
    93`c * g k * (|x| + 1)` instructions and raising the parameter by at most `h`. -/
    94structure IsFptReduction (P Q : Problem) (f : List ℕ → List ℕ) (prog : Program)
    95 (c : ℕ) (g h : ℕ → ℕ) : Prop where
    96 /-- The image of an admissible word is admissible. -/
    97 maps_domain : ∀ x ∈ P.Domain, f x ∈ Q.Domain
    98 /-- Yes-instances go to yes-instances, and no-instances to no-instances. -/
    99 correct : ∀ x ∈ P.Domain, (P.Yes x ↔ Q.Yes (f x))
    100 /-- The new parameter is bounded by a function of the old one alone. -/
    101 param_le : ∀ x ∈ P.Domain, Q.param (f x) ≤ h (P.param x)
    102 /-- At every word length, the program computes `f` on every admissible word that fits
    103 and whose image fits, within the stated bound. -/
    104 time : ∀ w : ℕ, ComputesInTime w prog
    105 {x | x ∈ P.DomainFits c w x ∧ Fits c w (f x)}
    106 f (fun x => c * g (P.param x) * (x.length + 1))
    107
    108/-- `P` **fpt-reduces** to `Q`. -/
    109def FptReduces (P Q : Problem) : Prop :=
    110 ∃ (f : List ℕ → List ℕ) (prog : Program) (c : ℕ) (g h : ℕ → ℕ),
    111 IsFptReduction P Q f prog c g h
    112
    113@[inherit_doc] infix:50 " ≤fpt " => FptReduces
    114
    115end Lax470956.ParameterizedComplexity
    116
    Formalization notes

    The parameter is read off the input word, and the program is fixed before it: the quantifier order puts the program and the constant before the instance, the parameter and the word length. This is the uniformity of the definition. A definition that let the program be chosen after kk would describe a family of programs, one per parameter, which could hide unbounded advice in its literals.

    FitsFits is the fitting condition, stated as an explicit inequality against 2w2 ^ w rather than through logarithms. It says of each entry vv of a word that c(x+v+1)2wc(|x|+v+1) \le 2^w, which makes every entry a word and leaves room for the constant multiple of the length that bounds the addresses and the step count. Entries are not bounded by the length in general: a parameter, a weight or a deadline may be any number at all, so the claim quantifies over the entries instead of assuming they are small.

    A reduction's output has to fit as well. A machine at word length ww reduces what it writes modulo 2w2^w, so a word whose image does not fit is one the program cannot emit; the admissible set therefore constrains the image too. Like every fitting condition here this restricts the inputs rather than appearing as a hypothesis: as a hypothesis it would be empty, since no word length accommodates every encoding of a fixed instance at once.

    The bound is cgk(x.length+1)c * g k * (x.length + 1), elementary rather than asymptotic, with the +1+ 1 making it meaningful on the empty word. Its dependence on the length is linear, where the usual definition of FPT allows g(k)xO(1)g(k)\,|x|^{O(1)}, so both notions defined here are the stricter ones: a problem that is fixed-parameter tractable in this sense is so in the usual sense, and a reduction that meets this bound is an fpt-reduction in the usual sense. A membership and a hardness proved against these definitions therefore imply their standard forms. Nothing weaker is defined because nothing weaker is needed — the dynamic program of Theorem 3 and the reduction of Theorem 1 both run within a linear bound.

    gg is an arbitrary function of the parameter: it bounds a fixed program's running time rather than defining it, so no computability requirement on gg is needed or intended. Some presentations of FPT require gg to be computable; the definition here does not, and the gg that Theorem 3 supplies is a closed-form expression in the parameter, so that theorem meets the definitions that require it as well.

    Only the timed notions are defined. Plain computability is the special case in which the bound is unconstrained, and is not what any statement of this submission needs.

    Discussion

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

    Loading discussion…