Efficient domination
AbbreviationEfficient Domination instances#✓fully proved
An instance of EFFICIENT DOMINATION is a pair \((n, E)\) of a natural number \(n\), the number of vertices, and a list \(E\) of pairs of natural numbers, the edges.
abbrev EfficientDominationInstance := ℕ × List (ℕ × ℕ)
DefinitionGraph of an Efficient Domination instance#✓fully proved
For an instance \((n, E)\), its graph is the simple graph on the vertex set \(\{0, \dots, n - 1\}\) in which distinct vertices \(u\) and \(v\) are adjacent when \((u, v)\) or \((v, u)\) belongs to \(E\).
def Graph (i : EfficientDominationInstance) : SimpleGraph (Fin i.1) :=
Cslib.Complexity.Karp.edgeGraph i.1 i.2
abbrev EfficientDominationInstance := ℕ × List (ℕ × ℕ)
WantedExt/Complexity/NPComplete/EfficientDominationWanted.lean:47
def edgeGraph (n : ℕ) (es : List (ℕ × ℕ)) : SimpleGraph (Fin n) :=
SimpleGraph.fromRel fun i j => ((i : ℕ), (j : ℕ)) ∈ es
CSLibExt/Computability/Complexity/Karp/Color.lean:51
Uses 2 · Used by 1
DefinitionWell-formed Efficient Domination instances#✓fully proved
An instance \((n, E)\) is well formed when the list \(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 belong to \(E\).
def WellFormed (i : EfficientDominationInstance) : Prop :=
i.2.Nodup ∧ ∀ e ∈ i.2, e.1 < i.1 ∧ e.2 < i.1 ∧ e.1 ≠ e.2 ∧ (e.2, e.1) ∉ i.2
abbrev EfficientDominationInstance := ℕ × List (ℕ × ℕ)
WantedExt/Complexity/NPComplete/EfficientDominationWanted.lean:47
Uses 1 · Used by 1
DefinitionInstances with an efficient dominating set#✓fully proved
An instance \((n, E)\) of EFFICIENT DOMINATION is feasible when its graph has an efficient dominating set (a perfect code): a set \(S\) of vertices such that every vertex \(v\) has exactly one vertex \(u \in S\) with \(u = v\) or \(u\) adjacent to \(v\).
def EfficientDominationFeasible
(i : EfficientDominationInstance) : Prop :=
∃ S : Finset (Fin i.1),
∀ v : Fin i.1, ∃! u ∈ S, u = v ∨ (Graph i).Adj u v
abbrev EfficientDominationInstance := ℕ × List (ℕ × ℕ)
WantedExt/Complexity/NPComplete/EfficientDominationWanted.lean:47
def Graph (i : EfficientDominationInstance) : SimpleGraph (Fin i.1) :=
Cslib.Complexity.Karp.edgeGraph i.1 i.2
WantedExt/Complexity/NPComplete/EfficientDominationWanted.lean:50
Uses 2 · Used by 1
DefinitionEFFICIENT DOMINATION (PERFECT CODE) as a decision problem#✓fully proved
The decision problem EFFICIENT DOMINATION accepts a bitstring \(x\) exactly when \(x\) decodes, under the canonical bitstring encoding of instances, to an instance \((n, E)\) that is well formed and whose graph has an efficient dominating set. Bitstrings that do not decode to an instance are rejected.
noncomputable def efficientDominationDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := EfficientDominationInstance) x with
| some i => decide (WellFormed i ∧ EfficientDominationFeasible 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 EfficientDominationInstance := ℕ × List (ℕ × ℕ)
WantedExt/Complexity/NPComplete/EfficientDominationWanted.lean:47
def WellFormed (i : EfficientDominationInstance) : Prop :=
i.2.Nodup ∧ ∀ e ∈ i.2, e.1 < i.1 ∧ e.2 < i.1 ∧ e.1 ≠ e.2 ∧ (e.2, e.1) ∉ i.2
WantedExt/Complexity/NPComplete/EfficientDominationWanted.lean:55
def EfficientDominationFeasible
(i : EfficientDominationInstance) : Prop :=
∃ S : Finset (Fin i.1),
∀ v : Fin i.1, ∃! u ∈ S, u = v ∨ (Graph i).Adj u v
WantedExt/Complexity/NPComplete/EfficientDominationWanted.lean:59
Uses 12 · Used by 1
TheoremEFFICIENT DOMINATION (PERFECT CODE) is NP-complete#●ready to prove
The decision problem EFFICIENT DOMINATION belongs to NP, and every decision problem in NP reduces to it by a polynomial-time many-one reduction.
public theorem_wanted efficientDomination_npComplete :
efficientDominationDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L efficientDominationDec
noncomputable def efficientDominationDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := EfficientDominationInstance) x with
| some i => decide (WellFormed i ∧ EfficientDominationFeasible i)
| none => false
WantedExt/Complexity/NPComplete/EfficientDominationWanted.lean:66
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), EFFICIENT DOMINATION; D. G. Corneil and Y. Perl, "Clustering and domination in perfect graphs" (1984) and the perfect-code literature.
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.