Contents / Combinatorics / Extremal Graph Theory
Chapter 7
Extremal Graph Theory
The extremal function ex(n,H): Mantel and Turán with proofs and the unique extremal graph, supersaturation and stability, Kővári–Sós–Turán and Erdős–Stone, and the regularity and removal lemmas behind Roth, Szemerédi and Green–Tao.
Introduction
How many edges a graph can carry before a forbidden subgraph is forced: the extremal function, Turán's theorem and its extremal graph, the bipartite and asymptotic theories, and the density theorems of Roth and Szemerédi that grew out of the same question.
7.1The Extremal Function and Mantel's Theorem
Extremal graph theory asks one question in many costumes: how large can a structure be if it avoids something? The structure is a graph, the size is its number of edges, and the thing avoided is a fixed graph . The whole subject is organised around a single function.
Definition 7.1 (Subgraph containment). A graph contains , written , if some subgraph of is isomorphic to ; equivalently, if there is an injection with whenever . If no such injection exists, is -free.
Pitfall. Containment here is not induced containment. The injection must carry edges of to edges of , but it is allowed to carry non-edges of to edges of as well. So contains (take any four vertices), and " -free" therefore means "no four vertices carry a cycle of length four", not "no four vertices induce exactly a -cycle". Induced containment is a different and generally harder theory.
Definition 7.2 (The extremal function). For a graph and an integer , the extremal number (or Turán number) of is
Two trivial values fix the scale. If is a single edge, an -free graph has no edges at all, so . If has more than vertices then no -vertex graph can contain it and . Everything interesting happens between these extremes, and the first structural fact is that the density of the extremal graph can only fall as grows.
Proposition 7.3 (The extremal density is non-increasing). For every graph and every ,
Proof. Let be -free on vertices with edges. For each vertex the graph is again -free — deleting vertices cannot create a subgraph — and has vertices, so .
Now count the pair where is an edge of . Every edge of survives the deletion of exactly of the vertices, so
The limit exists for every , which is a strong statement given that the exact value of is known for only a handful of graphs. The rest of this chapter is largely the story of computing and, where possible, the exact function behind it.
The first genuine theorem of the subject is over a century old and is still the cleanest illustration of the pattern: a construction, a matching upper bound, and a uniqueness statement.
Theorem 7.4 (Mantel's theorem). (Mantel, 1907) Every triangle-free graph on vertices has at most edges, so
Proof. The construction. Split into parts , with , and join every vertex of to every vertex of . A triangle would need two of its vertices in the same part, but parts carry no edges, so the graph is triangle-free; it has edges. (For a split into parts of sizes and the edge count is , a downward parabola in maximised at ; among integers the maximum is at .)
The bound. Let be triangle-free. If then and have no common neighbour, so . Summing over all edges and grouping by vertex,
Uniqueness. Equality forces equality in Cauchy–Schwarz, so all degrees are equal, say to , and forces on every edge, so — which already needs even — and . A triangle-free graph in which adjacent vertices have disjoint neighbourhoods covering all of is exactly a complete bipartite graph with parts and . For odd the count is reached by , and the same argument applied to a maximum-degree vertex identifies it as the only extremal graph. (The general uniqueness statement is proved for all in Turán's theorem.)∎
A second proof is worth seeing because it generalises in a different direction — it is really a statement about independent sets, and it is the proof that turns into the induction of the next section.
Proof. (Second proof of the bound.) Let be a vertex of maximum degree and put , . Since is triangle-free, is an independent set: two adjacent neighbours of would close a triangle with . Hence every edge of has at least one endpoint in , and
Intuition. Both proofs say the same thing from opposite ends. Triangle-freeness is a local scarcity condition — adjacent vertices must have disjoint neighbourhoods — and the only way to satisfy it while keeping degrees high is to split the vertices into two camps and spend every edge crossing between them. The bipartite graph is not merely one good construction among many; it is the unique shape that saturates the local condition everywhere at once.
Example 7.5. Determine and exhibit the extremal graph, then decide whether is extremal.
Solution. By Mantel's theorem, , attained by , which indeed has edges and is bipartite, hence triangle-free.
The five-cycle is also triangle-free but has only edges, so it is not extremal — consistent with the uniqueness clause, which says is the only -edge triangle-free graph on five vertices.
To see the bound is not improvable downwards, add any edge to . The new edge joins two vertices of the same part, and every vertex of the other part is adjacent to both, so a triangle appears immediately. Hence every -vertex graph with edges contains a triangle.□
Example 7.6. A graph on vertices has edges. Must it contain a triangle? What if it has ?
Solution. Here . A graph with edges exceeds the extremal number, so by Mantel's theorem it cannot be triangle-free: it contains a .
With exactly edges no conclusion follows — has edges and no triangle. The extremal number is the last value for which a counterexample survives, and the implication "more edges than forces " is sharp by construction.□
Remark. Mantel's theorem also pins down a Turán density: . Half of all pairs is the ceiling for triangle-freeness, and Turán's theorem will show that forbidding raises that ceiling to .
7.2Turán's Theorem and Zykov Symmetrisation
Mantel forbade a triangle; Turán forbade a clique of any size. The answer has exactly the same shape — a complete multipartite graph with balanced parts — and the statement below is the central theorem of the subject.
Definition 7.7 (Turán graph). For , the Turán graph is the complete -partite graph on vertices whose part sizes differ pairwise by at most : writing with , it has parts of size and parts of size , with every pair of vertices in different parts joined and no edges inside a part. Its edge count is written .
Theorem 7.8 (Turán's theorem). (Turán, 1941) Let and let be a -free graph on vertices. Then
That is admissible is immediate and worth isolating, because it is the half of the theorem that needs no work.
Proposition 7.9 (The Turán graph is -free). contains no .
Proof. A clique may use at most one vertex from each part, since two vertices in the same part are non-adjacent. There are parts, so every clique has at most vertices. (Equivalently: colouring each part with its own colour is a proper -colouring, and an -colourable graph contains no .)∎
The content of the theorem is that nothing else does better. We give a complete proof by Zykov symmetrisation, which is the argument that makes the shape of the extremal graph appear rather than assuming it. The idea: take any extremal graph and show that it can be pushed, without ever losing edges, into a complete multipartite graph.
Definition 7.10 (Duplicating a vertex). Let be a graph and distinct vertices. To replace by a copy of is to delete all edges at and join to every vertex of . The resulting graph has and non-adjacent with (they are twins), and
Lemma 7.11 (Duplication preserves clique number). If and is obtained from by replacing by a copy of , then ; in particular, if is -free then so is .
Proof. Let be a clique of . Since and are non-adjacent twins in , contains at most one of them. If then is a clique of as well, because and agree away from . If , then is a set of the same size; it is a clique of because every vertex of lies in , and it avoids , so by the previous case it is a clique of . Either way has a clique of size .∎
Proof. (Turán's theorem.) Fix and with and let be a -free graph on vertices with the maximum possible number of edges; such a exists because there are finitely many graphs on labelled vertices.
Step 1: non-adjacency is transitive in . Suppose not. Then there are vertices with , and .
Case A: . Replace by a copy of . By the Duplication preserves clique number lemma the new graph is still -free, and it has edges, contradicting maximality. The symmetric case is identical.
Case B: and . Form by replacing both and by copies of . Since and are each non-adjacent to , the lemma applies twice and is -free. (After the first duplication is a twin of , so is still non-adjacent to and the second duplication is legitimate.) Count the change: deleting the edges at and at removes edges, the because the edge was counted twice; re-attaching and as copies of adds edges each, and , , are pairwise non-adjacent so nothing is double-counted. Hence
So no such triple exists: the relation " or " is reflexive, symmetric and — by Step 1 — transitive, hence an equivalence relation.
Step 2: is complete multipartite with at most parts. The equivalence classes of Step 1 are independent sets, and any two vertices in different classes are adjacent; that is precisely the definition of a complete multipartite graph with the classes as parts. If there were or more parts, picking one vertex from each of parts would give a . So is complete -partite for some .
Step 3: exactly parts, balanced. Among complete multipartite graphs on vertices with at most parts, maximises edges. If and some part has , split into two non-empty parts: this adds edges (the pairs inside that cross the split) and keeps the graph -partite with parts, contradicting maximality. Since , this forces .
Now suppose two parts had sizes . Move one vertex from the larger part to the smaller. The vertex loses the edges to the part it joins and gains the edges to the part it left, a net change of , and the graph is still complete -partite. Again this contradicts maximality, so all part sizes differ by at most and .
Every maximiser is therefore isomorphic to , which proves both the bound and the uniqueness of the extremal graph.∎
Intuition. Symmetrisation is a greedy tidying-up. Whenever two non-adjacent vertices have different degrees, the weaker one is wasting its edges, and you may as well give it the stronger one's neighbourhood; since twins are non-adjacent, no new clique can appear. Repeating drives every graph towards the most symmetric object compatible with the constraint, and "complete multipartite with balanced parts" is what maximal symmetry looks like here. The theorem is less about cliques than about the fact that the constraint is preserved by this tidying.
Pitfall. The symmetrisation argument is applied to a graph already known to be extremal, not to an arbitrary graph. Duplication can easily destroy a property you care about other than clique number — connectivity, girth, planarity — and the proof gives no bound on how many steps a real graph would need. It is an argument about the maximiser, not an algorithm.
Example 7.13. Apply Turán's theorem with on vertices: what is the largest number of edges in a -free graph, and which graph achieves it?
Solution. The extremal graph is . Writing , the part sizes are .
Counting edges by pairs of parts: . So , out of possible pairs.
Uniqueness is a real constraint: the complete -partite graph with parts is also -free, but has edges, exactly as the vertex-moving step in the proof predicts — moving one vertex from the part of size to a part of size gains edge.□
7.3Two Further Proofs: Induction and Weight Shifting
A theorem this central deserves more than one proof, and the alternatives are not decoration: the induction below is the one that generalises to counting cliques, and the weight-shifting proof is the one that turns Turán's theorem into a statement about a continuous optimisation problem, which is how modern flag-algebra methods attack extremal problems.
Both proofs need the exact edge count of the Turán graph only through one recursion.
Lemma 7.14 (Turán recursion). For ,
Proof. Delete one vertex from each part of . Because the part sizes differ by at most , what remains is again balanced, so it is and carries edges. The deleted vertices lie in distinct parts, so they are pairwise adjacent and contribute edges among themselves. Finally a deleted vertex in a part of size is adjacent to every remaining vertex outside its own part, of which there are . Summing over the deleted vertices,
Proof. (Turán's theorem by induction on .) The statement is vacuous for , where no fits and is complete; this also settles all as the base case. So let and assume the bound for all smaller vertex counts.
Let be -free on vertices with maximal. Then contains a copy of : otherwise is -free, and adding any missing edge would keep it -free — a graph with no cannot acquire a from a single new edge, since every clique through that edge has at most vertices — contradicting maximality unless is already complete, which for contains . Fix such a copy with .
Split the edges of into three groups: those inside , those from to , and those inside .
Inside there are exactly edges. Each vertex has at most neighbours in : if were joined to all vertices of , then would be a . So the second group has at most edges. The graph induced on is -free on vertices, so by the induction hypothesis it has at most edges. Altogether
The second proof replaces the discrete problem by a continuous one. Put a weight on each vertex and try to maximise the total weight of the edges.
Definition 7.15 (Lagrangian of a graph). For a graph on vertex set let be the standard simplex, and define
Theorem 7.16 (Motzkin–Straus). (Motzkin and Straus, 1965) For every graph with clique number ,
Proof. Lower bound. Let be a clique with and put for , otherwise. Then .
Upper bound. Among all maximisers of , choose one whose support has the fewest elements. We claim is a clique.
Suppose with . The variable appears in only through the linear term , and similarly for ; since is not an edge, no term contains both. So for small the shifted point , obtained from by replacing with , satisfies
Finally, writing ,
Corollary 7.17 (Turán bound from Motzkin–Straus). If is -free on vertices then .
Proof. Apply to the uniform weighting . Then , and , so by Motzkin–Straus .∎
Remark. The Motzkin–Straus route gives the clean bound , which equals exactly when and otherwise overshoots it by , where . It therefore proves Turán's theorem asymptotically and exactly in the divisible case, but not the floor-function refinement or the uniqueness clause; those come from the symmetrisation or induction arguments. Trading exactness for a continuous formulation is the usual bargain, and it is what makes the method extend to hypergraphs, where exact extremal graphs are mostly unknown.
Intuition. Think of the weights as dividing one unit of "mass" among the vertices, with the chance that two independently sampled vertices land on an edge. Weight-shifting says the optimum never needs to split mass between two non-adjacent vertices: their contributions do not interact, so all the mass may as well be piled on whichever of the two is better connected. Push that to its conclusion and the optimal mass sits on a single largest clique, spread evenly.
Example 7.18. Let be the five-cycle . Compute from Motzkin–Straus, and check it against the uniform weighting.
Solution. is triangle-free with at least one edge, so and Motzkin–Straus gives , attained by putting weight on each endpoint of a single edge: .
The uniform weighting gives , so uniform is not optimal here. This is the gap the corollary tolerates: applied to it only yields , whereas and .□
7.4Inside the Turán Graph
The extremal graph deserves its own examination, because most later refinements — stability, supersaturation, the Erdős–Stone theorem — are phrased as statements about how close a graph is to .
Definition 7.19 (Complete multipartite graphs and blow-ups). Given a graph on vertices and positive integers , the blow-up replaces each by an independent set of size and joins every vertex of to every vertex of whenever . The Turán graph is exactly the balanced blow-up of .
Proposition 7.20 (Exact edge count). Write with , so has parts of size and of size . Then
Proof. The first expression is immediate: has every pair joined except the pairs lying inside a part, and the parts contribute or missing pairs each.
For the closed form, substitute . The missing pairs total
Three structural facts follow at once from the definition, and each is used later.
Proposition 7.22 (Structure of ). Let as above. Then:
- The complement of is a disjoint union of cliques, of sizes (with multiplicity ) and (with multiplicity ).
- A vertex in a part of size has degree , so has only two distinct degrees, and , and is regular exactly when .
- and , and is the unique complete -partite graph on vertices with the maximum number of edges.
Proof. (1) Two vertices are non-adjacent in exactly when they share a part, so the complement's components are the parts, each complete.
(2) A vertex is joined to everything outside its own part: vertices.
(3) Colouring by part is proper, so ; a transversal of the parts is a , so and . For the last claim, suppose a complete -partite graph has parts with . Moving a vertex from part to part changes the edge count by , so it was not maximal. Hence all part sizes differ by at most , and any two such size vectors are permutations of each other.∎
Intuition. The point of balance is a convexity statement. The missing edges are the pairs inside parts, , and is a convex function, so for a fixed total the sum of missing edges is smallest when the are as equal as the integers allow. Maximising edges and minimising missing edges are the same problem read from the two ends.
Pitfall. "Complete -partite" is not enough: and are both -free complete -partite graphs on vertices, but they have and edges. Likewise -partite with fewer than parts is wasteful — is -free on vertices with only edges. Turán's uniqueness clause is about the exact part sizes and the exact number of parts.
Example 7.23. Compute in three ways: by pairs of parts, by subtraction, and from the closed formula.
Solution. With , : , so , and the parts are .
By pairs of parts: .
By subtraction: .
By the closed formula: the main term is and the correction is , so .
All three agree, so every graph on vertices with or more edges contains a .□
Example 7.24. What is the smallest for which every graph on vertices with at least edges contains a ?
Solution. A -free graph can have edges, so the condition fails precisely when , i.e. when the Turán graph itself is that dense.
Using and : the inequality simplifies to , i.e. .
Check the boundary. For : (parts ) and , so meets the threshold and is -free — fails. For : from the previous example while , so any graph with at least edges exceeds and contains a . The answer is .□
7.5Corollaries: Independence, Supersaturation, Stability
Turán's theorem is a hub. Read in the complement it bounds independence numbers; read quantitatively it says a graph past the threshold contains not one forbidden clique but a positive proportion of all of them; read approximately it says near-extremal graphs must look like the extremal graph.
Corollary 7.25 (Mantel from Turán). Taking in Turán's theorem recovers Mantel's theorem: , uniquely attained by .
Complementation turns "few edges forced by no clique" into "large independent set forced by few edges". Recall that is independent if it spans no edge, and denotes the largest size of such a set; is independent in exactly when it is a clique in the complement .
Theorem 7.26 (Caro–Wei). (Caro 1979, Wei 1981) Every graph satisfies
Proof. Take a uniformly random linear order on and let
is independent: if were adjacent, then and , which is impossible.
For a fixed , the event says that among the vertices of — whose relative order is uniformly random — comes first, which has probability . By linearity of expectation , and some outcome is at least the average, so .∎
Corollary 7.27 (Turán's bound on the independence number). A graph with vertices, edges and average degree satisfies
Proof. The function is convex on , so by Jensen's inequality applied to the degree sequence,
Example 7.28. A committee of people has pairwise conflicts. How large a conflict-free subcommittee is guaranteed?
Solution. Model conflicts as edges: , , so .
By Turán's bound on the independence number, : some six people are pairwise conflict-free.
The bound is sharp here — six disjoint copies of have vertices, edges and independence number exactly — and this graph is the complement of , as the equality case predicts. Note that Caro–Wei would beat this whenever degrees are uneven: a graph with vertices of degree and one of huge degree has much larger than .□
Exceeding the Turán threshold does not merely produce one clique. It produces many, and the jump is immediate.
Theorem 7.29 (Supersaturation). (Erdős–Simonovits) For every and every there is a such that for all large : every graph on vertices with at least edges contains at least copies of .
Proof. Fix an integer , to be chosen at the end, and let have vertices and .
Pick an -subset uniformly at random and let . Each edge of survives in of the subsets, so
Each individual copy of in lies inside of the -sets, so the number of distinct copies is at least
Intuition. Supersaturation is the statement that the extremal threshold has no plateau. One might imagine graphs that sit just above and contain a single stubborn clique; averaging rules that out, because "just above the threshold globally" means "above the threshold on a constant fraction of all small windows", and each such window contributes its own clique. The same averaging trick converts any extremal theorem into a counting theorem, which is why it is the standard first move in the field.
Finally, near-extremal graphs are near the extremal graph — not merely in edge count but in shape.
Theorem 7.30 (Erdős–Simonovits stability). For every and there are and such that: if is a -free graph on vertices with
Proof. (Sketch; the full argument uses the regularity method of the section Regularity, Removal and the Density Increment.) Suppose the conclusion fails for some : then for every there is a -free graph, dense but -far from -partite. Apply the Szemerédi regularity lemma to such a graph and form the reduced graph on the clusters, joining two clusters when the pair is regular with density above a threshold. Being far from -partite forces the reduced graph to have an edge inside what would be a part, and the counting lemma then embeds a across the dense regular pairs, contradicting -freeness. The quantitative content — that the loss in edges from being -far is at least — is exactly what the counting step supplies.∎
Remark. Stability is the engine behind many exact results. The standard strategy is: prove an asymptotic bound (often via Erdős–Stone), use stability to show an extremal graph is within of a known structure, and then run a local optimisation argument to force it to be exactly that structure. Erdős and Simonovits used it to determine exactly for every with and large , in terms of a "decomposition family" that measures how sits inside blow-ups.
7.6Bipartite Forbidden Graphs and the Erdős–Stone Theorem
Turán's theorem answers the question for cliques. Two further theorems complete the picture: one determines the asymptotics for every non-bipartite , and the other opens the genuinely hard case, which is the bipartite one.
Theorem 7.31 (Erdős–Stone–Simonovits). (Erdős and Stone 1946; the form below is due to Erdős and Simonovits 1966) For every graph with at least one edge,
Proof. (Sketch, resting on the regularity lemma stated in the section Regularity, Removal and the Density Increment.) Lower bound: is -colourable, so it cannot contain , which needs colours; it has edges.
Upper bound: it suffices to show that for every and , a graph with edges contains the complete -partite graph with all parts of size , since embeds into . By Supersaturation such a graph has copies of ; a regularity partition plus the counting lemma upgrades "many copies of " to "a copy of the blown-up ". This last step is the substance of the Erdős–Stone theorem and is what the regularity method was built to deliver.∎
The consequence is a clean dichotomy, and it is the single most quoted fact in the subject.
Corollary 7.32 (The chromatic dichotomy). If , then is determined to leading order: it is , the same as for . If — that is, is bipartite — the formula gives only , and the leading-order behaviour is not determined.
Pitfall. The in Erdős–Stone is not a detail that "more care" removes. For the error term is genuinely smaller than the main term and the corollary is informative. For bipartite the main term is , so the theorem says only that is subquadratic — true but nearly empty, since the truth is somewhere between and . This is the degenerate case, and determining the exponent even for is open.
For bipartite the first general bound is a counting argument on stars.
Theorem 7.33 (Kővári–Sós–Turán). (1954) Let . Then
Proof. Let be -free on vertices with degrees and edges. Count -stars: pairs where and is adjacent to every vertex of .
Counting by the centre , the number of such pairs is .
Counting by : if some -set had or more common neighbours, those vertices together with would contain a . So each is counted at most times, and the total is at most .
Hence . The function (extended by for , and below) is convex, so by Jensen
Corollary 7.34 (Reiman's bound for ). A graph on vertices with no — equivalently, in which no two vertices have two common neighbours, which for simple graphs means no — has at most edges, so .
Proof. Specialise the star count to : . By convexity , i.e. , whence and gives the bound.∎
Remark. Reiman's bound is asymptotically sharp. The Erdős–Rényi polarity graph takes the points of the projective plane as vertices, joining and when ; two distinct points lie on exactly one common line, so no two vertices have two common neighbours. It has vertices and edges, which is . Hence along the sequence of prime powers, and the exponent is correct. Analogous algebraic constructions (norm graphs) settle the exponent for whenever ; for and beyond nothing matching is known. A probabilistic deletion argument gives the general lower bound , which does not match Kővári–Sós–Turán.
Sparse bipartite graphs push the extremal number all the way down to linear.
Lemma 7.35 (Greedy tree embedding). If then contains every tree on vertices.
Proof. Induct on . For there is nothing to prove. Let have vertices, let be a leaf of with neighbour , and let , a tree on vertices. Since , the induction hypothesis embeds into by some map . The image has at least neighbours in , while occupies only vertices other than ; so some neighbour of lies outside the image. Extending by embeds .∎
Corollary 7.36 (Trees have linear extremal number). For every tree on vertices, .
Proof. Let have vertices and edges. Repeatedly delete a vertex of degree at most , as long as one exists. Each deletion destroys at most edges and there are at most deletions, so fewer than edges are destroyed in total and the process stops at a non-empty subgraph with . By the Greedy tree embedding lemma , and hence , contains . So a -free graph has at most edges.∎
Remark. The truth is a factor of two better and is a genuine open problem in general. The Erdős–Sós conjecture asserts for every tree on vertices — sharp because a disjoint union of copies of contains no tree on vertices and has exactly edges when . It is proved for paths (the Erdős–Gallai theorem: a graph with more than edges contains a path on vertices), for spiders and caterpillars, and, by an announced proof of Ajtai, Komlós, Simonovits and Szemerédi using the regularity method, for all trees with large.
Example 7.37. Bound the number of edges of a -free graph on vertices, and compare with the polarity construction.
Solution. By Reiman's bound, , so .
The polarity graph of has , hence vertices and edges — within two of the bound. So the true value of lies between and : Reiman's bound is tight to within a lower-order term rather than exactly.
By contrast , more than twice as large: forbidding a bipartite graph is a far more severe restriction than forbidding a triangle, exactly as The chromatic dichotomy predicts.□
7.7Density in the Integers: Roth and Szemerédi
Every theorem so far has the same logical shape: enough density forces a fixed pattern. Turán forces a clique once the edge density passes ; Erdős–Stone forces any once it passes . The most celebrated instance of that shape lives not in graphs but in the integers, and — as the next section shows — it is proved with the tools of extremal graph theory.
Definition 7.38 (Upper density and the counting function ). For the upper density of is
is the extremal function of this world, exactly parallel to : the largest an object can be while avoiding a pattern. The prehistory is a colouring theorem rather than a density theorem.
Theorem 7.39 (van der Waerden). (1927) For all integers there is an such that every colouring of with colours contains a monochromatic -term arithmetic progression.
Proof. (Sketch; the standard proof is a double induction on and on the number of colours, using "colour focusing".) One shows by induction on the stronger statement that long blocks of consecutive integers, coloured arbitrarily, must repeat their colour patterns, so that a family of progressions of length can be constructed all "focused" on a single further point; whichever colour that focus receives completes one of them to a monochromatic progression of length . The induction gives no reasonable bound — the resulting is of Ackermann type, and Shelah's later proof brought it down to primitive recursive.∎
Erdős and Turán observed in 1936 that a density statement would imply van der Waerden's colouring statement at once: in any -colouring of some colour class has at least elements, so a theorem of the form "a set of size contains a -AP" covers it. They conjectured exactly that. The case took seventeen years.
Theorem 7.40 (Roth). (1953) . Quantitatively, Roth proved .
Theorem 7.41 (Szemerédi). (1975) For every , . Equivalently: every set with contains arithmetic progressions of every finite length — indeed infinitely many of each length.
The two formulations really are equivalent, and the translation is worth doing once because it explains why a statement about the infinite set can be attacked by finite combinatorics.
Proposition 7.42 (Finite and infinite forms agree). Fix . Then if and only if every with contains a -term arithmetic progression.
Proof. () Let . Then for infinitely many . Since , for all large we have , so for any such large the set is too big to be -AP-free and contains a -AP. Taking larger and larger and noting that a -AP found in can be avoided only finitely often, contains infinitely many.
() Suppose for some and infinitely many ; we build a set of positive upper density with no -AP. Choose growing fast enough that , and for each a -AP-free set with . Place a translated copy of inside a block of length starting far beyond everything used so far and separated by long gaps, with the blocks' spacings chosen generically so that no progression can straddle two blocks. The union has along the block ends, yet every -AP would have to lie inside one block, where none exists.∎
Pitfall. Positive upper density is sufficient, never necessary. The primes have density zero and yet contain arbitrarily long progressions (Green–Tao); the squares have density zero and contain no four-term progression at all. A density-zero hypothesis simply puts the set outside the theorem's reach — it says nothing either way. Equally, note that is a : the ordinary density need not exist for Szemerédi to apply.
How far from can a -AP-free set be? The lower bound is a construction of Behrend, and it is the reason the quantitative problem is hard.
Theorem 7.43 (Behrend's construction). (1946) There is a constant such that for all large ,
Proof. (Sketch of the construction; the verification is elementary.) Fix integers and and consider the cube . Split by the value of , which ranges over at most values, so some sphere contains at least points.
A sphere in Euclidean space is strictly convex, so it contains no three points with unless : the midpoint of a chord lies strictly inside. Hence is free of three-term progressions as a subset of .
Now map , a base- encoding. Because every digit is less than , adding two elements of produces no carries, so the map sends progressions to progressions and is injective. The image is a -AP-free subset of with and size at least . Optimising against gives the stated bound.∎
Intuition. Behrend's set is thin only in the way a sphere is thin inside a cube. Convexity is exactly the geometric form of "no three points in arithmetic progression", and lifting it to high dimension, where a cube has exponentially many points but only polynomially many possible radii, is what makes the loss sub-polynomial. Any proof of Roth's theorem must lose at least this much, which is why bounds of the shape or are the natural currency rather than .
Example 7.44. Decide what Szemerédi's theorem says about (a) the even numbers, (b) the perfect squares, (c) a set containing every integer in for every and nothing else.
Solution. (a) , so and the theorem applies: the evens contain -APs for every — visibly so, since is one.
(b) , so and the theorem is silent. In fact a classical result of Fermat says no four distinct squares are in arithmetic progression, so the squares contain no -AP — a density-zero set may genuinely lack long progressions.
(c) Along the set occupies about half of , so even though the ordinary density does not exist (along the ratio is nearly ). Szemerédi applies, because the definition uses , and indeed each block is a long interval and contains progressions of every length.□
Remark. Erdős conjectured a far stronger statement: if then contains -term progressions for every . This would imply Green–Tao for the primes, since diverges. It remains open for ; Bloom and Sisask proved the case in 2020.
7.8Regularity, Removal and the Density Increment
Szemerédi's original proof of his theorem introduced a tool that has outgrown it: the regularity lemma, which says that every graph, however large and however irregular, is approximately a bounded-size weighted graph. It is the reason this theorem belongs in a chapter on extremal graph theory, and — through the removal lemma — it gives a complete proof of Roth's theorem in the language of triangles.
Definition 7.45 (Density and -regular pairs). For disjoint vertex sets in a graph , the density of the pair is , where counts edges with one end in each. The pair is -regular if for all , with and ,
Theorem 7.46 (Szemerédi regularity lemma). (1975) For every and every there is an such that every graph with at least vertices admits an -regular equitable partition into parts with .
Proof. (Sketch; the argument is a potential-function increment.) Define the mean square density (or index) of a partition into parts as
Lemma 7.47 (Triangle counting lemma). Let be disjoint sets of size such that each pair is -regular with density . Then the number of triangles with one vertex in each is at least
Proof. (Sketch.) Call typical if it has at least neighbours in and at least neighbours in . Regularity forbids more than vertices from failing either condition — the set of failures would otherwise be a large subset witnessing a density drop — so at least vertices are typical. For a typical , its neighbourhoods and each have size at least , so -regularity of applies to them and gives edges, each completing a triangle through . Multiplying gives the bound.∎
Theorem 7.48 (Triangle removal lemma). (Ruzsa and Szemerédi, 1976) For every there is a such that: if a graph on vertices contains fewer than triangles, then there is a set of at most edges whose deletion makes triangle-free.
Proof. Apply the Szemerédi regularity lemma with parameter and to get an equitable -regular partition into parts, each of size . Now delete three kinds of edges:
- edges inside a part: at most of them, since ;
- edges in pairs that are not -regular: at most ;
- edges in regular pairs of density less than : at most .
In total at most edges are deleted. Suppose the resulting graph still has a triangle, with vertices in parts — necessarily distinct by (1), pairwise regular by (2) and of density at least by (3). Then the Triangle counting lemma applies with in place of and densities at least , producing at least
Intuition. The removal lemma says triangles come in crowds or not at all. A graph cannot contain a few scattered triangles that are nevertheless impossible to destroy cheaply: either you can wipe them out with a vanishing fraction of the edges, or there were already a constant fraction of all possible triangles. This "few implies removable" shape recurs everywhere in the subject — it is the exact statement that makes triangle-freeness testable by sampling a constant number of vertices, and the ancestor of property testing.
The payoff is Roth's theorem, obtained by turning an arithmetic problem into a triangle problem.
Theorem 7.49 (Roth's theorem via triangle removal). If contains no three-term arithmetic progression with positive common difference, then .
Proof. Let and work in . Build a tripartite graph on , where each of is a copy of , so , with edges
Triangles correspond to progressions. A triangle means , and with ; adding the first two gives in , and since both sides lie in with there is no wrap-around, so the equation holds in . Thus is a three-term progression in , which by hypothesis must be trivial: .
Counting. Conversely, for each and each the triple is a triangle. So has exactly triangles, and these are pairwise edge-disjoint: an edge determines and hence the whole triangle. Destroying all triangles therefore requires deleting at least edges.
Applying removal. The triangle count is , so for any , once is large the hypothesis of the Triangle removal lemma holds with the relevant ; hence edge deletions suffice to destroy all triangles. Combining the two counts,
Roth's own proof (1953) predates all of this and runs on Fourier analysis. It is worth recording because its density increment strategy is the template for the whole quantitative theory.
Proof. (Sketch of Roth's Fourier proof.) Let have density and no non-trivial -AP. Write .
Dichotomy. Either every non-trivial Fourier coefficient is small, for all , or some coefficient is large.
Uniform case. Expanding the count of three-term progressions in as a Fourier integral, the zero frequency contributes and all other frequencies contribute at most . So there are at least progressions, far more than the trivial ones once — a contradiction.
Structured case. If for some , then correlates with the level sets of , which partition into arithmetic progressions of length about on which is nearly constant. On one of them has density at least .
Iteration. Rescale that progression to look like with and repeat. Density increases by each time, so after steps it would exceed ; the iteration must therefore terminate in the uniform case, which forces .∎
Remark. Szemerédi's theorem for general resisted Fourier analysis for decades: a set can be perfectly uniform in the Fourier sense and still have the wrong number of -APs — the standard example is , whose obstruction is quadratic, not linear. Repairing this is what Gowers's uniformity norms do, and the corresponding inverse theorem — large norm implies correlation with a nilsequence — is due to Green, Tao and Ziegler. A third, entirely different proof was given by Furstenberg in 1977: his correspondence principle converts a set of positive upper density into a measure-preserving system and a set with , so that Szemerédi's theorem becomes the multiple recurrence statement
Example 7.51. Explain why the triangle removal lemma cannot be improved to a bound of the form .
Solution. Suppose the lemma held with for absolute constants and . Run Roth's theorem via triangle removal backwards on a Behrend set.
Take with no non-trivial -AP and , and build the tripartite graph on vertices with , so and . As established in that proof, has exactly triangles and they are pairwise edge-disjoint, so making triangle-free costs at least edge deletions, i.e. deletions with
Apply the lemma with : since deletions provably do not suffice, the hypothesis must fail, i.e. . Substituting both estimates,
But Behrend's construction supplies -AP-free sets of size , which exceeds for every fixed once is large. The two are incompatible, so no polynomial exists. The best known is tower-type, inherited from the regularity lemma, and improving it is equivalent to improving the bound in Roth's theorem.□
7.9Green–Tao and the Reach of the Method
The regularity–removal machinery spread far beyond its origin. This section records where the two strands of the chapter — extremal graph theory and density theorems for the integers — ended up, and how they feed back into each other.
Theorem 7.52 (Green–Tao). (2004) The primes contain arbitrarily long arithmetic progressions: for every there are primes in arithmetic progression.
Proof. (Sketch, resting on Szemerédi.) The primes have density zero in — about — so Szemerédi's theorem does not apply directly. Green and Tao prove a relative Szemerédi theorem: if is a pseudorandom measure on — a non-negative weight satisfying certain linear-forms and correlation conditions that make it behave like the constant function for the purposes of counting progressions — then any subset of positive relative density with respect to contains -APs. They then construct such a supported essentially on almost-primes, using sieve weights of Goldston and Yıldırım, with respect to which the primes have positive relative density. The transference step deduces the relative theorem from the absolute one by approximating the relatively dense set by a genuinely dense one.∎
Remark. The theorem is ineffective in the sense that matters for examples: it guarantees -term progressions of primes for every , but the smallest known explicit ones grow enormous — the record progressions have around terms and involve numbers of dozens of digits. Note also what it does not say: it makes no claim about progressions of consecutive primes, a much harder statement (known for unconditionally and in general only under strong hypotheses).
Example 7.53. Exhibit a -term arithmetic progression of primes, and explain why the common difference must be divisible by for any progression of primes above .
Solution. works: the differences are , and all five terms are prime.
For the divisibility claim, let be primes greater than in arithmetic progression with common difference , and let be a prime. The residues modulo run through all residues if , since is then invertible mod and ; in particular one term would be divisible by and hence equal to , contradicting . So for every prime . For this gives and , hence — and indeed as well unless the progression starts at , which is exactly the loophole our example uses.□
The proof technique generalised in several independent directions.
Theorem 7.54 (Multidimensional Szemerédi). (Furstenberg and Katznelson, 1978) Let be finite and let have positive upper Banach density. Then contains a homothetic copy of for some and .
Theorem 7.55 (Polynomial Szemerédi). (Bergelson and Leibman, 1996) Let satisfy . If then there are and with all in . Taking recovers Szemerédi's theorem; taking , gives a square difference inside every dense set.
Remark. Both were originally proved by ergodic methods only; combinatorial proofs came later, through the hypergraph regularity and removal lemmas of Gowers and of Rödl, Nagle, Schacht and Skokan, which also yield a fourth proof of Szemerédi's theorem for all by exactly the argument used above for — -APs become "simplices" in a -uniform hypergraph, and the hypergraph removal lemma finishes it.
Quantitatively the subject is still open in every direction that matters.
Theorem 7.56 (Quantitative bounds for and ). Gowers (2001) proved for every , the first effective bound for . For , Kelley and Meka (2023) proved
Meanwhile the graph-theoretic side of the chapter absorbed the same tools.
Theorem 7.57 (Graph removal lemma). (Erdős, Frankl and Rödl, 1986) For every graph and every there is such that any -vertex graph with fewer than copies of can be made -free by deleting at most edges.
Corollary 7.58 (Ruzsa–Szemerédi -theorem). If a -uniform hypergraph on vertices has the property that no vertices span or more edges, then it has edges. Equivalently, a graph on vertices whose edge set is the disjoint union of induced matchings has edges.
Proof. (Sketch.) Encode the hypergraph as a tripartite graph exactly as in Roth's theorem via triangle removal: each hyperedge becomes a triangle, and the -condition forces the triangles to be edge-disjoint and to be the only ones. Edge-disjointness makes destroying them expensive; the removal lemma says it must be cheap unless there are few, so there are of them.∎
Remark. Three further descendants are worth naming. Property testing: the removal lemma is precisely the statement that -freeness is testable — a randomised algorithm sampling a constant number of vertices distinguishes -free graphs from those -far from -free. Graph limits: the space of graphons, with the cut metric, makes the regularity lemma a compactness statement, and Turán-type problems become optimisation over a compact space. Flag algebras: Razborov's formalism turns the Lagrangian viewpoint of Motzkin–Straus into a semidefinite program, and has settled numerous extremal densities — including the asymptotic version of the triangle supersaturation problem solved by Razborov, Nikiforov and Reiher — that resisted hand arguments.
Intuition. The unifying moral of the chapter is that density leaves no room to hide. Push the edge density past and a clique appears; push it past that by a constant and a positive proportion of all cliques appear; push a set of integers past density zero and every progression appears. In each case the proof finds a scale at which the object looks random, and a random object of that density simply contains the pattern. Extremal theorems are the statement that structure and randomness are the only two options.
- **Confusing "contains " with "contains as an induced subgraph"**: uses ordinary containment. Every graph with a contains , so -free is a much stronger condition than "no induced -cycle".
- Assuming the extremal graph is always a Turán graph: only when is a clique. For bipartite the extremal graphs are algebraic or random-like — incidence graphs of projective planes, norm graphs — and look nothing like a balanced blow-up.
- Forgetting the uniqueness clause, or over-reading it: is the *unique* maximiser, so complete -partite graphs with unbalanced parts are strictly worse; but uniqueness is a statement about the exact maximum, not about graphs slightly below it — those are governed by *Erdős–Simonovits stability*.
- **Treating the in Erdős–Stone as harmless**: for bipartite the main term is zero and the theorem gives no information beyond subquadratic. The whole degenerate case, including , lives inside that error term.
- **Expecting quadratic extremal numbers for sparse **: for a tree on vertices is *linear* in ; the Erdős–Sós conjecture puts it at , and the easy argument via minimum degree gives .
- Misreading Kővári–Sós–Turán as an equality: it is an upper bound , matched by constructions only for and for large relative to .
- Confusing extremal and Ramsey statements: Turán's theorem maximises edges in an uncoloured graph before a clique is forced; Ramsey's theorem forces a monochromatic clique in *any* colouring of a large complete graph, regardless of density. Neither implies the other.
- Applying Szemerédi's theorem to a density-zero set: positive upper density is a hypothesis, not a conclusion. The squares have density zero and no -AP; the primes have density zero and do have -APs (*Green–Tao*). The theorem simply does not speak about either.
- Confusing upper density with natural density: is a , so a set whose density oscillates still qualifies. Demanding the limit exists is a strictly stronger hypothesis than the theorem needs.
- Attributing the ergodic proof to Szemerédi: Szemerédi's 1975 proof is combinatorial and introduced the regularity lemma; Furstenberg's 1977 proof is the ergodic one, and it gives no quantitative bound.
- Believing the quantitative bounds are usable: every proof of Szemerédi's theorem for yields bounds that are astronomically weak, and the regularity lemma's tower-type dependence is known to be necessary. For concrete computations one falls back on van der Waerden numbers, which are themselves only known for the tiniest cases.