Parameterized Problems and FPT-Reductions on a Word RAM

Lax496464.ParameterizedComplexity · concepts/Lax496464/ParameterizedComplexity.lean · lax-496464

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 c g(k) (∣x∣+1)cc\,g(k)\,(|x|+1)^c 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 a problem that is fixed-parameter tractable and receives an fpt-reduction makes the source problem fixed-parameter tractable as well.

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

    In the paper

    • page 7 of this submission's paper

    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
    11c g(k) (∣x∣+1)cc\,g(k)\,(|x|+1)^c 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 a problem that is fixed-parameter tractable and receives an
    18fpt-reduction makes the source problem fixed-parameter tractable as well.
    19
    20# Formalization Notes
    21
    22The parameter is read off the input word rather than carried beside it. This is what lets
    23one program serve every parameter: a program that had to be told kk from outside would
    24be a family of programs, one per parameter, free to hide unbounded advice in its
    25literals. The quantifier order says the same thing — the program and the constant come
    26before the instance, the parameter and the word length.
    27
    28`Fits` is the fitting condition, an explicit inequality against 2w2^w rather than a
    29statement about logarithms. It says of each entry vv of a word that c(∣x∣+v+1)≤2wc(|x|+v+1) \le 2^w
    30: every entry is a genuine word, with room left for the constant multiple of the
    31length that bounds the addresses and the step count. Entries are not bounded by the
    32length here — a due date or a weight may be any number at all — so quantifying over them
    33is what makes a claim about them honest rather than a silent assumption that they are
    34small.
    35
    36A reduction's *output* has to fit as well, since a machine at word length ww reduces
    37what it writes modulo 2w2^w. Like every fitting condition this restricts the inputs
    38rather than appearing as a hypothesis: as a hypothesis it would be empty, because no word
    39length accommodates every encoding of a fixed instance at once.
    40
    41The bound is elementary, `c * g k * (x.length + 1) ^ c`, with the `+ 1` making it
    42meaningful on the empty word. The same constant serves as the multiple and as the
    43exponent, which costs nothing — raising either is raising both — and keeps one number to
    44quantify. `g` is an arbitrary function of the parameter: it bounds a fixed program's
    45running time rather than defining it, so no computability requirement on `g` is intended.
    46
    47The polynomial factor is what the definition of fixed-parameter tractability asks for,
    48f(k)⋅nO(1)f(k) \cdot n^{O(1)}, and it is what a reduction needs here: the construction of this
    49submission emits an instance polynomially larger than the one it reads, so no reduction
    50computing it can run in time linear in its input.
    51-/
    52
    53namespace Lax496464.ParameterizedComplexity
    54
    55open Lax808846.Ram Lax808846.RamComputes
    56
    57/-- A parameterized problem: the words that encode an instance, which of them are
    58yes-instances, and the parameter each one carries. -/
    59structure Problem where
    60 /-- The words that encode an instance. A program may do anything on the others. -/
    61 Domain : Set (List ℕ)
    62 /-- The yes-instances. -/
    63 Yes : List ℕ → Prop
    64 /-- The parameter, read off the word. -/
    65 param : List ℕ → ℕ
    66
    67/-- The word `x` fits at word length `w`, with room for `c` times its length: every entry
    68`v` of `x` satisfies `c * (x.length + v + 1) ≤ 2 ^ w`. -/
    69def Fits (c w : ℕ) (x : List ℕ) : Prop := ∀ v ∈ x, c * (x.length + v + 1) ≤ 2 ^ w
    70
    71open Classical in
    72/-- At every word length, the program decides `P` on every admissible word that fits,
    73within `c * g k * (|x| + 1) ^ c` instructions, where `k` is the word's parameter. It writes
    74`1` for a yes-instance and `0` for a no-instance. -/
    75def Decides (P : Problem) (prog : Program) (c : ℕ) (g : ℕ → ℕ) : Prop :=
    76 ∀ w : ℕ, ComputesInTime w prog
    77 {x | x ∈ P.Domain ∧ Fits c w x}
    78 (fun x => if P.Yes x then [1] else [0])
    79 (fun x => c * g (P.param x) * (x.length + 1) ^ c)
    80
    81/-- `P` is **fixed-parameter tractable**: one program and one constant decide it within
    82`c * g k * (|x| + 1) ^ c` instructions, for some function `g` of the parameter alone. -/
    83def FPT (P : Problem) : Prop := ∃ (prog : Program) (c : ℕ) (g : ℕ → ℕ), Decides P prog c g
    84
    85/-- The map `f` is an fpt-reduction from `P` to `Q`, computed by `prog` within
    86`c * g k * (|x| + 1) ^ c` instructions and raising the parameter by at most `h`. -/
    87structure IsFptReduction (P Q : Problem) (f : List ℕ → List ℕ) (prog : Program)
    88 (c : ℕ) (g h : ℕ → ℕ) : Prop where
    89 /-- The image of an admissible word is admissible. -/
    90 maps_domain : ∀ x ∈ P.Domain, f x ∈ Q.Domain
    91 /-- Yes-instances go to yes-instances, and no-instances to no-instances. -/
    92 correct : ∀ x ∈ P.Domain, (P.Yes x ↔ Q.Yes (f x))
    93 /-- The new parameter is bounded by a function of the old one alone. -/
    94 param_le : ∀ x ∈ P.Domain, Q.param (f x) ≤ h (P.param x)
    95 /-- At every word length, the program computes `f` on every admissible word that fits
    96 and whose image fits, within the stated bound. -/
    97 time : ∀ w : ℕ, ComputesInTime w prog
    98 {x | x ∈ P.Domain ∧ Fits c w x ∧ Fits c w (f x)}
    99 f (fun x => c * g (P.param x) * (x.length + 1) ^ c)
    100
    101/-- `P` **fpt-reduces** to `Q`. -/
    102def FptReduces (P Q : Problem) : Prop :=
    103 ∃ (f : List ℕ → List ℕ) (prog : Program) (c : ℕ) (g h : ℕ → ℕ),
    104 IsFptReduction P Q f prog c g h
    105
    106@[inherit_doc] infix:50 " ≤fpt " => FptReduces
    107
    108end Lax496464.ParameterizedComplexity
    109
    Formalization Notes

    The parameter is read off the input word rather than carried beside it. This is what lets one program serve every parameter: a program that had to be told kk from outside would be a family of programs, one per parameter, free to hide unbounded advice in its literals. The quantifier order says the same thing — the program and the constant come before the instance, the parameter and the word length.

    FitsFits is the fitting condition, an explicit inequality against 2w2^w rather than a statement about logarithms. It says of each entry vv of a word that c(∣x∣+v+1)≤2wc(|x|+v+1) \le 2^w: every entry is a genuine word, with room left for the constant multiple of the length that bounds the addresses and the step count. Entries are not bounded by the length here — a due date or a weight may be any number at all — so quantifying over them is what makes a claim about them honest rather than a silent assumption that they are small.

    A reduction's output has to fit as well, since a machine at word length ww reduces what it writes modulo 2w2^w. Like every fitting condition this restricts the inputs rather than appearing as a hypothesis: as a hypothesis it would be empty, because no word length accommodates every encoding of a fixed instance at once.

    The bound is elementary, c∗gk∗(x.length+1)cc * g k * (x.length + 1) ^ c, with the +1+ 1 making it meaningful on the empty word. The same constant serves as the multiple and as the exponent, which costs nothing — raising either is raising both — and keeps one number to quantify. 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 intended.

    The polynomial factor is what the definition of fixed-parameter tractability asks for, f(k)⋅nO(1)f(k) \cdot n^{O(1)}, and it is what a reduction needs here: the construction of this submission emits an instance polynomially larger than the one it reads, so no reduction computing it can run in time linear in its input.

    Discussion

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

    Loading discussion…