The Maximum Number of Triangles in a Graph of Given Maximum Degree

We prove that any graph on n vertices with max degree d has at most q (d+1 3 ) + (r 3 ) triangles, where n = q(d+1)+r, 0≤ r≤ d. This resolves a conjecture of Gan-Loh-Sudakov.


Introduction
Fix positive integers d and n with d + 1 ≤ n ≤ 2d + 1. Galvin [7] conjectured that the maximum number of cliques in an n-vertex graph with maximum degree d comes from a disjoint union K d+1 K r of a clique on d + 1 vertices and a clique on r := n − d − 1 vertices. Cutler and Radcliffe [4] proved this conjecture. Engbers and Galvin [6] then conjectured that, for any fixed t ≥ 3, the same graph K d+1 K r maximizes the number of cliques of size t, over all (d + 1 + r)-vertex graphs with maximum degree d. Engbers and Galvin [6]; Alexander, Cutler, and Mink [1]; Law and McDiarmid [11]; and Alexander and Mink [2] all made progress on this conjecture before Gan, Loh, and Sudakov [9] resolved it in the affirmative. Gan, Loh, and Sudakov then extended the conjecture to arbitrary n ≥ 1 (for any d).
Conjecture (Gan-Loh-Sudakov Conjecture). Any graph on n vertices with maximum degree d has at most q d+1 They showed their conjecture implies that, for any fixed t ≥ 4, any max-degree d graph on n = q(d + 1) + r vertices has at most q d+1 t + r t cliques of size t. In other words, considering triangles is enough to resolve the general problem of cliques of any fixed size.
The Gan-Loh-Sudakov conjecture (GLS conjecture) has attracted substantial attention. Cutler and Radcliffe [5] proved the conjecture for d ≤ 6 and showed that a minimal counterexample, in terms of number of vertices, must have q = O(d). Gan [8] proved the conjecture if d + 1 − 9 4096 d ≤ r ≤ d (there are some errors in his proof, but they can be mended). Using fourier analysis, the author [3] proved the conjecture for Cayley graphs with q ≥ 7. Kirsch and Radcliffe [10] investigated a variant of the GLS conjecture in which the number of edges is fixed instead of the number of vertices (with still a maximum degree condition).
In this paper, we fully resolve the Gan-Loh-Sudakov conjecture.
Theorem 1. For any positive integers n, d ≥ 1, any graph on n vertices with maximum degree d has at most q d+1 Analyzing the proof shows that qK d+1 K r is the unique extremal graph if r ≥ 3, and that qK d+1 H, for any H on r vertices, are the extremal graphs if 0 ≤ r ≤ 2.
The heart of the proof is the following Lemma, of independent interest, which says that, in any graph, we can find a closed neighborhood whose removal from the graph removes few triangles. Theorem 1 will follow from its repeated application. Lemma 1. In any graph G, there is a vertex v whose closed neighborhood meets at most d(v)+1 3 triangles.
As mentioned above, Theorem 1, together with the work of Gan, Loh, and Sudakov [9], yields the general result, for cliques of any fixed size.
Theorem 2. Fix t ≥ 3. For any positive integers n, d ≥ 1, any graph on n vertices with maximum degree d has at most q d+1 t + r t cliques of size t, where n = q(d + 1) + r, 0 ≤ r ≤ d.
Theorem 2 gives another proof of (the generalization of) Galvin's conjecture (to n ≥ 2d + 2) that a disjoint union of cliques maximizes the total number of cliques in a graph with prescribed number of vertices and maximum degree.
Finally, the author would like to point out a connection to a related problem, that of determining the minimum number of triangles that a graph of fixed number of vertices n and prescribed minimum degree δ can have. The connection stems from a relation, observed in [2] and [9], between the number of triangles in a graph and the number of triangles in its complement: Lo [12] resolved this "dual" problem when δ ≤ 4n 5 . His results resolve the GLS conjecture for regular graphs for q = 2, 3, and the GLS conjecture implies his results, up to an additive factor of O(δ 2 ), for q = 2, 3, and yields an extension of his results for q ≥ 4 -these are the optimal results asymptotically, in the natural regime of δ n fixed, and n → ∞.

Notation
Denote by E the edge set of G; for two vertices u, v, we write "uv ∈ E" if there is an edge between u and v and "uv ∈ E" otherwise -in particular, for any u, uu ∈ E.
Let Ω = {(z, u, v, w) : uv, uw, vw ∈ E and [zu ∈ E or zv ∈ E or zw ∈ E]}, Σ = {(x, u, v, w) : ux, vx, wx ∈ E}, and W = W (G). Note that repeated vertices in the 4-tuples are allowed. First observe that, since there are 6 ways to order the vertices of a triangle, ∑ v 6|T N[v] | = |Ω|. Any 4-tuple in Σ,W, or Ω gives rise to one of the induced subgraphs shown below, since one vertex must be adjacent to all the others. 3 , it thus suffices to show that for each of the induced subgraphs above, the number of times it comes from a 4-tuple in Σ is the sum of the number of times it comes from 4-tuples in Ω and W . Any fixed copy of A, say on vertices u and v, comes 0 times from a 4-tuple in Ω (since it has no triangles), and 2 times from each of W and Σ ((u, v, v, v), (v, u, u, u)). Any fixed copy of B, say on vertices u, v, w with vu, vw ∈ E, comes 0 times from Ω, and 6 times from each of W and Σ ((v, u, u, w), (v, u, w, u), (v, u, w, w), (v, w, u, u), (v, w, u, w), (v, w, w, u)). Any fixed copy of C comes 18 times from each of Ω and Σ (3 choices for the first vertex and then 6 for the ordered triangle), and 0 times from W . Similarly, any fixed copy of D comes 6 times from each of W and Σ, and 0 times from Ω; finally, F, H, I come 6, 12, 24 times, respectively, from each of Ω and Σ, and 0 times from W .
We now prove our key lemma, previously mentioned in the introduction. Lemma 1. In any graph G, there is a vertex v whose closed neighborhood meets at most d(v)+1