\documentclass[11pt]{article}

\usepackage{lecture}

\newcommand{\ignore}[1]{}

\begin{document}

\lecture{10}{3/4/2013}{Expander Constructions}{Xi Wu}

In the previous lecture we defined expander graphs using the notion of
spectral gap, and derived a number of interesting properties of
expander graphs of low degree. In this lecture, we first argue that
expanders with nontrivial parameters {\em exist}. In fact, we will see
that a random $d$-regular graph is a good expander with high
probability, and that no $d$-regular graph can have significantly better
expansion.

This suggests a randomized construction of expanders, which however
uses too many random bits for the derandomization applications that we
will cover later. What we need are {\em explicit} constructions, i.e.,
families of expander graphs that can be built in an efficient
deterministic way. 

We consider two notions of explicitness. We say
that a family of expanders is {\em mildly explicit} if the (multiset of)
neighbors of a vertex can be computed in time $\poly(N)$, where $N$
denotes the number of vertices. We call a family {\em fully explicit}
if, on input the label of a vertex $u$ and an index $\el$, we can 
compute the label of the end point $v$ of the $\el$th outgoing edge
from $u$ in time polynomial in the length of the description of the
label and the length of the index, i.e., in time $\poly\log(N)$. 
This presupposes an ordering of the outgoing edges at every vertex
$u$. Such an ordering facilitates the description of a random walk on
$G$. 

Ideally, the family contains an expander for every number of vertices.
Typically, we will only be able to realize a subset of the natural
numbers that is sufficiently dense for the applications. 

There are two general approaches for constructing explicit expanders: 
\begin{itemize}
\item \emph{Direct Constructions} \\
  All known direct constructions are based on groups or, more
  generally, on group actions. They are simple to describe and
  therefore very explicit, but their analysis typically involves heavy
  mathematical machinery: harmonic analysis, representation
  theory, number theory, and additive combinatorics. We only introduce
  the general approach and state some of the direct constructions, but
  do not present their analysis. We refer to the recent survey
  \cite{Yehudayoff12} for more information.
\item \emph{Iterative Constructions} \\
  These constructions start from a small expander, and iteratively
  build larger and larger ones using simple graph operations. They
  are harder to describe, but their analysis is elementary and
  intuitive. We develop an iterative construction in full detail,
  namely one based on the replacement product (or the zig-zag
  product) of graphs.
\end{itemize}

\section{Existence and Limitations of Expanders}

We begin with the following theorem, which gives an upper bound on the
spectral gap $1-\lambda(G)$ as a function of the degree $d$.
\begin{theorem}[\cite{Alon86}]
  Let $d$ be a positive integer.
  Every $d$-regular multigraph $G$ on $N$ vertices satisfies
  $\lambda(G) \ge 2\sqrt{d-1}/d - o(1)$. 
\end{theorem}
In other words, if $d$ is constant and $N$ is large, then there are no
regular $N$-vertex graph $G$ of degree $d$ can have $\lambda(G)$ 
significantly smaller than $2\sqrt{d-1}/d$. Regular multigraphs of
degree $d$ that match this bound, i.e., for which $\lambda(G) \leq 
2\frac{\sqrt{d-1}}{d}$, are called {\em Ramanujan graphs}. 

The following theorem shows that random $d$-regular graphs are almost
Ramanujan with high probability.
\begin{theorem}[\cite{Friedman}]\label{thm:friedman}
  Let $d$ be a positive integer. There exists a function $f(N)=o(1)$
  such that the probability that a random $d$-regular multigraph $G$ on
  $N$ vertices satisfies $\lambda(G) \le 2\sqrt{d-1}/d + f(N)$ is at
  least $1 - o(1)$. 
\end{theorem}
Another way to state this result is that \emph{almost all} $d$-regular 
multigraphs have almost-optimal expansion, namely have $\lambda(G)$
close to $2\sqrt{d-1}/d$. The search for deterministic constructions
of expander graphs can therefore be viewed as a derandomization
problem. 

% DvM: commented out the following as it doesn't refer to the spectral
% gap and we didn't cover the reverse expander mixing lemma.
\ignore{
We now prove a simplified version of the above theorem using the 
probabilistic argument.
\begin{proposition}\label{lemma:existence}
  For all $n,d\in\Nat$ such that $n$ is an even number with $n\geq 
  \Omega( d^2 )$ and $d$ is large enough, there is a graph $H$ with 
  $\lambda(H)<\frac{1}{4}$.
\end{proposition}
\begin{proof}
  Let $M_1,\dots,M_d$ be $d$ matchings that are chosen independently 
  and uniformly at random on the vertex set $[n]$.
  We define the graph $H$ as the union of these matchings and prove 
  that, with positive probability, this graph is quasirandom.
  Let $S,T\subseteq[n]$ be disjoint sets.
  We claim that
  \begin{align*}
    \Pr_{M_1,\dots,M_d}\Big[ \big| e(S,T) / (dn) - \mu(S) \mu(T)\big| 
    >\epsilon \Big] < 1/2^{2n}
  \end{align*}
  Now we use a Chernoff bound to get the above concentration result.
  So let $X_i \doteq e_{M_i} (S,T) / n$ and $X=\sum_{i\in[d]} X_i / 
  d$.
  Let us first verify that the expectation is correct: 
  $\Exp[e(S,T)/(dn)] = \Exp[X] = \frac{1}{d}\sum_i\Exp[X_i] = 
  \frac{1}{dn}\sum_i\sum_{s\in S}\sum_{t\in T} \Pr[\{s,t\} \in M_i] = 
  \mu(S)\mu(T)$.
  The latter equality is true because a random matching contains any 
  particular edge with probability $1/n$.
  Thus,
  \begin{align*}
    \Pr\Big[ | X - \Exp(X) | > \epsilon \Big]
    \leq 2 \exp( -2 \epsilon^2 d^2 )
  \end{align*}
  This is $ < 1/2^{2n}$ is we choose $n\geq C d^2$ for a large enough 
  constant $C$ and any constant $\epsilon>0$.
  Since there are at most $2^{2n}$ pairs of subsets $S,T$, this means 
  that there exists a graph $H$ that is $\epsilon$-quasirandom.
  By the converse of the expander mixing lemma, this implies that 
  $\lambda(H)<\frac{1}{4}$ when $\epsilon>0$ is a small enough 
  constant.
\end{proof}
}

\section{Direct Constructions}

An appealing approach to construct expanders is as {\em Cayley graphs
of finite groups}.
\begin{definition}[Cayley graph]
  For any finite group $H$ and any subset $S \subseteq H$,
  the Cayley graph $\mathrm{C}(H,S)$ is the digraph with vertex set 
  $H$, and $(a,b)$ is an edge if $a^{-1}b \in S$.
  In other words, all neighbors of a vertex $a \in H$ are of the 
  form $as$ for some $s\in S$.
\end{definition}
Note that $\mathrm{C}(H,S)$ is a regular digraph of degree $S$. It is 
undirected iff $S^{-1} \subseteq S$. For $\mathrm{C}(H,S)$ to be an
expander, $S$ better be a generating set; otherwise, $\mathrm{C}(H,S)$
is not strongly connected and therefore its spectral gap vanishes.

The characters of $H$ are always eigenvectors of the transition matrix
$M_{\mathrm{C}(H,S)}$ for the random walk on $\mathrm{C}(H,S)$,
irrespective of the choice of $S$. The corresponding eigenvalues
depend on $S$, as given in the next proposition.
\begin{proposition}
  \label{prop:character-spectrum}
  Let $H$ be a finite group, $S \subseteq H$, and $\chi: H \mapsto 
  \C$ a character of $H$.
  Let $M$ denote the transition matrix $M_{\mathrm{C}(H,S)}$,
  and $x \in \C^{|H|}$ be the vector with $x_a = \chi(a)$ for $a \in H$.
  Then $x$ is an eigenvector of $G$ with eigenvalue
  \begin{align*}
    \frac{1}{|S|}\sum_{s \in S}\chi(s^{-1})\,. \tag{1}
  \end{align*}
\end{proposition}
\begin{proof}
  For $a,b \in H$, we have 
  $ M_{ab} = \frac{1}{|S|} I[(\exists s \in S) \, a=bs] =
  \frac{1}{|S|} I[b^{-1}a \in S]$, so
  \begin{eqnarray*}
    (Mx)_a = \sum_{b \in H} M_{ab} x_b 
                    & = & \sum_{b \in H} \frac{1}{|S|} I[b^{-1}a \in
                    S] \cdot \chi(b) \\
                    & = & \frac{1}{|S|} \sum_{s \in S}\chi(as^{-1}) \\
                    & = & \frac{1}{|S|} \sum_{s \in S}\chi(a)
                    \chi(s^{-1}) \\
                    & = & \left( \frac{1}{|S|} \sum_{s \in S}
                      \chi(s^{-1}) \right) x_a.
  \end{eqnarray*}
  This shows that $x$ is an eigenvector of~$M$ with the stated
  eigenvalue.
\end{proof}
Note that the trivial characters $\chi \equiv 1$ corresponds to the
eigenvector $\vec{1}$ with eigenvalue 1. 

In the case that $H$ is Abelian, the characters of $H$ form a full
orthogonal basis for $\mathbb{C}^N$. It follows from Proposition
\ref{lect09:prop:alternate} from Lecture 9 that 
\begin{equation}\label{eq:character}
\lambda(C(H,S)) = \max_{\chi \not\equiv 1} 
\left| \frac{1}{|S|} \sum_{s \in S} \chi(s^{-1}) \right|
= \max_{\chi \not\equiv 1} 
\left| \frac{1}{|S|} \sum_{s \in S} \chi(s) \right|,
\end{equation}
where the last equality follows because $\chi(s^{-1}) = 1/\chi(s)$ and
$1/\chi$ is a character whenever $\chi$ is. 

For the Boolean cube, i.e., for $H = (\zo^n,+)$, the
characters are of the form $\chi_a: x \mapsto (-1)^{\langle x, a
  \rangle}$ where $a \in \zo^n$, and the right-hand side of
\eqref{eq:character} is exactly the bias of $U_S$, the uniform
distribution on $S$:
\begin{align*}
  \frac{1}{|S|}\sum_{s \in S} \chi_a(s)
  = \frac{1}{|S|}\sum_{s \in S}(-1)^{\langle s,a \rangle} = \E_{s
    \leftarrow U_S}[(-1)^{\langle s,a \rangle}] = \bias_a(U_S).
\end{align*}
This  generalizes to every finite Abelian group with a natural
generalization of the notion of bias. Thus, for finite
Abelian groups, the goal of constructing a good Cayley expander of low
degree is equivalent to the construction of a small set with small
bias. 

However, it turns out that Cayley graphs of Abelian groups cannot be
good expanders of small degree -- in order to have a spectral gap
bounded below by some positive constant their degree needs to be
$\Omega(N / \log\log(n))$. The argument hinges on the fact that
the diameter of such expanders is logarithmic. This means that every
group element can be written as a sum of $\Delta = O(\log N)$ terms,
each from the set $S$. Since the group is Abelian, terms in this sum
can be rearranged, and the element can be fully described by the
number of times each element of $S$ appears in the sum. As there are
at most $\Delta^{|S|}$ such descriptions, we need that $\Delta^{|S|}
\geq N$. This implies that $|S| = \Omega(N/ \log(\Delta)) = \Omega(N/
\log\log(N))$.

Thus, we need to consider non-Abelian finite groups and their Cayley
graphs. More generally, we make use of {\em group actions} and their
{\em Schreier graphs}, which we define next.
\begin{definition}[Group action and Schreier graph]
  Given a set $X$ and a group $H$, an action of $H$ on $X$ is a mapping
  $\cdot: X \times H \to X$ such that the following conditions are
  satisfied: 
  \begin{itemize}
  \item $(\forall x \in X) \, x \cdot 1 = x$.
  \item $(\forall x \in X) \, (\forall g,h \in H) \, x \cdot (gh) = (x
    \cdot g) \cdot h$,
  \end{itemize}
  The action of $H$ on $X$ defines a group itself, which we also
  denote by $H$. Given a set $S \subseteq H$, we define the
  \emph{Schreier graph} $\mathrm{S}(X, H, S)$ to be the digraph with
  vertex set $X$ and edges of the form $(x, x \cdot s)$ where $s \in S$. 
\end{definition}
Note that Cayley graphs are Schreier graphs where $G$ acts on itself
by right multiplication. 

The approach using Schreier graphs has been very effective, in
particular when the group $H$ is non-Abelian (needed by the above
argument) and $X$ itself has an Abelian group structure (so that
harmonic analysis can still be applied). We describe two particularly
interesting constructions along these lines.

\paragraph{Simple fully explicit constructions.}
We begin with a construction that acts on a discrete torus.
\begin{construction}\label{construction:torus}
  Let $M$ be a positive integer. The vertex set of $G_{M^2}$ is $V \doteq
  \mathbb{Z}_M \times \mathbb{Z}_M$, where $\mathbb{Z}_M$ denotes the
  additive group of the integers modulo $M$.
  For each vertex $(x,y)\in V$, we define 8 neighbors (with
  multiplicity) as
  \[  (x \pm y, y), (x \pm (y + 1), y), (x, y \pm x), (x, y \pm (x +
  1)). \]
\end{construction}
The graph $G_{M^2}$ in Construction \ref{construction:torus} can be
viewed as the Schreier graph $\mathrm{S}(X,H,S)$ where $X =
\mathbb{Z}_M \times \mathbb{Z_M}$, $H$ denotes (the action of) the
unimodular affine transformations on $X$, i.e., mappings of the form 
$z \mapsto Az+b$ with $|\det(A)|=1$,  and $S$ consists of 
the transformations $L_{b,s}$ and $L_{b,s}+s \cdot e_b$ for $b \in
\{0,1\}$ and $s \in \{-1,1\}$, where $L_{0,s}$ and $L_{1,s}$ denote
the linear transformations defined by 
\[ \begin{bmatrix}
    1 & s\\
    0 & 1
  \end{bmatrix} 
\quad\quad \textrm{ and } \quad\quad
  \begin{bmatrix}
    1 & 0\\
    s & 1
  \end{bmatrix},\]
respectively, and where
\[ e_0 =
  \begin{bmatrix}
    1 \\
    0
  \end{bmatrix} \quad\quad \textrm{ and } \quad\quad
  e_1 =
  \begin{bmatrix}
    0 \\
    1
  \end{bmatrix}.
\]
As there are 8 transformations in total, the degree of $G$ is 8. The
determinant of each $L_{b,s}$ is 1, so all transformations are
unimodular and therefore invertible over $\mathbb{Z}_M$. In fact,
$L_{b,s}^{-1} = L_{b,-s}$, which implies that $G$ is undirected.  

Note that, given $z \in \mathbb{Z}_M \times \mathbb{Z}_M$, we can
compute the neighbors of $z$ in $G_{M^2}$ in time and space $O(\log
N)$, where $N = M^2$ denotes the number of vertices. Thus,
Construction \ref{construction:torus} is fully explicit.

Construction \ref{construction:torus} yields a family of graphs
that is fairly dense. It contains a graph for every number of vertices that
is a positive square.

Finally, we have the following theorem about the spectral expansion of
this construction. 
\begin{theorem}\label{thm:torus}
  There exists a constant $\lambda < 1$ such that every graph
  $G_{M^2}$ from Construction \ref{construction:torus} satisfies
  $\lambda(G_{M^2}) \leq \lambda$.
\end{theorem}
We refer to \cite{GG81} for a proof.

A construction that is even simpler to describe but only mildly
explicit, acts on a cycle. 
\begin{construction}\label{construction:cycle}
  Let $p$ be a prime. The vertex set of $G_p$ is $V \doteq
  \mathbb{Z}_p$, where $\mathbb{Z}_p$ denotes the field of the
  integers modulo $p$. 
  For each vertex $x \in V$, we define 3 neighbors as 
  \[  x +1, x-1, \textrm{ and } x^{-1}, \]
  where $0^{-1}$ is defined as 0. 
\end{construction}
The graph $G_p$ is the Schreier graph $\mathrm{S}(X,H,S)$, where $X = 
\mathbb{Z}_p$, $H$ denotes (the action of) the unimodular linear
fractional transformations on $X$, i.e., mappings of the form 
\[ x \mapsto \frac{ax+b}{cx+d} \quad\quad \textrm{ with } \quad\quad
    \left| \det \begin{bmatrix}
    a & b\\
    c & d
  \end{bmatrix} \right| = 1, \]
and $S$ consists of the transformations corresponding to the matrices
\[ 
    \begin{bmatrix}
    1 & 1\\
    0 & 1
  \end{bmatrix}, 
    \begin{bmatrix}
    1 & -1\\
    0 & 1
  \end{bmatrix}, \textrm{ and }
    \begin{bmatrix}
    0 & 1\\
    1 & 0
  \end{bmatrix}.
\]

The graph $G_p$ has degree 3 and is undirected. When $p$ is given, the
neighbors in $G_p$ can be computed in time $\poly\log(p)$, which is
very efficient but somewhat more complex than Construction
\ref{construction:torus} due to the need to compute an inverse modulo
$p$. There exists such a graph for every prime $p$, thus the family is
fairly dense by the prime number theorem. However, we do not know how
to find a prime $p$ that is close to a target number of vertices $N$
in deterministic time $\poly\log(N)$. Exhaustive search finds one in
time $\poly(N)$. As such, Construction \ref{construction:cycle} is
mildly explicit but not fully explicit.

The spectral gap of $G_p$ is constant, as stated in the next result.
\begin{theorem}\label{thm:cycle}
  There exists a constant $\lambda < 1$ such that every graph
  $G_p$ from Construction \ref{construction:cycle} satisfies
  $\lambda(G_p) \leq \lambda$.
\end{theorem}
We refer to \cite[Theorem 4.42]{Lub94} for a proof.

\paragraph{Ramanujan graphs.}
Recall that $d$-regular graphs that achieve the bound $\lambda(G) \leq
2\sqrt{d-1}/d$ are called \emph{Ramanujan graphs}, and
Theorem~\ref{thm:friedman} says that almost all $d$-regular graphs are
almost Ramanujan. There are explicit constructions of Ramanujan graphs.
We describe one such construction.
\begin{construction}\label{construction:Ramanujan}
  Let $p,q$ be distinct primes such that $p \equiv q \equiv 1 \bmod 4$
  and $p$ is a square modulo $q$. Let $i \in \mathbb{Z}_q$ be such
  that $i^2 \equiv -1 \bmod q$. We define the graph $G=(V,E)$ where $V
  \doteq \mathbb{Z}_q \cup \{\infty\}$ denotes the field of the
  integers modulo $q$ plus one extra node representing infinity.
  For each vertex $x \in V$, we define its neighbors as all vertices
  of the form
  \begin{align*}
    \frac{(a_0+ia_1)x + (a_2 + ia_3)}{(-a_2+ia_3)x + (a_0-ia_1)}
  \end{align*}
  for $a_0,a_1,a_2,a_3 \in \mathbb{Z}_p$ such that $a_0^2 + a_1^2 +
  a_2^2 + a_3^2 = p$, $a_0$ odd and positive, and $a_1,a_2,a_3$ are
  even.
\end{construction}
The graph $G$ is the Schreier graph $\mathrm{S}(X,H,S)$, where $X = 
\mathbb{Z}_q \cup \{\infty\}$, $H$ denotes (the action of) the
invertible linear fractional transformations on $X$, and $S$ 
consists of those transformations corresponding to matrices of the
form 
\begin{equation}\label{eq:transfo}
    \begin{bmatrix}
    a_0+ia_1 & a_2+ia_2\\
    -a_2+ia_3 & a_0-ia_1
  \end{bmatrix}, 
\end{equation}
where the $a_j$'s and $i$ are as stated in Construction
\ref{construction:Ramanujan}.

Note that the determinant of \eqref{eq:transfo} equals
$a_0^2+a_1^2+a_2^2+a_3^2 \equiv p \not\equiv 0 \bmod q$, so the
transformations are invertible. In fact, the inverse of the
transformation induced by $(a_0,a_1,a_2,a_3)$
is induced by $(a_0,-a_1,-a_2,a_3)$. It follows that the graph $G$
is undirected. 

The condition that $q \equiv 1 \bmod 4$ guarantees that $-1$ is a
square modulo $q$, i.e., that $i$ in Construction
\ref{construction:Ramanujan} exists. The condition that $p$ is a
square modulo $q$ guarantees that $G$ is not bipartite (which is a
necessary condition to be an expander). If $p$ is not a square modulo
$q$, the resulting graph $G$ is a so-called bipartite expander. These
facts as well as the following theorem can be proved using number
theory, including results related to the ``Ramanujan conjectures,''
from which the name ``Ramanujan graphs'' originates.
We refer to~\cite{Sar90, Lub94} for more about the underlying
mathematical machinery and the proofs.
\begin{theorem}\label{thm:Ramanujan}
The graph $G$ in Construction \ref{construction:Ramanujan} is a
regular Ramanujan graph of degree $p+1$.
\end{theorem}
Like Construction \ref{construction:cycle}, Construction
\ref{construction:Ramanujan} is mildly explicit but not explicit. In
fact, it is an open problem whether fully explicit Ramanujan graphs
exist. 

\section{Iterative Constructions}

We now develop and fully analyze an iterative combinatorial
construction of expanders. The idea is to start with a good expander
graph $G_0$ of constant size, and then use graph products to
iteratively construct a sequence $G_1, G_2, \dots$ of multigraphs of  
increasing size, while keeping the degree of the graph and the
expansion under control.

The multigraphs $G$ that we construct will be undirected and
$d$-regular, and may have parallel edges. We describe them via the
notion of a \emph{neighbor 
  function} $\Gamma_G:V(G) \times [d]\to V(G)$, where $\Gamma(u,\el)$
denotes the vertex we reach from $u$ if we follow the $\el$th edge out
of $u$. Since $G$ is undirected, for every edge between $u$ and $v$
there exist unique $\el \in [d]$ and $\el' \in [d]$ such that
$\Gamma_G(u,\el)=v$ and $\Gamma_G(v,\el')=u$. This holds even in the
presence of parallel edges, where the uniqueness property is
interpreted as follows: The values for $\el$ used for distinct edges
incident with $u$ are distinct, as are the values for $\el'$ used for distinct
edges incident with $v$, where distinct edges may go between the same
end points $u$ and $v$. 

Note that $\el$ and $\el'$ may differ for a given undirected edge
between $u$ and $v$, i.e., the edge may be labeled differently at $u$
and at $v$.  
A neighbor function $\Gamma$ under which $\el = \el'$ for all edges is
equivalent to a proper edge coloring of $G$ with $d$ colors, i.e., a
mapping $c: E(G) \rightarrow [d]$ such that incident edges receive
distinct colors. We point out that not every $d$-regular multigraph
has a proper edge coloring with $d$ colors. For example, an odd cycle
does not have a proper edge coloring with two colors; it does have one
with three colors. In general, Vizing's Theorem states that every
$d$-regular multigraph has a proper edge coloring with $d$ or $d+1$
colors, but deciding whether one exists with $d$ colors is
\NP-complete.

\subsection{The initial graph}
There are several ways to pick the initial multigraph $G_0$.
Since it has some constant size $N_0$ and constant degree $d$, we 
could use brute force to find one that has sufficiently small
$\lambda(G_0)$ (e.g., is Ramanujan).
Doing so will take constant time, although we would probably want 
to avoid this approach in practice.
A simpler choice, and the one we are going to use, is to pick $G_0$ as
the complete graph $K_d$ on $N_0=d$ vertices with all
self-loops. Note that $K_d$ has a proper edge coloring with $d$
colors: for $u,v \in V(K_d)=[d]$, we set $c(\{u,v\}) = (u+v) \bmod d +
1$. Since $\lambda(K_d)=0$, the expansion is perfect.  

\subsection{Tensor product: Squaring the size}
One of the simplest graph products is the \emph{tensor product}.
Its role in our construction is to increase the size of the graph 
quickly.
\begin{definition}[Tensor product]
  The \emph{tensor product} of a multigraph $G$ of degree $d_G$ and a 
  multigraph $G'$ of degree $d_{G'}$ is the multigraph $G\tensor G'$ whose
  vertex set is $V(G) \times V(G')$, whose degree is $d_G d_{G'}$, and
  whose edges are defined by the neighbor function
  \begin{align*}
    \Gamma_{G \tensor G'} &: \big(V(G)\times V(G')\big) \times 
    \big([d_G]\times[d_{G'}]\big) \to \big(V(G)\times V(G')\big)
    \\
    \Gamma_{G \tensor G'} &\Big((u,u'), (\el,\el')\Big)
    =
    \big(\Gamma_G(u,\el), \Gamma_{G'}(u',\el')\big)\,.
  \end{align*}
\end{definition}
Note that if $G$ and $G'$ are undirected, then so is $G \tensor
G'$. Also, if $\Gamma_{G}$ and $\Gamma_{G'}$ correspond to a proper
edge coloring, then so does $\Gamma_{G \tensor G'}$. 

In order to construct the desired sequence of expanders of increasing 
size, we could try to inductively define the sequence as 
$G_{i}=G_{i-1} \tensor G_{i-1}$.
In each iteration, the number of vertices gets squared, so the number 
of vertices at step $i$ is equal to $|V(G_0)|^{2^i}$, which quickly 
grows to the size we desire.
The expansion of these graphs is very good, but this comes at a
price. If $G_0$ is the complete graph, then all graphs $G_i$ in the 
sequence are actually complete graphs. More generally,
the problem is that next to the number of vertices, the degree gets 
squared in every iteration as well, which is no good if we want to 
construct expanders of constant degree.

Still, if we somehow manage to reduce the degree, the tensor product 
can be an important building block to make the graphs grow quickly in 
our construction. The sequence does not consist of complete graphs
anymore, but we can still guarantee that the expansion of the tensor 
product is at least as good as the expansion of its components, as is 
formalized in the following lemma.
\begin{lemma}\label{lemma:tensor}
  $\lambda(G \tensor G') = \max(\lambda(G),\lambda(G'))$.
\end{lemma}
\begin{proof}
  The transition matrix of the random walk on the graph tensor product
  corresponds to the usual tensor product of the transition matrices.
  Indeed, if $A$ and $A'$ are the transition matrices of $G$ and $G'$, 
  respectively, then the matrix $A\tensor A'=(A_{vu} 
  A'_{v'u'})_{v,u\in [N];\;v',u'\in [N']}$ is the transition matrix of 
  $G\tensor G'$.
  Since $A$ and $A'$ are real symmetric matrices, they have 
  orthonormal bases of eigenvectors, say $(w_1,\dots,w_N)$ and 
  $(w'_1,\dots,w'_{N'})$, corresponding to eigenvalues 
  $\lambda_1,\dots,\lambda_N$ and $\lambda_1',\dots,\lambda_{N'}'$, 
  respectively.
  Then we observe that $\{w_i \tensor w'_j\}_{i \in [N], j \in [N']}$ 
  is an orthonormal basis of $\mathbb{R}^{NN'}$,
  and straightforward computation shows that
  $(A \tensor A') (w_i \tensor w'_j) = (Aw_i \tensor A'w'_j) = 
  \lambda_i\lambda_j' (w_i \tensor w'_j)$,
  Therefore the set $\{\lambda_i\lambda_j'\}_{i \in [N], j \in [N']}$ 
  is the set of all eigenvalues of $A \tensor A'$.
  Recall that the largest eigenvalue of a regular graph is $1$.
  Therefore, the largest eigenvalue of $A \tensor A'$ is $1\cdot 1$, and the 
  second-largest one (in absolute value) is either $1\cdot\lambda(G')$ or 
  $\lambda(G)\cdot 1$.
  Thus $\lambda(G \tensor G') = \max(\lambda(G), \lambda(G'))$.
\end{proof}

\subsection{Replacement product: Reducing the degree}

To counteract the tensor product's degree explosion, we use an
operation that reduces the degree of a multigraph without
deteriorating the spectral gap by too much. The simplest way to reduce
the degree without loosing the connectivity or the overall structure
is to replace every vertex $u$ of degree $d$ by a copy of $d$ fresh
vertices $u_1,\dots,u_d$ that are connected in a cycle. We refer to
those $d$ vertices as the \emph{cloud} of $u$. Furthermore, the $d$
edges incident to $u$ get distributed to the $d$ vertices of the cycle
in such a way that that the resulting graph remains undirected.
Formally, for $G$ of degree $d_G$, we define the graph $G'$
with vertex set $V(G)\times[d_G]$ via the following neighbor function:
\begin{align*}
  \Gamma_{G'}\big((u,\el);1\big) &= (u,\el+1) \\
  \Gamma_{G'}\big((u,\el);2\big) &= (u,\el-1) \\
  \Gamma_{G'}\big((u,\el);3\big) &= (v,\el'),
\end{align*}
where $\el+1$ denotes the successor and $\el-1$ the 
predecessor in the cycle of length $d_G$, $v \doteq \Gamma_{G}(u,\el)$, 
and $\el' \in [d_G]$ is such that $\Gamma(v,\el')=u$. Note that $\el'$
is well-defined because $G$ is undirected.

Basically, label 1 means staying within the same cloud and moving one
position in one direction, label 2 means the same but moving in the
opposite direction, and label 3 means jumping to a neighboring cloud,
namely the one corresponding to $v \doteq \Gamma(u,\el)$. Note that
$v$ could coincide with $u$, in which case $G'$ would have a self-loop
at $(u,\el)$ labeled 3.

By replacing every vertex by a cycle, we thus obtain a multigraph $G'$ that
is undirected and $3$-regular. We still need to check how our
construction fares with respect to the spectral expansion. 
It turns out that the cycle does not do so well in this respect.
\begin{exercise}\label{ex:expansion}
Let $\tilde{H}$ denote the $d$-cycle $H$ with self-loops added at
every vertex for even $d$.
\begin{itemize}
\item[(a)] Show that if $\Gamma_G$ corresponds to a proper edge coloring of
  $G$, then $\lambda(G') \geq \lambda(\tilde{H})$. \\
Hint: Use the characterization given in Proposition
\ref{lect09:prop:alternate:undirected} from Lecture 9, consider the same
optimal vector in each copy of $H$, and match up the components of
different copies according to the proper edge coloring.
\item[(b)] Show that $\lambda(\tilde{H}) \geq \sqrt{1 - \frac{32}{9d}}$. \\
Hint: Again use the characterization given in Proposition
\ref{lect09:prop:alternate:undirected} from Lecture 9, and consider
the vector $x \in \{-1,1\}^d$ representing a cut of the cycle into two
equal connected halves.
\end{itemize}
\end{exercise}
By combining parts (a) and (b) from Exercise \ref{ex:expansion}, we
have that $\lambda(G') \geq \sqrt{1 - \frac{32}{9d}}$, which is too
close to 1 for our purposes. 

The reason the cycle fails to maintain a good spectral gap in the
construction is because its own spectral gap (or that of the closely
related variant that has a self-loop at every vertex) is not good. 
Instead of replacing each vertex with a cycle, we can replace it with
some other multigraph~$H$ on the vertex set $V(H)=[d_G]$ that has a
good spectral gap and some constant degree~$d_H$. We also duplicate
each original edge from $G$ into $d_H$ parallel edges that cross
between clouds in the replacement product in order to make the event
that a random walk moves between clouds and the event that it moves
within a cloud equally probable. This leads to the following
definition of the replacement product.
\begin{definition}[Replacement product]
  The \emph{replacement product} of a multigraph $G$ of degree $d_G$
  and a multigraph $H$ of degree $d_H$ with vertex set $V(H)=[d_G]$ is
  the multigraph $G\replacement H$ whose vertex set is $V(G)\times
  [d]$, whose degree is $2d_H$, and whose edges are defined by the
  neighbor function 
  \begin{align*}
    \Gamma_{G \replacement H} &: \big(V(G)\times V(H)\big) \times [2d_H] 
    \to \big(V(G)\times V(H)\big)\\
    \Gamma_{G\replacement H}&\big((u,\el);1\big) = (u,\Gamma_H(\el,1))\\
    \vdots\\
    \Gamma_{G\replacement H}&\big((u,\el);d_H\big) = (u,\Gamma_H(\el,d_H))\\
    \Gamma_{G\replacement H}&\big((u,\el);d_H+1\big) = 
    (v,\el')\\
    \vdots\\
    \Gamma_{G\replacement H}&\big((u,\el);2d_H\big) = 
    (v,\el'),
  \end{align*}
where $v \doteq \Gamma_{G}(u,\el)$, and $\el' \in [d_G]$ is such that
$\Gamma(v,\el')=u$. 
\end{definition}
Note that the replacement product is only defined if~$H$ has the same 
number of vertices as the degree of~$G$, and that $\el'$ in the above
definition is well-defined because $G$ is undirected. Also, $G
\replacement H$ is undirected, and if both $\Gamma_G$ and  
$\Gamma_H$ correspond to proper edge colorings then so does $\Gamma_{G 
  \replacement H}$. 
%% Figure commented out until adapted.
\ignore{
\begin{figure}[tbp]
  \hfill
  \includegraphics[scale=.7]{drawing-G}
  \hfill
  \includegraphics[scale=.7]{drawing-H}
  \hfill
  \includegraphics{drawing-G-replacement-H}
  \hfill\mbox{}\\
  \mbox{}\hfill$G$\hfill$H$\hfill$G\replacement H$\hfill\mbox{}
\caption{The complete graph $G$ with all self-loops, the complete 
  graph $H$ without self-loops, and their replacement product 
  $G\replacement H$.
  The three shaded ellipses on the right represent the three copies of 
  $H$ that form the three clouds of $G\replacement H$.
  The edge-coloring is not depicted explicitly, but note that the 
  three clouds have been rotated and reflected in the drawing so that 
  the labels and colors match.}
\end{figure}
}

We will prove that the spectral expansion of $G\replacement H$ is not 
much worse than the spectral expansions of $G$ and $H$.
For this, we consider random walks in $G\replacement H$ of 
length~$3$ and focus on the case where the first edge stays within a  
cloud, the second edge crosses to another cloud, and the third edge 
again stays within a cloud. Instead of performing the $3$-step
approach in the \emph{analysis} of the replacement product, it is
also possible to directly consider the graph that is defined by those
walks on the same vertex set as $G \replacement H$. We refer to this
multigraph as the \emph{zig-zag product} $G \zigzag H$, and formally
define it as follows.
\begin{definition}[Zig-Zag product]
  The \emph{zig-zag product} of a multigraph $G$ of degree $d_G$ and a  
  multigraph $H$ of degree $d_H$ with vertex set $V(H)=[d_G]$ is the
  multigraph $G\zigzag H$ whose vertex set is $V(G)\times [d_G]$,
  whose degree is $d_H^2$, and whose edges are defined by the neighbor
  function 
  \begin{align*}
    \Gamma_{G \zigzag H} &: \big(V(G)\times V(H)\big) \times [d_H]^2 \to 
    \big(V(G)\times V(H)\big)\\
    \Gamma_{G\zigzag H} &
    \big((u,\el);(a,b)\big)
    =
    \Gamma_{G\replacement H}(
      \Gamma_{G\replacement H}(
        \Gamma_{G\replacement H}((u,\el);a); d_H+1
        );
        b).\\
  \end{align*}
\end{definition}
Note that in $G \zigzag H$ we do not duplicate edges that cross
between clouds, as we did in $G \replacement H$. An edge label
$(a,b)\in [d_H]\times[d_H]$ specifies the walk $a,d_H+1,b$ in $G
\replacement H$. 

Like the replacement product, the zig-zag product is only defined if
$H$ has the same number of vertices as the degree of~$G$, and 
$G \zigzag H$ is undirected. Unlike $G \replacement H$, it does not
hold in general that if both $\Gamma_G$ and $\Gamma_H$ correspond to
proper edge colorings then so does $\Gamma_{G \zigzag H}$. Indeed, in
general, the following will not hold:
$(u,\el)
=
\Gamma_{G\zigzag H}
\big(\Gamma_{G\zigzag H} ((u,\el);(a,b));(a,b)\big)
$.

We now analyze $\lambda(G \zigzag H)$, which we will then use to upper 
bound $\lambda(G \replacement H)$. Intuitively, since $H$ is a good
expander, the first step in the above walk of length 3 is close to 
choosing a uniform vertex in the same cloud, the second step then
deterministically moves to a neighboring cloud depending on where we
moved to in the first step, and the third step is again close to
choosing a uniform vertex within the new cloud. Thus the whole
``zig-zag'' process is close to a single random step in~$G$ and a
single independent random step in $H$. 

Before formalizing this intuition, let us introduce some notation
for various relevant transition matrices:
\begin{enumerate}
  \item $A$ denotes the adjacency matrix of $G$.
  \item $B \doteq M_H $ denotes the transition matrix of a random walk
    on $H$. 
  \item $\hat A$ denotes the adjacency matrix corresponding to edges 
    \emph{between} the clouds of $G\replacement H$, that is, we have 
    $\hat A_{(v,\el') , (u,\el)}=1$ if $\Gamma_G(u,\el)=v$ and
    $\Gamma_G(v,\el')=u$; otherwise $\hat 
    A_{(v,\el') , (u,\el)}=0$.
  \item $\hat B = I_N\tensor B$ denotes the transition matrix for a
    random walk \emph{within} any cloud of $G\replacement H$, that is,
    $\hat B_{(u,\el') , (u,\el)}=B_{\el',\el}$
    and
    $\hat B_{(v,\el'),(u,\el)}=0$ for distinct $u,v\in V(G)$.
\end{enumerate}
Then the transition matrix for a random walk on the replacement
product and on the zig-zag-product can be written as 
\begin{eqnarray}
 M_{G \replacement H} & = & \frac{1}{2}\hat B +
\frac{1}{2}\hat A, \label{eq:replacement}  \\
M_{G \zigzag H} & = & \hat{B} \hat{A} \hat{B}. \label{eq:zigzag}
\end{eqnarray}
With those expressions in hand, we first upper bound $\lambda(G
\zigzag H)$ and then $\lambda(G \replacement H)$. 
\begin{lemma}\label{lemma:zigzag}
 $\lambda(G \zigzag H) \leq 1-(1-\lambda(H))^2\cdot(1-\lambda(G))$.
\end{lemma}
\begin{proof}
  Let $\lambda \doteq \lambda(G)$ and $\mu \doteq \lambda(H)$.
  We decompose the matrix $B$ using Proposition
  \ref{lect09:prop:decomposition} from Lecture 9:
  \[B \doteq M_H = (1-\mu) M_K +\mu \Delta,\] 
  where $K$ denotes the
  complete graph with self-loops on $d$ vertices, and $\Delta$ is an
  error term with matrix norm $\|\Delta\|_2\leq 1$. Plugging this
  decomposition into \eqref{eq:zigzag} and using the linearity of the
  matrix tensor product, we can write
  \begin{align*}
    M_{G \zigzag H} &=(1-\mu)^2 \cdot (I\tensor M_K) \hat A (I\tensor M_K)
    +(1-\mu)\mu \cdot (I\tensor M_K) \hat A (I\tensor \Delta)\\
    &\quad +\mu (1-\mu) \cdot (I\tensor \Delta) \hat A (I\tensor M_K)
    +\mu^2 \cdot (I\tensor \Delta) \hat A (I\tensor \Delta)\\
    &=(1-\mu)^2 A\tensor M_K + \big(1-(1-\mu)^2\big) \Delta'\,,
  \end{align*}
  where $\Delta'$ is defined so that the last equality holds, and we note 
  that $(I\tensor M_K)\hat A (I\tensor M_K)=A\tensor M_K$ holds 
  because both correspond to the transition matrix of a random walk on
  the graph $G\tensor K$, where we pick a random neighbor in $G$ and a
  random vertex in the corresponding cloud independently. We further
  note that $\Delta'$ is a convex combination of the matrices
  $(I\tensor M_K) \hat A (I\tensor \Delta)$, 
  $(I\tensor \Delta) \hat A (I\tensor M_K)$, and
  $(I\tensor \Delta) \hat A (I\tensor \Delta)$. The matrix $\hat A$ is
  a permutation matrix and therefore has 2-norm 1. As $\|M_K\|_2 = 1$
  and $\|\Delta\|_2 \leq 1$, the other factors also have 2-norm at most
  1. If follows that each of the three component matrices of $\Delta'$
  have 2-norm at most 1, and therefore so does their convex
  combination $\Delta'$. By Proposition
  \ref{lect09:prop:decomposition} from Lecture 9 we conclude that
  \begin{align*}
    \lambda(G \zigzag H)
    &
    \leq(1-\mu)^2 \cdot \lambda + \big(1-(1-\mu)^2\big)
    = 1 - (1-\mu)^2 cdot (1-\lambda). 
  \end{align*}
\end{proof}
We next transfer the bound on $\lambda(G \zigzag H)$ to $\lambda(G
\replacement H)$ and show that the degree reduction using the
replacement product does not hurt the expansion too much.
In particular, we show that if $\lambda(G)$ and $\lambda(H)$ are
bounded by constants smaller than one, then so is
$\lambda(G \replacement H)$.
\begin{lemma}\label{lemma:replacement}
  $\lambda(G \replacement H) \leq
  \left(\frac{\lambda'+7}{8}\right)^{1/3}$, where $\lambda'\doteq  
  1-(1-\lambda(H))^2 (1-\lambda(G))$.
\end{lemma}
\begin{proof}
  Let $M$ denote $M_{G \replacement H}$. 
  In order to apply Lemma~\ref{lemma:zigzag}, we consider the
  multigraph on $V(G \replacement H)$ where every edge corresponds to
  a walk of length $3$ in $G \replacement H$. We have that $M_{G'} =
  M^3$. The eigenvalues of $M^3$ are the cubes of the eigenvalues of
  $M$. This holds in general but easily follows for $M$ as $M$ has a
  full basis of eigenvectors. In particular, 
  \begin{equation}\label{eq:lambda}
  \lambda(G') = \lambda(G \replacement H)^3.
  \end{equation}

  By \eqref{eq:replacement} we can write $M = \frac{1}{2}(\hat A+\hat B)$.
  Multiplying out $M^3$ leads to a sum of $8$ 
  terms, one of which is $\frac{1}{8}\cdot M_{G \zigzag H}$ by
  \eqref{eq:zigzag}.  We collect the remaining $7$ terms of $M^3$ into a 
  matrix $M' \doteq M^3-\frac{1}{8} M_{G \zigzag H}$.
  The 2-norm of $M'$ is bounded by $\frac{7}{8}$ because all of 
  the $7$ terms have a coefficient of $\frac{1}{8}$, and the matrices 
  involved have 2-norm at most one each. Thus, we can write 
  $M_{G'} = \frac{1}{8}M_{G \zigzag H} + M'$ where $\|M'\|_2 \leq \frac{7}{8}$.
  By Proposition
  \ref{lect09:prop:decomposition} from Lecture 9 this means that 
  $\lambda(G') \leq \frac{1}{8}\lambda(G \zigzag H) + \frac{7}{8}$.
  By Lemma~\ref{lemma:zigzag}, $\lambda(G \zigzag H) \leq \lambda'$,
  so $\lambda(G') \leq \frac{\lambda'+7}{8}$. The result then follows from
  \eqref{eq:lambda} by taking cube roots.
\end{proof}

\subsection{Attempted construction}

Recall that our plan is to start from a constant-size complete graph
$G_0$ with self-loops, increase the size of the graph using the tensor
product, and reduce the degree back to a fixed constant without  
loosing too much in expansion. For the latter we use the replacement
product with a suitable fixed graph~$H$ of degree~$d_H$. The attempted
iterative procedure is therefore 
\begin{align}
  G_i= (G_{i-1} \tensor G_{i-1}) \replacement H\,.
\end{align}
We need to make sure that the degree of $G_{i-1}\tensor G_{i-1}$ 
and the number of vertices of $H$ work out to be the same.
The degree of $G_i$ is, by definition of the replacement product, 
equal to $2d_H$. Therefore, if we choose $G_0$ to have degree $2d_H$
as well, and the number of vertices of $H$ to be $(2d_H)^2$, the
construction is indeed well-defined. We still need to argue the
existence of a regular multigraph $H$ with degree $d_H$,
$(2d_H)^2$ vertices, and good expansion. However, there is a more
pressing issue -- the resulting spectral expansion deteriorates by too 
much. 

Let $\lambda_i \doteq \lambda(G_i)$ and $\mu \doteq \lambda(H)$.
We have $\lambda_0=0$ because $G_0$ is a complete graph with
self-loops. By combining Lemma \ref{lemma:tensor} and Lemma
\ref{lemma:replacement}, we obtain the bound
\begin{equation}\label{eq:gap}
 \lambda_i \leq \left( 1 - \frac{(1-\mu)^2}{8} (1-\lambda_{i-1})
\right)^{1/3}. 
\end{equation}
Note that for $\lambda_{i-1}$ close to 1, the right-hand side of
\eqref{eq:gap} is asymptotically $1- \frac{(1-\mu)^2}{24}
(1-\lambda_{i-1})$, which means that our bound on $\lambda_i$
converges to 1 once it gets close to 1. In fact, no matter how small a
positive value $\mu$ is, the bound on $\lambda_i$ converges to 1 as
$i\to\infty$. Thus, the expansion guarantee vanishes as the graphs get
larger, and we are not done yet. In each iteration, we need to do
something to slightly boost the expansion without loosing too much in
the degree and the size of the graph.

\subsection{Squaring: Increasing the expansion}

Perhaps the simplest operation we can perform to boost the expansion 
is \emph{squaring}. Given a multigraph~$G$, the square $G^2$ of $G$
has edges for each walk of length~$2$ in~$G$. This operation squares
the degree, and leaves the number of vertices the same. The edge
labels transfer from $G$ to $G^2$ in a natural way, which we make
formal in the definition below.
\begin{definition}[Squaring]
  The \emph{square} of a multigraph $G$ of degree $d$ is the
  multigraph $G^2$ whose vertex set is $V(G)$, whose degree is $d^2$,
  and whose edges are defined by the neighbor function
  \begin{align*}
    \Gamma_{G^2} &: V(G) \times [d]^2 \to V(G)\\
    \Gamma_{G^2} &
    \big(u;(a,b)\big)
    =
    \Gamma_{G}(
      \Gamma_{G}(u;a)
      ;b).
  \end{align*}
\end{definition}
Note that $G^2$ is undirected. For similar reasons as the zig-zag
product, squaring does not  preserve proper edge colorings: 
$u = \Gamma_{G^2}(\Gamma_{G^2}(u,(a,b)),(a,b))$ does not need to hold
in general.  

Similar to the argument in the first part of the proof of Lemma
\ref{lemma:replacement}, the transition matrix $M_{G^2}$ for the
random walk on $G^2$ equals $M_G^2$ (the square of the transition
matrix for $G$), and the eigenvalues of $M_{G^2}$ are the squares of
the eigenvalues of $M_G$. In particular, we have the following.
\begin{lemma}\label{lemma:squaring}
  $\lambda(G^2) = \lambda(G)^2$.
\end{lemma}

\subsection{The final construction}

Our next attempt is a construction of the form
\begin{align}
  G_i= \big( (G_{i-1} \tensor G_{i-1}) \replacement H \big)^a\,,
\end{align}
where $a$ is some large constant to be specified later.
If $d$ denotes the degree of $H$, then the degree of $G_i$ now equals
$(2d)^a$, so choosing $G_0$ as the complete graphs with self-loops on
$(2d)^a$ vertices and $H$ with $(2d)^a$ vertices yields a well-defined
construction. Moreover, for every $d \geq 3$ Theorem
\ref{thm:friedman} guarantees the existence of such a multigraph $H$
with $\mu \doteq \lambda(H) < 1$  and $a$ sufficiently large
(depending on $d$). In fact, by choosing $d$ large enough, we 
can make $\mu$ an arbitrarily small positive real.

Our bound on $\lambda_i$ now becomes
\[
 \lambda_i \leq \left( 1 - \frac{(1-\mu)^2}{8} (1-\lambda_{i-1})
\right)^{a/3}, 
\]
which for $\lambda_{i-1}$ close to 1 asymptotically equals
$1- \frac{a(1-\mu)^2}{24} (1-\lambda_{i-1})$. This implies that for 
$a > \frac{24}{(1-\mu)^2}$, the value 1 is a repelling fixed point of
our bound, and since $\lambda_0=0$, $\lambda_i$ remains bounded away
from 1, i.e., there exists $\lambda<1$ such that $\lambda_i \leq
\lambda$ for every $i$. 

There is one remaining issue with the construction -- the resulting
family of expanders is too sparse. This is because the number of
vertices grows doubly exponential: $|V(G_i)| = (2d)^a \cdot
|V(G_{i-1})|^2$, so $|V(G_i)| \geq |V(G_0)|^{2^i}$. 
To remedy this issue, we modify the construction as follows:
\begin{align*}
  G_i &= \big( (G_{i/2} \tensor G_{i/2}) \replacement H \big)^a.
\end{align*}
Now the number of vertices grows more mildly. More precisely, 
$|V(G_{2^k})|=(2d)^a \cdot |V(G_{2^{k-1}})|)^2 = O\left(((2d)^a \cdot
  |V(G_1)|)^{2^k}\right)$. This yields a family with
inverse quadratic density: For every target value $N$ there exists
some $G_i$ satisfying $N \leq |V(G_i)| \leq (2d)^a \cdot 
N^2$. 

We still need to argue that the family is fully explicit. Let $T(i)$
denote the running time required to evaluate $\Gamma_{G_i}$.
In order to compute a neighbor in $G_i$, we need to make at most $2a$
queries to $\Gamma_{G_{i/2}}$, which are combined in time that is  
polylogarithmic in the size of $G_i$. This leads to the recurrence 
$T(i) \leq 2a \cdot T(i/2) + \poly\log(|V(G_i)|)$, which solves to 
$T(i) \leq (\poly\log(|V(G_i)|))^{\log(2a)} = \poly\log(|V(G_i)|)$, so
the family is indeed fully explicit.

To summarize, we have established the following theorem.
\begin{theorem}[Iterative Construction of Expanders]
There exists a fully explicit family of inverse quadratic density
consisting of multigraphs $G_i$ with constant degree and $\lambda(G_i)
\leq \lambda$ for some constant $\lambda < 1$ that can be constructed
using tensor products, replacement products, and squaring starting
from two fixed multigraphs. 
\end{theorem}

Finally, we point out an alternate construction that uses the zig-zag
product instead of the replacement product:
\begin{align*}
  G_0 &= K_{d^2} \\
  G_i &= (G_{i/2} \tensor G_{i/2})^2 \zigzag H.
\end{align*}
The construction is well-defined if $H$ has $d^8$ vertices and degree
$d$. All graphs $G_i$ have degree $d^2$, and for $\lambda(H)$
sufficiently small, a similar analysis based on Lemma
\ref{lemma:tensor} and Lemma \ref{lemma:zigzag} shows that
$\lambda(G_i) \leq \lambda$ for some constant $\lambda<1$. 

\bibliographystyle{alpha}
\bibliography{references}

\end{document}
