\documentclass[11pt]{article}
\usepackage{handout}
\usepackage{amsmath,amssymb,amsthm,epsfig}
\begin{document}
\input{courseMacros}
\newcommand{\BfPara}[1]{\noindent {\bf #1.}}

\newtheorem{Theorem}{Theorem}
\newtheorem{Corollary}{Corollary}
\newtheorem{Lemma}{Lemma}
\newtheorem{Claim}{Claim}
\newtheorem{Definition}{Definition}
\newtheorem{problem}{Problem}
\newenvironment{Proof}{\noindent{\bf Proof: }}{\qed}
\newenvironment{LabeledProof}[1]{\noindent{\bf Proof of #1}}{\qed}
%\theoremstyle{remark}
\newtheorem{Remark}{Remark}

\newcommand{\eps}{\varepsilon}
\newcommand{\poly}{\mbox{poly}}
\newcommand{\bfone}{\mbox{{\bf 1}}}
\newcommand{\bfzero}{\mbox{{\bf 0}}}
\newcommand{\junk}[1]{}
\newcommand{\Reals}{\mbox{{\cal R}}}
\newcommand{\dmax}{d_{\mbox {\scriptsize max}}}
\newcommand*{\bigF}{\scalebox{1.5}{\ensuremath{\mathcal{F}}}}
\newcommand{\fieldL}{\bigF_2^L}
\newcommand{\fieldn}{\bigF_2^n}
\newcommand{\vmu}{\vec{\mu}}
\thispagestyle{empty}
\thispagestyle{empty}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1.8ex}

\lecturehead{CS 7880}{Network Algorithms}{Spring 2016}{2
February 2016}{Alp El\c{c}i}

\begin{itemize}
\item
  Gossip in Networks, Random Linear Network Encoding
\end{itemize}

\section{Gossip in Networks}
Let there be $k$ distinct messages in a network. Gossip is the process
of having these $k$ messages being learned by all of the nodes. In
each round, a node can broadcast one message to its neighbors.  We
will investigate how long it takes for the gossip to complete.

Note that in the model we consider the communication has no
collisions.  Also note that each node can simultaneously transmit and
receive.  

\subparagraph*{Example: Line Graph}
Assume that in a line graph $G$, all $n$ nodes have exactly one message.
The gossip in this case can be completed in $2n$ rounds, by sending the
gossips to one direction for the first $n$ rounds then sending the
gossips to left in the next $n$ rounds.

\subparagraph*{Example: Tree}
Gossip in a tree can be completed in at most $2n$. All nodes can first
broadcast their messages up to the root. After the root has received all
of the messages, it can progressively broadcast the gossips down.

Consider gossip for a network in which the edges arbitrarily change
between after each timestep, and it is always connected. As a
potential approach, the nodes can round-robin through their
messages. For this approach, consider that all $n$ nodes have learned
$n-1$ messages, and there is one message, $m$, that is possessed only
by the vertex, $v$.  Since $m$ would be broadcast on average once per
$n$ rounds, it would take $O(n^2)$ time for $m$ to propagate through
all $n$ nodes.

In this lecture, we will see that there is a much more efficient way
of completing gossip using the novel idea of network coding.  Gossip
for {\em arbitrarily changing networks}\/ can be solved through random
linear network coding (RLNC).  The result we will present here is due
to Haeupler~\cite{haeupler:gossip}.

Assume that there are $n = |V|$ messages in a network, $G$.  Each
message has a length of $L$, in bits. Let $\vec{m_i}$ be the $i^{th}$
message.

\[
m_i \in \fieldL
\]

Where $\fieldL$ is the $L$-dimensional integral field in mod 2. For this
section, all arithmetic operations will be conducted in base $2$. In 
RLNC, the nodes will send packets instead  of the  raw  messages. A 
packet is a tuple of $(\vmu, \vec{m})$, where $ \vmu$ is the coefficient 
vector of $\vec{m}$, denoting linear combination coefficients of the $n$ 
raw messages that span form $\vec{m}$.

\[
\vec{m} \in \fieldL
\]
\[
\vmu \in \fieldn
\]

For a low overhead, it is assumed that $L \approx n$.

\subparagraph*{Example: 4 nodes}
Assume the node $v$ has packets with coefficient vectors: 
$(1, 0, 0, 0)$, $(0, 1, 0, 0)$. $v$ can send packets with coefficient
vectors of: $(1, 0, 0, 0)$, $(0, 1, 0, 0)$, $(1, 1, 0, 0)$. The message
of $(1, 1, 0, 0)$ will be the $\oplus$ of the known two messages.

In RLNC, once a node has $v$ linearly independent coefficient 
vectors, the node can reconstruct all of the messages. The sending
protocol is as the following
\begin{itemize}
\item 
  For each $v$, let $Y_v$ denote the span of the coefficient vectors
  of packets stored by $v$. Pick a random vector in this span.
\item
  Send the packet corresponding to the selected coefficient vector.
\end{itemize}

As a note, for choosing a random vector from $Y_v$, a random linear
combination of the coefficient vectors received so far can be taken.
The proof of this is left to the reader as practice.

\begin{Theorem}
  \label{thm:main}
$Pr[$gossip completes in $O(n)$ rounds$]$ $\geq 1 - 
\frac{1}{2^{\Omega(n)}}$.
\end{Theorem}

\begin{Lemma}
If the span of the coefficient vectors received by $v$ is $\fieldn$, then
$v$ can decode all of the $n$ messages by applying Gaussian elimination
over the received messages.
\end{Lemma}

Initially, the $Y_v$. Since $\fieldn$ is a finite space, $Y_v$ can have
at most $2^n$ vectors. 

\begin{Definition}
$v$ {\bf knows about} $\vmu$ if $\vmu$ is not orthogonal to $Y_v$,
  hence $\exists \vec{x} \in Y_v, <\vec{x}, \vmu> \neq 0$.
\end{Definition}

\textbf{Lemma 1} can be reconstructed as the following.

\begin{Lemma}
If $v$ knows about every vector in $\fieldn$, then $v$ can decode all
$n$ messages for $v \in V$, $\vmu \in \fieldn$.
\end{Lemma}

As an important note, $v$ knowing about all $n$ singular vectors does not
imply that $v$ can reconstruct all of the $n$ messages. $v$ must know
about all vectors in $\fieldn$. As an example, if $n = 2$, a vector
that has only one packet with $\vmu = (1, 1)$ would know about both
singular vectors and would be unable to reconstruct the messages.

\begin{Lemma}
\label{lem:main}
If $A$ knows about $\vmu$ and transmits something to $v_B$, with
probability $1/2$, $B$ will know about $\vmu$.
\end{Lemma}

This claim is particularly strong since it is applied simultaneously
for the exponential number of $\vmu$s.  Before giving the proof of
Lemma~\ref{lem:main}, we show how Theorem~\ref{thm:main} follows from
Lemma~\ref{lem:main}.

\begin{LabeledProof}{Theorem~\ref{thm:main}}
Fix any $\vmu$. Let $S$ be the set of vertices that know about $\vmu$.
Let $U$ be the set of vertices that don't know about $\vmu$. By
\textbf{Lemma 3},
\[
Pr[\text{$|S|$ will increase by $1$}] \geq 1/2
\]
Consider that $12n$ timesteps are elapsed.  The probability that $|S|$
is not $n$ is at most the probability that in $12n$ tosses of a fair
coin, the number of heads is less than $n$.  This probability can be
upper bounded by a Chernoff bound as follows.  The expected number of
heads in $12n$ tosses of a fair coin is $6n$.  So the probability that
we have fewer than $n$ heads is at most
\begin{align*}
e^{-(5/6)^2 \cdot 6n/3} \le e^{-25n/18}.
\end{align*}
\[
Pr[\text{all nodes know of all $\vmu$ after $12n$ rounds}] \geq 1 - 
\frac{2^n}{e^{25n/18}} \ge 1 - \frac{2^n}{4^n} = 1 - \frac{1}{2^n}.
\]
\end{LabeledProof}

Following is the proof of \textbf{Lemma 3}.

\begin{LabeledProof}{Lemma~\ref{lem:main}}
Let $A$ be the node that knows about $\vmu$. Let $Y_A$ be partitioned
as $Y_A^0$, such that $\forall \vec{c} \in Y_A^0$, $<\vec{c}, \vmu> = 0$,
and $Y_A^1$, such that $\forall \vec{c} \in Y_A^1$, 
$<\vec{c}, \vmu> = 1$. 

Let $\vec{\beta} \in Y_A^1$. Fix $\vec{\beta}$. $\forall \vec{\alpha}
\in Y_A^1, \vec{\alpha} + \vec{\beta} \in Y_A^0$ since the sum will
not be perpendicular to $\vmu$. Since $Y_A^1$ is not empty by the 
initial assumption, $|Y_A^1| > |Y_A^0|$.

\end{LabeledProof}

\bibliographystyle{plain}

\bibliography{refs}

\end{document}
