Minimum bisection
AbbreviationInstances of MINIMUM BISECTION#✓fully proved
An instance of MINIMUM BISECTION is a triple \((n, es, K)\) of a natural number \(n\) (the number of vertices), a list \(es\) of pairs of natural numbers (the edge list) and a natural number \(K\) (the bound on the number of crossing edges).
abbrev MinBisectionInstance := ℕ × List (ℕ × ℕ) × ℕ
DefinitionWell-formed MINIMUM BISECTION instances#✓fully proved
An instance \((n, es, K)\) of MINIMUM BISECTION is well formed when \(n\) is even, the list \(es\) has no repeated entries, and every entry \((u, v)\) of \(es\) satisfies \(u < n\), \(v < n\) and \(u \ne v\), and \((v, u)\) is not an entry of \(es\).
def WellFormed (i : MinBisectionInstance) : Prop :=
i.1 % 2 = 0 ∧ 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 MinBisectionInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MinBisectionWanted.lean:46
Uses 1 · Used by 1
DefinitionFeasible MINIMUM BISECTION instances#✓fully proved
An instance \((n, es, K)\) of MINIMUM BISECTION is feasible when there is a set \(S \subseteq \{0, \dots, n - 1\}\) with \(\lfloor n / 2 \rfloor\) elements such that no sublist of \(es\) (a list obtained from \(es\) by deleting entries) with \(K + 1\) entries consists only of entries \((u, v)\) with exactly one of \(u\) and \(v\) in \(S\); that is, at most \(K\) entries of \(es\) have exactly one endpoint in \(S\).
def MinBisectionFeasible
(i : MinBisectionInstance) : Prop :=
∃ S : Finset ℕ, (∀ v ∈ S, v < i.1) ∧ S.card = i.1 / 2 ∧
¬ ∃ cut : List (ℕ × ℕ), cut.Sublist i.2.1 ∧ cut.length = i.2.2 + 1 ∧
∀ e ∈ cut, (e.1 ∈ S ∧ e.2 ∉ S) ∨ (e.1 ∉ S ∧ e.2 ∈ S)
abbrev MinBisectionInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MinBisectionWanted.lean:46
Uses 1 · Used by 1
DefinitionThe decision problem MINIMUM BISECTION#✓fully proved
The decision problem MINIMUM BISECTION accepts a bitstring \(x\) exactly when \(x\) decodes, under the canonical bitstring encoding of instances, to an instance \((n, es, K)\) of MINIMUM BISECTION that is well formed and feasible (its vertices split into two sets of \(n / 2\) vertices with at most \(K\) entries of \(es\) between them). Bitstrings that do not decode are rejected.
noncomputable def minBisectionDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := MinBisectionInstance) x with
| some i => decide (WellFormed i ∧ MinBisectionFeasible 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 MinBisectionInstance := ℕ × List (ℕ × ℕ) × ℕ
WantedExt/Complexity/NPComplete/MinBisectionWanted.lean:46
def WellFormed (i : MinBisectionInstance) : Prop :=
i.1 % 2 = 0 ∧ 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/MinBisectionWanted.lean:49
def MinBisectionFeasible
(i : MinBisectionInstance) : Prop :=
∃ S : Finset ℕ, (∀ v ∈ S, v < i.1) ∧ S.card = i.1 / 2 ∧
¬ ∃ cut : List (ℕ × ℕ), cut.Sublist i.2.1 ∧ cut.length = i.2.2 + 1 ∧
∀ e ∈ cut, (e.1 ∈ S ∧ e.2 ∉ S) ∨ (e.1 ∉ S ∧ e.2 ∈ S)
WantedExt/Complexity/NPComplete/MinBisectionWanted.lean:53
Uses 12 · Used by 1
TheoremMINIMUM BISECTION is NP-complete#●ready to prove
The decision problem MINIMUM BISECTION belongs to NP, and every decision problem in NP reduces to it by a polynomial-time many-one reduction.
public theorem_wanted minBisection_npComplete :
minBisectionDec ∈ MetaMathlibExt.ComplexityTheory.NP ∧
∀ L : MetaMathlibExt.ComplexityTheory.DecisionProblem,
L ∈ MetaMathlibExt.ComplexityTheory.NP →
Cslib.CookLevin.PolyManyOneRed L minBisectionDec
noncomputable def minBisectionDec :
MetaMathlibExt.ComplexityTheory.DecisionProblem := fun x =>
match MetaMathlibExt.BitstringEncoding.bitDecode
(α := MinBisectionInstance) x with
| some i => decide (WellFormed i ∧ MinBisectionFeasible i)
| none => false
WantedExt/Complexity/NPComplete/MinBisectionWanted.lean:61
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 BISECTION.
Uses 5
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.