Hitting Set Is NP-Hard
Lax496464.HittingSetHardness · concepts/Lax496464/HittingSetHardness.lean · lax-496464
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Every language in NP reduces to Hitting Set in polynomial time, by a reduction whose output instances stay of size polynomial in the length of the input and satisfy .
This is Karp's theorem. The reduction is Cook's theorem, followed by the reduction from satisfiability of : a formula is satisfiable exactly when its instance has a hitting set of the required size, and the reduction runs in polynomial time on a Turing machine writing the binary word of the instance. The theorem is stated twice: as a many-one reduction into the language of Hitting Set, and in the form the reduction of this submission consumes it.
The two restrictions on cost nothing. A hitting set of size exactly cannot exist once exceeds the universe, so the upper one is a normalization; for the lower one, pad an instance with one fresh element and the singleton set containing it, which forces that element into every hitting set and raises by one.
The universe of an emitted instance is no larger than plus the total size of the sets. The reduction from satisfiability satisfies this, since its pairs alone cover the universe. The clause is what lets the next reduction, which reads the word of the emitted instance, be polynomial-time in that word: the shop it builds has more than jobs, so a universe larger than the sets that present it — which a word of bits could name — could not be written by any machine polynomial in the word. It is the same restriction the admissible words of the fixed-parameter statements carry, that the universe is no larger than the word that presents it.
That the size of the emitted instance stays polynomially bounded is automatic for a polynomial-time reduction, since an instance cannot be larger than what was written. It is stated because it is what makes the composed reduction of this submission a strong NP-hardness statement: the numbers of the constructed shop are polynomial in , and , hence in the length of the original input.
Concept map
Evidence
In the paper
- page 9 of this submission's paper
Lean source view on GitHub
| 1 | import Lax496464.HittingSetFromSat |
| 2 | import Lax434930.NondeterministicPolynomialTime |
| 3 | import Lax429075.Reductions |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Hitting Set Is NP-Hard |
| 8 | type: theorem |
| 9 | --- |
| 10 | Every language in NP reduces to Hitting Set in polynomial time, by a reduction whose |
| 11 | output instances stay of size polynomial in the length of the input and satisfy |
| 12 | . |
| 13 | |
| 14 | This is Karp's theorem. The reduction is Cook's theorem, followed by the reduction from |
| 15 | satisfiability of `HittingSetFromSat`: a formula is satisfiable exactly when its instance has |
| 16 | a hitting set of the required size, and the reduction runs in polynomial time on a Turing |
| 17 | machine writing the binary word of the instance. The theorem is stated twice: as a |
| 18 | many-one reduction into the language of Hitting Set, and in the form the reduction of this |
| 19 | submission consumes it. |
| 20 | |
| 21 | The two restrictions on cost nothing. A hitting set of size exactly cannot exist |
| 22 | once exceeds the universe, so the upper one is a normalization; for the lower one, pad |
| 23 | an instance with one fresh element and the singleton set containing it, which forces that |
| 24 | element into every hitting set and raises by one. |
| 25 | |
| 26 | The universe of an emitted instance is no larger than plus the total size of the |
| 27 | sets. The reduction from satisfiability satisfies this, since its pairs alone cover the |
| 28 | universe. The clause is what lets the next reduction, which reads the *word* of the emitted |
| 29 | instance, be polynomial-time in that word: the shop it builds has more than jobs, so a |
| 30 | universe larger than the sets that present it — which a word of bits could |
| 31 | name — could not be written by any machine polynomial in the word. It is the same |
| 32 | restriction the admissible words of the fixed-parameter statements carry, that the |
| 33 | universe is no larger than the word that presents it. |
| 34 | |
| 35 | That the size of the emitted instance stays polynomially bounded is automatic for a |
| 36 | polynomial-time reduction, since an instance cannot be larger than what was written. It |
| 37 | is stated because it is what makes the composed reduction of this submission a *strong* |
| 38 | NP-hardness statement: the numbers of the constructed shop are polynomial in , and |
| 39 | , hence in the length of the original input. |
| 40 | |
| 41 | # Formalization Notes |
| 42 | |
| 43 | Cook's theorem is the archive's Cook–Levin theorem (`lax-429075`), with the classes P and NP |
| 44 | of `lax-434930`; polynomial time on a Turing machine is established by a word RAM program |
| 45 | and the archive's equivalence of the two models (`lax-759944`). |
| 46 | |
| 47 | The bound on the size of the emitted instance is a power of rather than of |
| 48 | : the instance has at least two elements even for the empty word, which no power |
| 49 | of allows. |
| 50 | |
| 51 | The parameterized counterpart — that Hitting Set is W[2]-complete for the solution size — |
| 52 | is not stated. It is instead built into the definition of W[2]-hardness, which asks for an |
| 53 | fpt-reduction from Hitting Set, so that no statement depends on it and the class W[2] |
| 54 | itself need not be formalized. |
| 55 | -/ |
| 56 | |
| 57 | namespace Lax496464.HittingSetHardness |
| 58 | |
| 59 | open Lax496464.HittingSet Lax496464.HittingSetFromSat Lax434930.PolynomialTime |
| 60 | open Lax434930.NondeterministicPolynomialTime Lax429075.CNF |
| 61 | |
| 62 | /-- **Correctness of the reduction from satisfiability**: a formula is satisfiable exactly |
| 63 | when its instance has a hitting set of the required size. -/ |
| 64 | axiom fromSat_correct (F : Formula) : Satisfiable F ↔ (inst F).HasHittingSet (vars F) |
| 65 | |
| 66 | /-- **The reduction from satisfiability runs in polynomial time**, as a Turing machine |
| 67 | writing the binary word of the instance. -/ |
| 68 | axiom fromSat_polyTime : |
| 69 | Nonempty (Turing.TM2ComputableInPolyTime id |
| 70 | (fun z : Instance × ℕ => encodeInstance z.1 z.2) reduce) |
| 71 | |
| 72 | /-- **Hitting Set is NP-hard** (Karp): every language in NP has a polynomial-time |
| 73 | many-one reduction to it. -/ |
| 74 | axiom npHard : ∀ A : Language, A ∈ NP → Lax429075.Reductions.ManyOne A HittingSetLanguage |
| 75 | |
| 76 | /-- **Hitting Set is NP-hard** (Karp), already on instances with `2 ≤ k ≤ n`, by a |
| 77 | reduction whose output stays polynomially bounded and whose universe is covered by its |
| 78 | sets. -/ |
| 79 | axiom hittingSet_npHard : |
| 80 | ∀ A : Language, A ∈ NP → |
| 81 | ∃ (f : Word → Instance × ℕ) (c : ℕ), |
| 82 | Nonempty (Turing.TM2ComputableInPolyTime id |
| 83 | (fun z : Instance × ℕ => encodeInstance z.1 z.2) f) ∧ |
| 84 | (∀ x, 2 ≤ (f x).2 ∧ (f x).2 ≤ (f x).1.n) ∧ |
| 85 | (∀ x, (f x).1.n + (f x).1.m ≤ (x.length + 2) ^ c) ∧ |
| 86 | (∀ x, (f x).1.n ≤ 4 + (f x).1.m + ∑ j : Fin (f x).1.m, ((f x).1.F j).card) ∧ |
| 87 | (∀ x, x ∈ A ↔ Instance.HasHittingSet (f x).1 (f x).2) |
| 88 | |
| 89 | end Lax496464.HittingSetHardness |
| 90 |
Formalization Notes
Cook's theorem is the archive's Cook–Levin theorem (), with the classes P and NP of ; polynomial time on a Turing machine is established by a word RAM program and the archive's equivalence of the two models ().
The bound on the size of the emitted instance is a power of rather than of : the instance has at least two elements even for the empty word, which no power of allows.
The parameterized counterpart — that Hitting Set is W[2]-complete for the solution size — is not stated. It is instead built into the definition of W[2]-hardness, which asks for an fpt-reduction from Hitting Set, so that no statement depends on it and the class W[2] itself need not be formalized.
Used by
none
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments