Maximum n-times coverage
AbbreviationInstance of maximum n-times coverage#✓fully proved
An instance: n, the coverage rows of the overlays, element weights, k, τ.
DefinitionWell-formed maximum n-times coverage instance#✓fully proved
Well-formedness: every row has one entry per element.
def WellFormed (i : Instance) : Prop :=
∀ row ∈ i.2.1, row.length = i.2.2.1.length
abbrev Instance := ℕ × List (List ℕ) × List ℕ × ℕ × ℕ
WantedExt/Complexity/NPComplete/MaxNTimesCoverageWanted.lean:42
Uses 1 · Used by 1
DefinitionWeight covered at least n times#✓fully proved
The weight of the elements covered at least n times by the rows sub.
def coveredWeight (n : ℕ) (sub : List (List ℕ)) (weights : List ℕ) : ℕ :=
((List.range weights.length).filter fun e => n ≤ (sub.map fun row => row.getD e 0).sum).foldr
(fun e acc => weights.getD e 0 + acc) 0
Used by 1
DefinitionFeasibility for maximum n-times coverage#✓fully proved
At most k overlays cover weight at least τ at least n times.
def Feasible (i : Instance) : Prop :=
∃ sub : List (List ℕ), sub.Sublist i.2.1 ∧ sub.length ≤ i.2.2.2.1 ∧
i.2.2.2.2 ≤ coveredWeight i.1 sub i.2.2.1
abbrev Instance := ℕ × List (List ℕ) × List ℕ × ℕ × ℕ
WantedExt/Complexity/NPComplete/MaxNTimesCoverageWanted.lean:42
def coveredWeight (n : ℕ) (sub : List (List ℕ)) (weights : List ℕ) : ℕ :=
((List.range weights.length).filter fun e => n ≤ (sub.map fun row => row.getD e 0).sum).foldr
(fun e acc => weights.getD e 0 + acc) 0
WantedExt/Complexity/NPComplete/MaxNTimesCoverageWanted.lean:49
Uses 2 · Used by 1
DefinitionMaximum n-times coverage decision problem#✓fully proved
MAXIMUM n-TIMES COVERAGE as a decision problem over bitstrings.
noncomputable def maxNTimesCoverageDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode (α := Instance) x with
| some i => decide (WellFormed i ∧ Feasible 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 Instance := ℕ × List (List ℕ) × List ℕ × ℕ × ℕ
WantedExt/Complexity/NPComplete/MaxNTimesCoverageWanted.lean:42
def WellFormed (i : Instance) : Prop :=
∀ row ∈ i.2.1, row.length = i.2.2.1.length
WantedExt/Complexity/NPComplete/MaxNTimesCoverageWanted.lean:45
def Feasible (i : Instance) : Prop :=
∃ sub : List (List ℕ), sub.Sublist i.2.1 ∧ sub.length ≤ i.2.2.2.1 ∧
i.2.2.2.2 ≤ coveredWeight i.1 sub i.2.2.1
WantedExt/Complexity/NPComplete/MaxNTimesCoverageWanted.lean:54
Uses 12 · Used by 1
TheoremMAXIMUM n-TIMES COVERAGE is NP-complete#●ready to prove
MAXIMUM n-TIMES COVERAGE is NP-complete (Liu, Dimitrakakis, Carter and Gifford 2022).
public theorem_wanted maxNTimesCoverage_npComplete :
maxNTimesCoverageDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L maxNTimesCoverageDec
noncomputable def maxNTimesCoverageDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode (α := Instance) x with
| some i => decide (WellFormed i ∧ Feasible i)
| none => false
WantedExt/Complexity/NPComplete/MaxNTimesCoverageWanted.lean:60
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
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.