Goemans–Williamson random-hyperplane rounding for MAX-CUT #
This module formalizes the analysis of the Goemans–Williamson algorithm for weighted maximum cut
[GoemansWilliamson1995, Sections 2 and 3]: given unit vectors that are optimal, or ε-optimal,
for the semidefinite relaxation of MAX-CUT, cutting along a random hyperplane through the origin
gives a cut whose expected weight is at least α times the weight of every cut, minus α ε,
where α = Real.goemansWilliamsonConstant > 0.87856.
Model #
A weighted multigraph is a finite type ι of edges, endpoints ends : ι → V × V and real weights
w : ι → ℝ. A cut is a side assignment side : V → Bool; its weight cutValue ends w side is the
total weight of the edges whose endpoints lie on different sides. Self-loops never cross and
parallel edges add their weights. The semidefinite relaxation assigns a vector v i of a real
inner product space F to each vertex; its objective is
sdpValue ends w v = ∑ e, w e * (1 - ⟪v (ends e).1, v (ends e).2⟫) / 2, maximized over
assignments of unit vectors. This is the relaxation (P) of [GoemansWilliamson1995, Section 2],
whose sum over pairs i < j is a sum over edges here. For a unit vector u, the assignment
signVector u side sends the two sides of a cut to u and -u; its objective is the weight of
the cut (sdpValue_signVector), so the relaxation's optimum is at least the maximum cut.
Algorithm and source mapping #
Random-hyperplane rounding draws a standard Gaussian vector r of F and puts vertex i on the
side hyperplaneSide v r i = decide (0 ≤ ⟪v i, r⟫). The source draws r uniformly from the unit
sphere and uses S = {i | v i · r ≥ 0}; the side of each vertex depends only on the direction of
r, and the standard Gaussian is rotation invariant, so the two models agree. Here the rounding
is analyzed under Mathlib's exact ProbabilityTheory.stdGaussian on a finite-dimensional F, as
in the source, and the expected weight of the rounded cut is the integral
∫ r, cutValue ends w (hyperplaneSide v r) ∂stdGaussian F.
- Lemma 3.2 of the source, that a random hyperplane separates unit vectors
uandvwith probabilityarccos ⟪u, v⟫ / π, is Sheppard's formulaProbabilityTheory.measureReal_stdGaussian_zero_mem_uIoc_eq_arccos. - Theorem 3.1 is
integral_cutValue_hyperplaneSide. - Theorem 3.3 is
goemansWilliamsonConstant_mul_sdpValue_le_integral, from Lemma 3.4 (Real.goemansWilliamsonConstant_mul_le_arccos). - The approximation guarantee against the maximum cut, which the source draws from Theorem 3.3 and
the fact that the relaxation's optimum is at least the maximum cut, is
goemansWilliamsonConstant_mul_sub_le_integralforε-optimal vectors andgoemansWilliamsonConstant_mul_cutValue_le_integralfor optimal ones. WithReal.lt_goemansWilliamsonConstant(Lemma 3.5), the ratio exceeds0.87856.
An optimal assignment of unit vectors exists in every nontrivial F
(exists_isMaxOn_sdpValue): the objective depends on finitely many coordinates and the
assignments of unit vectors form a compact set. For the guarantee, F may have any dimension;
the source uses dimension n, the number of vertices, where an optimal solution of the
semidefinite program is a Gram matrix of vectors.
The bridge to the weighted Cslib.Complexity.MaxCut problem and its
Cslib.Complexity.MaxCut.cutWeight is in
CslibFrontier.Algorithms.Lean.MaxCut.GoemansWilliamsonCutWeight, so that this module does not
depend on the machine-level complexity of MaxCut.
Limitations #
The theorem analyzes the rounding of a given vector solution under an exact Gaussian. Solving the
semidefinite program to precision ε in polynomial time, a finite-precision or ProbComp
realization of the Gaussian sample, the tightness of the analysis (the integrality gap of Feige and
Schechtman, Karloff's examples), and derandomization are not formalized; see
CslibFrontier.Algorithms.Lean.MaxTwoSAT.GoemansWilliamson and
CslibFrontier.Algorithms.Lean.MaxDicut.GoemansWilliamson for the MAX-2SAT and MAX-DICUT
extensions.
Main definitions #
Cslib.Algorithms.Lean.MaxCut.cutValue: the weight of a cut.Cslib.Algorithms.Lean.MaxCut.sdpValue: the objective of the semidefinite relaxation.Cslib.Algorithms.Lean.MaxCut.hyperplaneSide: the cut along the hyperplane orthogonal tor.Cslib.Algorithms.Lean.MaxCut.signVector: the vector solution of a cut.
Main results #
integral_cutValue_hyperplaneSide: the expected weight of the rounded cut is∑ e, w e * arccos ⟪v (ends e).1, v (ends e).2⟫ / π[GoemansWilliamson1995, Theorem 3.1].goemansWilliamsonConstant_mul_sdpValue_le_integral: it is at leastαtimes the relaxation's objective [GoemansWilliamson1995, Theorem 3.3].sdpValue_signVector,cutValue_le_sdpValue_add: the relaxation's objective at a cut's vector solution is the cut's weight, soε-optimal vectors have objective at least every cut's weight minusε.goemansWilliamsonConstant_mul_sub_le_integral,goemansWilliamsonConstant_mul_cutValue_le_integral: the Goemans–Williamson guarantee against every cut, hence against the maximum cut.exists_forall_goemansWilliamsonConstant_mul_sub_le: some hyperplane cut achieves the guarantee.exists_isMaxOn_sdpValue: the relaxation has an optimal solution.measurable_hyperplaneSide,measurableSet_hyperplaneSide_ne,measurableSet_hyperplaneSide_eq,integrable_ite_const,integral_hyperplaneSide_ne,integral_hyperplaneSide_eq,goemansWilliamsonConstant_mul_one_add_le_one_sub_arccos: measurability, indicator integrability, separation/same-side Gaussian integrals, and same-side Lemma 3.4 bound reused by the §7 extensions.
References #
Cuts, the relaxation and rounding #
The weight of the cut side of the weighted multigraph with endpoints ends and weights w:
the total weight of the edges whose endpoints lie on different sides.
The objective ∑ e, w e * (1 - ⟪v (ends e).1, v (ends e).2⟫) / 2 of the semidefinite
relaxation of MAX-CUT at the vector assignment v [GoemansWilliamson1995, Section 2].
Random-hyperplane rounding: vertex i goes on side true when ⟪v i, r⟫ ≥ 0, so the cut is
S = {i | v i · r ≥ 0} of [GoemansWilliamson1995, Section 2].
The vector solution of the cut side: the vertices on side true get u and the others
-u.
Two vertices are separated by the hyperplane orthogonal to r exactly when 0 lies between
⟪v i, r⟫ and ⟪v j, r⟫, the event of Sheppard's formula.
Each vector of a cut's vector solution is a unit vector when u is.
The relaxation's objective at a cut's vector solution is the cut's weight.
ε-optimal vectors beat every cut up to ε. If the unit vectors v are within ε of
optimal for the relaxation, then their objective is at least the weight of every cut minus ε.
This needs no assumption on F beyond containing the unit vectors v.
The expected weight of the rounded cut #
The hyperplane side hyperplaneSide v r i is a measurable function of r.
The event that the hyperplane orthogonal to r separates two vertices is measurable.
The event that the hyperplane orthogonal to r puts two vertices on the same side is
measurable.
An if-then-else indicator with constant value c on a measurable predicate is integrable
under any finite measure.
The weight of the rounded cut is integrable.
Goemans–Williamson, Theorem 3.1. For unit vectors v, the expected weight of the cut
along the hyperplane orthogonal to a standard Gaussian vector is
∑ e, w e * arccos ⟪v (ends e).1, v (ends e).2⟫ / π [GoemansWilliamson1995, Theorem 3.1]. The
weights may have any sign.
Probability that two unit vectors fall on opposite sides of a standard Gaussian hyperplane.
Probability that two unit vectors fall on the same side of a standard Gaussian hyperplane.
Same-side rounding inequality: α · (1 + ⟪u, w⟫) / 2 ≤ 1 - arccos ⟪u, w⟫ / π for unit
vectors u and w [GoemansWilliamson1995, Lemma 3.4].
Goemans–Williamson, Theorem 3.3. For unit vectors v and nonnegative weights, the
expected weight of the rounded cut is at least α times the relaxation's objective at v
[GoemansWilliamson1995, Theorem 3.3].
The approximation guarantee #
The Goemans–Williamson guarantee for ε-optimal vectors. If the unit vectors v are
within ε of optimal for the relaxation and the weights are nonnegative, then the expected weight
of the rounded cut is at least α times the weight of every cut minus ε
[GoemansWilliamson1995, Section 3]. Taking side to be a maximum cut, the expected weight is at
least α (OPT - ε), with α > 0.87856 (Real.lt_goemansWilliamsonConstant).
The Goemans–Williamson guarantee. If the unit vectors v maximize the relaxation and the
weights are nonnegative, then the expected weight of the rounded cut is at least α times the
weight of every cut, in particular of a maximum cut [GoemansWilliamson1995, Section 3].
Some hyperplane achieves the guarantee. Under the hypotheses of
goemansWilliamsonConstant_mul_sub_le_integral, some hyperplane cut has weight at least α times
the weight of every cut minus ε.
The relaxation has an optimal solution. In a nontrivial finite-dimensional F, some
assignment of unit vectors maximizes the relaxation's objective. The vertex type may be infinite:
the objective depends only on the endpoints of the finitely many edges.