Documentation

CslibFrontier.Foundations.Combinatorics.SimpleGraph.MotzkinStraus

The Motzkin–Straus theorem #

For a finite simple graph G on a nonempty vertex type V with clique number ω(G), the maximum of the quadratic form x ⬝ᵥ G.adjMatrix K *ᵥ x over the standard simplex Convexity.StdSimplex K V equals 1 - 1 / ω(G) (note that [MS65] sums over unordered edges ∑_{ij ∈ E} x_i x_j = (1 / 2) * (x ⬝ᵥ G.adjMatrix K *ᵥ x), differing by a factor of 2). This generalizes the real Motzkin–Straus theorem (attributed to [MS65], cited from bibliographic metadata only without inspecting the published text) to any linearly ordered field K (including ℚ and ℝ); the K-generalization and the SimpleGraph.copositiveCliqueMatrix packaging below are original formulations of this library:

We also record the integer matrix SimpleGraph.copositiveCliqueMatrix G k with entries -1 on edges and k - 2 on non-edges and the diagonal, which is non-copositive iff k ≤ G.cliqueNum (SimpleGraph.exists_nonneg_dotProduct_copositiveCliqueMatrix_lt_zero_iff) for k ≥ 2 on a nonempty finite graph.

Main definitions #

Main results #

References #

Motzkin–Straus upper bound: on Convexity.StdSimplex K V, x ⬝ᵥ G.adjMatrix K *ᵥ x is at most 1 - 1 / G.cliqueNum (library generalization over arbitrary linearly ordered fields K; [MS65] was not inspected directly).

theorem SimpleGraph.exists_stdSimplex_quadraticForm_adjMatrix_eq_of_isNClique {V : Type u_1} {K : Type u_2} [Fintype V] [Field K] [LinearOrder K] [IsStrictOrderedRing K] (G : SimpleGraph V) [DecidableRel G.Adj] {S : Finset V} {k : ℕ} (hk : 1 ≤ k) (hS : G.IsNClique k S) :
∃ (x : Convexity.StdSimplex K V), ⇑x.weights ⬝ᵥ (adjMatrix K G).mulVec ⇑x.weights = 1 - 1 / ↑k

The uniform weight vector on a k-clique (1 ≤ k) gives a point of Convexity.StdSimplex K V achieving 1 - 1 / k.

The Motzkin–Straus theorem (library generalization to arbitrary linearly ordered fields K; [MS65] is cited at paper level without inspecting the published text): on a nonempty finite graph, the maximum of x ⬝ᵥ G.adjMatrix K *ᵥ x over Convexity.StdSimplex K V equals 1 - 1 / G.cliqueNum. Note that [MS65] maximizes ∑_{ij ∈ E} x_i x_j = (1 / 2) * (x ⬝ᵥ G.adjMatrix K *ᵥ x), giving (1 / 2) * (1 - 1 / ω(G)) (differing by a factor of 2).

The Motzkin–Straus theorem over ℝ in sSup form (attributed to [MS65]; the published text is uninspected, and [MS65] includes a factor of 1 / 2 from summing over unordered edges).

Copositive matrix characterization of the clique number #

The symmetric integer matrix (k - 2) J - (k - 1) A_G (library packaging for the clique reduction): entries are -1 on edges of G and k - 2 on non-edges and the diagonal. For k ≥ 2 on a nonempty finite graph, this matrix fails to be copositive iff G has a k-clique.

@[simp]
theorem SimpleGraph.copositiveCliqueMatrix_apply {V : Type u_1} (G : SimpleGraph V) [DecidableRel G.Adj] (k : ℕ) (u v : V) :
G.copositiveCliqueMatrix k u v = if G.Adj u v then -1 else ↑k - 2
theorem SimpleGraph.dotProduct_copositiveCliqueMatrix {V : Type u_1} {K : Type u_2} [Fintype V] [CommRing K] (G : SimpleGraph V) [DecidableRel G.Adj] (k : ℕ) (x : V → K) :
x ⬝ᵥ ((G.copositiveCliqueMatrix k).map Int.cast).mulVec x = (↑k - 2) * (∑ v : V, x v) ^ 2 - (↑k - 1) * x ⬝ᵥ (adjMatrix K G).mulVec x

On any vector, x ⬝ᵥ M *ᵥ x = (k - 2) * (∑ x_v)^2 - (k - 1) * (x ⬝ᵥ A_G *ᵥ x).

theorem SimpleGraph.exists_nonneg_dotProduct_copositiveCliqueMatrix_lt_zero_iff {V : Type u_1} {K : Type u_2} [Fintype V] [Field K] [LinearOrder K] [IsStrictOrderedRing K] (G : SimpleGraph V) [Nonempty V] [DecidableRel G.Adj] {k : ℕ} (hk : 2 ≤ k) :
(∃ (x : V → K), (∀ (v : V), 0 ≤ x v) ∧ x ⬝ᵥ ((G.copositiveCliqueMatrix k).map Int.cast).mulVec x < 0) ↔ k ≤ G.cliqueNum

For k ≥ 2 on a nonempty finite graph, copositiveCliqueMatrix G k is non-copositive iff G has a clique of size k.