Many cliques with few edges

Recently Cutler and Radcliffe proved that the graph on $n$ vertices with maximum degree at most $r$ having the most cliques is a disjoint union of $\lfloor n/(r+1)\rfloor$ cliques of size $r+1$ together with a clique on the remainder of the vertices. It is very natural also to consider this question when the limiting resource is edges rather than vertices. In this paper we prove that among graphs with $m$ edges and maximum degree at most $r$, the graph that has the most cliques of size at least two is the disjoint union of $\bigl\lfloor m \bigm/\binom{r+1}{2} \bigr\rfloor$ cliques of size $r+1$ together with the colex graph using the remainder of the edges. We have conjectured that in fact this graph has the largest number of $K_t$'s for all $t \ge 2$ under the same conditions.


Introduction
There has been a lot of recent work on the general problem of determining which graphs have the most cliques subject to natural "resource limitations" and additional constraints. Most of the early work focused on vertices as resources, and added other conditions. There are results about n-vertex graphs of maximum degree at most r [2,9], n-vertex graphs containing no K r+1 [14], and many related results concerning the number of independent sets in graphs [5,8].
In this paper we consider results for which the resource is edges. We fix the number of edges in the graph, possibly impose other conditions, and ask which graph has the largest number of cliques.
Since we are putting no constraint on the number of vertices, the simplest version of the problem is that of determining max k(G) : G has m edges , where we write k t (G) for the number of cliques in G of size t and k(G) = t≥2 k t (G) for the number of cliques in G of size at least 2. This question is straightforward to answer. The 10] easily shows that this maximum is achieved when G = C(m); the colex graph having m edges. This is the graph on vertex set N whose edges are the first m in the colexicographic (colex) order on pairs. Proposition 1 ( [12,10]). For t ≥ 2, if a graph G has m edges, then k t (G) ≤ k t (C(m)).
Radcliffe and Uzzell noted that it is a straightforward consequence of the "rainbow Kruskal-Katona Theorem" of Frankl, Füredi, and Kalai [6], together with an important result of Frohmader [7] that max k(G) : G has m edges and contains no K r+1 , is achieved by the r-partite colex-Turán graph CT r (m). For more details see [13].

Main Result.
In this paper we consider the next most natural problem in this area. We determine f (m, r) = max{ k(G) : G has m edges and ∆(G) ≤ r}. Indeed we show that the maximum is attained by a graph made up of as many copies of K r+1 as it is possible to build with m edges, together with an additional component (possibly empty) that is a colex graph on strictly fewer than r+1 2 edges. For convenience we give a name to value of k of this graph. Defining a and b by m = a r+1 It is possible to describe the last term more carefully. For any 0 consists of a clique of size c, together with another vertex joined to d vertices of the clique. We have Thus our main theorem is as follows.
with equality if and only if G = aK r+1 ∪ C(b).
In [11], we conjectured the following refinement of this main theorem.
Conjecture 2. For any t ≥ 3, if G is a graph with m edges and maximum degree at most r, then where m = a r+1 2 + b and 0 ≤ b < r+1 2 . We proved this conjecture when t = 3 and r ≤ 8.

Theorem 3 ([11]
). For any r ≤ 8, if G is a graph with m edges and maximum degree at most r, then where m = a r+1 2 + b and 0 ≤ b < r+1 2 . Our proof of the main theorem combines several "local moves" (alterations to a potentially optimal graph demonstrating that a closely related graph would have a strictly larger value of k) and a final global averaging argument, applicable to any graph not containing a K r+1 to which none of the local moves apply.
Our initial analysis of the structure of a potentially optimal graph is to consider tight cliques. A clique, of size t say, is tight if its vertices have r + 1 − t common neighbors. A maximal tight clique we call a cluster. We expect that optimal graphs will have many tight cliques. A cluster of size r + 1 is simply a K r+1 component in G, and if such a cluster exists we can apply induction on m. Most of our proof involves considering the possible structures and relationships of clusters.
In Section 2 we outline the basic properties of clusters. In Section 3 we discuss the various local alterations we will attempt to do on a potentially optimal graph. All are variants of an operation we call folding, which was introduced in a slightly different context in [2] and also used in [3] and [11]. If we can establish that the folded graph has no more edges and no higher maximum degree than before, and k has strictly increased, then we can eliminate G as a potentially optimal graph. In Section 4 we describe the final ingredients of the proof, and in Section 5 we prove our Main Theorem. We finish in Section 6 by describing some open problems in the area.

Clusters
One way to think about counting the number of cliques in a graph G containing m edges, is to count how the 3-cliques are made up of 2-cliques, how the 4-cliques are made up of 3-cliques, and so on. Clearly each t-clique contains t (t − 1)-cliques, and equally easily each t-clique K is contained in |N (K)| (t + 1)-cliques, where N (K) is the set of common neighbors of K. Thus, for G with maximum degree at most r to have many cliques it seems likely that many of its cliques must have as large a common neighborhood as possible. This prompts the following definitions.
Definition 4. If G is a graph of maximum degree at most r and T ⊆ V (G) is a clique satisfying |N (T )| = r + 1 − |T | we say that T is tight. If T is a maximal tight clique we say it is a cluster.
For a cluster T we can analyze the graph locally as consisting of T , its neighbors, and connections to the rest of the graph. The following definition establishes our notation and conventions.
Definition 5. Suppose that G is a graph with ∆(G) ≤ r and T ⊆ V (G) is a cluster. We let S T = N (T ) and let B T be the graph of edges uv such that u ∈ S T and v ∈ V (G) \ (T ∪ S T ). We define R T = G[S T ], i.e., the graph on S T whose edges are those not in G. We think of the missing edges R T as red edges, and the edge B T from the cluster to the rest of the graph as blue edges. When the risk of confusion is low we will simply refer to T , S, B, and R. Note that since G has maximum degree at most r we know that for all vertices T S Figure 1. A cluster and its neighborhood Lemma 6. Let G be a graph with maximum degree at most r.
(1) Two vertices x, y ∈ V (G) of degree r belong to some common tight clique precisely if In particular the relation of belonging to some common tight clique is an equivalence relation on vertices of degree r. The clusters of G are disjoint and are the equivalence classes. (2) An edge can be incident to at most two clusters.
(3) An edge e that is not tight (equivalently, that is not in a cluster) has k t (e) ≤ r−2 t−2 for every t ≥ 2.

Local Moves
In this section we define three ways to alter a potentially extremal graph G when it has a cluster T with certain properties. We call these local moves folding, colex folding, and partial folding. In addition we use colex folding (Subsection 3.2) and partial folding (Subsection 3.3) to show that graphs with certain types of clusters are not extremal.
Definition 7. Suppose that G ∈ G(m, r) and T ⊆ V (G) is a cluster. The folding of G at T is the new graph G T formed by converting T ∪ S into a clique (of size r + 1) and deleting all the blue edges. In other words we define The folded graph G T also has maximum degree at most r as d B (x) ≤ d R (x) for all x ∈ S. Nevertheless, for some clusters T , G T may not be in G(m, r): if e(B) < e(R), then e(G T ) > e(G). Thus we consider folding only when e(B) ≥ e(R). Ignoring this limitation, we define unfoldable clusters as those with k(G) ≥ k(G T ). It turns out that unfoldable clusters are not very good for maximizing the number of cliques, so in Subsection 4.1 we give conditions implied by unfoldability, rather than giving conditions to show when folding is useful.

Colex Folding.
Colex folding is a natural variant of folding to consider when e(B) < e(R).
The colex folding of G at T is the new graph G ′ formed by converting T ∪ S and E(B) into a colex graph with the same number of edges. In other words we define By construction e(G ′ ) = e(G). When e(B) < e(R), the number of edges in the new colex component is less than r+1 2 , so no vertex will have degree greater than r, and G ′ ∈ G(m, r). We will show that if some cluster T in G has e(B) < e(R) ≤ r, then k(G) < k(G ′ ). First we prove a series of statements to bound the number of blue cliques lost in the colex folding operation and to help us use the bound.
Proposition 9. For any cluster T and t ≥ 2, the number of blue K t 's is at most e(B) t−1 . Proof. Given a t-clique C that contains a blue edge, its blue edges form a spanning and connected (indeed, complete bipartite) subgraph of C, so C has a blue spanning tree. This map from blue K t 's to (t − 1)-sets of blue edges is an injection.
Lemma 10. For u, q ∈ N such that q 2 ≤ u and t ≥ 2, Proof. By Pascal's identity, this inequality is equivalent to We can change G 1 to G 2 by deleting one vertex of the K q+1 and adding its q edges to the colex component.
In K q+1 there are q t−1 K t 's that contain a given vertex; these are the K t 's lost. We show that at least q t−1 K t 's are gained by considering two cases based on c and d defined by In this case, the q new edges form a star in the colex component. They contribute q t−1 new K t 's from this star alone.
In this case, the q new edges do not form a star in the colex component; they complete the next largest clique and then add a new vertex. The assumption that q 2 ≤ u implies that q ≤ c, so only one new vertex is added. Let q 1 = c − d (the number of edges to complete the next clique) and q 2 = q − q 1 = q − c + d (the degree of the new vertex). Note q 2 ≤ d. In completing the first clique we add d t−2 + d+1 t−2 + · · · + c−1 t−2 K t 's. Then the edges incident to the new vertex add Theorem 11. Suppose that G ∈ G C (m, r) and T is a cluster in G with e(B) < e(R) ≤ r. Let G ′ be the colex folding of G at T . Then G ′ ∈ G(m, r) and, for every t ≥ 2, k t (G ′ ) ≥ k t (G).
Corollary 12. Suppose that G ∈ G C (m, r) and T is a cluster in G with e(B) < e(R) ≤ r. Let G ′ be the colex folding of G at T . Then G ′ ∈ G(m, r) and k(G ′ ) ≥ k(G).
3.3. Partial Folding. Partial folding is a simpler variant of folding, first used in [11], to consider when e(B) < e(R). For a graph G ∈ G C (m, r) and T ⊆ V (G) a cluster, a partial folding of G at T is a graph obtained from G by deleting all blue edges and adding any e(B) of the red edges. The resulting graph is always in G(m, r). The following lemma shows that if some cluster T in G has e(B) < e(R) and |T | ≥ r−1 2 , then k(G) would be increased by a partial folding of G at T .
Lemma 13. Suppose that G ∈ G C (m, r) and T is a tight clique in G with |T | ≥ r−1 2 and e(B) < e(R). Let G ′ be a partial folding of G at T . Then G ′ ∈ G(m, r) and k(G ′ ) > k(G).
Proof. The loss from deleting the blue edges is at most 2 s−2 e(B): for each blue edge uv with v ∈ S, v has s − 1 − d R (v) neighbors in S and at most d R (v) − 1 neighbors in V (G) \ (T ∪ S) other than u.
In total, u and v have at most s − 2 common neighbors, and any subset of them forms one clique containing uv.
The number of cliques gained from adding any one red edge is at least 2 |T | , one for each subset of T . Therefore the net gain is at least 2 |T | e(R)−2 s−2 e(B) > (2 |T | −2 s−2 )e(R) ≥ 0 since |T | ≥ r−1 2 .

Averaging
In this section we consider the graphs in which every cluster either is unfoldable or is small and has many edges missing from its neighborhood. This includes the graphs in which there are no clusters. We use an averaging argument to show that these graphs are not extremal.

Fixed loss and unfoldable clusters.
To handle unfoldable clusters, we will use prior technical results about the fixed loss, from [2], to show that they have a large number of incident edges of low weight. Theorem 15 ( [2]). If R is a graph on s vertices then The following lemma appears in [2] in an incorrect form. The following version is correct. The corrected proof is available in [4].

Lemma 16 ([4]). If T is a cluster in
The following theorem and proof were slightly modified from [2].
Theorem 17. Let R be a graph on s vertices having ℓ vertices of degree one. Then Proof. Let L be the set of vertices of degree one. We split up the sum computing φ(R) into two parts, the contributions of independent sets containing an element of L and the rest. To this end, let To bound the first term, we consider two cases. If R does not contain a K 2 component, then observe This follows from the fact that no vertex of L is adjacent to any other and therefore, given any nonempty subset L ′ of L, at least one vertex of R \ L is excluded from I. So there are at most 2 s−ℓ−1 independent sets contributing to φ ′ (R) of the form L ′ ∪ J where L ∩ J = ∅. Otherwise, R contains a K 2 component xy. No independent set of R contains both x and y, and the independent sets containing x are in bijection with those containing y. Therefore On the other hand, writing The fifth step above follows as in the proof of Theorem 15 and the final step uses the convexity of 2 x on the first term and ignores the second. Combining these bounds, we have Lemma 18. Let r ≥ 3 and 3 ≤ t ≤ r + 1. If T is a cluster in G and k(G T ) ≤ k(G), then there are at least 2 |T | 2 edges e incident to T with k t (e) ≤ r−3 t−2 . Proof. We will show that there are at least |T | − 1 vertices v in S with d R (v) ≥ 2. We let ℓ be the number of vertices of R of degree one. If ℓ ≥ s − |T | + 2, then by Theorem 17, we would have φ(R) ≤ 5 · 2 s−2 + (|T | − 4)2 |T |−3 . Note that this would imply by Lemma 16. By the convexity of 2 x , since 2 ≤ |T | ≤ r − 1, we have 2 |T | + 2 r+1−|T | ≤ 2 2 + 2 r−1 , and a contradiction for r ≥ 4. When r = 3, we also have |T | = 2, contradicting 2 r − 2 |T | ≤ 5 · 2 r−1−|T | + (|T | − 4)2 |T |−3 . Let h be the number of vertices in R of degree at least two. Having shown that ℓ ≤ s − |T | + 1, we know that h ≥ |T | − 1. There are |T |h ≥ 2 |T | 2 edges xy with x ∈ T , y ∈ S, and d R (y) ≥ 2, so Averaging calculations. We will write E 1 for the set of tight edges and let E 2 = E(G) \ E 1 .
Lemma 19. If every cluster T in G ∈ G(m, r) has |T | ≤ r 2 , then less than half the edges of G are tight.
Proof. Let C be the set of clusters in G. By Lemma 6, each tight edge is in exactly one cluster, so By Lemma 6, an edge is incident to at most two clusters. By counting in two ways the pairs (e, T ) where e ∈ E 2 is incident to the cluster T , |E 2 | ≥ 1 2 T ∈C |T |(r + 1 − |T |).
Lemma 20. If every cluster T in G ∈ G C (m, r) either (1) is unfoldable, i.e, k(G) ≥ k(G T ), or (2) has e(R) ≥ r − 2, then for every t ≥ 4, Proof. For every edge e, we will define a modified version of k t (e). We let u e be 1 if e belongs to an unfoldable cluster and 0 otherwise. We let u ′ e be the number of unfoldable clusters to which e is incident if k t (e) ≤ r−3 t−2 and 0 otherwise. We set We show for all edges in G that k ′ t (e) ≤ r−2 t−2 . Suppose first that k t (e) ≤ r−3 t−2 . Note u e ≥ 0 and, by Lemma 6, u ′ e ≤ 2. For these edges we have (2 r + r 2 /12 − 13r/12 − 1).
For fixed r and b, the left side of this inequality is a linear function of a. For r ≥ 7, we will show that the inequality holds when a = 1, which implies from the special case b = 0 that its slope is positive and therefore that the inequality holds for a ≥ 1.

Proof of the Main Theorem
Main Theorem. For all m, r ∈ N, write m = a r+1 If G is a graph on m edges with ∆(G) ≤ r, then with equality if and only if (disregarding isolated vertices) G = aK r+1 ∪C(b) or G = aK r+1 ∪K c ∪K 2 (where b = c 2 + 1). Proof. We disregard isolated vertices because they do not affect the number of edges, maximum degree, or number of cliques. For r = 1, the theorem is trivial as mK 2 is the only possible graph. For r = 2, it is almost as trivial, as we have k(G) ≤ m + a. The graphs G ∈ G(m, 2) that achieve equality have k 3 (G) = a so are G = aK r+1 ∪ C(b) and, when b = 2, G = aK 3 ∪ 2K 2 .
For r ≥ 3, we use induction on m. The Kruskal-Katona Theorem (Proposition 1) implies the theorem for m ≤ r+1 2 , i.e. a = 0. By Lemma 11 of [11] and a proof similar to that of Corollary 12 of [11], if G is disconnected, then k(G) ≤ k(aK r+1 ∪C(b)), with equality if and only if G = aK r+1 ∪C(b) (or, if d = 1, G = aK r+1 ∪ K c ∪ K 2 ). Henceforth we assume G is connected.
If G contains a cluster T of any of the following types, then we use a local move to show G is not extremal: (1) k(G) < k(G T ) and e(B) ≥ e(R): then the folding of G at T shows G is not extremal, since G T ∈ G(m, r). (2) e(B) < e(R) ≤ r: then by Corollary 12, the colex folding G ′ of G at T has at least as many cliques as G and is disconnected. If k(G) = k(G ′ ) = f (m, r), then G ′ = aK r+1 ∪ C(b) (or, if d = 1, G ′ = aK r+1 ∪ K c ∪ K 2 ). This is impossible because G was connected, so G ′ cannot contain a K r+1 . Therefore G is not extremal. (3) e(B) < e(R) and |T | ≥ r−1 2 : then a partial folding of G at T shows G is not extremal, by Lemma 13. Otherwise, each cluster of G has none of the above types, so has either (1) k(G) ≥ k(G T ), or (2) e(R) ≥ r + 1 and |T | ≤ r−2 2 . In this case, Theorem 22 shows G is not extremal.

Open Problems
As mentioned in the abstract, the problem of determining the maximum number of copies of K t among m-edge graphs with maximum degree at most r is still open in general. Conjecture 2 states that the extremal graphs are the same as for the total cliques problem. There is a broad class of similar problems where one determines mex T (m, F ) = max{n T (G) : G is a graph with m edges not containing a copy of F }, where n T (G) is the number of copies of T in G. Conjecture 2 concerns mex Kt (m, K 1,r+1 ). There are many natural problems of this form. They are the edge analogues of the problems introduced by Alon and Shikhelman in [1]. They define ex T (n, F ) = max{n T (G) : G is a graph on n vertices not containing a copy of F } and solve many problems of this form.

Acknowledgments
We thank Stijn Cambie for helpful discussions that improved the paper.