Minimum fill-in
AbbreviationInstances of MINIMUM FILL-IN#✓fully proved
An instance of MINIMUM FILL-IN is a triple \((n, E, K)\) consisting of a natural number \(n\) (the number of vertices), a list \(E\) of pairs of natural numbers (the edge list) and a natural number \(K\) (the bound).
abbrev MinimumFillInInstance := ℕ × List (ℕ × ℕ) × ℕ
DefinitionGraph augmented by added edges#✓fully proved
For an instance \((n, E, K)\) of MINIMUM FILL-IN and a list \(A\) of pairs of natural numbers, the augmented graph is the graph of the edge list \(E\) followed by \(A\) on \(n\) vertices: the simple graph on \(\{0, \dots, n - 1\}\) in which distinct vertices \(i\) and \(j\) are adjacent when \((i, j)\) or \((j, i)\) belongs to \(E\) or to \(A\).
def GraphAug (i : MinimumFillInInstance) (added : List (ℕ × ℕ)) : SimpleGraph (Fin i.1) :=
Cslib.Complexity.Karp.edgeGraph i.1 (i.2.1 ++ added)
abbrev MinimumFillInInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MinimumFillInWanted.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 MINIMUM FILL-IN instances#✓fully proved
An instance \((n, E, K)\) of MINIMUM FILL-IN is well formed when the list \(E\) has no repeated entries and every pair \((u, v)\) in \(E\) satisfies \(u < n\), \(v < n\) and \(u \ne v\), and its reverse \((v, u)\) does not belong to \(E\).
def WellFormed (i : MinimumFillInInstance) : 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 MinimumFillInInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MinimumFillInWanted.lean:47
Uses 1 · Used by 1
DefinitionFeasible MINIMUM FILL-IN instances#✓fully proved
An instance \((n, E, K)\) of MINIMUM FILL-IN is feasible when there are an ordering \(\sigma\) of the vertices \(0, \dots, n - 1\) (a list that contains each of them exactly once) and a list \(A\) of pairs of natural numbers, with no repeated entries and at most \(K\) entries, such that every pair \((u, v)\) in \(A\) satisfies \(u < n\), \(v < n\) and \(u \ne v\), neither \((u, v)\) nor \((v, u)\) belongs to \(E\), and \((v, u)\) does not belong to \(A\), and such that, in the graph augmented by \(A\), any two distinct vertices \(a\) and \(b\) that are both adjacent to a vertex \(v\) and both come after \(v\) in \(\sigma\) are adjacent to each other.
The ordering \(\sigma\) is thus a perfect elimination ordering of the augmented graph, so adding the at most \(K\) edges of \(A\) to the graph makes it chordal.
def MinimumFillInFeasible
(i : MinimumFillInInstance) : Prop :=
∃ ord : List (Fin i.1), ord.Perm (List.finRange i.1) ∧
∃ added : List (ℕ × ℕ), added.Nodup ∧ added.length ≤ i.2.2 ∧
(∀ e ∈ added, e.1 < i.1 ∧ e.2 < i.1 ∧ e.1 ≠ e.2 ∧ (e.2, e.1) ∉ added ∧
(e.2, e.1) ∉ i.2.1 ∧ e ∉ i.2.1) ∧
∀ v a b : Fin i.1, a ≠ b → ord.idxOf v < ord.idxOf a →
ord.idxOf v < ord.idxOf b → (GraphAug i added).Adj v a →
(GraphAug i added).Adj v b → (GraphAug i added).Adj a b
abbrev MinimumFillInInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MinimumFillInWanted.lean:47
def GraphAug (i : MinimumFillInInstance) (added : List (ℕ × ℕ)) : SimpleGraph (Fin i.1) :=
Cslib.Complexity.Karp.edgeGraph i.1 (i.2.1 ++ added)
WantedExt/Complexity/NPComplete/MinimumFillInWanted.lean:51
Uses 2 · Used by 1
DefinitionThe MINIMUM FILL-IN (CHORDAL COMPLETION) problem#✓fully proved
The decision problem MINIMUM FILL-IN accepts a bitstring \(x\) exactly when \(x\) decodes, under the canonical bitstring encoding, to an instance \((n, E, K)\) of MINIMUM FILL-IN that is well formed and feasible.
noncomputable def minimumFillInDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := MinimumFillInInstance) x with
| some i => decide (WellFormed i ∧ MinimumFillInFeasible 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 MinimumFillInInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MinimumFillInWanted.lean:47
def WellFormed (i : MinimumFillInInstance) : 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/MinimumFillInWanted.lean:56
def MinimumFillInFeasible
(i : MinimumFillInInstance) : Prop :=
∃ ord : List (Fin i.1), ord.Perm (List.finRange i.1) ∧
∃ added : List (ℕ × ℕ), added.Nodup ∧ added.length ≤ i.2.2 ∧
(∀ e ∈ added, e.1 < i.1 ∧ e.2 < i.1 ∧ e.1 ≠ e.2 ∧ (e.2, e.1) ∉ added ∧
(e.2, e.1) ∉ i.2.1 ∧ e ∉ i.2.1) ∧
∀ v a b : Fin i.1, a ≠ b → ord.idxOf v < ord.idxOf a →
ord.idxOf v < ord.idxOf b → (GraphAug i added).Adj v a →
(GraphAug i added).Adj v b → (GraphAug i added).Adj a b
WantedExt/Complexity/NPComplete/MinimumFillInWanted.lean:60
Uses 12 · Used by 1
TheoremMINIMUM FILL-IN (CHORDAL COMPLETION) is NP-complete#●ready to prove
The decision problem MINIMUM FILL-IN lies in NP, and every decision problem in NP has a polynomial-time many-one reduction to MINIMUM FILL-IN.
public theorem_wanted minimumFillIn_npComplete :
minimumFillInDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L minimumFillInDec
noncomputable def minimumFillInDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := MinimumFillInInstance) x with
| some i => decide (WellFormed i ∧ MinimumFillInFeasible i)
| none => false
WantedExt/Complexity/NPComplete/MinimumFillInWanted.lean:72
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), MINIMUM FILL-IN; M. Yannakakis, "Computing the minimum fill-in is NP-complete" (1981).
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.