Maximum coverage
AbbreviationMaximum-coverage instances#✓fully proved
A maximum-coverage instance is a tuple \((n, S, K, M)\) of a natural number \(n\) (the universe size), a list \(S\) of lists of natural numbers (the subsets), a natural number \(K\) (the set budget) and a natural number \(M\) (the coverage target).
DefinitionWell-formed maximum-coverage instances#✓fully proved
A maximum-coverage instance \((n, S, K, M)\) is well formed when every subset in the list \(S\) has no repeated elements and all of its elements are less than \(n\).
def WellFormed (i : MaximumCoverageInstance) : Prop :=
∀ s ∈ i.2.1, s.Nodup ∧ ∀ x ∈ s, x < i.1
abbrev MaximumCoverageInstance := ℕ × List (List ℕ) × ℕ × ℕ
WantedExt/Complexity/NPComplete/MaximumCoverageWanted.lean:47
Uses 1 · Used by 1
DefinitionFeasible maximum-coverage instances#✓fully proved
A maximum-coverage instance \((n, S, K, M)\), with universe size \(n\), list of subsets \(S\), set budget \(K\) and coverage target \(M\), is feasible when there are a sublist \(T\) of \(S\) with at most \(K\) entries and a list of at least \(M\) pairwise distinct natural numbers, each less than \(n\) and each belonging to some subset in \(T\).
def MaximumCoverageFeasible
(i : MaximumCoverageInstance) : Prop :=
∃ T : List (List ℕ), T.Sublist i.2.1 ∧ T.length ≤ i.2.2.1 ∧
∃ covered : List ℕ, covered.Nodup ∧ i.2.2.2 ≤ covered.length ∧
∀ x ∈ covered, x < i.1 ∧ ∃ s ∈ T, x ∈ s
abbrev MaximumCoverageInstance := ℕ × List (List ℕ) × ℕ × ℕ
WantedExt/Complexity/NPComplete/MaximumCoverageWanted.lean:47
Uses 1 · Used by 1
DefinitionThe MAXIMUM COVERAGE decision problem#✓fully proved
MAXIMUM COVERAGE is the decision problem that accepts a bitstring \(x\) exactly when \(x\) decodes, under the canonical bitstring encoding, to a maximum-coverage instance \((n, S, K, M)\) that is well formed and feasible: every subset in the list \(S\) has no repeated elements and only elements less than \(n\), and some sublist of \(S\) with at most \(K\) entries covers at least \(M\) distinct elements less than \(n\). Bitstrings that do not decode are rejected.
noncomputable def maximumCoverageDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := MaximumCoverageInstance) x with
| some i => decide (WellFormed i ∧ MaximumCoverageFeasible i)
| none => false
abbrev DecisionProblem := List Bool → Bool
MathlibExt/Computability/Complexity.lean:170
def bitDecode [BitstringEncoding α] (l : List Bool) : Option α := toEncoding.decode l
MathlibExt/Computability/Complexity.lean:58
abbrev MaximumCoverageInstance := ℕ × List (List ℕ) × ℕ × ℕ
WantedExt/Complexity/NPComplete/MaximumCoverageWanted.lean:47
def WellFormed (i : MaximumCoverageInstance) : Prop :=
∀ s ∈ i.2.1, s.Nodup ∧ ∀ x ∈ s, x < i.1
WantedExt/Complexity/NPComplete/MaximumCoverageWanted.lean:50
def MaximumCoverageFeasible
(i : MaximumCoverageInstance) : Prop :=
∃ T : List (List ℕ), T.Sublist i.2.1 ∧ T.length ≤ i.2.2.1 ∧
∃ covered : List ℕ, covered.Nodup ∧ i.2.2.2 ≤ covered.length ∧
∀ x ∈ covered, x < i.1 ∧ ∃ s ∈ T, x ∈ s
WantedExt/Complexity/NPComplete/MaximumCoverageWanted.lean:54
Uses 12 · Used by 1
TheoremMAXIMUM COVERAGE is NP-complete#●ready to prove
The MAXIMUM COVERAGE decision problem belongs to NP, and every decision problem in NP reduces to it by a polynomial-time many-one reduction.
public theorem_wanted maximumCoverage_npComplete :
maximumCoverageDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L maximumCoverageDec
noncomputable def maximumCoverageDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := MaximumCoverageInstance) x with
| some i => decide (WellFormed i ∧ MaximumCoverageFeasible i)
| none => false
WantedExt/Complexity/NPComplete/MaximumCoverageWanted.lean:62
def NP : DecisionComplexityClass :=
{ L | ∃ (p : Polynomial ℕ), ∃ R : (List Bool × List Bool) → Bool,
IsPolyTime R ∧
∀ x, L x ↔ ∃ w : List Bool, w.length ≤ p.eval x.length ∧ R (x, w) }
MathlibExt/Computability/Complexity.lean:200
abbrev DecisionProblem := List Bool → Bool
MathlibExt/Computability/Complexity.lean:170
def PolyManyOneRed (L₁ L₂ : MetaMathlibExt.ComplexityTheory.DecisionProblem) : Prop :=
∃ reduce : List Bool → List Bool,
MetaMathlibExt.ComplexityTheory.IsPolyTime reduce ∧ ∀ x, L₁ x = L₂ (reduce x)
CSLibExt/Computability/CookLevin.lean:396
Sources
- M. R. Garey and D. S. Johnson, Computers and Intractability (1979), SET COVER: maximum coverage with target
M = nis exactly set cover (at mostKsets covering allnelements).
Uses 5
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.