\documentclass[11pt]{article}

\usepackage{lecture}
\begin{document}

\lecture{13}{3/6/2013}{Derandomized Squaring}{Alexi Brooks}

\draft

In this lecture, we introduce a new graph operation, the 
\emph{derandomized squaring}, which affects the second-largest 
eigenvalue of a graph in a similar way as squaring and which is based 
on the replacement product.
The advantage that derandomized squaring has over squaring is that the 
degree does not go up by too much.
We can use this tool to show that the problem of Undirected 
Connectivity in deterministic Logspace.

As explained in the last lecture, we consider edge-colored graphs and 
we represent them formally as a \emph{neighbor function}
$\Gamma_G:V(G) \times [D]\to V(G)$.
To describe the neighbor $v=\Gamma_G(u,\el)$ that we reach from $u$ if we 
follow the edge $\{u,v\}$ that has color $\el$ under the coloring $c$.
In this lecture, we will not require that the induced edge-coloring is 
proper or that the graph is undirected.
Instead, we will consider ``consistently labeled'' graphs $G$, which 
are $D$-regular directed graphs with edge colors from $[D]$ such that 
any two outgoing edges have distinct colors and any two incoming edges 
have distinct colors at every vertex.
We make this formal in the following definition.
\begin{definition}
  The edge-colored directed graph~$G$ represented by the neighbor 
  function
  \begin{equation*}
    \Gamma_G:V(G) \times [D]\to V(G)
  \end{equation*}
  is called \emph{consistently labeled} if,
  for all $u,u'\in V(G)$ with $u\neq u'$ and all $\el,\el'\in[D]$ with 
  $\Gamma_G(u,\el)=\Gamma_G(u',\el')$, we have $\el\neq \el'$.
\end{definition}

\section{Replacement Product}

We defined the replacement product $G\replacement H$ in the previous 
lecture for a $D$-regular $N$-vertex graph~$G$ and a $d$-regular 
$D$-vertex graph~$H$:
For every vertex~$u$ of $G$, we create a distinguished copy of~$H$ in 
$G\replacement H$.
This copy is the ``cloud'' of $v$ in $G\replacement H$.
Each vertex in the cloud has a label from the set $V(H)=[D]$.
Within a cloud, adjacencies correspond to adjacencies in $H$.
Across clouds, adjacencies exist as they do in $G$; if we are at node 
$(u,\el)$ in $G\replacement H$, then we have $d$ edges to the vertex 
$(\Gamma_G(u;\el), \el)$.
and for each edge we choose the vertices within the clouds that 
correspond to its edge label.

\paragraph{Transition Matrices in the Replacement Product.}
We recall a number of transition matrices related to the replacement 
product $G\replacement H$ that will be convenient in defining and 
analyzing the derandomized squaring:
\begin{enumerate}
  \item $A$ is the transition matrix of $G$
  \item $B$ is the transition matrix of $H$
  \item $\hat A$ is the transition 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 $\hat 
    A_{(v,\el') , (u,\el)}=0$, otherwise.
  \item $\hat B = I_N\tensor B$ is the transition matrix for walking 
    \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 all distinct $u,v\in V(G)$.
\end{enumerate}
The transition matrix of the replacement product can be written as
$M=\frac{1}{2}\hat B + \frac{1}{2}\hat A$.

\section{Derandomized Squaring}

Derandomized Squaring~\cite{rozenman2005derandomized} is related to a 
certain random walk in the Replacement Product.
To compute the derandomized square of a given $D$-regular directed 
graph $G$, we will thus again make use of a fixed constant-size 
expander~$H$.
In our construction, the number of vertices of $H$ has to be equal to 
the degree $D$ of $G$.

Conceptually, we generate the derandomized square $G\dersquare H$ of 
$G$ and $H$ by ``lifting'' $G$ onto $G\replacement H$, taking two 
steps between clouds, and then projecting back onto $G$.
Since each step between clouds (a transition with respect to 
$\hat{A}$) is deterministic, we make sure we are located at any vertex 
in each cloud with uniform probability.
We achieve this before the first across-cloud step by doing the 
lifting in such a way that we select a vertex in the corresponding 
cloud uniformly at random among the vertices in the cloud.
We achieve randomness before the second across-cloud step by taking a 
step within the cloud, that is, according to $\hat{B}$.
We exploit the fact that $H$ is a good expander, so a single step in 
$\hat{B}$ should give us a reasonable approximation of a uniform 
distribution.
Thus, the transition matrix $M(G\dersquare H)$ of the derandomized 
square is defined as
\begin{equation*}
  M(G\dersquare H) = P\hat{A}\hat{B} \hat{A}L\,.
\end{equation*}
Here $L$ is the lifting operation and $P$ is the corresponding 
projection.
That is, $L$ is the $ND \times N$ matrix and $P$ is the $N\times ND$ 
matrix that satisfies
\begin{align*}
  \big( L x \big)_{ (u,\el) } &= x_u / D\,,\\
  \big( P z \big)_{ u }       &= \sum_\el z_{(u,\el)}\,,
\end{align*}
for all $N$-dimensional vectors $x$, all $ND$-dimensional vectors $z$, 
and all $u\in V(G)$ and $\el\in V(H)$.
\begin{figure}[tbp]
  \begin{center}
    \Large
    \input{drawing-dersquare.pdf_tex}
  \end{center}
  \caption{\label{fig:dersquare}
    A pictorial representation of the five-step walk that makes up a 
    single step in the derandomized square graph.
    The left side of the picture corresponds to the vertices of $G$ 
    and thus the vertices of $G\dersquare H$.
    The right side of the picture corresponds to the graph 
    $G\replacement H$; it is not actually part of the graph~$G 
    \dersquare H$, but any edge in $G\dersquare H$ can be though of as 
    a five-step walk in the graph $G\ \dot\cup \ (G\replacement H)$:
    Starting at the top left vertex~$v$, we first ``lift'' to 
    $G\replacement H$ by selecting uniformly at random a vertex in the 
    cloud $H_v$ of $v$ in $G\replacement H$.
    Next we take the deterministic step~$\hat A$, which corresponds to 
    switching the cloud, i.e., it is a step in~$G$.
    Then we take a uniform step inside the second cloud, which 
    corresponds to~$\hat B$.
    We take another deterministic step~$\hat A$ and arrive somewhere 
    in a third cloud.
    Finally, we ``project'' back to the vertex of~$G$ whose cloud we 
    just arrived at.}
\end{figure}

To understand this definition (cf.~also Figure~\ref{def:dersquare}), 
recall that basic squaring generates the graph~$G^2$ of degree~$D^2$, 
and it connects vertices that can be reached in two steps.
The degree of a graph is closely related to the amount of randomness 
needed to perform a random walk on it, and we therefore want it to be 
small.
In the definition of $G\dersquare H$, we only have two steps where 
randomness is needed --- the two $\hat{A}$-steps and the projection 
step $P$ are purely deterministic and do not contribute to the degree 
of $G\dersquare H$.
The steps that do require randomness are $L$ and $\hat{B}$.
The lifting $L$ selects one of~$D$ vertices in a cloud uniformly at 
random, and the $\hat{B}$ steps select one of $d$ neighbors uniformly 
at random.
Thus, the degree of $G\dersquare H$ is $D \cdot d$ as opposed to the 
degree $D\cdot D$ of $G^2$.

The transition matrix above suffices to do the eigenvalue analysis, 
but formally, we also need to specify the edge labels of the graph 
$G\dersquare H$.
\begin{definition}\label{def:dersquare}
  The \emph{derandomized square} of a degree-$D$ graph $G$ with 
  respect to a degree-$d$ graph~$H$ with vertex set $V(H)=[D]$ is the 
  graph $G\dersquare H$ whose vertex set is $V(G)$, whose degree is 
  $D\cdot d$, and whose edges are defined by the neighbor function
  \begin{align*}
    \Gamma_{G \dersquare H} &: V(G)\times ([D] \times [d]) \to V(G)\\
    \Gamma_{G\dersquare H} &
    \big(u;(\el,a)\big)
    = v\text{, where}\\
    &(v,*) \doteq \Gamma_{G\replacement H}\Big(\Gamma_{G\replacement 
      H}((u,\el);d+1);a\Big)\,.
  \end{align*}
\end{definition}
In particular, if $H$ is the complete graph, then $G\dersquare H$ is 
equal to $G^2$.
We now prove more generally that, if $H$ is a good expander, then the 
second-largest eigenvalue of $G\dersquare H$ is close to the one of~$G^2$.
\begin{lemma}\label{lemma:dersquare}
  If $G$ has second-largest eigenvalue $\lambda$ and $H$ has 
  second-largest eigenvalue $\mu$, then $G\dersquare H$ has 
  second-largest eigenvalue at most $(1-\mu)\lambda^2 + \mu$.
\end{lemma}
\begin{proof}
  The transition matrix of $G\dersquare H$ is $M(G\dersquare H)=P\hat 
  A \hat B \hat A L$ as discussed above.
  By the matrix-decomposition view of second-largest eigenvalues, we 
  can write
  $\hat{B}=I_N \otimes B = (1-\mu)\cdot I_N \otimes J_D + \mu\cdot I_N 
  \otimes E$ for some error matrix $E$ with $\|E\|_2\leq 1$.
  We define $\tilde{J}=I_N \otimes J_D$ and $\tilde{E}=I_N \otimes E$.
  Then $\|\tilde E\|_2 \leq 1$ holds by the properties of the tensor 
  product.
  The transition matrix $M = P\hat{A}\hat{B}\hat{A}L$ can then be 
  decomposed into
  \begin{equation}\label{Mdecomp}
    M = (1-\mu)\cdot P\hat{A}\tilde{J}\hat{A}L + \mu\cdot P\hat{A}\tilde{E}\hat{A}L\,.
  \end{equation}

  Note that $\tilde{J}$ corresponds to moving to uniformly at random 
  vertex in the same cloud and the matrix product $LP$ does the exact 
  same thing, we have $\tilde{J}=LP$.
  Furthermore, note that $P\hat A L$ first moves to a uniform vertex in 
  the cloud, crosses to a neighboring cloud deterministically, and then 
  collapses the clouds to a single vertex.
  This is the same operation as one step in $A$, so we have $A=P\hat A 
  L$.
  Then the first matrix product in \eqref{Mdecomp} becomes
  $P\hat{A}LP\hat{A}L = (P\hat{A}L)^2 = A^2 = M(G)^2$.
  Then we can use the triangle inequality to bound $\lambda(M) \leq 
  (1-\mu)\lambda(A^2) + \mu \lambda(P\hat{A}\tilde{E}\hat{A}L)$.
  Since $\lambda(A^2)=\lambda^2$ and 
  $\lambda(P\hat{A}\tilde{E}\hat{A}L)\leq\|P\hat{A}\tilde{E}\hat{A}L\|_2
  \leq\|P\|_2\cdot \|\hat{A}\|_2 \cdot \|\tilde{E}\|_2\cdot \| 
  \hat{A}\|_2\cdot \|L\|_2= \sqrt{D} \cdot 1 \cdot \frac{1}{\sqrt{D}}$, 
  we obtain the claimed inequality.
\end{proof}

In the next lecture, we will use the derandomized squaring operation 
to obtain a log-space algorithm for undirected connectivity.

\bibliographystyle{alpha}
\bibliography{references}

\end{document}
