# Szemerédi regularity lemma

(Redirected from Szemeredi regularity lemma)

In extremal graph theory, Szemerédi’s regularity lemma states that a graph can be partitioned into a bounded number of parts so that the edges between parts are regular. The lemma shows that certain properties of random graphs can be applied to dense graphs like counting the copies of a given subgraph within graphs. Endre Szemerédi proved the lemma over bipartite graphs for his theorem on arithmetic progressions in 1975 and for general graphs in 1978. Variants of the lemma use different notions of regularity and apply to other mathematical objects like hypergraphs.

## 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 G is a graph with vertex set V.

Definition 1. Let XY be disjoint subsets of V. The edge density of the pair (XY) is defined as:

${\displaystyle d(X,Y):={\frac {\left|E(X,Y)\right|}{|X||Y|}}}$

where E(XY) denotes the set of edges having one end vertex in X and one in Y.

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 ε > 0, a pair of vertex sets X and Y is called ε-regular, if for all subsets A ⊆ X, B ⊆ Y satisfying |A| ≥ ε|X|, |B| ≥ ε|Y|, we have

${\displaystyle \left|d(X,Y)-d(A,B)\right|\leq \varepsilon .}$

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 (but a small fraction of all pairs) to be irregular.[1] So we shall define ε-regular partitions to be one where most pairs of parts are ε-regular.

Definition 3. A partition of ${\displaystyle V}$ into ${\displaystyle k}$ sets ${\displaystyle {\mathcal {P}}=\{V_{1},\ldots ,V_{k}\}}$ is called an ${\displaystyle \varepsilon }$-regular partition if

${\displaystyle \sum _{(V_{i},V_{j}){\text{ not }}\varepsilon {\text{-regular}}}|V_{i}||V_{j}|\leq \varepsilon |V(G)|^{2}}$

Now we can state the lemma:

Szemerédi's Regularity Lemma. For every ε > 0 and positive integer m there exists an integer M such that if G is a graph with at least M vertices, there exists an integer k in the range m ≤ k ≤ M and an ε-regular partition of the vertex set of G into k sets.

The bound M 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 O(ε−5)-level iterated exponential of m. At one time it was hoped that the true bound was much smaller, which would have had several useful applications. However Gowers (1997) found examples of graphs for which M does indeed grow very fast and is at least as large as a ε−1/16-level iterated exponential of m.[2]

## Proof

We shall find an ε-regular partition for a given graph following an algorithm:

2. While the partition isn't ε-regular:
• Find the subsets which witness ε-irregularity for each irregular pair.
3. Refine the partition using all the witnessing subsets.

We apply a technique called the energy increment argument to show that this process stops after a bounded number of steps. To do this, we define a measure which must increase by a certain amount in each step, but it's bounded above and thus cannot increase indefinitely. This measure is called 'energy' as it's an ${\displaystyle L^{2}}$ quantity.

Definition 4. Let UW be subsets of V. Set ${\displaystyle |V|=n}$. The energy of the pair (UW) is defined as:

${\displaystyle q(U,W):={\frac {|U||W|}{n^{2}}}d(U,W)^{2}}$

For partitions ${\displaystyle {\mathcal {P}}_{U}=\{U_{1},\ldots ,U_{k}\}}$ of U and ${\displaystyle {\mathcal {P}}_{W}=\{W_{1},\ldots ,W_{l}\}}$ of W, we define the energy to be the sum of the energies between each pair of parts:

${\displaystyle q({\mathcal {P}}_{U},{\mathcal {P}}_{W}):=\sum _{i=1}^{k}\sum _{j=1}^{l}q(U_{i},W_{j})}$

Finally, for a partition ${\displaystyle {\mathcal {P}}=\{V_{1},\ldots ,V_{k}\}}$ of V, define the energy of ${\displaystyle {\mathcal {P}}}$ to be ${\displaystyle q({\mathcal {P}},{\mathcal {P}})}$. Specifically,

${\displaystyle q({\mathcal {P}})=\sum _{i=1}^{k}\sum _{j=1}^{k}q(V_{i},V_{j})=\sum _{i=1}^{k}\sum _{j=1}^{k}{\frac {|V_{i}||V_{j}|}{n^{2}}}d(V_{i},V_{j})^{2}}$

Note that energy is between 0 and 1 because edge density is bounded above by 1:

${\displaystyle q({\mathcal {P}})=\sum _{i=1}^{k}\sum _{j=1}^{k}{\frac {|V_{i}||V_{j}|}{n^{2}}}d(V_{i},V_{j})^{2}\leq \sum _{i=1}^{k}\sum _{j=1}^{k}{\frac {|V_{i}||V_{j}|}{n^{2}}}=1}$

Now, we start by proving that energy does not decrease upon refinement.

Lemma 1. (Energy is nondecreasing under partitioning) For any partitions ${\displaystyle {\mathcal {P}}_{U}}$ and ${\displaystyle {\mathcal {P}}_{W}}$ of vertex sets ${\displaystyle U}$ and ${\displaystyle W}$, ${\displaystyle q({\mathcal {P}}_{U},{\mathcal {P}}_{W})\geq q(U,W)}$.

Proof: Let ${\displaystyle {\mathcal {P}}_{U}=\{U_{1},\ldots ,U_{k}\}}$ and ${\displaystyle {\mathcal {P}}_{W}=\{W_{1},\ldots ,W_{l}\}}$. Choose vertices ${\displaystyle x}$ uniformly from ${\displaystyle U}$ and ${\displaystyle y}$ uniformly from ${\displaystyle W}$, with ${\displaystyle x}$ in part ${\displaystyle U_{i}}$ and ${\displaystyle y}$ in part ${\displaystyle W_{j}}$. Then define the random variable ${\displaystyle Z=d(U_{i},W_{j})}$. Let us look at properties of ${\displaystyle Z}$. The expectation is

${\displaystyle \mathbb {E} [Z]=\sum _{i=1}^{k}\sum _{j=1}^{l}{\frac {|U_{i}|}{|U|}}{\frac {|W_{j}|}{|W|}}d(U_{i},W_{j})={\frac {e(U,W)}{|U||W|}}=d(U,W)}$

The second moment is

${\displaystyle \mathbb {E} [Z^{2}]=\sum _{i=1}^{k}\sum _{j=1}^{l}{\frac {|U_{i}|}{|U|}}{\frac {|W_{j}|}{|W|}}d(U_{i},W_{j})^{2}={\frac {n^{2}}{|U||W|}}q({\mathcal {P}}_{U},{\mathcal {P}}_{W})}$

By convexity, ${\displaystyle \mathbb {E} [Z^{2}]\geq \mathbb {E} [Z]^{2}}$. Rearranging, we get that ${\displaystyle q({\mathcal {P}}_{U},{\mathcal {P}}_{W})\geq q(U,W)}$ for all ${\displaystyle U,W}$.${\displaystyle \square }$

If each part of ${\displaystyle {\mathcal {P}}}$ is further partitioned, the new partition is called a refinement of ${\displaystyle {\mathcal {P}}}$. Now, if ${\displaystyle {\mathcal {P}}=\{V_{1},\ldots ,V_{m}\}}$, applying Lemma 1 to each pair ${\displaystyle (V_{i},V_{j})}$ proves that for every refinement ${\displaystyle {\mathcal {P'}}}$ of ${\displaystyle {\mathcal {P}}}$, ${\displaystyle q({\mathcal {P'}})\geq q({\mathcal {P}})}$. Thus the refinement step in the algorithm doesn't lose any energy.

Lemma 2. (Energy boost lemma) If ${\displaystyle (U,W)}$ is not ${\displaystyle \varepsilon }$-regular as witnessed by ${\displaystyle U_{1}\subset U,W_{1}\subset W}$, then,

${\displaystyle q\left(\{U_{1},U\backslash U_{1}\},\{W_{1},W\backslash W_{1}\}\right)>q(U,W)+\varepsilon ^{4}{\frac {|U||W|}{n^{2}}}}$

Proof: Define ${\displaystyle Z}$ as above. Then,

${\displaystyle Var(Z)=\mathbb {E} [Z^{2}]-\mathbb {E} [Z]^{2}={\frac {n^{2}}{|U||W|}}\left(q\left(\{U_{1},U\backslash U_{1}\},\{W_{1},W\backslash W_{1}\}\right)-q(U,W)\right)}$

But observe that ${\displaystyle |Z-\mathbb {E} [Z]|=|d(U_{1},W_{1})-d(U,W)|}$ with probability ${\displaystyle {\frac {|U_{1}|}{|U|}}{\frac {|W_{1}|}{|W|}}}$(corresponding to ${\displaystyle x\in U_{1}}$ and ${\displaystyle y\in W_{1}}$), so

${\displaystyle Var(Z)=\mathbb {E} [(Z-\mathbb {E} [Z])^{2}]\geq {\frac {|U_{1}|}{|U|}}{\frac {|W_{1}|}{|W|}}(d(U_{1},W_{1})-d(U,W))^{2}>\varepsilon \cdot \varepsilon \cdot \varepsilon ^{2}}$ ${\displaystyle \square }$

Now we can prove the energy increment argument, which shows that energy increases substantially in each iteration of the algorithm.

Lemma 3 (Energy increment lemma) If a partition ${\displaystyle {\mathcal {P}}=\{V_{1},\ldots ,V_{k}\}}$ of ${\displaystyle V(G)}$ is not ${\displaystyle \varepsilon }$-regular, then there exists a refinement ${\displaystyle {\mathcal {Q}}}$ of ${\displaystyle {\mathcal {P}}}$ where every ${\displaystyle V_{i}}$ is partitioned into at most ${\displaystyle 2^{k}}$ parts such that

${\displaystyle q({\mathcal {Q}})\geq q({\mathcal {P}})+\varepsilon ^{5}.}$

Proof: For all ${\displaystyle (i,j)}$ such that ${\displaystyle (V_{i},V_{j})}$ is not ${\displaystyle \varepsilon }$-regular, find ${\displaystyle A^{i,j}\subset V_{i}}$ and ${\displaystyle A^{j,i}\subset V_{j}}$ that witness irregularity (do this simultaneously for all irregular pairs). Let ${\displaystyle {\mathcal {Q}}}$ be a common refinement of ${\displaystyle {\mathcal {P}}}$ by ${\displaystyle A^{i,j}}$'s. Each ${\displaystyle V_{i}}$ is partitioned into at most ${\displaystyle 2^{k}}$ parts as desired. Then,

${\displaystyle q({\mathcal {Q}})=\sum _{(i,j)\in [k]^{2}}q({\mathcal {Q}}_{V_{i}},{\mathcal {Q}}_{V_{j}})=\sum _{(V_{i},V_{j}){\text{ }}\varepsilon {\text{-regular}}}q({\mathcal {Q}}_{V_{i}},{\mathcal {Q}}_{V_{j}})+\sum _{(V_{i},V_{j}){\text{ not }}\varepsilon {\text{-regular}}}q({\mathcal {Q}}_{V_{i}},{\mathcal {Q}}_{V_{j}})}$

Where ${\displaystyle {\mathcal {Q}}_{V_{i}}}$ is the partition of ${\displaystyle V_{i}}$ given by ${\displaystyle {\mathcal {Q}}}$. By Lemma 1, the above quantity is at least

${\displaystyle \sum _{(V_{i},V_{j}){\text{ }}\varepsilon {\text{-regular}}}q(V_{i},V_{j})+\sum _{(V_{i},V_{j}){\text{ not }}\varepsilon {\text{-regular}}}q(\{A^{i,j},V_{i}\backslash A^{i,j}\},\{A^{j,i},V_{j}\backslash A^{j,i}\})}$

Since ${\displaystyle V_{i}}$ is cut by ${\displaystyle A^{i,j}}$ when creating ${\displaystyle {\mathcal {Q}}}$, so ${\displaystyle {\mathcal {Q}}_{V_{i}}}$ is a refinement of ${\displaystyle \{A^{i,j},V_{i}\backslash A^{i,j}\}}$. By lemma 2, the above sum is at least

${\displaystyle \sum _{(i,j)\in [k]^{2}}q(V_{i},V_{j})+\sum _{(V_{i},V_{j}){\text{ not }}\varepsilon {\text{-regular}}}\varepsilon ^{4}{\frac {|V_{i}||V_{j}|}{n^{2}}}}$

But the second sum is at least ${\displaystyle \varepsilon ^{5}}$ since ${\displaystyle {\mathcal {P}}}$ is not ${\displaystyle \varepsilon }$-regular, so we deduce the desired inequality. ${\displaystyle \square }$

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

## Applications

### Graph counting lemma

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 ${\displaystyle H}$ be a graph with ${\displaystyle V(H)=[k]}$, and let ${\displaystyle \varepsilon >0}$. Let ${\displaystyle G}$ be an ${\displaystyle n}$-vertex graph with vertex sets ${\displaystyle V_{1},\dots ,V_{k}\subseteq V(G)}$ such that ${\displaystyle (V_{i},V_{j})}$ is ${\displaystyle \varepsilon }$-regular whenever ${\displaystyle \{i,j\}\in E(H)}$. Then, the number of labeled copies of ${\displaystyle H}$ in ${\displaystyle G}$ is within ${\displaystyle e(H)\varepsilon |V_{1}|\cdots |V_{k}|}$ of

${\displaystyle \left(\prod _{\{i,j\}\in E(H)}d(V_{i},V_{j})\right)\left(\prod _{i=1}^{k}|V_{i}|\right).}$

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,[3] and a generalization of it, the hypergraph removal lemma, can be used to prove Szemerédi's theorem.[4]

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.[5] 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, ${\displaystyle \varepsilon }$-regularity is trivially satisfied. Even though the result seems purely theoretical, some attempts [6][7] have been made to use the regularity method as compression technique for large graphs.

### Frieze-Kannan regularity

A different notion of regularity was introduced by Frieze and Kannan, known as the weak regularity lemma.[8] This lemma defines a weaker notion of regularity than that of Szemerédi which uses better bounds and can be used in efficient algorithms.

Given a graph ${\displaystyle G=(V,E)}$, a partition of its vertices ${\displaystyle {\mathcal {P}}=\{V_{1},\ldots ,V_{k}\}}$ is said to be Frieze-Kannan ${\displaystyle \epsilon }$-regular if for any pair of sets ${\displaystyle S,T\subseteq V}$:

${\displaystyle \left|e(S,T)-\sum _{i,j=1}^{k}d(V_{i},V_{j})|S\cap V_{i}||T\cap V_{j}|\right|\leq \epsilon |V|^{2}}$

The weak regularity lemma for graphs states that every graph has a weak ${\displaystyle \epsilon }$-regular partition into at most ${\displaystyle 4^{\epsilon ^{-2}}}$ parts.

This notion can be extended to graphons by defining a stepping operator. Given a graphon ${\displaystyle W}$ and a partition ${\displaystyle {\mathcal {P}}}$ of ${\displaystyle [0,1]}$, we can define ${\displaystyle W_{\mathcal {P}}}$ as a step-graphon with steps given by ${\displaystyle {\mathcal {P}}}$ and values given by averaging ${\displaystyle W}$ over each step.

A partition ${\displaystyle {\mathcal {P}}}$ is weak ${\displaystyle \epsilon }$-regular if:

${\displaystyle \|W-W_{\mathcal {P}}\|_{\square }\leq \epsilon }$

The weak regularity lemma for graphons states that every graphon has a weak ${\displaystyle \epsilon }$-regular partition into at most ${\displaystyle 4^{\epsilon ^{-2}}}$ parts. As with Szemerédi's regularity lemma, the weak regularity also induces a counting lemma.

### Algorithmic applications

One of the initial motivations for the development of the weak regularity lemma was the search for an efficient algorithm for estimating the maximum cut in a dense graph.[8] It has been shown that approximating the max-cut problem beyond 16/17 is NP-hard,[9] however an algorithmic version of the weak regularity lemma gives an efficient algorithm for approximating the max-cut for dense graphs within an ${\displaystyle \epsilon n^{2}}$ additive error.[8] These ideas have been further developed into efficient sampling algorithms for estimating max-cut in dense graphs.[10]

The smaller bounds of the weak regularity lemma allow for efficient algorithms to find an ${\displaystyle \epsilon }$-regular partition.[11] Graph regularity has further been used in various area of theoretical computer science, such as matrix multiplication[12] and communication complexity.[13]

## Strong regularity lemma

The strong regularity lemma is a stronger variation of the regularity lemma proven by Alon, Fischer, Krivelevich, and Szegedy in 2000.[5] Intuitively, it provides information between non-regular pairs and could be applied to prove the induced graph removal lemma.

### Statement

For any infinite sequence of constants ${\displaystyle \epsilon _{0}\geq \epsilon _{1}\geq ...>0}$, there exists an integer ${\displaystyle M}$ such that for any graph ${\displaystyle G}$, we can obtain two (equitable) partitions ${\displaystyle {\mathcal {P}}}$ and ${\displaystyle {\mathcal {Q}}}$ such that the following properties are satisfied:

• ${\displaystyle {\mathcal {Q}}}$ refines ${\displaystyle {\mathcal {P}}}$, that is every part of ${\displaystyle {\mathcal {P}}}$ is the union of some collection of parts in ${\displaystyle {\mathcal {Q}}}$.
• ${\displaystyle {\mathcal {P}}}$ is ${\displaystyle \epsilon _{0}}$-regular and ${\displaystyle {\mathcal {Q}}}$ is ${\displaystyle \epsilon _{|{\mathcal {P}}|}}$-regular.
• ${\displaystyle q({\mathcal {Q}})
• ${\displaystyle |{\mathcal {Q}}|\leq M}$

### Proof

We apply the regularity lemma repeatedly to prove the stronger version. A rough outline:

• Start with ${\displaystyle {\mathcal {P}}_{0}}$ be an ${\displaystyle \epsilon _{0}}$ regular partition
• Repeatedly find its refinement ${\displaystyle {\mathcal {Q}}}$ that is ${\displaystyle \epsilon _{|{\mathcal {P}}|}}$ regular. If the energy increment of ${\displaystyle {\mathcal {Q}}\leq \epsilon _{0}}$, we simply return ${\displaystyle ({\mathcal {P}},{\mathcal {Q}})}$. Otherwise, we replace ${\displaystyle {\mathcal {P}}}$ with ${\displaystyle {\mathcal {Q}}}$ and continue.

We start with ${\displaystyle {\mathcal {P}}_{0}}$ be an ${\displaystyle \epsilon _{0}}$ regular partition of ${\displaystyle G}$ with ${\displaystyle \leq M(\epsilon _{0})}$ parts. Here ${\displaystyle M(t)}$ corresponds to the bound of parts in regularity lemma when ${\displaystyle \epsilon =t}$.

Now for ${\displaystyle i=0,1,\cdots }$, we set ${\displaystyle {\mathcal {P_{i+1}}}}$ to be an ${\displaystyle \epsilon _{|P_{i}|}}$regular refinement of ${\displaystyle {\mathcal {P_{i}}}}$ with ${\displaystyle \leq M(\epsilon _{|P_{i}|})|{\mathcal {P}}_{i}|}$ parts. By the energy increment argument, ${\displaystyle q({\mathcal {P}}_{i+1})\geq q({\mathcal {P}}_{i})}$. Since the energy is bounded in ${\displaystyle [0,1]}$, there must be some ${\displaystyle i\leq 1/\epsilon _{0}+1}$ such that ${\displaystyle q({\mathcal {P}}_{i+1})-q({\mathcal {P}}_{i})<\epsilon _{0}}$. We return ${\displaystyle ({\mathcal {P}}_{i},{\mathcal {P}}_{i+1})}$ as ${\displaystyle ({\mathcal {P}},{\mathcal {Q}})}$.

By our choice of ${\displaystyle {\mathcal {P}}_{i+1},}$ the regular and refinement conditions hold. The energy condition holds trivially. Now we argue for the number of parts. We use induction to show that ${\displaystyle \forall i}$, there exists ${\displaystyle M_{i}}$ such that ${\displaystyle |{\mathcal {P}}_{i}|\leq M_{i}}$. By setting ${\displaystyle M_{0}=M(\epsilon _{0})}$, we have ${\displaystyle |{\mathcal {P}}_{0}|\leq M_{0}}$. Note that when ${\displaystyle |P_{i}|\leq M_{i}}$, ${\displaystyle |P_{i+1}|\leq M(\epsilon _{|P_{i}|})|{\mathcal {P}}_{i}|\leq M(\epsilon _{|M_{i}|})M_{i}}$, so we could set ${\displaystyle M_{i+1}=M(\epsilon _{|M_{i}|})M_{i}}$ and the statement is true for ${\displaystyle i+1}$. By setting ${\displaystyle M=\max _{i\leq 1/\epsilon _{0}+2}M_{i}}$, we have ${\displaystyle |P|,|Q|\leq M.}$

### Remarks on equitable

A partition is equitable if the sizes of any two sets differ by at most ${\displaystyle 1}$. By equitizing in each round of iteration, the proof of regularity lemma could be accustomed to prove the equitable version of regularity lemma. And by replacing the regularity lemma with its equitable version, the proof above could prove the equitable version of strong regularity lemma where ${\displaystyle {\mathcal {P}}}$ and ${\displaystyle {\mathcal {Q}}}$ are equitable partitions.

### A useful corollary

#### Statement

For any infinite sequence of constants ${\displaystyle \epsilon _{0}\geq \epsilon _{1}\geq ...>0}$, there exists ${\displaystyle \delta >0}$ such that there exists a partition ${\displaystyle {\mathcal {P}}={V_{1},...,V_{k}}}$ and subsets ${\displaystyle W_{i}\subset V_{i}}$ for each ${\displaystyle i}$ where the following properties are satisfied:

• ${\displaystyle |W_{i}|>\delta n}$
• ${\displaystyle (W_{i},W_{j})}$ is ${\displaystyle \epsilon _{|{\mathcal {P}}|}}$-regular for each pair ${\displaystyle 1\leq i\leq j\leq k}$
• ${\displaystyle |d(W_{i},W_{j})-d(V_{i},V_{j})|\leq \epsilon _{0}}$ for all but ${\displaystyle \epsilon _{0}|{\mathcal {P}}|^{2}}$ pairs ${\displaystyle 1\leq i\leq j\leq k}$

#### Motivation

The corollary explores deeper the small energy increment. It gives us a partition together with subsets with large sizes from each part, which are pairwise regular. In addition, the density between the corresponding subset pairs differs "not much" from the density between the corresponding parts.

#### Proof of corollary

We'll only prove the weaker result where the second condition only requires ${\displaystyle (W_{i},W_{j})}$ to be ${\displaystyle \epsilon _{|{\mathcal {P}}|}}$-regular for ${\displaystyle 1\leq i. The full version can be proved by picking more subsets from each part that are mostly pairwise regular and combine them together.

Let ${\displaystyle r=\epsilon _{0}^{3}/20}$. We apply the strong regularity lemma to find equitable ${\displaystyle {\mathcal {P}}}$ that is a ${\displaystyle r}$ regular partition and equitable ${\displaystyle {\mathcal {Q}}}$ that is a ${\displaystyle r/|P|^{4}}$ regular refinement of ${\displaystyle {\mathcal {P}}}$ , such that ${\displaystyle q({\mathcal {Q}})-q({\mathcal {P}})\leq r}$ and ${\displaystyle |{\mathcal {Q}}|\leq M}$.

Now assume that ${\displaystyle P=\{V_{1},\cdots ,V_{k}\}}$, we randomly pick a vertex ${\displaystyle v_{i}}$ from each ${\displaystyle V_{i}}$ and let ${\displaystyle W_{i}}$ to be the set that contains ${\displaystyle v_{i}}$ in ${\displaystyle {\mathcal {Q}}}$. We argue that the subsets ${\displaystyle W_{i}}$ satisfy all the conditions with probability ${\displaystyle >0}$.

By setting ${\displaystyle \delta ={\frac {1}{2M}}}$ the first condition is trivially true since ${\displaystyle {\mathcal {Q}}}$ is an equitable partition. Since at most ${\displaystyle {\frac {r}{|P|^{4}}}{\binom {n}{2}}\leq \epsilon _{0}{\frac {|V_{i}||V_{j}|}{3|P|^{2}}}}$ vertex pairs live between irregular pairs in ${\displaystyle {\mathcal {Q}}}$ , the probability that the pair ${\displaystyle W_{i}}$ and ${\displaystyle W_{j}}$ is irregular ${\displaystyle \leq {\frac {1}{3|P|^{2}}}}$, by union bound, the probability that at least one pair ${\displaystyle W_{i}}$, ${\displaystyle W_{i}}$ is irregular ${\displaystyle \leq 1/3}$. Note that

{\displaystyle {\begin{aligned}r&\geq q({\mathcal {Q}})-q({\mathcal {P}})\\&=\sum _{i,j}{\frac {|V_{i}||V_{j}|}{n^{2}}}\mathbb {E} |d(W_{i},W_{j})-d(V_{i},V_{j})|^{2}\\&\geq \sum _{i,j}{\frac {1}{4|P|^{2}}}\mathbb {E} |d(W_{i},W_{j})-d(V_{i},V_{j})|^{2}\\&={\frac {1}{4|P|^{2}}}\mathbb {E} \sum _{i,j}|d(W_{i},W_{j})-d(V_{i},V_{j})|^{2}\end{aligned}}}

So by Markov's inequality ${\displaystyle P(\sum _{i,j}|d(W_{i},W_{j})-d(V_{i},V_{j})|^{2}\geq 8|P|^{2}r)\leq 1/2}$, so with probability ${\displaystyle \geq 1/2}$, at most ${\displaystyle \epsilon _{0}|P|^{2}}$ pairs could have ${\displaystyle d(W_{i},W_{j})-d(V_{i},V_{j})\geq \epsilon _{0}}$. By union bound, the probability that all conditions hold ${\displaystyle \geq 1-1/2-1/3>0}$.

## History and extensions

Szemerédi (1975) first introduced a weaker version of this lemma, restricted to bipartite graphs, in order to prove Szemerédi's theorem,[14] and in (Szemerédi 1978) he proved the full lemma.[15] Extensions of the regularity method to hypergraphs were obtained by Rödl and his collaborators[16][17][18] and Gowers.[19][20]

János Komlós, Gábor Sárközy and Endre Szemerédi later (in 1997) proved in the blow-up lemma[21][22] 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.[23] Subsequently, Frieze and Kannan gave a different version and extended it to hypergraphs.[24] They later produced a different construction due to Alan Frieze and Ravi Kannan that uses singular values of matrices.[25] One can find more efficient non-deterministic algorithms, as formally detailed in Terence Tao's blog[26] and implicitly mentioned in various papers.[27][28][29]

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.[30] Terence Tao has also provided a proof of the lemma based on spectral theory, using the adjacency matrices of graphs.[31]

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 (but a small fraction of all pairs) to be irregular.[1]

It is a common variant in the definition of an ${\displaystyle \varepsilon }$-regular partition to require that the vertex sets all have the same size, while collecting the leftover vertices in an "error"-set ${\displaystyle V_{0}}$ whose size is at most an ${\displaystyle \varepsilon }$-fraction of the size of the vertex set of ${\displaystyle G}$.

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 ${\displaystyle \varepsilon }$ 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 (and hence precompact) in a suitable metric (the cut distance). Limits in this metric can be represented by graphons; another version of the regularity lemma simply states that the space of graphons is compact.[32]

## References

1. ^ a b Conlon, David; Fox, Jacob (2012), "Bounds for graph regularity and removal lemmas", Geometric and Functional Analysis, 22 (5): 1191–1256, arXiv:1107.4829, doi:10.1007/s00039-012-0171-x, MR 2989432, S2CID 1623986
2. ^ Gowers, W. T. (1997), "Lower bounds of tower type for Szemerédi's uniformity lemma", Geometric and Functional Analysis, 7 (2): 322–337, doi:10.1007/PL00001621, MR 1445389, S2CID 115242956
3. ^ Roth, K. F. (1953), "On certain sets of integers", Journal of the London Mathematical Society, 28 (1): 104–109, doi:10.1112/jlms/s1-28.1.104, MR 0051853
4. ^ Tao, Terence (2006), "A variant of the hypergraph removal lemma", Journal of Combinatorial Theory, Series A, 113 (7): 1257–1280, arXiv:math/0503572, doi:10.1016/j.jcta.2005.11.006, MR 2259060, S2CID 14337591
5. ^ a b Alon, Noga; Fischer, Eldar; Krivelevich, Michael; Szegedy, Mario (2000), "Efficient testing of large graphs", Combinatorica, 20 (4): 451–476, doi:10.1007/s004930070001, MR 1804820, S2CID 44645628
6. ^ Pelosin, Francesco (2018), Graph Compression Using The Regularity Method (MSc thesis), Ca' Foscari University of Venice, arXiv:1810.07275
7. ^ Fiorucci, Marco; Pelosin, Francesco; Pelillo, Marcello (February 2020), "Separating structure from noise in large graphs using the regularity lemma", Pattern Recognition, 98: 107070, arXiv:1905.06917, Bibcode:2020PatRe..9807070F, doi:10.1016/j.patcog.2019.107070, S2CID 155100313
8. ^ a b c Frieze, Alan; Kannan, Ravi (1999), "Quick Approximation to Matrices and Applications", Combinatorica, 19 (2): 175–220, doi:10.1007/s004930050052, S2CID 15231198
9. ^ Håstad, Johan (2001), "Some Optimal Inapproximability Results", Journal of the ACM, 48 (4): 798–859, doi:10.1145/502090.502098, S2CID 5120748
10. ^ Alon, Noga; Fernandez de la Vega, W.; Kannan, Ravi; Karpinksi, Marek (2003), "Random sampling and approximation of MAX-CSPs", Journal of Computer and System Sciences, 67 (2): 212–243, doi:10.1016/S0022-0000(03)00008-4, S2CID 34786604
11. ^ Dellamonica, Domingos; Kalyanasundaram, Subrahmanyam; Martin, Daniel; Rödl, Vojtěch; Shapira, Asaf (2012), "Random sampling and approximation of MAX-CSPs", SIAM Journal on Discrete Mathematics, 26 (1): 15–29, doi:10.1137/110846373
12. ^ Bansal, Nikhil; Williams, Ryan (2009), "Regularity Lemmas and Combinatorial Algorithms", 2009 50th Annual IEEE Symposium on Foundations of Computer Science, pp. 745–754, doi:10.1109/FOCS.2009.76, ISBN 978-1-4244-5116-6
13. ^ Hajnal, András; Maass, Wolfgang; Turán, Gyorgy (1988), "On the Communication Complexity of Graph Properties", Proceedings of the twentieth annual ACM symposium on Theory of computing - STOC '88, vol. 26, Association for Computing Machinery, pp. 186–191, doi:10.1145/62212.62228, ISBN 0897912640, S2CID 17495443
14. ^ Szemerédi, Endre (1975), "On sets of integers containing no k elements in arithmetic progression", Polska Akademia Nauk. Instytut Matematyczny. Acta Arithmetica, 27: 199–245, doi:10.4064/aa-27-1-199-245, MR 0369312.
15. ^ Szemerédi, Endre (1978), "Regular partitions of graphs", Problèmes combinatoires et théorie des graphes (Colloq. Internat. CNRS, Univ. Orsay, Orsay, 1976), vol. 260, Paris: CNRS, pp. 399–401, MR 0540024.
16. ^ Frankl, Peter; Rödl, Vojtěch (2002), "Extremal problems on set systems", Random Structures & Algorithms, 20 (2): 131–164, doi:10.1002/rsa.10017.abs, MR 1884430.
17. ^ Rödl, Vojtěch; Skokan, Jozef (2004), "Regularity lemma for k-uniform hypergraphs", Random Structures & Algorithms, 25 (1): 1–42, doi:10.1002/rsa.20017, MR 2069663, S2CID 7458739.
18. ^ Nagle, Brendan; Rödl, Vojtěch; Schacht, Mathias (2006), "The counting lemma for regular k-uniform hypergraphs", Random Structures & Algorithms, 28 (2): 113–179, CiteSeerX 10.1.1.378.8503, doi:10.1002/rsa.20117, MR 2198495, S2CID 14126774.
19. ^ Gowers, W. T. (2006), "Quasirandomness, counting and regularity for 3-uniform hypergraphs", Combinatorics, Probability and Computing, 15 (1–2): 143–184, doi:10.1017/S0963548305007236, MR 2195580, S2CID 14632612.
20. ^ Gowers, W. T. (2007), "Hypergraph regularity and the multidimensional Szemerédi theorem", Annals of Mathematics, Second Series, 166 (3): 897–946, arXiv:0710.3032, Bibcode:2007arXiv0710.3032G, doi:10.4007/annals.2007.166.897, MR 2373376, S2CID 56118006.
21. ^ Komlós, János; Sárközy, Gábor N.; Szemerédi, Endre (1997), "Blow-up lemma", Combinatorica, 17 (1): 109–123, doi:10.1007/BF01196135, MR 1466579, S2CID 6720143
22. ^ Komlós, János; Sárközy, Gábor N.; Szemerédi, Endre (1998), "An algorithmic version of the blow-up lemma", Random Structures & Algorithms, 12 (3): 297–312, arXiv:math/9612213, doi:10.1002/(SICI)1098-2418(199805)12:3<297::AID-RSA5>3.3.CO;2-W, MR 1635264
23. ^ Alon, N.; Duke, R. A.; Lefmann, H.; Rödl, V.; Yuster, R. (1994), "The algorithmic aspects of the regularity lemma", Journal of Algorithms, 16: 80–109, CiteSeerX 10.1.1.102.681, doi:10.1006/jagm.1994.1005
24. ^ Frieze, Alan M.; Kannan, Ravi (1996), "The regularity lemma and approximation schemes for dense problems", 37th Annual Symposium on Foundations of Computer Science, FOCS '96, Burlington, Vermont, USA, 14–16 October, 1996, IEEE Computer Society, pp. 12–20, doi:10.1109/SFCS.1996.548459, ISBN 0-8186-7594-2, S2CID 38681854
25. ^ Frieze, Alan; Kannan, Ravi (March 1999), "A simple algorithm for constructing Szemerédi's regularity partition", The Electronic Journal of Combinatorics, 6 (1), Article R17, doi:10.37236/1449
26. ^
27. ^ Alon, Noga; Shapira, Asaf (2008), "Every monotone graph property is testable", SIAM J. Comput., 38 (2): 505–522, doi:10.1137/050633445, ISSN 0097-5397, MR 2411033
28. ^ Ishigami, Yoshiyasu (2006), A Simple Regularization of Hypergraphs, arXiv:math/0612838, Bibcode:2006math.....12838I
29. ^ Austin, Tim (2008), "On exchangeable random variables and the statistics of large graphs and hypergraphs", Probability Surveys, 5: 80–145, arXiv:0801.1698, Bibcode:2008arXiv0801.1698A, doi:10.1214/08-PS124, S2CID 15421306
30. ^ Tao, Terence (2006), "Szemerédi's regularity lemma revisited", Contributions to Discrete Mathematics, 1 (1): 8–28, arXiv:math/0504472, Bibcode:2005math......4472T, doi:10.11575/cdm.v1i1.61900, MR 2212136.
31. ^
32. ^ Lovász, László; Szegedy, Balázs (2007), "Szemerédi's lemma for the analyst", Geometric and Functional Analysis, 17: 252–270, doi:10.1007/s00039-007-0599-6, ISSN 1016-443X, MR 2306658, S2CID 15201345