Parameterized Problems and FPT-Reductions on a Word RAM
Lax496464.ParameterizedComplexity · concepts/Lax496464/ParameterizedComplexity.lean · lax-496464
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural 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 of parameter , within instructions, for a constant and a function of the parameter alone.
An fpt-reduction from to 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
In the paper
- page 7 of this submission's paper
Lean source view on GitHub
| 1 | import Lax808846.RamComputes |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Parameterized Problems and FPT-Reductions on a Word RAM |
| 6 | type: definition |
| 7 | --- |
| 8 | A *parameterized problem* is a set of admissible input words, a yes-instance predicate on |
| 9 | them, and a parameter read off the word. It is *fixed-parameter tractable* if one word |
| 10 | RAM program decides it, on every admissible word of parameter , within |
| 11 | instructions, for a constant and a function of the parameter |
| 12 | alone. |
| 13 | |
| 14 | An *fpt-reduction* from to is a map on words that sends admissible words to |
| 15 | admissible words, preserves and reflects yes-instances, raises the parameter by at most a |
| 16 | function of it, and is computed by one word RAM program within the same kind of bound. |
| 17 | Fpt-reductions compose, and a problem that is fixed-parameter tractable and receives an |
| 18 | fpt-reduction makes the source problem fixed-parameter tractable as well. |
| 19 | |
| 20 | # Formalization Notes |
| 21 | |
| 22 | The parameter is read off the input word rather than carried beside it. This is what lets |
| 23 | one program serve every parameter: a program that had to be told from outside would |
| 24 | be a family of programs, one per parameter, free to hide unbounded advice in its |
| 25 | literals. The quantifier order says the same thing — the program and the constant come |
| 26 | before the instance, the parameter and the word length. |
| 27 | |
| 28 | `Fits` is the fitting condition, an explicit inequality against rather than a |
| 29 | statement about logarithms. It says of each entry of a word that |
| 30 | : every entry is a genuine word, with room left for the constant multiple of the |
| 31 | length that bounds the addresses and the step count. Entries are not bounded by the |
| 32 | length here — a due date or a weight may be any number at all — so quantifying over them |
| 33 | is what makes a claim about them honest rather than a silent assumption that they are |
| 34 | small. |
| 35 | |
| 36 | A reduction's *output* has to fit as well, since a machine at word length reduces |
| 37 | what it writes modulo . Like every fitting condition this restricts the inputs |
| 38 | rather than appearing as a hypothesis: as a hypothesis it would be empty, because no word |
| 39 | length accommodates every encoding of a fixed instance at once. |
| 40 | |
| 41 | The bound is elementary, `c * g k * (x.length + 1) ^ c`, with the `+ 1` making it |
| 42 | meaningful on the empty word. The same constant serves as the multiple and as the |
| 43 | exponent, which costs nothing — raising either is raising both — and keeps one number to |
| 44 | quantify. `g` is an arbitrary function of the parameter: it bounds a fixed program's |
| 45 | running time rather than defining it, so no computability requirement on `g` is intended. |
| 46 | |
| 47 | The polynomial factor is what the definition of fixed-parameter tractability asks for, |
| 48 | , and it is what a reduction needs here: the construction of this |
| 49 | submission emits an instance polynomially larger than the one it reads, so no reduction |
| 50 | computing it can run in time linear in its input. |
| 51 | -/ |
| 52 | |
| 53 | namespace Lax496464.ParameterizedComplexity |
| 54 | |
| 55 | open Lax808846.Ram Lax808846.RamComputes |
| 56 | |
| 57 | /-- A parameterized problem: the words that encode an instance, which of them are |
| 58 | yes-instances, and the parameter each one carries. -/ |
| 59 | structure 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`. -/ |
| 69 | def Fits (c w : ℕ) (x : List ℕ) : Prop := ∀ v ∈ x, c * (x.length + v + 1) ≤ 2 ^ w |
| 70 | |
| 71 | open Classical in |
| 72 | /-- At every word length, the program decides `P` on every admissible word that fits, |
| 73 | within `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. -/ |
| 75 | def 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. -/ |
| 83 | def 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`. -/ |
| 87 | structure 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`. -/ |
| 102 | def 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 | |
| 108 | end 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 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.
is the fitting condition, an explicit inequality against rather than a statement about logarithms. It says of each entry of a word that : 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 reduces what it writes modulo . 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, , with the 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. is an arbitrary function of the parameter: it bounds a fixed program's running time rather than defining it, so no computability requirement on is intended.
The polynomial factor is what the definition of fixed-parameter tractability asks for, , 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.
0 comments