Motivation
MAXCUT asks for a partition of the vertices of a weighted graph into two sets that maximizes the total weight of the edges between them. It is one of Karp's original NP-hard problems, so no polynomial-time exact algorithm is expected, and the natural question is how close a polynomial-time algorithm can come to the optimum. Sampling a uniformly random partition already achieves, in expectation, half of the optimal value. For two decades this factor 1/2 was essentially the best known.
Goemans and Williamson (J. ACM 42(6), 1995) replaced the combinatorial problem by a semidefinite relaxation, solvable in polynomial time by interior point methods, and rounded its solution with a random Gaussian hyperplane. They proved that the resulting cut has expected weight at least 0.878 times the maximum. The technique founded the use of semidefinite programming in approximation algorithms. Khot, Kindler, Mossel and O'Donnell (SIAM J. Comput. 37(1), 2007) showed that, assuming the Unique Games Conjecture, no polynomial-time algorithm achieves a better constant. Nesterov (Optim. Methods Softw. 9, 1998) extended the rounding analysis to maximizing any positive semidefinite quadratic form over the hypercube, with the constant 2/π.
This mission formalizes the presentation of these results in §6.6 of S. Bubeck, Convex Optimization: Algorithms and Complexity (arXiv:1405.4980v2), pp. 343–347.
Setting
Let n≥0 and let A∈Rn×n be a symmetric matrix with non-negative entries; Ai,j is the weight between points i and j. The graph Laplacian is L=D−A, where D is the diagonal matrix with entries ∑j=1nAi,j. For x∈{−1,1}n the vector x encodes a partition, and MAXCUT is (6.7)
x∈{−1,1}nmaxx⊤Lx.
Write ⟨M,X⟩=Tr(M⊤X) for the Frobenius inner product and S+n for the symmetric positive semidefinite matrices. Since x⊤Lx=⟨L,xx⊤⟩ and xx⊤∈S+n has unit diagonal, MAXCUT is bounded above by the SDP relaxation
max{⟨L,X⟩:X∈S+n, Xi,i=1, i∈[n]}.
A solution Σ of the relaxation is any feasible matrix attaining this maximum. The rounding draws ξ∼N(0,Σ), a centered Gaussian vector with covariance Σ, and outputs ζ=sign(ξ)∈{−1,1}n coordinatewise.
Formalization targets
Goal: Theorem 6.11 (Goemans–Williamson)
For A symmetric with non-negative entries, L=D−A, Σ any solution of the relaxation, ξ∼N(0,Σ) and ζ=sign(ξ):
Eζ⊤Lζ ≥ 0.878x∈{−1,1}nmaxx⊤Lx.
Milestones
- Bounded entries. If Σ∈S+n and Σi,i=1, then ∣Σi,j∣≤1 (remark in the proof of Lemma 6.12).
- Lemma 6.12 (Sheppard's formula). If ξ∼N(0,Σ) with Σi,i=1 and ζ=sign(ξ), then Eζiζj=π2arcsin(Σi,j).
- Inequality (6.8). 1−π2arcsin(t)≥0.878(1−t) for all t∈[−1,1].
- Relaxation inequality. maxxx⊤Lx=maxx⟨L,xx⊤⟩≤⟨L,Σ⟩ for every solution Σ.
The separately stated Laplacian identity on p. 346 is also included as a theorem item: if Xi,i=1 for all i, then ⟨L,X⟩=∑i,jAi,j(1−Xi,j); for x∈{−1,1}n, x⊤Lx=∑i,jAi,j(1−xixj).
Companion: Theorem 6.13 (Nesterov)
For B∈S+n, Σ a solution of max{⟨B,X⟩:X∈S+n, Xi,i=1}, ξ∼N(0,Σ) and ζ=sign(ξ):
Eζ⊤Bζ ≥ π2x∈{−1,1}nmaxx⊤Bx.
Significance
The result. Theorem 6.11 is a polynomial-time randomized 0.878-approximation for MAXCUT: the relaxation is a semidefinite program, and sampling a Gaussian vector and taking signs is cheap. Repeated sampling turns the bound in expectation into a cut of value close to 0.878 times the optimum with high probability. The same scheme of relaxation followed by randomized rounding underlies approximation algorithms for MAX-2SAT, correlation clustering and quadratic programs over the hypercube, and Nesterov's Theorem 6.13 is the version for an arbitrary positive semidefinite objective.
Formalizing it. Both theorems were proved long ago. To our knowledge neither has a machine-checked proof in Mathlib. The platform has related statements from other books, in different forms: Grothendieck's identity for a standard Gaussian and two unit vectors, and the relaxation guarantee with a Grothendieck constant. This mission states the textbook's results for a Gaussian with a possibly singular covariance matrix, which is the form the rounding uses. A complete development needs Sheppard's formula for a degenerate bivariate Gaussian, an elementary but careful real-variable inequality, and a link between Mathlib's multivariate Gaussian and Gram factorizations of Σ. All three are reusable.
Difficulty
The algebra (the Laplacian identity and milestone 4) is routine. The probabilistic core is Lemma 6.12. The textbook argument reduces it to the probability that a uniformly random direction separates two unit vectors, which is "a quick picture" on paper. In Lean this requires showing that the pair (ξi,ξj) has the law of (⟨Vi,ε⟩,⟨Vj,ε⟩) for a standard Gaussian ε, and then computing an angular measure in the plane, including the degenerate cases Σi,j=±1, where the pair is supported on a line. A density-based argument fails there, because N(0,Σ) has no density when Σ is singular, and singular solutions of the relaxation occur (for instance Σ=xx⊤). Inequality (6.8) is a statement about a transcendental function on a closed interval with a tight constant (0.878 against the true minimum ≈0.87856), so crude estimates do not suffice near the minimizer t≈−0.689.
Formalization scope
- Matrices are
Matrix (Fin n) (Fin n) ℝ, vectors Fin n → ℝ. S+n is Matrix.PosSemidef, which includes symmetry, and ⟨M,X⟩ is trace (Mᵀ * X).
- N(0,Σ) is Mathlib's
ProbabilityTheory.multivariateGaussian 0 Σ on EuclideanSpace ℝ (Fin n), defined for every positive semidefinite Σ, singular ones included. Expectations are Bochner integrals against it, and each theorem also asserts integrability of its (bounded) integrand.
- The sign is {−1,1}-valued: sign(r)=1 for r≥0 and −1 for r<0. Mathlib's
Real.sign would give sign(0)=0, which takes ζ out of {−1,1}n; the two agree almost surely because Σi,i=1.
- The maximum over the hypercube is a finite maximum (
Finset.sup') over the 2n Boolean vectors read as ±1 vectors, so it is never a junk value. "The solution" of the relaxation means any maximizer, and maximizers exist since the feasible set is compact and contains the identity.
- Standing hypotheses: in Theorem 6.11, A symmetric with non-negative entries (the book's MAXCUT setting); in Lemma 6.12, Σ positive semidefinite (implicit in "ξ∼N(0,Σ)"); in Theorem 6.13, B positive semidefinite. The identities of milestones 4 and 5 hold for every real matrix A and are stated without hypotheses on A.
- Ruled out: tying ξ's law to anything other than Σ, or dropping optimality of Σ, would make the goal false or vacuous; here the law is exactly N(0,Σ) and Σ is a maximizer.
- Welcome contributions: Sheppard's formula in Mathlib's multivariate Gaussian language, a proof of (6.8), and the Schur product theorem (A,B⪰0⇒A∘B⪰0) used in Theorem 6.13.
Selected references
- S. Bubeck, Convex Optimization: Algorithms and Complexity, Foundations and Trends in Machine Learning 8(3–4):231–358, 2015. arXiv:1405.4980v2
- M. X. Goemans, D. P. Williamson, Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming, J. ACM 42(6):1115–1145, 1995. doi:10.1145/227683.227684
- Yu. Nesterov, Semidefinite relaxation and nonconvex quadratic optimization, Optim. Methods Softw. 9(1–3):141–160, 1998. doi:10.1080/10556789808805690
- S. Khot, G. Kindler, E. Mossel, R. O'Donnell, Optimal inapproximability results for MAX-CUT and other 2-variable CSPs?, SIAM J. Comput. 37(1):319–357, 2007. doi:10.1137/S0097539705447372
- W. F. Sheppard, On the application of the theory of error to cases of normal distribution and normal correlation, Phil. Trans. R. Soc. A 192:101–167, 1899. doi:10.1098/rsta.1899.0003