Szemerédi regularity lemma


Szemerédi's regularity lemma is one of the most powerful tools in extremal graph theory, particularly in the study of large dense graphs. It states that the vertices of every large enough graph can be partitioned into a bounded number of parts so that the edges between different parts behave almost randomly.
According to the lemma, no matter how large a graph is, we can approximate it with the edge densities between a bounded number of parts. Between any two parts, the distribution of edges will be pseudorandom as per the edge density. These approximations provide essentially correct values for various properties of the graph, such as the number of embedded copies of a given subgraph or the number of edge deletions required to remove all copies of some subgraph.

Statement

To state Szemerédi's regularity lemma formally, we must formalize what the edge distribution between parts behaving 'almost randomly' really means. By 'almost random', we're referring to a notion called -regularity. To understand what this means, we first state some definitions. In what follows is a graph with vertex set.
Definition 1. Let be disjoint subsets of. The edge density of the pair is defined as:
where denotes the set of edges having one end vertex in and one in.

We call a pair of parts -regular if, whenever you take a large subset of each part, their edge density isn't too far off the edge density of the pair of parts. Formally,
Definition 2. For, a pair of vertex sets and is called -regular, if for all subsets, satisfying,, we have
The natural way to define an -regular partition should be one where each pair of parts is -regular. However, some graphs, such as the half graphs, require many pairs of partitions to be irregular. So we shall define -regular partitions to be one where most pairs of parts are -regular.
Definition 3. A partition of into sets is called an -regular partition if

Now we can state the lemma:
Szemerédi's Regularity Lemma. For every and positive integer there exists an integer such that if is a graph with at least vertices, there exists an integer in the range and an -regular partition of the vertex set of into sets.

The bound for the number of parts in the partition of the graph given by the proofs of Szemeredi's regularity lemma is very large, given by a -level iterated exponential of. At one time it was hoped that the true bound was much smaller, which would have had several useful applications. However found examples of graphs for which does indeed grow very fast and is at least as large as a -level iterated exponential of. In particular the best bound has level exactly 4 in the Grzegorczyk hierarchy, and so is not an elementary recursive function.

Proof

We shall find an ε-regular partition for a given graph following an algorithm. A rough outline:
  1. Start with an arbitrary partition
  2. While the partition isn't ε-regular:
  3. *Find the subsets which witness ε-irregularity for each irregular pair.
  4. *Simultaneously refine the partition using all the witnessing subsets.
We apply a technique called the energy increment argument to show that this process terminates after a bounded number of steps. Basically, we define a monovariant which must increase by a certain amount in each step, but it's bounded above and thus cannot increase indefinitely. This monovariant is called 'energy' as it's an quantity.
Definition 4. Let be subsets of. Set. The energy of the pair is defined as:
For partitions of and of, we define the energy to be the sum of the energies between each pair of parts:
Finally, for a partition of, define the energy of to be. Specifically,

Observe that energy is between 0 and 1 because edge density is bounded above by 1:
Now, we start by proving that energy does not decrease upon refinement.
Lemma 1. For any partitions and of vertex sets and,.

Proof: Let and. Choose vertices uniformly from and uniformly from, with in part and in part. Then define the random variable. Let us look at properties of. The expectation is
The second moment is
By convexity,. Rearranging, we get that for all.

If each part of is further partitioned, the new partition is called a refinement of. Now, if, applying Lemma 1 to each pair proves that for every refinement of,. Thus the refinement step in the algorithm doesn't lose any energy.
Lemma 2. If is not -regular as witnessed by, then,
Proof: Define as above. Then,
But observe that with probability, so

Now we can prove the energy increment argument, which shows that energy increases substantially in each iteration of the algorithm.
Lemma 3 If a partition of is not -regular, then there exists a refinement of where every is partitioned into at most parts such that

Proof: For all such that is not -regular, find and that witness irregularity. Let be a common refinement of by 's. Each is partitioned into at most parts as desired. Then,
Where is the partition of given by. By Lemma 1, the above quantity is at least
Since is cut by when creating, so is a refinement of. By lemma 2, the above sum is at least
But the second sum is at least since is not -regular, so we deduce the desired inequality.

Now, starting from any partition, we can keep applying Lemma 3 as long as the resulting partition isn't -regular. But in each step energy increases by, and it's bounded above by 1. Then this process can be repeated at most times, before it terminates and we must have an -regular partition.

Applications

If we have enough information about the regularity of a graph, we can count the number of copies of a specific subgraph within the graph up to small error.
Graph Counting Lemma. Let be a graph with, and let. Let be an -vertex graph with vertex sets such that is -regular whenever. Then, the number of labeled copies of in is within of
This can be combined with Szemerédi's regularity lemma to prove the Graph removal lemma. The graph removal lemma can be used to prove Roth's Theorem on Arithmetic Progressions, and a generalization of it, the hypergraph removal lemma, can be used to prove Szemerédi's theorem.
The graph removal lemma generalizes to induced subgraphs, by considering edge edits instead of only edge deletions. This was proved by Alon, Fischer, Krivelevich, and Szegedy in 2000. However, this required a stronger variation of the regularity lemma.
Szemerédi's regularity lemma does not provide meaningful results in sparse graphs. Since sparse graphs have subconstant edge densities, -regularity is trivially satisfied. Even though the result seems purely theoretical, some attempts have been made to use the regularity method as compression technique for large graphs.

History and Extensions

first introduced a weaker version of this lemma, restricted to bipartite graphs, in order to prove Szemerédi's theorem,
and in he proved the full lemma. Extensions of the regularity method to hypergraphs were obtained by Rödl and his collaborators and Gowers.
János Komlós, Gábor Sárközy and Endre Szemerédi later proved in the blow-up lemma that the regular pairs in Szemerédi regularity lemma behave like complete bipartite graphs under the correct conditions. The lemma allowed for deeper exploration into the nature of embeddings of large sparse graphs into dense graphs.
The first constructive version was provided by Alon, Duke, Lefmann, Rödl and Yuster.
Subsequently, Frieze and Kannan gave a different version and extended it to hypergraphs. They later produced a different construction due to Alan Frieze and Ravi Kannan that uses singular values of matrices. One can find more efficient non-deterministic algorithms, as formally detailed in Terence Tao's blog and implicitly mentioned in various papers.
An inequality of Terence Tao extends the Szemerédi regularity lemma, by revisiting it from the perspective of probability theory and information theory instead of graph theory. Terence Tao has also provided a proof of the lemma based on spectral theory, using the adjacency matrices of graphs.
It is not possible to prove a variant of the regularity lemma in which all pairs of partition sets are regular. Some graphs, such as the half graphs, require many pairs of partitions to be irregular.
It is a common variant in the definition of an -regular partition to require that the vertex sets all have the same size, while collecting the leftover vertices in an "error"-set whose size is at most an -fraction of the size of the vertex set of.
A stronger variation of the regularity lemma was proven by Alon, Fischer, Krivelevich, and Szegedy while proving the induced graph removal lemma. This works with a sequence of instead of just one, and shows that there exists a partition with an extremely regular refinement, where the refinement doesn't have too large of an energy increment.
Szemerédi's regularity lemma can be interpreted as saying that the space of all graphs is totally bounded in a suitable metric. Limits in this metric can be represented by graphons; another version of the regularity lemma simply states that the space of graphons is compact.