Maximum induced matching
AbbreviationMaximum-induced-matching instances#✓fully proved
A maximum-induced-matching instance is a triple \((n, E, K)\) of a natural number \(n\) (the vertex count), a list \(E\) of pairs of natural numbers (the edges) and a natural number \(K\) (the bound).
abbrev MaximumInducedMatchingInstance := ℕ × List (ℕ × ℕ) × ℕ
DefinitionWell-formed maximum-induced-matching instances#✓fully proved
A maximum-induced-matching instance \((n, E, K)\) is well formed when the edge list \(E\) has no repeated entries and every pair \((u, v)\) in \(E\) satisfies \(u < n\), \(v < n\) and \(u \ne v\), with the reverse pair \((v, u)\) not in \(E\).
def WellFormed (i : MaximumInducedMatchingInstance) : 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 MaximumInducedMatchingInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MaximumInducedMatchingWanted.lean:48
Uses 1 · Used by 1
DefinitionFeasible maximum-induced-matching instances#✓fully proved
A maximum-induced-matching instance \((n, E, K)\), with vertex count \(n\), edge list \(E\) of pairs of natural numbers and bound \(K\), is feasible when there is a sublist \(M\) of \(E\) of length at least \(K\) such that any two distinct pairs in \(M\) share no endpoint, and no pair in \(E\) joins an endpoint of one pair in \(M\) to an endpoint of a different pair in \(M\).
def MaximumInducedMatchingFeasible
(i : MaximumInducedMatchingInstance) : Prop :=
∃ M : List (ℕ × ℕ), M.Sublist i.2.1 ∧ i.2.2 ≤ M.length ∧
(∀ e1 ∈ M, ∀ e2 ∈ M, e1 ≠ e2 →
e1.1 ≠ e2.1 ∧ e1.1 ≠ e2.2 ∧ e1.2 ≠ e2.1 ∧ e1.2 ≠ e2.2) ∧
∀ e ∈ i.2.1, ∀ e1 ∈ M, ∀ e2 ∈ M, e1 ≠ e2 →
¬ ((e.1 = e1.1 ∨ e.1 = e1.2) ∧ (e.2 = e2.1 ∨ e.2 = e2.2) ∨
(e.2 = e1.1 ∨ e.2 = e1.2) ∧ (e.1 = e2.1 ∨ e.1 = e2.2))
abbrev MaximumInducedMatchingInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MaximumInducedMatchingWanted.lean:48
Uses 1 · Used by 1
DefinitionThe MAXIMUM INDUCED MATCHING decision problem#✓fully proved
MAXIMUM INDUCED MATCHING is the decision problem that accepts a bitstring \(x\) exactly when \(x\) decodes, under the canonical bitstring encoding, to a maximum-induced-matching instance \((n, E, K)\) that is well formed and feasible: the edge list \(E\) has no repeated entries, every pair \((u, v)\) in \(E\) satisfies \(u < n\), \(v < n\) and \(u \ne v\) with \((v, u)\) not in \(E\), and some sublist \(M\) of \(E\) of length at least \(K\) is an induced matching, meaning that any two distinct pairs in \(M\) share no endpoint and no pair in \(E\) joins an endpoint of one pair in \(M\) to an endpoint of a different pair in \(M\). Bitstrings that do not decode are rejected.
noncomputable def maximumInducedMatchingDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := MaximumInducedMatchingInstance) x with
| some i => decide (WellFormed i ∧ MaximumInducedMatchingFeasible 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 MaximumInducedMatchingInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MaximumInducedMatchingWanted.lean:48
def WellFormed (i : MaximumInducedMatchingInstance) : 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/MaximumInducedMatchingWanted.lean:51
def MaximumInducedMatchingFeasible
(i : MaximumInducedMatchingInstance) : Prop :=
∃ M : List (ℕ × ℕ), M.Sublist i.2.1 ∧ i.2.2 ≤ M.length ∧
(∀ e1 ∈ M, ∀ e2 ∈ M, e1 ≠ e2 →
e1.1 ≠ e2.1 ∧ e1.1 ≠ e2.2 ∧ e1.2 ≠ e2.1 ∧ e1.2 ≠ e2.2) ∧
∀ e ∈ i.2.1, ∀ e1 ∈ M, ∀ e2 ∈ M, e1 ≠ e2 →
¬ ((e.1 = e1.1 ∨ e.1 = e1.2) ∧ (e.2 = e2.1 ∨ e.2 = e2.2) ∨
(e.2 = e1.1 ∨ e.2 = e1.2) ∧ (e.1 = e2.1 ∨ e.1 = e2.2))
WantedExt/Complexity/NPComplete/MaximumInducedMatchingWanted.lean:55
Uses 12 · Used by 1
TheoremMAXIMUM INDUCED MATCHING is NP-complete#●ready to prove
The MAXIMUM INDUCED MATCHING decision problem belongs to NP, and every decision problem in NP reduces to it by a polynomial-time many-one reduction.
public theorem_wanted maximumInducedMatching_npComplete :
maximumInducedMatchingDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L maximumInducedMatchingDec
noncomputable def maximumInducedMatchingDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := MaximumInducedMatchingInstance) x with
| some i => decide (WellFormed i ∧ MaximumInducedMatchingFeasible i)
| none => false
WantedExt/Complexity/NPComplete/MaximumInducedMatchingWanted.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
- L. J. Stockmeyer and V. V. Vazirani, "NP-completeness of some generalizations of the maximum matching problem", Information Processing Letters 15 (1982), 14-19; K. Cameron, "Induced matchings", Discrete Applied Mathematics 24 (1989), 97-102 (NP-completeness for bipartite graphs, polynomial for chordal graphs).
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.