Lecture 10: Extremal I

October 8, 2020

() Lecture 10 October 8, 2020 1 What is extremal combinatorics

Extremal combinatorics deals with questions of the following form: given a graph G on n vertices, how big certain global invariants can be when G does not exhibit certain local substructures? What are the graphs without such local substructures that have maximal global invariants? The questions we will discuss: how many edges can G have if G does not have certain types of subgraphs. We start with the easiest such result. All graphs in these two lectures will be simple. Proposition 1. If G is a on n vertices, then G can have n2 ≤ 4 edges. Remark. This falls under the previous paradigm since G is bipartite if and only if G does not contain any polygon of odd length.

() Lecture 10 October 8, 2020 2 The maximal number of edges of a bipartite graph

Proof of the proposition. If G is a bipartite graph on n vertices, then we have disjoint subsets A and B of V (G), with k and n − k elements, such that every edge of G joins a vertex in A with a vertex in B. It follows that k + (n − k)2 n2 #E(G) ≤ k(n − k) ≤ = , 2 4 where the inequality is given by the inequality between the arithmetic and geometric means. Proof of the remark. The fact that a bipartite graph contains no polygon of odd length is clear. Suppose now that G contains no such polygon and let’s show that G is bipartite. By treating each connected component of G separately, we may assume G is connected. Fix a vertex v0 of G and let A and B be the subsets of V (G) that can be connected to v0 via a path of even (respectively, odd) length. We clearly have A ∪ B = V (G) and the hypothesis implies A ∩ B = ∅. Moreover, it implies that no two vertices in A (or B) can be neighbors in G. Hence G = G(A, B) is bipartite. () Lecture 10 October 8, 2020 3 Graphs with no triangles

With a bit more work, we can prove a stronger version of the previous result. Proposition 2 (Mantel, 1907). If G is a graph on n vertices that does not n2 contain any triangle, then #E(G) ≤ 4 .

Proof. Let m = #E(G). For every x ∈ V (G), let dx = deg(x). Given any two adjacent vertices x, y ∈ V (G), the hypothesis implies that x and y have no common neighbors. We thus have dx + dy ≤ n. Therefore X (dx + dy ) ≤ mn. {x,y}∈E(G)

On the other hand, we have

X X 2 (dx + dy ) = dx . {x,y}∈E(G) x∈V (G)

() Lecture 10 October 8, 2020 4 Graphs with no triangles, cont’d

Recall now that the Cauchy-Schwarz inequality says that for every a1,..., an and b1,..., bn, we have n ! n ! n !2 X 2 X 2 X ai · bi ≥ ai bi . i=1 i=1 i=1

By taking b1 = ... = bn = 1, we obtain n ! n !2 X 2 X n · ai ≥ ai . i=1 i=1 Applying this and our inequalities, we obtain  2 2 X 2 X 2 2 mn ≥ n · dx ≥  dx  = (2m) = 4m , x∈V (G) x∈V (G) hence m ≤ n2/4. () Lecture 10 October 8, 2020 5 Graphs with no triangles, cont’d

Remark. It follows from the proof of Proposition 2 that if G is as in the n2 proposition and m = 4 , then for every edge {x, y} in E(G), every vertex of G is a neighbor of precisely one of x and y. If A consists of the neighbors of x and B consists of the neighbors of y, since G contains no triangles, we see that G is the on A and B. If a = #A and b = #B, then n = a + b and #E(G) = ab = (a + b)2/4, hence a = b. Remark. If n is odd and G is a graph on n vertices that does not contain n2−1 any triangles, then it follows from Proposition 2 that #E(G) ≤ 4 . This is sharp, as can be seen by taking the complete bipartite graph Kk+1,k , n−1 where k = 2 . n2−1 Exercise. Show that in this case, too, if #E(G) = 4 , then G is isomorphic to Kk+1,k .

() Lecture 10 October 8, 2020 6 Graphs with no Kt+1

Next: we want to extend the result in Proposition 2, by asking what is the maximum number of edges for a graph on n vertices that does not contain any Kt+1, for some t ≥ 2 (recall: Kt+1 is the complete graph on t + 1 vertices).

How to construct graphs without any Kt+1: let V = V1 t ... t Vt . If we consider the graph G with V (G) = V and where the edges in G are given by all edges that connect vertices in different Vi , then G does not contain any Kt+1 (for any t + 1 vertices of G, two of them must lie in the same Vi by the pigeonhole principle).

Note: in this example, if di = #Vi , then #V = d1 + ... + dt and P #E(G) = i

() Lecture 10 October 8, 2020 7 Graphs with no Kt+1, cont’d

Let’s prove this fact when t divides n. In this case, we have

2 2 2 X (d1 + ... + dt ) − (d + ... + d ) d d = 1 t . i j 2 i

The Cauchy-Schwarz inequality gives

2 2 2 t · (d1 + ... + dt ) ≥ (d1 + ... + dt )

(it also says that equality holds iff d1 = ... = dt ). We thus conclude that

n2 X n2 − n2  1 d d ≤ t = 1 − i j 2 2 t i

(with equality iff di = n/t for all i).

() Lecture 10 October 8, 2020 8 Graphs with no Kt+1, cont’d The proof of the fact in the general setting (when t might not divide n is similar). Note that the condition di − dj ∈ {0, 1, −1} for all i and j uniquely determines the graph we constructed, up to isomorphism. Indeed, if n = tk + r, with r ∈ {0, 1,..., t − 1}, then after reordering the Vi , we may assume that di = k + 1 for 1 ≤ i ≤ r and di = k for r + 1 ≤ i ≤ t. The corresponding graph is the Tur´angraph Tn,t .

Remark. The number of edges of the Tur´angraph Tn,t is equal to n2  1 1 − + lower degree terms in n. (1) 2 t n This is immediate if t divides n: in this case every Vi has t elements, hence the number of edges is 1 n  n n2  1 t · · n − = 1 − . 2 t t 2 t Exercise. Prove the formula in (1) in general. () Lecture 10 October 8, 2020 9 P´alTur´an

P´alTur´anis another famous Hungarian mathematician, who lived 1910-1976. Worked mostly in number theory, but also in analysis and graph theory. He collaborated extensively with Paul Erd¨os. As a Jew, he could not get a university job for several years and was sent to labour service at various times between 1940-44. Peter Franks: “Mathematicians have only paper and pen, he doesn’t have anything in camp. So he created extremal combinatorics for which he did not need either.”

() Lecture 10 October 8, 2020 10 Tur´an’stheorem

Theorem (Tur´an). For every t ≥ 2, among all graphs on n vertices that contain no Kt+1, the graph Tn,t has the most edges; moreover, it is unique with this property. Proof. We argue by induction on t ≥ 2. For t = 2, we have seen that among the graphs on n vertices that contain no triangles, the unique one with the maximal number of edges is Kk,k (if n = 2k is even) or Kk+1,k if n = 2k + 1 is odd. We now consider t ≥ 3 and assume the theorem known for t − 1.

Let G be a graph on n vertices with no Kt+1 subgraphs. Choose v ∈ V (G) such that its degree dv := degG (v) is maximal. Let Sv ⊆ V (G) be the subset consisting of the neighbors of v (hence #Sv = dv ) and Tv = V (G) r Sv .

Clear: since v is a common neighbor of all vertices in Sv , the assumption on G implies that the subgraph of G spanned by Sv contains no Kt subgraph. () Lecture 10 October 8, 2020 11 Tur´an’stheorem

We now modify G to get a new graph G 0 with V (G 0) = V (G), as follows: • We keep all edges in E(G) between the vertices in Sv . • We add edges between the vertices in Sv and the vertices in Tv . • We remove all edges in E(G) between the vertices in Tv .

Claim. For every vertex w in V (G), we have degG 0 (w) ≥ degG (w). • This is clear if w ∈ Sv (we have only added some new edges incident to w). • If w ∈ Tv , then

degG 0 (w) = #Sv = dv ≥ degG (w), by the maximality in our choice of v. The claim, together with the formula relating the sum of the degrees with the number of edges gives

#E(G 0) ≥ #E(G).

() Lecture 10 October 8, 2020 12 Tur´an’stheorem

By induction hypothesis for the subgraph hSv i of G spanned by Sv :

#E(hSv i) ≤ #E(Tdv ,t−1).

0 Since G contains no edges between vertices in Tv and contains all edges between vertices in Sv and vertices in Tv , we conclude that

0 #E(G) ≤ #E(G ) = (#Tv ) · dv + #E(hSv i)

≤ (#Tv ) · dv + #E(Tdv ,t−1) ≤ #E(Tn,t ).

Furthermore, if #E(G) = #E(Tn,t ), then we see that in G already every vertex in Sv was adjacent to every vertex in Tv (otherwise, by the previous 0 computation #E(G ) > #E(G)). Moreover, Sv has to be isomorphic to

Tdv ,t−1. Since G contains no Kt+1, it follows that no vertices of Tv are adjacent in G. Hence G is constructed out of subsets V1,..., Vt . Maximality in the number of edges implies that G is isomorphic to Tn,t . () Lecture 10 October 8, 2020 13 The Erd¨os-Stonetheorem

We now consider the following general problem. Given a fixed graph H, estimate for large n the number ex(n, H) consisting of the maximum number of edges of a graph on n vertices that does not contain any graphs isomorphic to H. The answer is provided by the Erd¨os-Stonetheorem. Of course, this is not interesting if E(H) = ∅ (in which case every graph with n ≥ #V (H) vertices contains a subgraph isomorphic to H). Recall that the chromatic number χ(H) is the smallest number c such that the vertices of H can be colored with c colors such that no two adjacent vertices get the same color. Note that χ(H) = 1 if and only if #E(G) = ∅. Theorem (Erd¨os-Stone).For every (finite simple) graph H with E(G) 6= ∅ and for every  > 0, for n  0, we have

1  1  1  1  1 − −  n2 < ex(n, H) < 1 − +  n2. 2 χ(H) − 1 2 χ(H) − 1

() Lecture 10 October 8, 2020 14 The Erd¨os-Stonetheorem

Example. If H = Kt+1 (when χ(H) = t + 1), this matches the assertion given by Tur´an’stheorem, which gives

1  1 ex(n, K ) = 1 − n2 + lower order terms in n t+1 2 t

(depending on the residue of n when divided by t). Remark. The formula in the Erd¨os-Stonetheorem implies that if χ(H) ≥ 3, then

ex(n, H) 1  1  lim = 1 − > 0. n→∞ n2 2 χ(H) − 1

Hence we understand the behavior of ex(n, H) for n → ∞. The situation is more delicate when χ(H) = 2 (that is, for bipartite graphs), when we can only conclude that for every  > 0, we have ex(n, H) ≤ n2 for n  0. We will discuss some examples in the next lecture. () Lecture 10 October 8, 2020 15 Proof of the lower bound in Erd¨os-Stone

This part is easy: say χ(H) = k + 1. Since the Tur´angraph Tn,k has vertices in k disjoint sets, with neighbors being precisely vertices in different such subsets, it follows that χ(Tn,k ) = k. Since χ(H) = k + 1, we deduce that Tn,k has no subgraph isomorphic to H. We thus conclude that ex(n, H) ≥ #E(Tn,k ). We have seen that

1  1  #E(T ) = 1 − n2 + lower order terms in n n,k 2 k

(with the precise formula depending on the residue of n divided by t). It thus follows that given  > 0, we have

1  1  ex(n, H) ≥ #E(T ) > 1 − −  n2 for n  0. n,k 2 k

() Lecture 10 October 8, 2020 16 A lemma for the upper bound in Erd¨os-Stone

Lemma. Given positive integers k and t, and 0 <  < 1/k, for every graph G on n vertices, with n large enough (depending on k, t, and ) and 1 1  2 with m ≥ 2 1 − k +  n edges, there are disjoint subsets A1,..., Ak+1 of V (G), all of size t, such that any two vertices in two different Ai and Aj are neighbors in G. Proof. We first prove the following Claim: Given any p and every 0, with 0 < 0 < , if n is large enough, then for 1 1  2 every graph G on n vertices, with #E(G) ≥ 2 1 − k +  n , we can find a subgraph G 0 of G on ≥ p vertices, such that for every v ∈ V (G 0), we have   1 0 0 deg 0 (v) ≥ 1 − +  · #V (G ). G k We construct G 0 by successively removing the “bad” vertices.

() Lecture 10 October 8, 2020 17 A lemma for the upper bound in Erd¨os-Stone,cont’d

More precisely, we construct a sequence of subgraphs G1, G2,... of G = G0 as follows: if Gi has been constructed and it contains a vertex vi with deg (v ) < 1 − 1 + 0 · #V (G ), then we take G to be the subgraph Gi i k i i+1 of Gi spanned by V (Gi ) r {vi }; if there is no such vi , then we stop.

We need to show that if n  0, we can’t reach a subgraph G` such that 0 0 #V (G`) < n . If this is the case, note that q := #V (G`) = n − ` < n . In q(q−1) n02 this case, we have #E(G`) ≤ 2 < 2 . On the other hand, for every i ≥ 0, we have #E(Gi ) ≤  1   1  #E(G ) + 1 − + 0 · #V (G ) = #E(G ) + 1 − + 0 · (n − i). i+1 k i i+1 k By combining all these, we get #E(G) ≤

2 `−1 2 n0 X  1  n0  1  n(n + 1) q(q + 1) + 1 − + 0 ·(n−i) = + 1 − + 0 · − . 2 k 2 k 2 2 i=0

() Lecture 10 October 8, 2020 18 A lemma for the upper bound in Erd¨os-Stone,cont’d

Since q is bounded above and 0 < , this implies that for n large enough, we get 1  1  #E(G) < 1 − +  n2, 2 k a contradiction. This completes the proof of the claim. The claim implies that from now on (after possibly replacing  by a smaller value), we may assume that we have a graph on n vertices, such that 1  every vertex has degree ≥ 1 − k +  n. We show by induction on q, with 1 ≤ q ≤ k + 1, that for all t, if n  0, then we can find disjoint subsets A1,..., Aq of V (G), all of size t, such that any two vertices in two different Ai and Aj are neighbors in G. For q = k + 1, we obtain the assertion in the lemma.

() Lecture 10 October 8, 2020 19 A lemma for the upper bound in Erd¨os-Stone,cont’d

The assertion to prove is clear for q = 1, hence we may assume q ≥ 2. We 0 0 apply the induction hypothesis to get disjoint subsets A1,..., Aq of V (G), 0 0 all of size s = dt/e, such that any two vertices in two different Ai and Aj are neighbors in G. 0 0 Let U = V (G) r (A1 ∪ ... ∪ Aq) and consider

0 W = {v ∈ U | v has ≥ t neighbors in each Ai }.

We first show that we can make #W arbitrarily large by taking n  0. We bound in two ways the number N of missing edges in G between 0 0 U r W and A1 ∪ ... ∪ Aq. Since every vertex in U r W has < t neighbors 0 in some Ai , it follows that

N ≥ #(UrW )·(qs−t) = (n−qs−#W )·(qs−t) ≥ (n−qs−#W )s(q−).

() Lecture 10 October 8, 2020 20 A lemma for the upper bound in Erd¨os-Stone,cont’d

 1  On the other hand, since every vertex in G has degree ≥ 1 − q +  n neighbors, we have

 1   1  N ≤ #(A0 ∪ ... ∪ A0 ) · −  n = qsn −  = sn(1 − q). 1 q q q

We now combine the two inequalities involving N to get a lower bound for #W :

(q − )#W ≥ (n − qs)(q − ) − n(1 − q) = n( + 1)(q − 1) − qs(q − ).

Since q, , and s are fixed, we see that when we make n large enough, we may assume that #W is as large as we want. sq In particular, we may and will assume that #W > t (t − 1).

() Lecture 10 October 8, 2020 21 Proof of the upper bound in Erd¨os-Stone

We now make the following construction: for every w ∈ W , we choose t 0 neighbors of w in each of the Ai and let Γw be their union. sq Clearly, there are at most t such subsets Γw . By our condition on #W and the pigeonhole principle, we can find distinct w1,..., wt ∈ W such

that Γw1 = ... = Γwt = Γ. 0 If we put Aq+1 = {w1,..., wt } and let Ai = Γ ∩ Ai for 1 ≤ i ≤ q, we see that A1,..., Aq+1 all have size t, and any two vertices in two different Ai and Aj are neighbors in G. This completes the proof of the induction step for the assertion depending of q and thus the proof of the lemma.

() Lecture 10 October 8, 2020 22 Proof of the upper bound in Erd¨os-Stone

We can now prove the upper bound in the Erd¨os-Stonetheorem. Let k = χ(H) − 1 and t = #V (H). It follows the lemma that if n  0 and G 1 1  2 is a graph on n vertices and with m ≥ 2 1 − k +  n edges, we have disjoint subsets A1,..., Ak+1 of V (G) such that any two vertices in two different Ai , Aj are neighbors in G. Since χ(H) = k + 1, if we consider a coloring of H with colors 1,..., k + 1 and if we map the vertices colored by i to distinct vertices in Ai , then we see that G has a subgraph isomorphic to H. We thus have

1  1  ex(n, H) < 1 − +  n2 for n  0. 2 k

This completes the proof of the Erd¨os-Stonetheorem.

() Lecture 10 October 8, 2020 23 Reference

In the next lecture, we will consider in some examples the asymptotic behavior of ex(n, H) for certain bipartite graphs H.

For more on extremal graph theory, see Jacob Fox’s MIT course, available at http://math.mit.edu/˜ fox/MAT307

() Lecture 10 October 8, 2020 24