Inapproximability of MAX-CUT
DefinitionVertex count of a MAX-CUT instance#✓fully proved
The vertex count of a MAX-CUT instance, a bitstring \(x\) of length \(|x|\), is \(\lfloor \sqrt{|x|} \rfloor\).
Sources
- C. H. Papadimitriou and M. Yannakakis, "Optimization, approximation, and complexity classes", Journal of Computer and System Sciences 43 (1991), 425-440.
Used by 3
DefinitionFeasible MAX-CUT solutions#✓fully proved
A bitstring \(s\) is a feasible solution of a MAX-CUT instance \(x\) exactly when the length of \(s\) equals the vertex count \(\lfloor \sqrt{|x|} \rfloor\) of \(x\), so that \(s\) has one bit per vertex.
def maxCutFeas (x s : List Bool) : Bool := decide (s.length = maxCutN x)
def maxCutN (x : List Bool) : ℕ := Nat.sqrt x.length
WantedExt/Complexity/KeyTheorems/MaxCutNoPTASWanted.lean:64
Sources
- C. H. Papadimitriou and M. Yannakakis, "Optimization, approximation, and complexity classes", Journal of Computer and System Sciences 43 (1991), 425-440.
Uses 1 · Used by 2
DefinitionValue of a MAX-CUT solution#✓fully proved
Let \(x\) be a MAX-CUT instance with vertex count \(n = \lfloor \sqrt{|x|} \rfloor\) and let \(s\) be a bitstring, with bits indexed from \(0\). If \(s\) is a feasible solution of \(x\) (its length is \(n\)), the value of \(s\) is the number, as a rational number, of pairs \((i, j)\) with \(i < j < n\) such that bit \(i n + j\) of \(x\) is true and bits \(i\) and \(j\) of \(s\) differ; otherwise the value is \(0\).
def maxCutVal (x s : List Bool) : ℚ :=
if maxCutFeas x s then
((Finset.filter (fun p : ℕ × ℕ => p.1 < p.2 ∧ p.2 < maxCutN x ∧
x.getD (p.1 * maxCutN x + p.2) false ∧
(s.getD p.1 false) ≠ (s.getD p.2 false))
(Finset.range (maxCutN x) ×ˢ Finset.range (maxCutN x))).card : ℚ)
else 0
def maxCutFeas (x s : List Bool) : Bool := decide (s.length = maxCutN x)
WantedExt/Complexity/KeyTheorems/MaxCutNoPTASWanted.lean:70
def maxCutN (x : List Bool) : ℕ := Nat.sqrt x.length
WantedExt/Complexity/KeyTheorems/MaxCutNoPTASWanted.lean:64
Sources
- C. H. Papadimitriou and M. Yannakakis, "Optimization, approximation, and complexity classes", Journal of Computer and System Sciences 43 (1991), 425-440.
Uses 2 · Used by 1
DefinitionMAX-CUT as an optimization problem#✓fully proved
MAX-CUT is the optimization problem whose instances are bitstrings \(x\), read as an adjacency matrix on \(n = \lfloor \sqrt{|x|} \rfloor\) vertices in which, for \(i < j < n\), bit \(i n + j\) of \(x\) (bits indexed from \(0\)) says whether \(\{i, j\}\) is an edge. Its feasible solutions for \(x\) are the bitstrings of length \(n\), one bit per vertex; the value of a feasible solution \(s\) is the number of pairs \(i < j < n\) that are edges and whose bits in \(s\) differ, the value of an infeasible solution is \(0\), and the polynomial bound on the length of feasible solutions is \(p(m) = m\).
MetaMathlibExt.Complexity.KeyTheorems.MaxCutNoPTAS.maxCut · 20 lines
noncomputable def maxCut : OptProblem where
val := maxCutVal
feas := maxCutFeas
bound := Polynomial.X
feas_len := fun x s h => by
unfold maxCutFeas at h
rw [decide_eq_true_eq] at h
rw [h]
simp [Polynomial.eval_X, maxCutN, Nat.sqrt_le_self]
val_nonneg := fun x s => by
unfold maxCutVal
split
· exact Nat.cast_nonneg _
· exact le_rfl
val_infeas := fun x s h => by
unfold maxCutVal
have h' : maxCutFeas x s ≠ true := by rw [h]; exact Bool.false_ne_true
simp [h']
feas_nonempty := fun x => ⟨List.replicate (maxCutN x) false, by
simp [maxCutFeas, List.length_replicate]⟩
structure OptProblem where
/-- The objective value of solution `s` for instance `x`. -/
val : List Bool → List Bool → ℚ
/-- The feasibility predicate: whether `s` is a feasible solution for `x`. -/
feas : List Bool → List Bool → Bool
/-- A polynomial bound on feasible solution lengths. -/
bound : Polynomial ℕ
/-- Feasible solutions respect the length bound. -/
feas_len : ∀ x s, feas x s = true → s.length ≤ bound.eval x.length
/-- Objective values are nonnegative. -/
val_nonneg : ∀ x s, 0 ≤ val x s
/-- The value on infeasible solutions is `0`. -/
⋯
CSLibExt/Computability/Complexity/Classes.lean:919
def maxCutVal (x s : List Bool) : ℚ :=
if maxCutFeas x s then
((Finset.filter (fun p : ℕ × ℕ => p.1 < p.2 ∧ p.2 < maxCutN x ∧
x.getD (p.1 * maxCutN x + p.2) false ∧
(s.getD p.1 false) ≠ (s.getD p.2 false))
(Finset.range (maxCutN x) ×ˢ Finset.range (maxCutN x))).card : ℚ)
else 0
WantedExt/Complexity/KeyTheorems/MaxCutNoPTASWanted.lean:78
def maxCutFeas (x s : List Bool) : Bool := decide (s.length = maxCutN x)
WantedExt/Complexity/KeyTheorems/MaxCutNoPTASWanted.lean:70
Sources
- C. H. Papadimitriou and M. Yannakakis, "Optimization, approximation, and complexity classes", Journal of Computer and System Sciences 43 (1991), 425-440.
Uses 4 · Used by 1
TheoremMAX-CUT has no PTAS unless P = NP#●ready to prove
If \(\mathsf{P} \neq \mathsf{NP}\), then the optimization problem MAX-CUT does not admit a polynomial-time approximation scheme.
public theorem_wanted max_cut_no_ptas :
P ≠ NP → ¬ IsPTAS maxCut
def P : DecisionComplexityClass :=
{ L | IsPolyTime L }
MathlibExt/Computability/Complexity.lean:194
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
def IsPTAS (P : OptProblem) : Prop :=
IsNPO P ∧ ∀ k : ℕ, 1 ≤ k → ∃ A : List Bool × List Bool → List Bool,
IsPolyTime A ∧ ApproxAt P A k (1 - 1 / (k : ℚ))
CSLibExt/Computability/Complexity/Classes.lean:1002
noncomputable def maxCut : OptProblem where
val := maxCutVal
feas := maxCutFeas
bound := Polynomial.X
feas_len := fun x s h => by
unfold maxCutFeas at h
rw [decide_eq_true_eq] at h
rw [h]
simp [Polynomial.eval_X, maxCutN, Nat.sqrt_le_self]
val_nonneg := fun x s => by
unfold maxCutVal
split
⋯
WantedExt/Complexity/KeyTheorems/MaxCutNoPTASWanted.lean:90
Sources
- C. H. Papadimitriou and M. Yannakakis, "Optimization, approximation, and complexity classes", Journal of Computer and System Sciences 43 (1991), 425-440 (MAX-CUT is MAXSNP-complete, hence APX-hard); S. Arora and B. Barak, Computational Complexity: A Modern Approach, 2009, Chapter 11 (APX-hardness rules out a PTAS unless P = NP).
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.