\documentclass[landscape]{slides}
\usepackage{multicol}
 
\input{preamble}
\input{SLIDES}
 
%\usepackage[dvips]{graphics}
%\usepackage[all,poly,ps,dvips,color]{xy}
%\UseCrayolaColors

%\DeclareMathOperator{\mathin}{in}
%\DeclareMathOperator{\mathout}{out}

\newcommand{\vindex}[2]{\left[ #1 \right] _ #2}
\newcommand{\eigen}{\mathbf a}
\newcommand{\elem}{\mathbf e}
\newcommand{\state}{\mathbf x}
\newcommand{\maxdeg}{\Delta}
\newcommand{\maxdegC}{d_{max}}

\newcommand{\din}{d_{\mathin}}
\newcommand{\dout}{d_{\mathout}}
\newcommand{\dmax}{d_{\max}}


\newcommand{\nlabel}[2]{\ar@{} @(#1,#1) |<<{#2}}
\newcommand{\gnlabel}[2]{[#1(.25)] {#2}}
\newcommand{\node}{{\bullet}}
\newcommand{\bypass}{{\circ}}

\begin{document}

\begin{titlepage}
\title{CS 591-06, Lecture 10}

\author {Jared Saia \\
{\red University of New Mexico}}

\date{}
\maketitle

\end{titlepage}

\begin{SLIDE}[Class Outline]
\emph{A reasonable probability is the only certainty.} - E.W. Howe

\begin{itemize}
\item Majority-Preserving Property
\item Chernoff Bounds
\item In-Class Exercise
\item Proof for Spam Resistant P2P network
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Majority-Preserving Property]

A bipartite graph $G= (L,R)$ where $|L|=|R|=n$ is said to have the
\emph{majority preserving property} iff for some $\epsilon >0$,

\begin{itemize}
\item For all sets $L'\subset L$ such that $|L'| \geq 2n/3$, the
number of nodes in $R$ which have a majority of their neighbors in the
set $L'$ is at least $n-\epsilon n/\log n$.
\end{itemize}

Claim:

\begin{itemize}
\item A bipartite graph where every node in $L$ has edges to $C\log n$
random nodes in $R$ has the \emph{majority preserving property}.
Further the constant $C$ depends only on $\epsilon $.
\end{itemize}

\end{SLIDE}

\begin{SLIDE}[Chernoff Bounds]
\begin{itemize}
\item Let $X=\sum _{i=1}^{m}X_{i}$ where the $X_{i}$ are random variables which
are: independent and all take on values between $0$ and $1$.
\end{itemize}
then for any $0<\delta \leq 1$,
\begin{itemize}
\item $P (|X - E (X)| \geq \delta E (X) ) \leq 2e^{\frac{-E (X) \delta
^{2}}{4}}$
\end{itemize}

\end{SLIDE}


\begin{SLIDE}[Review: Linearity of Expectation]

{\bf Linearity of Expecation Fact}: If there are random variable
$X,X_{1},\dots , X_{n}$, such that $X = \sum_{i=1}^{n} X_{i} $, then 

\begin{itemize}
\item $E (X) = \sum _{i=1}^{n} E (X_{i})$ 
\end{itemize}

Example:

Let the variable $X_{i}$ be $1$ if the $i$-th flip of a coin is heads
and $0$ otherwise and say that $E (X_{i}) = 1/2$.  Let $X =
\sum_{i=1}^{n} X_{i}$.  Then:

$E (X) = n/2$

\end{SLIDE}

\begin{SLIDE}[Chernoff Example]

\begin{itemize}
\item  Let $X = \avec{X}$, where each $X_{i}$ is $1$ if the $i$-th flip of a
coin flip is heads tails otherwise.  Let the coin turn up heads with
probability $1/2$.

\item Q: What is a bound on the probability that either the number of
heads exceeds $(3/4)m$ or the number of heads is less than $(1/4)m$?

\end{itemize}
\end{SLIDE}


\begin{SLIDE}[Majority Preserving Property]

\begin{itemize}
\item Assume we've got a biparitite graph $G= (L,R)$, where each
vertex in $L$ has $C \log n$ edges to random nodes in $R$.  (The edges
are chosen uniformly and independently at random),

\item Consider some fixed sets $L' \subset L, R' \subset R$ such that
$|L'| = 2n/3$ and $|R'|=\epsilon n/\log n$, for some fixed $\epsilon >0$

\item {\bf Question:} What is the probability that no node in $R'$ has
a majority of its edges to nodes in $L'$?

\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Expander Picture]
\ifig{fixed-set}
\end{SLIDE}

\begin{SLIDE}[Probability of Failure]

\begin{itemize}
\item {\bf Question:} What is the probability that no node in $R'$ has
a majority of its edges to nodes in $L'$?

\item This bad event occurs only if the number of edges between $L'$
and $R'$ is no more than the number of edges between $L-L'$ and $R'$

\item Q1: What is the expected number of edges between $L'$ and $R'$?

\item Q2: What is the expected number of edges between $L-L'$ and $R'$?

\end{itemize}
\end{SLIDE}


\begin{SLIDE}[Probability of Failure]

\begin{itemize}
\item {\bf Question:} What is the probability that no node in $R'$ has
a majority of its edges to nodes in $L'$?

\item This bad event occurs only if the number of edges between $L'$
and $R'$ is no more than the number of edges between $L-L'$ and $R'$

\item Q1: What is the expected number of edges between $L'$ and $R'$?
A: $(2/3)\epsilon nC $

\item Q2: What is the expected number of edges between $L-L'$ and
$R'$? A: $(1/3) \epsilon nC$

\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Probability of Failure]

\begin{itemize}
\item Bad Event 1: The number of edges between $L'$ and $R'$ is less
than $9/10*((2/3)\epsilon nC) $

\item Bad Event 2: The number of edges between $L-L'$ and $R'$ is
greater than $10/9*((1/3)\epsilon nC) $

\item We can use a union bound to bound the probability that either
bad event occurs.

\end{itemize}

\end{SLIDE}


\begin{SLIDE}[Bad Event 1]

\begin{itemize}
\item Let $X$ be the number of edges between $L'$ and $R'$

\item Note that $X = sum_{i=1}^{m}$ where $X_{i}$ is $1$ if the $i$-th edge
from $L'$ lands in $R'$ and is $0$ otherwise and $m = (2/3)n C\log n$

\item From before, $E (X) = ((2/3)\epsilon nC) $

\item By Chernoff bounds:

\begin{eqnarray}
P (|X-E (X)| > (1/10)E (X)) & \leq & 2e^{\frac{- E (X) (1/10)^{2}}{4}} \\
& \leq & 2e^{\frac{- (2/3)\epsilon n C}{400}}\\
& = & 2e^{\frac{- \epsilon n C}{600}}\\
\end{eqnarray}

\end{itemize}

\end{SLIDE}

\begin{SLIDE}[Bad Event 2]
\begin{itemize}
\item Let $Y$ be the number of edges between $L-L'$ and $R'$ 

\item Note that $Y = \sum_{i=1}^{l} Y_{i} $ where $Y_{i}$ is $1$ if the
$i$-th edge from $L-L'$ lands in $R'$ and is $0$ otherwise, and  $l =
(1/3)n C\log n$

\item From before, $E (Y) = (1/3)\epsilon nC$

\item By Chernoff bounds:

\begin{eqnarray}
P (|Y-E (Y)| > (1/10)E (Y)) & \leq & 2e^{\frac{- E(Y) (1/10)^{2}}{4}} \\
& \leq & 2e^{\frac{- (1/3)\epsilon nC}{400}}\\
& = & 2e^{\frac{- \epsilon nC}{1200}}
\end{eqnarray}

\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Probability of failure]
\begin{itemize}
\item Let $\gamma _{1}$ be bad event 1 and $\gamma _{2}$ be bad event 2 
\item Then:
\begin{eqnarray}
P (\gamma _{1} \bigcup \gamma _{2}) & \leq & P (\gamma _{1}) + P
(\gamma _{2})\\
& \leq & 2e^{\frac{- \epsilon nC}{600}} + 2e^{\frac{- \epsilon nC}{1200}}\\
& \leq & 4e^{\frac{-  \epsilon nC}{1200}}
\end{eqnarray}

\item This is a bound on the probability that the majority preserving
property fails for a fixed set $L'$ and a fixed set $R'$.

\item It's very small, but is it small enough???

\end{itemize}

\end{SLIDE}

\begin{SLIDE}[Prob of Any Failure]
\begin{itemize}
\item We know that the prob. of failure for a fixed set $L'$ and fixed
set $R'$ is no more than $4e^{\frac{-  \epsilon nC}{1200}}$
\item There are $n \choose n/2$ ways to choose a set $L'$ 
\item There are $n \choose \epsilon n / \log n $ ways to choose a set $R'$
\item $n \choose n/2$ and $n \choose \epsilon n / \log n$ are both
no more than $e^{n}$
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Prob of Any Failure]
\begin{itemize}
\item For any set $L'$ and $R'$ of appropriate size, let
$\gamma_{L',R'} $ be the probability that the bad event occurs for the sets
$L'$ and $R'$ 
\item We want $P (\bigcup _{L'\subset L, R'\subset R \textrm{ s.t. } |L'|=n/2,
|R'|=\epsilon n/\log n}, \gamma _{L',R'})$
\item Use the union bound:
\begin{eqnarray}
P (\bigcup _{L', R'} \gamma _{L',R'}) & \leq & \sum _{L', R'}P (\gamma _{L',R'})\\
& = & {n \choose {n/2}}* {n \choose {\epsilon n/\log n}}* (4e^{\frac{-\epsilon nC}{1200}})\\
& \leq & e^{n} * e^{n} * 4e^{\frac{-\epsilon nC}{1200}} \\
& = & e^{\frac{-\epsilon nC + 2400n + 2400}{1200}}
\end{eqnarray}

\end{itemize}
\end{SLIDE}



\begin{SLIDE}[Analysis]
\begin{itemize}
\item For $C$ chosen dependent only on $\epsilon$, this probability
can be to go to $0$ exponentially quickly as $n$ grows large.

\item This means that with high probability, for appropriate constant
$C$, a \emph{random} bipartite graph will have the majority preserving
property.

\item Note: Our proof made use of the union bound and Chernoff bounds.

\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Some Useful Bounds]

\begin{itemize}
\item Stirlings Formula: $n! = \sqrt{2\pi n} \left( \frac{n}{e} \right)^{n} \left( 1+\frac{1}{12n} + O (\frac{1}{n^{2}})\right)$ 

\item $n! \geq  \left( \frac{n}{e} \right)^{n}$

\item ${n \choose {k}} \leq \frac{n^{k}}{k!}$

\item ${n \choose {k}} \leq \left(\frac{ne}{k} \right)^{k}$

\end{itemize}
\end{SLIDE}


\begin{SLIDE}[In Class Exercise]
\begin{itemize}
\item Consider a directed random graph with possible loops on $n$
vertices where each of the $n^{2}$ possible edges is included with
probability $p$.

\item Q1: What is the probability that some fixed set of $n/2$
vertices share more than $n^{2}p/4$ edges?

\item Q2: What is an upperbound on the probability that the graph
contains \emph{some} set of $n/2$ vertices which share $n^{2}p/4$ edges?

\end{itemize}
\end{SLIDE}





\end{document} 

