Edge dominating set
AbbreviationEDGE DOMINATING SET instances#✓fully proved
An instance of EDGE DOMINATING SET is a triple \((n, E, K)\) of a natural number \(n\) (the vertex count), a finite list \(E\) of ordered pairs of natural numbers (the edge list) and a natural number \(K\) (the bound).
abbrev EdgeDominatingSetInstance := ℕ × List (ℕ × ℕ) × ℕ
DefinitionEdge-list adjacency for EDGE DOMINATING SET#✓fully proved
For a list \(E\) of ordered pairs of natural numbers and natural numbers \(u\) and \(v\), the Boolean adjacency of \(u\) and \(v\) in \(E\) is true exactly when \((u, v)\) or \((v, u)\) occurs in \(E\).
DefinitionWell-formed EDGE DOMINATING SET instances#✓fully proved
An instance with vertex count \(n\), edge list \(E\) and bound \(K\) is well formed when \(E\) has no repeated entries and every pair \((a, b)\) in \(E\) satisfies \(a < n\), \(b < n\) and \(a \ne b\), and \((b, a)\) does not occur in \(E\). Thus \(E\) lists the edges of a simple graph on the vertices \(0, \dots, n - 1\), each once and in one orientation.
def WellFormed (i : EdgeDominatingSetInstance) : Prop :=
i.2.1.Nodup ∧ ∀ e ∈ i.2.1, e.1 < i.1 ∧ e.2 < i.1 ∧ e.1 ≠ e.2 ∧ (e.2, e.1) ∉ i.2.1
abbrev EdgeDominatingSetInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/EdgeDominatingSetWanted.lean:45
Uses 1 · Used by 1
DefinitionFeasible EDGE DOMINATING SET instances#✓fully proved
An instance with vertex count \(n\), edge list \(E\) and bound \(K\) is feasible when some sublist \(D\) of \(E\) (its entries taken in order) has at most \(K\) entries and dominates every edge of \(E\): for every \(e \in E\) there is \(d \in D\) such that one of the two entries of \(d\) equals one of the two entries of \(e\).
def EdgeDominatingSetFeasible
(i : EdgeDominatingSetInstance) : Prop :=
∃ D : List (ℕ × ℕ), D.Sublist i.2.1 ∧ D.length ≤ i.2.2 ∧
∀ e ∈ i.2.1, ∃ d ∈ D, d.1 = e.1 ∨ d.1 = e.2 ∨ d.2 = e.1 ∨ d.2 = e.2
abbrev EdgeDominatingSetInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/EdgeDominatingSetWanted.lean:45
Uses 1 · Used by 1
DefinitionThe EDGE DOMINATING SET decision problem#✓fully proved
EDGE DOMINATING SET is the decision problem that accepts a bitstring \(x\) exactly when \(x\) decodes, under the canonical bitstring encoding, to an EDGE DOMINATING SET instance \((n, E, K)\) that is well formed and feasible, that is, some sublist of \(E\) with at most \(K\) entries contains, for every edge of \(E\), an edge sharing an endpoint with it. Bitstrings that do not decode to an instance are rejected.
noncomputable def edgeDominatingSetDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := EdgeDominatingSetInstance) x with
| some i => decide (WellFormed i ∧ EdgeDominatingSetFeasible 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 EdgeDominatingSetInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/EdgeDominatingSetWanted.lean:45
def WellFormed (i : EdgeDominatingSetInstance) : Prop :=
i.2.1.Nodup ∧ ∀ e ∈ i.2.1, e.1 < i.1 ∧ e.2 < i.1 ∧ e.1 ≠ e.2 ∧ (e.2, e.1) ∉ i.2.1
WantedExt/Complexity/NPComplete/EdgeDominatingSetWanted.lean:54
def EdgeDominatingSetFeasible
(i : EdgeDominatingSetInstance) : Prop :=
∃ D : List (ℕ × ℕ), D.Sublist i.2.1 ∧ D.length ≤ i.2.2 ∧
∀ e ∈ i.2.1, ∃ d ∈ D, d.1 = e.1 ∨ d.1 = e.2 ∨ d.2 = e.1 ∨ d.2 = e.2
WantedExt/Complexity/NPComplete/EdgeDominatingSetWanted.lean:58
Uses 12 · Used by 1
TheoremEDGE DOMINATING SET is NP-complete#●ready to prove
The EDGE DOMINATING SET decision problem belongs to NP, and every decision problem in NP reduces to it by a polynomial-time many-one reduction.
public theorem_wanted edgeDominatingSet_npComplete :
edgeDominatingSetDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L edgeDominatingSetDec
noncomputable def edgeDominatingSetDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := EdgeDominatingSetInstance) x with
| some i => decide (WellFormed i ∧ EdgeDominatingSetFeasible i)
| none => false
WantedExt/Complexity/NPComplete/EdgeDominatingSetWanted.lean:65
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), EDGE DOMINATING SET; M. Yannakakis and F. Gavril, "Edge dominating sets in graphs" (1980).
Uses 5
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.