Szemerédi’s regularity lemma tells us that we can split a graph into equal parts such that the subgraphs between (almost) each pair of parts are “homogenous”: the edge densities between any two large subsets and are all roughly the same.
In other words, for each such pair , it’s a bit as if each edge were included at random with some fixed probability , the edge density between and . If the edges were actually drawn at random in this way (and ignoring the fact that this is only true for almost all pairs), then we could say lots of cool things about the graph!
For example, we could easily get an estimate on the number of triangles: for every triple of parts (not necessarily distinct), the fraction of triples that are triangles would be very close to the product of the densities . And in particular, whenever this product of densities is , you’d get triangles, because the parts all have size . So either the graph has no triangles at all, or it has lots of them; there’s no in-between!
The graph counting lemma and the reduced graph realize those two dreams.
Graph counting lemma
We’ll first show that regularity allows us to find many triangles, then generalize to counting the occurrences of any constant-size graph.
Finding triangles
Above, we argued that if the edges between three parts were drawn at random, then there should be roughly triangles. Let’s show that we get roughly that many triangles as long as , and are -regular: as long as the densities are , then we have
triangles.
We’ll first start by finding a bunch of wedges starting from : vertices that have edges and for many and . Then we’ll complete those wedges to triangles by finding edges for many of those wedges.
Formally, at most an fraction of vertices can be linked to less than a fraction of (and similarly for ): otherwise, those poorly-connected vertices would form a large subset for which the density is abnormally low. By a union bound, this means that a fraction of vertices are connected to both a fraction of and a fraction of .
Let’s name those fractions and . Since these fractions are big enough for regularity between and to apply, so the density between is at least , and each edge between and gives us a triangle. So in total, we have
triangles.
General case
Informally, for any fixed graph , the number of copies of within that “lie within the regular parts” is roughly the number we’d expect given the densities between the parts.
Lemma
Let be a graph over and let . Let be a partition such that is -regular whenever is an edge in . Then, the number of labeled copies of is
Note: the factor in the error comes from the fact that the -regularity is applied times.
Proof
TODO (it was a beautiful telescoping sum)
Reduced graph
TODO: rewrite
For any , Szemerédi’s regularity lemma can split any graph into equal parts such that for all but an fraction of the pairs , is -regular: the density between large enough subsets of them is roughly what we would expect it to be.
The idea of the “reduced graph” is to make a graph over the parts : we will connect iff is -regular and the density is above some threshold .
Applications
This technique allows us (among other things) to reprove some known results very easily.
Theorem (Erdős-Stone-Simonovits)
Any -free graph over vertices has at most edges.
Proof (sketch)
Let . Let be the complete -bipartite graph with parts of size . Clearly, contains . We will show that if has too many edges, it must contain a copy of .
Suppose has edges. Apply Szemerédi’s regularity lemma to with small enough (to be set later). Consider the reduced graph with threshold . As long as is small enough as a function of , this reduced graph will have at least edges. So by Turán’s theorem, must contain a copy of . Then, apply the graph counting lemma to the corresponding parts of to find copies of in . We only needed one.