%% LyX 1.6.8 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
%\documentclass[oneside,english]{amsart}
\documentclass[10pt]{article}
%\usepackage[T1]{fontenc}
%\usepackage[latin9]{inputenc}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}

\newenvironment{proof-sketch}{\noindent{\it Sketch of Proof.}\hspace*{1em}}{\qed\medskip}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
%\numberwithin{equation}{section}
%\numberwithin{figure}{section}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}
  \theoremstyle{definition}
  \newtheorem{defn}[thm]{Definition}
 \theoremstyle{definition}
  \newtheorem{example}[thm]{Example}
  \theoremstyle{plain}
  \newtheorem{cor}[thm]{Corollary}
  \theoremstyle{plain}
  \newtheorem{fact}[thm]{Fact}

\hbadness=10000
\vbadness=10000

\setlength{\oddsidemargin}{.25in}
\setlength{\evensidemargin}{.25in}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}

\newcommand{\handout}[5]{
   %\renewcommand{\thepage}{#1-\arabic{page}}
   \noindent
   \begin{center}
   \framebox{
      \vbox{
    \hbox to 5.78in { {\bf 6.842 Randomness and Computation}
     	 \hfill #2 }
       \vspace{4mm}
       \hbox to 5.78in { {\Large \hfill #5  \hfill} }
       \vspace{2mm}
       \hbox to 5.78in { {\it #3 \hfill #4} }
      }
   }
   \end{center}
   \vspace*{4mm}
}

\newcommand{\lecture}[4]{\handout{#1}{#2}{Lecturer:
#3}{Scribe: #4}{Lecture #1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\begin{document}
%\input{preamble.tex}
\lecture{8}{March 5, 2012}{Ronitt Rubinfeld}{Alex Arkhipov}

\makeatother

%\usepackage{babel}

This lecture, we will use Markov chains and random walks on graphs to solve
the undirected $st$-connectivity problem in randomized logspace.
We will also develop ideas in linear algebra related to random walks.


\section{Last Class}

Last time, we started talking about Markov chains and random walks.
A \textbf{Markov chain }is a memoryless random process in which one
transitions from state to state without regard for the prior history.
A \textbf{random walk }is a special kind of Markov chain associated
to a graph in which the state is the current node and you transition
by moving along an out-edge of the current node uniformly at random. 

We may represent a Markov chain as a \textbf{transition matrix }where
$P$ where each entry $P_{i,j}$ is the probability of moving from
state $i$ to state $j$. So, if the state at the current step is
$i$, then $i^{th}$ row lists the distribution of states in the next
step.

\[
\mbox{Row }i\mbox{ }\left[\begin{array}{ccccc}
\\\\P_{i,1} & P_{i,2} & \dots & P_{i,n-1} & P_{i,n-1}\\
\\\\\end{array}\right]\]
This obervation that the rows represent probability distributions
implies that the rows sum to one, and that the entries are non-negative.
Such a matrix is called \textbf{stochastic}; all transition matrices
of Markov chains are stochastic. If the columns also sum to one, we
say the Markov chain is \textbf{doubly stochastic}. One example of
a doubly stochastic Markov chain is a random walk on a $d$-regular
directed (or undirected) graph. This follows because each row distribution
is uniform over the the $d$ out-neighbors of that vertex, and so
each column also has $d$ entries of $1/d$ of the corresponding $d$
in-neighbors.

\[
\mbox{Vertex }i\mbox{ }\left[\begin{array}{ccccc}
 & 1/d\\
 & 0\\
0 & 1/d & 1/d & 1/d & 0\\
 & 0\\
 & 1/d\end{array}\right]\]


If the vector $\Pi$ is a probability distribution over states, performing
one step of the Markov chain yields the distribution given by $\Pi P$.
A \textbf{stationary distribution} $\Pi$ is a fixed point of the
Markov chain, meaning it satisfies $\Pi P=\Pi$. Restated, it is a
distribution over states so that if one picks a random state as per
that distribution and transitions it randomly as per the Markov chain,
the resulting distribution over states is the same. Observe that for
a doubly stochastic Markov chain, the uniform distribution is stationary.


\section{Stationary Distributions of Markov Chains}

With stationary distributions defined, a natural question us whether
every Markov chain has a stationary distribution, and whether it is
unique. It turns out that these both hold for Markov chains satisfying
certain {}``niceness'' conditions. 

Throughout this lecture, we assume Markov chains have only a finite number of states 
and which are time-homogenous, meaning that the transition matrix is the same at each step.

\begin{defn}
A Markov chain is \textbf{irreducible} if there is some value $n$ so that for any states $x$, $y$,
if you start at $x$ and take $n$ steps, there is a positive probability you end up at $y$. 
Equivalently, if the Markov chain has transition matrix $P$, then all entries of $P^n$ are strictly positive. 
\end{defn}

We can think of irreducibility of a Markov chain as a property of the graph that marks which states can transition to which state.

\begin{defn}
To a Markov chain $M$, associate a directed reachability graph $G_M$ whose nodes are
states, with a directed edge for each transition that occurs with positive probability.
A Markov chain $M$ is {\em ergodic} if and only if
\begin{enumerate}
\item The graph $G_M$ is \textbf{irreducible}: For every
large enough $n$, there is a positive probability
path of length $n$ between any two states. 
\item The graph $G_M$ \textbf{aperiodic}: The GCD of the lengths of 
positive probability cycles of $G_M$ is $1$.
\end{enumerate}
\end{defn}

The strongly-connectedness condition means that no matter which state
you start in, you eventually reach every other state with positive
probability. The aperiodicity condition rules out, say, a random walk
on a bipartite graph where you necesarrily alternate between the two
halves on odd and even steps. 

Together, these conditions suffice to guarantee that there's a unique stationary distribution.
\begin{thm}
\label{thm:stationary}Any ergodic Markov chain has a unique stationary
distribution.
\end{thm}

\section{Mixing in Random Walks}

One question about random walks is how long it takes for the walk
to diffuse throughout the graph. We define multiple metrics to quantify
these times. Although we will give these definition for random walks,
they apply in general to Markov chains.
\begin{defn}
The \textbf{hitting time} $h_{s,t}$ from a vertex $s$ to a vertex
$t$ on a graph $G$ is the expected number of steps for a random
walk on $G$ starting at $s$ to reach $t$. In the case where $s=t$,
this is the \textbf{return time. }

One may wonder whether the return time of every node is necessarily
even finite. The return time is in fact always finite for ergodic random walks, and can be
computed directly from the stationary state in the case of ergodic
random walks.\end{defn}
\begin{thm}
If a random walk is ergodic, then $h_{s,s}=1/\Pi_{s}$, where $\Pi_{s}$
is the probability of $s$ in the stationary distribution, which is nonzero.
\end{thm}

Note that nodes with higher weight in the stationary distribution
have shorter return times. This theorem is not true for non-ergodic random walks, 
such as a walk on a line where you always go right until you
reach the end. 

The hitting time tells us the expected time to reach a given node.
What if we instead want to visit every node? 
\begin{defn}
The \textbf{cover time} $\mathcal{C}_{u}\left(G\right)$ of a graph
starting at a node $u$ is the expected number of steps needed for
a random walk starting at $u$ to visit every node. When no node is
specified, the cover time $\mathcal{C}\left(G\right)$ is the maximum
cover time over all start nodes $u$. 

To get a sense of cover times, let's look at some graphs.\end{defn}
\begin{example}
If the graph is $K_{n}^{\ast}$, the complete graph with self loops
on $n$ vertices, then every step produces a uniformly random vertex.
This is equivalent to the coupon collector's problem, in which one
picks a random coupon uniformly from $n$ coupons with replacement
until one has collected at least one of each coupon. By a standard
result, $\theta\left(n\ln n\right)$ coupons are needed, so $\mathcal{C}_{u}\left(K_{n}^{\ast}\right)=\theta\left(n\ln n\right)$.
\end{example}

\begin{example}
Consider the line graph $L_{n}$ on $n$ vertices. Here, a random
walk is brownian motion in one dimension, and visiting all the vertices
is equivalent to visting the left and right one. Since after $n$
steps, one expects to move distance $\theta\left(\sqrt{n}\right)$,
you might guess that the cover time is $\theta\left(n^{2}\right)$.
Indeed, $\mathcal{C}_{u}\left(L_{n}\right)=\theta\left(n^{2}\right)$.
You might like to think about which start positions have the highest
cover times.
\end{example}

\begin{example}
This example illustrates that the cover time may strongly depend on
the start node. Define the lollipop graph $G$ to be a path of length
$n/2$ attached to a complete graph with self-loops on $n/2$ vertices. 

%
\begin{figure}
\centering{}\includegraphics[scale=0.5]{\string"Lollipop graph\string".png}\caption{Lollipop graph with $n=10$}

\end{figure}


Suppose we start at the far node of the line, which we'll call $u$.
One expects to take $\theta\left(n^{2}\right)$ steps walking to the
end of the line to reach the connected cluster, then $\theta\left(n\ln n\right)$
steps visiting all the nodes of the cluster. This ignores the fact
that one might wander off the cluster to the line with low probability,
but this turns out not to waste too many steps, as we usually quickly
wander back into the cluster. In fact, $\mathcal{C}_{u}\left(G\right)=\theta\left(n^{2}\right)$.

One the other hand, suppose one starts at a node $v$ in the cluster.
From here, it's not easy to get to the line: One only gets to the
connecting node every $n$ steps on average, and the probability of
taking the line edge is $1/\left(n+1\right)$. Even then, a walk on
the line is likely to wander back to the cluster before it reaches
node $u$ at other end: Most random walks on a line starting from
one end return to that end many times before reaching the other end.
Overall, $\mathcal{C}_{u}\left(G\right)=\theta\left(n^{3}\right)$
steps are needed on average.

Overall, the cover time of the graph is $\mathcal{C}\left(G\right)=\theta\left(n^{3}\right)$
\end{example}
In fact, the cover time for lollipop graph is asymptotically the worst
possible.
\begin{thm}
\label{thm:cover-time}If $G$ is an undirected, nonbipartite graph
with $n$ nodes and $m$ edges, then

\[
C\left(G\right)\leq2m\left(n-1\right)\leq n^{3}\]
\end{thm}
\begin{cor}
The hitting time for undirected, nonbipartite graph is bounded by
$h_{s,t}\leq n^{3}$.
\end{cor}

\begin{proof-sketch}
We'll give only the idea of the proof. The trick is to look at the
line graph $G'$, which is constructed by taking edges of $G$ as
nodes and connecting ones that share an edge. Because $G'$ turns out to be doubly
stochastic, its stationary distribution is uniform. The expected return
time of $G'$ from any node is the inverse of its weight in the stationary
distribution, and therefore equals $m$. This can be used to bound the time required
to hit each edge of a walk that is defined by a spanning tree of the graph.
Once the edges of the spanning tree have all been hit, the random
walk has hit all nodes of the graph.
\end{proof-sketch}

Note that these results are definitely not true for directed graphs
-- these can have exponentially large cover times. For example, consider 
a graph where the nodes are in a line, such that each node
$i$ has two outgoing edges -- one directed towards node $i+1$ and the other
directed towards node $1$. So, at each step of a
random walk on the graph, there is an equal probability of moving
to the next node or returning to the start. Since reaching the end
node from the start node requires $n$ successes in a row, the expected
cover time is $\theta\left(2^{n}\right)$. 

\section{Space-Efficient Single-Pair Connectivity Checking}

We can use random walks to give a simple algorithm to check in randomized
logspace whether two vertices lie on the same connected component.
For concreteness, define:
\begin{defn}
The \textbf{undirected connectivity problem (UST-conn) }is to decide
whether two given vertices $s$ and $t$ of an undirected graph $G$
lie on the same connected component.
\end{defn}

\begin{defn}
The complexity class \textbf{RL }is class of problems that can be
solved by polynomial-time and logarithmic-space Turing machines $M$
with one-sided error, meaning\end{defn}
\begin{itemize}
\item If $x\in L$, then $M$ accepts with probability at least $2/3$.
\item If $x\notin L$, then $M$ rejects.\end{itemize}
\begin{thm}
The undirected connectivity problem (UST-conn) is in RL.\end{thm}

\begin{proof}
We use the following simple algorithm: Let the input graph be $G$,
start node $s$, and end node $t$. Begin at the start node $s$,
and take a random walk in $G$ for $4n^{3}$ steps. If you reach $t$
among those steps, accept; otherwise, reject.

First, we check the one-sided error correctness condition. 

If $s$ and $t$ lie on the same connected component, then by applying
Theorem \ref{thm:cover-time} to that subgraph $G'$ of that component
gives $h_{s,t}\leq C\left(G'\right)\leq n^{3}$. Thus, the expected
number of steps to reach $t$ is $n^{3}$, so by Markov's inequality,
the probability of failing to reach $t$ within $4n^{3}$ steps is
at most $1/4$.

If $s$ and $t$ lie on different connected components, no path from
$s$ can reach $t$, so the algorithm always rejects.

Now, we only need to check that this algorithm runs in polynomial
time and logarithmic space. The polynomial running time is clear.
For logarithmic space, it is easy to see that each of the steps needed
can be done in logarithmic space:
\begin{itemize}
\item Use $\lg n$ bits to store the location of the current node
\item Use $O\left(\lg n\right)$ bits to choose a random neighbor.
\item Use $\lg4n^{3}$=$\theta\left(\lg n\right)$ bits to keep the count
of the current step.
\end{itemize} \end{proof}

A further result (Reingold 2008) shows that UST-conn is in L (logspace)
by derandomizing the random walk. It's open where $RL \subseteq L$, but
it's known that $RL$ is contained in $L^{3/2}$, the class of problems
solvable in $\log\left(n\right)^{3/2}$ space and polynomial time.


\section{Linear Algebra Review}

We'll write down some definitions from linear algebra that will be
useful for proving things about random walks. We'll use the convention
where vectors are written as row vectors $v=\left(v_{1},\dots,v_{n}\right)$,
and matrices act on the right, as in $w=vM$. This might look opposite
to what you're used to, but the convention doesn't affect the results.
\begin{defn}
A vector $v$ is an \textbf{eigenvector} of $A$ with \textbf{eigenvalue}
$\lambda$ if \[
vA=\lambda A\]

\end{defn}


For example, if $P$ is the transition matrix of a $d$-regular graph,
then the fact that the graph is doubly stochastic implies that

\[
\left(\frac{1}{n},\dots,\frac{1}{n}\right)P=\left(\frac{1}{n},\dots,\frac{1}{n}\right),\]
so the uniform distribution vector $\left(\frac{1}{n},\dots,\frac{1}{n}\right)$
is an eigenvector of $P$ with eigenvalue 1.
\begin{fact}
If a matrix $P$ has eigenvalues $v^{\left(1\right)},\dots,v^{\left(n\right)}$
with corresponding eigenvalues $\lambda^{\left(1\right)},\dots,\lambda^{\left(n\right)}$,
then the following matrices have the same eigenvectors and eigenvalues
related as follows:
\begin{itemize}
\item $\alpha P$ has eigenvectors $\left\{ v^{\left(i\right)}\right\} $
with corresponding eigenvalues$\left\{ \alpha\lambda^{\left(i\right)}\right\} $,
since \[
v^{\left(i\right)}\left(\alpha P\right)=\left(\alpha\lambda^{\left(i\right)}\right)v^{\left(i\right)}\]

\item $P+I$ has eigenvectors $\left\{ v^{\left(i\right)}\right\} $ with
corresponding eigenvalues$\left\{ \lambda^{\left(i\right)}+1\right\} $,
since \[
v^{\left(i\right)}\left(P+I\right)=\lambda^{\left(i\right)}v^{\left(i\right)}+v^{\left(i\right)}=\left(\lambda^{\left(i\right)}+1\right)v^{\left(i\right)}\]

\item $P^{k}$ has eigenvectors $\left\{ v^{\left(i\right)}\right\} $ with
corresponding eigenvalues$\left\{ \left(\lambda^{\left(i\right)}\right)^{k}\right\} $,
since\begin{eqnarray*}
v^{\left(i\right)}P^{k} & = & \lambda^{\left(i\right)}v^{\left(i\right)}P^{k-1}\\
 & = & \left(\lambda^{\left(i\right)}\right)^{2}v^{\left(i\right)}P^{k-2}\\
 & \dots\\
 & = & \left(\lambda^{\left(i\right)}\right)^{k}v^{\left(i\right)}\end{eqnarray*}

\end{itemize}
\end{fact}
Here's an example application: If $P$ is the transition matrix for
a Markov chain, the $\left(P+I\right)/2$ corresponds to a {}``slowed
down'' Markov chain where at each step we have a $1/2$ chance of
staying still and a $1/2$ chance of transitioning. Then, the slowed
down Markov chain has eigenvalues $\left\{ \left(\lambda^{\left(i\right)}+1\right)/2\right\} $.

We will want to talk about distance between vectors, for instance
to talk about the convergence of distributions. To do so, we define
a norm, as well as the related notion of orthonormality.
\begin{defn}
The \textbf{$\mathcal{L}_{2}$ }norm\textbf{ }of $v=\left(v_{1},\dots,v_{n}\right)$
is \[
\mathcal{L}_{2}\left(v\right)=\sqrt{v\cdot v}=\sum_{i=1}^{n}v_{i}^{2}\]
The $\mathcal{L}_{2}$ norm is also written as $\left\Vert \cdot\right\Vert _{2}$.
\end{defn}

\begin{defn}
A collection of vectors $v^{\left(1\right)},\dots,v^{\left(n\right)}$
is \textbf{orthonormal} if they are mutually orthogonal and each have \textbf{$\mathcal{L}_{2}$
}norm equal to 1, or equivalently if \[
v^{\left(i\right)}\cdot v^{\left(i\right)}=\delta_{ij}=\begin{cases}
0, & \mbox{if }i\neq j\\
1, & \mbox{if }i=j\end{cases}\]

\end{defn}
When a matrix is symmetric and real, its eigenvectors have a special
form.
\begin{thm}
If $P$ is a real, symmetric $n\times n$ matrix, then it admits a
collection of eigenvectors $v^{(1)},\dots,v^{\left(n\right)}$ that
are orthonormal.
\end{thm}

The choice of orthogonal eigenbasis is not unique in general. When an eigenvalue is repeated, there are multiple choices of orthogonal eigenvectors spanning that eigenspace. 

For an orthogonal eigenbasis, we use eigenvectors that are of unit $\mathcal{L}_{2}$ length. In contrast, distribution vectors have unit length in the $\mathcal{L}_{1}$ norm
because the total probability is 1.  For instance, the uniform distribution eigenvector $\left(\frac{1}{n},\dots,\frac{1}{n}\right)$ yields $\mathcal{L}_{1}$ norm $1$. To use this as an eigenvector in an orthonormal eigenbasis, we'd need to scale it to $\left(\frac{1}{\sqrt{n}},\dots,\frac{1}{\sqrt{n}}\right)$. 

Here's a further fact about stochastic matriches that we'll state
without proof: 
\begin{fact}
If $P$ is stochastic, then its eigenvectors are at most $1$ in absolute
value, $\left|\lambda^{\left(i\right)}\right|\leq1$.
\end{fact}
The stationary distributions are the eigenvectors with eigenvalue
$1$. If $P$ is ergodic, the by Theorem \ref{thm:stationary}, there
is a unique stationary distribution. So, if we write its eigenvalues
in decreasing order of absolute value, we have

\[
1=\lambda^{\left(1\right)}<\left|\lambda^{\left(2\right)}\right|\leq\left|\lambda^{\left(3\right)}\right|\leq\cdots\leq\left|\lambda^{\left(n\right)}\right|\leq0\]


Writing distributions in the orthonormal eigenbasis of the transition
matrix will be very useful for understanding what happens to the distribution
when the transition matrix is applied repeatedly. 
\begin{thm}
\label{thm:limit-dist}Suppose that $P$ is the transition matrix
of a random walk on undirected, non-bipartite, $d$-regular connected
graph. Then, for any start distribution $\Pi_{0}$, the distributions
$\Pi_{k}=\Pi_{0}P^{k}$ tend to the stationary distribution $\overline{\Pi}$\[
\lim_{k\to\infty}\Pi_{k}=\overline{\Pi}\]
\end{thm}
\begin{proof}
Since $P$ is real and symmetric, it has an orthonormal collection
of eigenvectors $v^{(1)},\dots,v^{\left(n\right)}$. Write the initial
distribution $\Pi_{0}$ in this eigenbasis.\[
\Pi_{0}=\alpha^{\left(1\right)}v^{\left(1\right)}+\alpha^{\left(n\right)}v^{\left(2\right)}+\cdots+\alpha^{\left(n\right)}v^{\left(n\right)}\]
In the eigenbasis, the effect of applying the transition matrix is
simple. The distribution after one step is 

\begin{eqnarray*}
\Pi_{1}=\Pi_{0}P & = & \left(\alpha^{\left(1\right)}v^{\left(1\right)}+\alpha^{\left(n\right)}v^{\left(2\right)}+\cdots+\alpha^{\left(n\right)}v^{\left(n\right)}\right)P\\
 & = & \alpha^{\left(1\right)}v^{\left(1\right)}P+\alpha^{\left(2\right)}v^{\left(2\right)}P+\cdots+\alpha^{\left(n\right)}v^{\left(n\right)P}\\
 & = & \alpha^{\left(1\right)}\lambda^{\left(1\right)}v^{\left(1\right)}+\alpha^{\left(2\right)}\lambda^{\left(2\right)}v^{\left(2\right)}+\cdots+\alpha^{\left(n\right)}\lambda^{\left(n\right)}v^{\left(n\right)}\end{eqnarray*}
So, each component coefficient in the eigenbasis gets multiplied by
the corresponding eigenvector. After $k$ steps, the result is 

\[
\Pi_{k}=\Pi_{0}P^{k}=\sum_{i=1}^{n}\alpha^{\left(n\right)}\left(\lambda^{\left(n\right)}\right)^{k}v^{\left(n\right)}\]
Since the Markov chain corresponding to $P$ is ergodic, there is
a unique stationary state $\overline{\Pi}$. This corresponds, up
to a constant, to the eigenvector $v^{\left(1\right)}$ whose eigenvalue
is $\lambda^{\left(1\right)}=1$. Since $\lambda^{\left(1\right)}=1$
and the rest of the eigenvalues have$\left|\lambda^{\left(i\right)}\right|<1$,
the coefficient of $v^{\left(i\right)}$ stays the same , while all
other coefficients have $\left|\lambda^{\left(i\right)}\right|<1$
and therefore decay exponentially to 0.

\[
\lim_{k\to\infty}\left(\lambda^{\left(n\right)}\right)^{k}=\begin{cases}
1, & \mbox{if }n=1\\
0, & \mbox{otherwise}\end{cases}\]
Therefore, 

\[
\lim_{k\to\infty}\Pi_{k}=\alpha^{\left(1\right)}v^{\left(1\right)}\]
Recall that $v^{\left(1\right)}$ is a multiple of $\overline{\Pi}$,
so $\lim_{k\to\infty}\Pi_{k}=c\overline{\Pi}$ for some constant $c$.
Since each $\Pi_{k}$ has total probability 1, so does their limit,
and therefore $c=1$. So, \[
\lim_{k\to\infty}\Pi_{k}=\overline{\Pi}\]

\end{proof}
We will now analyze the error terms to show that this convergence
is exponentially fast 
\begin{thm}
Suppose that $P$ is the transition matrix of a random walk on a undirected,
non-bipartite, $d$-regular connected graph. Then, for any start distribution
$\Pi_{0}$,

\[
\left\Vert \Pi_{0}P^{k}-\overline{\Pi}\right\Vert _{2}\leq\left|\lambda_{2}\right|^{k}\]
\end{thm}
\begin{proof}
As in Theorem \ref{thm:limit-dist}, we have \begin{eqnarray*}
\Pi_{k} & = & \sum_{i=1}^{n}\alpha^{\left(n\right)}\left(\lambda^{\left(n\right)}\right)^{k}v^{\left(n\right)}\\
 & = & \alpha^{\left(1\right)}v^{\left(1\right)}+\sum_{i=2}^{n}\alpha^{\left(n\right)}\left(\lambda^{\left(n\right)}\right)^{k}v^{\left(n\right)}\\
 & = & \overline{\Pi}+\sum_{i=2}^{n}\alpha^{\left(n\right)}\left(\lambda^{\left(n\right)}\right)^{k}v^{\left(n\right)}\end{eqnarray*}
So, \begin{eqnarray*}
\left\Vert \Pi_{0}P^{k}-\overline{\Pi}\right\Vert _{2} & = & \left\Vert \sum_{i=2}^{n}\alpha^{\left(n\right)}\left(\lambda^{\left(n\right)}\right)^{k}v^{\left(n\right)}\right\Vert _{2}\\
 & = & \sqrt{\sum_{i=2}^{n}\left(\alpha^{\left(n\right)}\right)^{2}\left(\lambda^{\left(n\right)}\right)^{2k}}\end{eqnarray*}
by orthonormality. Since $\lambda^{\left(2\right)}$ is the greatest
of the eigenvalues $\lambda^{\left(2\right)},\dots,\lambda^{\left(n\right)}$
in absolute value, we may use it to bound 

\begin{eqnarray*}
\left\Vert \Pi_{0}P^{k}-\overline{\Pi}\right\Vert _{2} & = & \sqrt{\sum_{i=2}^{n}\left(\alpha^{\left(n\right)}\right)^{2}\left(\lambda^{\left(n\right)}\right)^{2k}}\\
 & \leq & \sqrt{\sum_{i=2}^{n}\left(\alpha^{\left(n\right)}\right)^{2}\left(\lambda^{\left(2\right)}\right)^{2k}}\\
 & = & \left|\lambda^{\left(2\right)}\right|^{k}\sqrt{\sum_{i=2}^{n}\left(\alpha^{\left(n\right)}\right)^{2}}\\
 & = & \left|\lambda^{\left(2\right)}\right|^{k}\sqrt{\left\Vert \Pi_{0}\right\Vert ^{2}-\left(\alpha^{\left(1\right)}\right)^{2}}\end{eqnarray*}
Since the entries of $\Pi_{0}$ are non-negative and sum to 1, the
sum of their squares is at most 1 (with equality achieve when all
but one entry is 0), so $\left\Vert \Pi_{0}\right\Vert \leq1$. So, 

\[
\left\Vert \Pi_{0}P^{k}-\overline{\Pi}\right\Vert _{2}\leq\left|\lambda^{\left(2\right)}\right|^{k}\]
as desired.
\end{proof}

\end{document}
