Set splitting
AbbreviationSet-splitting instances#✓fully proved
A set-splitting instance is a pair \((n, C)\) of a natural number \(n\), the size of the universe, and a list \(C\) of lists of natural numbers, the subsets to be split.
DefinitionWell-formed set-splitting instances#✓fully proved
A set-splitting instance \((n, C)\), a natural number \(n\) together with a list \(C\) of lists of natural numbers, is well formed when every list in \(C\) has no repeated entries and all its entries are less than \(n\).
def WellFormed (i : SetSplittingInstance) : Prop :=
∀ s ∈ i.2, s.Nodup ∧ ∀ x ∈ s, x < i.1
abbrev SetSplittingInstance := ℕ × List (List ℕ)
WantedExt/Complexity/NPComplete/SetSplittingWanted.lean:45
Uses 1 · Used by 1
DefinitionFeasible set-splitting instances#✓fully proved
A set-splitting instance \((n, C)\), a natural number \(n\) together with a list \(C\) of lists of natural numbers, is feasible when there is a finite set \(S\) of natural numbers, all less than \(n\), such that every list in \(C\) has an entry in \(S\) and an entry not in \(S\).
def SetSplittingFeasible
(i : SetSplittingInstance) : Prop :=
∃ S : Finset ℕ, (∀ v ∈ S, v < i.1) ∧
∀ s ∈ i.2, (∃ x ∈ s, x ∈ S) ∧ ∃ y ∈ s, y ∉ S
abbrev SetSplittingInstance := ℕ × List (List ℕ)
WantedExt/Complexity/NPComplete/SetSplittingWanted.lean:45
Uses 1 · Used by 1
DefinitionThe SET SPLITTING decision problem#✓fully proved
SET SPLITTING is the decision problem that accepts a bitstring \(x\) exactly when \(x\) decodes, under the canonical bitstring encoding, to a pair \((n, C)\) of a natural number \(n\) and a list \(C\) of lists of natural numbers such that every list in \(C\) has no repeated entries and only entries less than \(n\), and some finite set \(S\) of natural numbers less than \(n\) contains an entry of every list in \(C\) and misses an entry of every list in \(C\). Bitstrings that do not decode to such a pair are rejected.
noncomputable def setSplittingDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := SetSplittingInstance) x with
| some i => decide (WellFormed i ∧ SetSplittingFeasible 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 SetSplittingInstance := ℕ × List (List ℕ)
WantedExt/Complexity/NPComplete/SetSplittingWanted.lean:45
def WellFormed (i : SetSplittingInstance) : Prop :=
∀ s ∈ i.2, s.Nodup ∧ ∀ x ∈ s, x < i.1
WantedExt/Complexity/NPComplete/SetSplittingWanted.lean:48
def SetSplittingFeasible
(i : SetSplittingInstance) : Prop :=
∃ S : Finset ℕ, (∀ v ∈ S, v < i.1) ∧
∀ s ∈ i.2, (∃ x ∈ s, x ∈ S) ∧ ∃ y ∈ s, y ∉ S
WantedExt/Complexity/NPComplete/SetSplittingWanted.lean:52
Uses 12 · Used by 1
TheoremSET SPLITTING is NP-complete#●ready to prove
The SET SPLITTING decision problem belongs to NP, and every decision problem in NP reduces to it by a polynomial-time many-one reduction.
public theorem_wanted setSplitting_npComplete :
setSplittingDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L setSplittingDec
noncomputable def setSplittingDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := SetSplittingInstance) x with
| some i => decide (WellFormed i ∧ SetSplittingFeasible i)
| none => false
WantedExt/Complexity/NPComplete/SetSplittingWanted.lean:59
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 SPLITTING (hypergraph 2-coloring); S. Lovasz, "Coverings and colorings of hypergraphs" (1973).
Uses 5
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.