# Combinatorics (Fall 2010)/Graph spectrum, expanders

## Graph Expansion

According to wikipedia:

"Expander graphs have found extensive applications in computer science, in designing algorithms, error correcting codes, extractors, pseudorandom generators, sorting networks and robust computer networks. They have also been used in proofs of many important results in computational complexity theory, such as SL=L and the PCP theorem. In cryptography too, expander graphs are used to construct hash functions."

We will not explore everything about expander graphs, but will focus on the performances of random walks on expander graphs.

### Expander graphs

Consider an undirected (multi)graph ${\displaystyle G(V,E)}$, where the parallel edges between two vertices are allowed.

Some notations:

• For ${\displaystyle S,T\subset V}$, let ${\displaystyle E(S,T)=\{uv\in E\mid u\in S,v\in T\}}$.
• The Edge Boundary of a set ${\displaystyle S\subset V}$, denoted ${\displaystyle \partial S\,}$, is ${\displaystyle \partial S=E(S,{\bar {S}})}$.
 Definition (Graph expansion) The expansion ratio of an undirected graph ${\displaystyle G}$ on ${\displaystyle n}$ vertices, is defined as ${\displaystyle \phi (G)=\min _{\overset {S\subset V}{|S|\leq {\frac {n}{2}}}}{\frac {|\partial S|}{|S|}}.}$

Expander graphs are ${\displaystyle d}$-regular (multi)graphs with ${\displaystyle d=O(1)}$ and ${\displaystyle \phi (G)=\Omega (1)}$.

This definition states the following properties of expander graphs:

• Expander graphs are sparse graphs. This is because the number of edges is ${\displaystyle dn/2=O(n)}$.
• Despite the sparsity, expander graphs have good connectivity. This is supported by the expansion ratio.
• This one is implicit: expander graph is a family of graphs ${\displaystyle \{G_{n}\}}$, where ${\displaystyle n}$ is the number of vertices. The asymptotic order ${\displaystyle O(1)}$ and ${\displaystyle \Omega (1)}$ in the definition is relative to the number of vertices ${\displaystyle n}$, which grows to infinity.

The following fact is directly implied by the definition.

An expander graph has diameter ${\displaystyle O(\log n)}$.

The proof is left for an exercise.

For a vertex set ${\displaystyle S}$, the size of the edge boundary ${\displaystyle |\partial S|}$ can be seen as the "perimeter" of ${\displaystyle S}$, and ${\displaystyle |S|}$ can be seen as the "volume" of ${\displaystyle S}$. The expansion property can be interpreted as a combinatorial version of isoperimetric inequality.

Vertex expansion
We can alternatively define the vertex expansion. For a vertex set ${\displaystyle S\subset V}$, its vertex boundary, denoted ${\displaystyle \delta S\,}$ is defined as that
${\displaystyle \delta S=\{u\not \in S\mid uv\in E{\mbox{ and }}v\in S\}}$,
and the vertex expansion of a graph ${\displaystyle G}$ is ${\displaystyle \psi (G)=\min _{\overset {S\subset V}{|S|\leq {\frac {n}{2}}}}{\frac {|\delta S|}{|S|}}}$.

### Existence of expander graph

We will show the existence of expander graphs by the probabilistic method. In order to do so, we need to generate random ${\displaystyle d}$-regular graphs.

Suppose that ${\displaystyle d}$ is even. We can generate a random ${\displaystyle d}$-regular graph ${\displaystyle G(V,E)}$ as follows:

• Let ${\displaystyle V}$ be the vertex set. Uniformly and independently choose ${\displaystyle {\frac {d}{2}}}$ cycles of ${\displaystyle V}$.
• For each vertex ${\displaystyle v}$, for every cycle, assuming that the two neighbors of ${\displaystyle v}$ in that cycle is ${\displaystyle w}$ and ${\displaystyle u}$, add two edges ${\displaystyle wv}$ and ${\displaystyle uv}$ to ${\displaystyle E}$.

The resulting ${\displaystyle G(V,E)}$ is a multigraph. That is, it may have multiple edges between two vertices. We will show that ${\displaystyle G(V,E)}$ is an expander graph with high probability. Formally, for some constant ${\displaystyle d}$ and constant ${\displaystyle \alpha }$,

${\displaystyle \Pr[\phi (G)\geq \alpha ]=1-o(1)}$.

By the probabilistic method, this shows that there exist expander graphs. In fact, the above probability bound shows something much stronger: it shows that almost every regular graph is an expander.

Recall that ${\displaystyle \phi (G)=\min _{S:|S|\leq {\frac {n}{2}}}{\frac {|\partial S|}{|S|}}}$. We call such ${\displaystyle S\subset V}$ that ${\displaystyle {\frac {|\partial S|}{|S|}}<\alpha }$ a "bad ${\displaystyle S}$". Then ${\displaystyle \phi (G)<\alpha }$ if and only if there exists a bad ${\displaystyle S}$ of size at most ${\displaystyle {\frac {n}{2}}}$. Therefore,

{\displaystyle {\begin{aligned}\Pr[\phi (G)<\alpha ]&=\Pr \left[\min _{S:|S|\leq {\frac {n}{2}}}{\frac {|\partial S|}{|S|}}<\alpha \right]\\&=\sum _{k=1}^{\frac {n}{2}}\Pr[\,\exists {\mbox{bad }}S{\mbox{ of size }}k\,]\\&\leq \sum _{k=1}^{\frac {n}{2}}\sum _{S\in {V \choose k}}\Pr[\,S{\mbox{ is bad}}\,]\end{aligned}}}

Let ${\displaystyle R\subset S}$ be the set of vertices in ${\displaystyle S}$ which has neighbors in ${\displaystyle {\bar {S}}}$, and let ${\displaystyle r=|R|}$. It is obvious that ${\displaystyle |\partial S|\geq r}$, thus, for a bad ${\displaystyle S}$, ${\displaystyle r<\alpha k}$. Therefore, there are at most ${\displaystyle \sum _{r=1}^{\alpha k}{k \choose r}}$ possible choices such ${\displaystyle R}$. For any fixed choice of ${\displaystyle R}$, the probability that an edge picked by a vertex in ${\displaystyle S-R}$ connects to a vertex in ${\displaystyle S}$ is at most ${\displaystyle k/n}$, and there are ${\displaystyle d(k-r)}$ such edges. For any fixed ${\displaystyle S}$ of size ${\displaystyle k}$ and ${\displaystyle R}$ of size ${\displaystyle r}$, the probability that all neighbors of all vertices in ${\displaystyle S-R}$ are in ${\displaystyle S}$ is at most ${\displaystyle \left({\frac {k}{n}}\right)^{d(k-r)}}$. Due to the union bound, for any fixed ${\displaystyle S}$ of size ${\displaystyle k}$,

{\displaystyle {\begin{aligned}\Pr[\,S{\mbox{ is bad}}\,]&\leq \sum _{r=1}^{\alpha k}{k \choose r}\left({\frac {k}{n}}\right)^{d(k-r)}\leq \alpha k{k \choose \alpha k}\left({\frac {k}{n}}\right)^{dk(1-\alpha )}\end{aligned}}}

Therefore,

{\displaystyle {\begin{aligned}\Pr[\phi (G)<\alpha ]&\leq \sum _{k=1}^{\frac {n}{2}}\sum _{S\in {V \choose k}}\Pr[\,S{\mbox{ is bad}}\,]\\&\leq \sum _{k=1}^{\frac {n}{2}}{n \choose k}\alpha k{k \choose \alpha k}\left({\frac {k}{n}}\right)^{dk(1-\alpha )}\\&\leq \sum _{k=1}^{\frac {n}{2}}\left({\frac {en}{k}}\right)^{k}\alpha k\left({\frac {ek}{\alpha k}}\right)^{\alpha k}\left({\frac {k}{n}}\right)^{dk(1-\alpha )}&\quad ({\mbox{Stirling formula }}{n \choose k}\leq \left({\frac {en}{k}}\right)^{k})\\&\leq \sum _{k=1}^{\frac {n}{2}}\exp(O(k))\left({\frac {k}{n}}\right)^{k(d(1-\alpha )-1)}.\end{aligned}}}

The last line is ${\displaystyle o(1)}$ when ${\displaystyle d\geq {\frac {2}{1-\alpha }}}$. Therefore, ${\displaystyle G}$ is an expander graph with expansion ratio ${\displaystyle \alpha }$ with high probability for suitable choices of constant ${\displaystyle d}$ and constant ${\displaystyle \alpha }$.

### Computation of graph expansion

Computation of graph expansion seems hard, because the definition involves the minimum over exponentially many subsets of vertices. In fact, the problem of deciding whether a graph is an expander is co-NP-complete. For a non-expander ${\displaystyle G}$, the vertex set ${\displaystyle S\subset V}$ which has low expansion ratio is a proof of the fact that ${\displaystyle G}$ is not an expander, which can be verified in poly-time. However, there is no efficient algorithm for computing the ${\displaystyle \phi (G)}$ unless NP=P.

The expansion ratio of a graph is closely related to the sparsest cut of the graph, which is the dual problem of the multicommodity flow problem, both NP-complete. Studies of these two problems revolutionized the area of approximation algorithms.

We will see right now that although it is hard to compute the expansion ratio exactly, the expansion ratio can be approximated by some efficiently computable algebraic identity of the graph.

## Graph spectrum

### Laplacian

The adjacency matrix of an ${\displaystyle n}$-vertex graph ${\displaystyle G}$, denoted ${\displaystyle A=A(G)}$, is an ${\displaystyle n\times n}$ matrix where ${\displaystyle A(u,v)}$ is the number of edges in ${\displaystyle G}$ between vertex ${\displaystyle u}$ and vertex ${\displaystyle v}$.

### Graph eigenvalues

Because adjacency matrix ${\displaystyle A}$ is a symmetric matrix with real entries, due to the Perron-Frobenius theorem, it has real eigenvalues ${\displaystyle \alpha _{1}\geq \alpha _{2}\geq \cdots \geq \alpha _{n}}$, which associate with an orthonormal system of eigenvectors ${\displaystyle v_{1},v_{2},\ldots ,v_{n}\,}$ with ${\displaystyle Av_{i}=\alpha _{i}v_{i}\,}$. We call the eigenvalues of ${\displaystyle A}$ the spectrum of the graph ${\displaystyle G}$.

The spectrum of a graph contains a lot of information about the graph. For example, supposed that ${\displaystyle G}$ is ${\displaystyle d}$-regular, the following lemma holds.

 Lemma ${\displaystyle |\alpha _{i}|\leq d}$ for all ${\displaystyle 1\leq i\leq n}$. ${\displaystyle \alpha _{1}=d}$ and the corresponding eigenvector is ${\displaystyle ({\frac {1}{\sqrt {n}}},{\frac {1}{\sqrt {n}}},\ldots ,{\frac {1}{\sqrt {n}}})}$. ${\displaystyle G}$ is connected if and only if ${\displaystyle \alpha _{1}>\alpha _{2}}$. If ${\displaystyle G}$ is bipartite then ${\displaystyle \alpha _{1}=-\alpha _{n}}$.
Proof.
 Let ${\displaystyle A}$ be the adjacency matrix of ${\displaystyle G}$, with entries ${\displaystyle a_{ij}}$. It is obvious that ${\displaystyle \sum _{j}a_{ij}=d\,}$ for any ${\displaystyle j}$. (1) Suppose that ${\displaystyle Ax=\alpha x,x\neq \mathbf {0} }$, and let ${\displaystyle x_{i}}$ be an entry of ${\displaystyle x}$ with the largest absolute value. Since ${\displaystyle (Ax)_{i}=\alpha x_{i}}$, we have ${\displaystyle \sum _{j}a_{ij}x_{j}=\alpha x_{i},\,}$ and so ${\displaystyle |\alpha ||x_{i}|=\left|\sum _{j}a_{ij}x_{j}\right|\leq \sum _{j}a_{ij}|x_{j}|\leq \sum _{j}a_{ij}|x_{i}|\leq d|x_{i}|.}$ Thus ${\displaystyle |\alpha |\leq d}$. (2) is easy to check. (3) Let ${\displaystyle x}$ be the nonzero vector for which ${\displaystyle Ax=dx}$, and let ${\displaystyle x_{i}}$ be an entry of ${\displaystyle x}$ with the largest absolute value. Since ${\displaystyle (Ax)_{i}=dx_{i}}$, we have ${\displaystyle \sum _{j}a_{ij}x_{j}=dx_{i}.\,}$ Since ${\displaystyle \sum _{j}a_{ij}=d\,}$ and by the maximality of ${\displaystyle x_{i}}$, it follows that ${\displaystyle x_{j}=x_{i}}$ for all ${\displaystyle j}$ that ${\displaystyle a_{ij}>0}$. Thus, ${\displaystyle x_{i}=x_{j}}$ if ${\displaystyle i}$ and ${\displaystyle j}$ are adjacent, which implies that ${\displaystyle x_{i}=x_{j}}$ if ${\displaystyle i}$ and ${\displaystyle j}$ are connected. For connected ${\displaystyle G}$, all vertices are connected, thus all ${\displaystyle x_{i}}$ are equal. This shows that if ${\displaystyle G}$ is connected, the eigenvalue ${\displaystyle d=\alpha _{1}}$ has multiplicity 1, thus ${\displaystyle \alpha _{1}>\alpha _{2}}$. If otherwise, ${\displaystyle G}$ is disconnected, then for two different components, we have ${\displaystyle Ax=dx}$ and ${\displaystyle Ay=dy}$, where the entries of ${\displaystyle x}$ and ${\displaystyle y}$ are nonzero only for the vertices in their components components. Then ${\displaystyle A(ax+by)=d(ax+by)}$. Thus, the multiplicity of ${\displaystyle d}$ is greater than 1, so ${\displaystyle \alpha _{1}=\alpha _{2}}$. (4) If ${\displaystyle G}$ if bipartite, then the vertex set can be partitioned into two disjoint nonempty sets ${\displaystyle V_{1}}$ and ${\displaystyle V_{2}}$ such that all edges have one endpoint in each of ${\displaystyle V_{1}}$ and ${\displaystyle V_{2}}$. Algebraically, this means that the adjacency matrix can be organized into the form ${\displaystyle P^{T}AP={\begin{bmatrix}0&B\\B^{T}&0\end{bmatrix}}}$ where ${\displaystyle P}$ is a permutation matrix, which has no change on the eigenvalues. If ${\displaystyle x}$ is an eigenvector corresponding to the eigenvalue ${\displaystyle \alpha }$, then ${\displaystyle x'}$ which is obtained from ${\displaystyle x}$ by changing the sign of the entries corresponding to vertices in ${\displaystyle V_{2}}$, is an eigenvector corresponding to the eigenvalue ${\displaystyle -\alpha }$. It follows that the spectrum of a bipartite graph is symmetric with respect to 0.
${\displaystyle \square }$

### The spectral gap

It turns out that the second largest eigenvalue of a graph contains important information about the graph's expansion parameter. The following theorem is the so-called Cheeger's inequality.

 Theorem (Cheeger's inequality) Let ${\displaystyle G}$ be a ${\displaystyle d}$-regular graph with spectrum ${\displaystyle \alpha _{1}\geq \alpha _{2}\geq \cdots \geq \alpha _{n}}$. Then ${\displaystyle {\frac {d-\alpha _{2}}{2}}\leq \phi (G)\leq {\sqrt {2d(d-\alpha _{2})}}}$

The theorem was first stated for Riemannian manifolds, and was proved by Cheeger and Buser (for different directions of the inequalities). The discrete case is proved independently by Dodziuk and Alon-Milman.

For a ${\displaystyle d}$-regular graph, the value ${\displaystyle (d-\alpha _{2})}$ is known as the spectral gap. The name is due to the fact that it is the gap between the first and the second eigenvalue in the spectrum of a graph. The spectral gap provides an estimate on the expansion ratio of a graph. More precisely, a ${\displaystyle d}$-regular graph has large expansion ratio (thus being an expander) if the spectral gap is large.

We will not prove the theorem, but we will explain briefly why it works.

For the spectra of graphs, the Cheeger's inequality is proved by the Courant-Fischer theorem in linear algebra. The Courant-Fischer theorem is a fundamental theorem in linear algebra which characterizes the eigenvalues by a series of optimizations:

 Theorem (Courant-Fischer theorem) Let ${\displaystyle A}$ be a symmetric matrix with eigenvalues ${\displaystyle \alpha _{1}\geq \alpha _{2}\geq \cdots \geq \alpha _{n}}$. Then {\displaystyle {\begin{aligned}\alpha _{k}&=\max _{v_{1},v_{2},\ldots ,v_{n-k}\in \mathbb {R} ^{n}}\min _{\overset {x\in \mathbb {R} ^{n},x\neq \mathbf {0} }{x\bot v_{1},v_{2},\ldots ,v_{n-k}}}{\frac {x^{T}Ax}{x^{T}x}}\\&=\min _{v_{1},v_{2},\ldots ,v_{k-1}\in \mathbb {R} ^{n}}\max _{\overset {x\in \mathbb {R} ^{n},x\neq \mathbf {0} }{x\bot v_{1},v_{2},\ldots ,v_{k-1}}}{\frac {x^{T}Ax}{x^{T}x}}.\end{aligned}}}

For a ${\displaystyle d}$-regular graph with adjacency matrix ${\displaystyle A}$ and spectrum ${\displaystyle \alpha _{1}\geq \alpha _{2}\geq \cdots \geq \alpha _{n}}$, its largest eigenvalue ${\displaystyle \alpha _{1}=d}$ with eigenvector ${\displaystyle A\cdot \mathbf {1} =d\mathbf {1} }$. According to the Courant-Fischer theorem, the second largest eigenvalue can be computed as

${\displaystyle \alpha _{2}=\max _{x\bot \mathbf {1} }{\frac {x^{T}Ax}{x^{T}x}},}$

and

${\displaystyle d-\alpha _{2}=\min _{x\bot \mathbf {1} }{\frac {x^{T}(dI-A)x}{x^{T}x}}.}$

The later is an optimization, which shares some resemblance of the expansion ratio ${\displaystyle \phi (G)=\min _{\overset {S\subset V}{|S|\leq {\frac {n}{2}}}}{\frac {|\partial S|}{|S|}}=\min _{\chi _{S}}{\frac {\chi _{S}^{T}(dI-A)\chi _{S}}{\chi _{S}^{T}\chi _{S}}}}$, where ${\displaystyle \chi _{S}}$ is the characteristic vector of the set ${\displaystyle S}$, defined as ${\displaystyle \chi _{S}(i)=1}$ if ${\displaystyle i\in S}$ and ${\displaystyle \chi _{S}(i)=0}$ if ${\displaystyle i\not \in S}$. It is not hard to verify that ${\displaystyle \chi _{S}^{T}\chi _{S}=\sum _{i}\chi _{S}(i)=|S|}$ and ${\displaystyle \chi _{S}^{T}(dI-A)\chi _{S}=\sum _{i\sim j}(\chi _{S}(i)-\chi _{S}(j))^{2}=|\partial S|}$.

Therefore, the spectral gap ${\displaystyle d-\alpha _{2}}$ and the expansion ratio ${\displaystyle \phi (G)}$ both involve some optimizations with the similar forms. It explains why they can be used to approximate each other.

## Reference

• Shlomo Hoory, Nathan Linial, and Avi Wigderson. Expander Graphs and Their Applications. American Mathematical Society, 2006. [PDF]