Hitting Set Is NP-Hard

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

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

    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 2≤k≤n2 \le k \le n.

    This is Karp's theorem. The reduction is Cook's theorem, followed by the reduction from satisfiability of HittingSetFromSatHittingSetFromSat: 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 kk cost nothing. A hitting set of size exactly kk cannot exist once kk 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 kk by one.

    The universe of an emitted instance is no larger than 4+m4 + m 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 n2n^2 jobs, so a universe larger than the sets that present it — which a word of O(log⁡n)O(\log n) 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 nn, mm and kk, hence in the length of the original input.

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

    In the paper

    • page 9 of this submission's paper

    Lean source view on GitHub

    1import Lax496464.HittingSetFromSat
    2import Lax434930.NondeterministicPolynomialTime
    3import Lax429075.Reductions
    4
    5/-!
    6---
    7title: Hitting Set Is NP-Hard
    8type: theorem
    9---
    10Every language in NP reduces to Hitting Set in polynomial time, by a reduction whose
    11output instances stay of size polynomial in the length of the input and satisfy
    122≤k≤n2 \le k \le n.
    13
    14This is Karp's theorem. The reduction is Cook's theorem, followed by the reduction from
    15satisfiability of `HittingSetFromSat`: a formula is satisfiable exactly when its instance has
    16a hitting set of the required size, and the reduction runs in polynomial time on a Turing
    17machine writing the binary word of the instance. The theorem is stated twice: as a
    18many-one reduction into the language of Hitting Set, and in the form the reduction of this
    19submission consumes it.
    20
    21The two restrictions on kk cost nothing. A hitting set of size exactly kk cannot exist
    22once kk exceeds the universe, so the upper one is a normalization; for the lower one, pad
    23an instance with one fresh element and the singleton set containing it, which forces that
    24element into every hitting set and raises kk by one.
    25
    26The universe of an emitted instance is no larger than 4+m4 + m plus the total size of the
    27sets. The reduction from satisfiability satisfies this, since its pairs alone cover the
    28universe. The clause is what lets the next reduction, which reads the *word* of the emitted
    29instance, be polynomial-time in that word: the shop it builds has more than n2n^2 jobs, so a
    30universe larger than the sets that present it — which a word of O(log⁡n)O(\log n) bits could
    31name — could not be written by any machine polynomial in the word. It is the same
    32restriction the admissible words of the fixed-parameter statements carry, that the
    33universe is no larger than the word that presents it.
    34
    35That the size of the emitted instance stays polynomially bounded is automatic for a
    36polynomial-time reduction, since an instance cannot be larger than what was written. It
    37is stated because it is what makes the composed reduction of this submission a *strong*
    38NP-hardness statement: the numbers of the constructed shop are polynomial in nn, mm and
    39kk, hence in the length of the original input.
    40
    41# Formalization Notes
    42
    43Cook's theorem is the archive's Cook–Levin theorem (`lax-429075`), with the classes P and NP
    44of `lax-434930`; polynomial time on a Turing machine is established by a word RAM program
    45and the archive's equivalence of the two models (`lax-759944`).
    46
    47The bound on the size of the emitted instance is a power of ∣x∣+2|x| + 2 rather than of
    48∣x∣+1|x| + 1: the instance has at least two elements even for the empty word, which no power
    49of 11 allows.
    50
    51The parameterized counterpart — that Hitting Set is W[2]-complete for the solution size —
    52is not stated. It is instead built into the definition of W[2]-hardness, which asks for an
    53fpt-reduction from Hitting Set, so that no statement depends on it and the class W[2]
    54itself need not be formalized.
    55-/
    56
    57namespace Lax496464.HittingSetHardness
    58
    59open Lax496464.HittingSet Lax496464.HittingSetFromSat Lax434930.PolynomialTime
    60open Lax434930.NondeterministicPolynomialTime Lax429075.CNF
    61
    62/-- **Correctness of the reduction from satisfiability**: a formula is satisfiable exactly
    63when its instance has a hitting set of the required size. -/
    64axiom 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
    67writing the binary word of the instance. -/
    68axiom 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
    73many-one reduction to it. -/
    74axiom 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
    77reduction whose output stays polynomially bounded and whose universe is covered by its
    78sets. -/
    79axiom 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
    89end Lax496464.HittingSetHardness
    90
    Show ProofShow ProofShow ProofShow Proof
    Formalization Notes

    Cook's theorem is the archive's Cook–Levin theorem (lax−429075lax-429075), with the classes P and NP of lax−434930lax-434930; polynomial time on a Turing machine is established by a word RAM program and the archive's equivalence of the two models (lax−759944lax-759944).

    The bound on the size of the emitted instance is a power of ∣x∣+2|x| + 2 rather than of ∣x∣+1|x| + 1: the instance has at least two elements even for the empty word, which no power of 11 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.

    Discussion

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

    Loading discussion…