\documentclass[landscape]{slides}

\usepackage{multicol}
\usepackage{sober}
\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}}

\title{Migration with Memory Constraints}

\author{Jason Hartline, Anna Karlin, Jared Saia}

\begin{document}

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

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

\date{}
\maketitle

\end{titlepage}

\begin{SLIDE}[Class Outline]
\begin{itemize}
\item Review Migration Problem
\item Statement of Hall's Marriage Theorem
\item In-class Exercise
\item Using Hall's Theorem to Factor a Graph
\item Proof of Hall's Theorem
\end{itemize}
\end{SLIDE}


\begin{SLIDE}[Defn: A Matching]

Let $G$ be any graph with edge set $E$.  Then a \emph{matching} on $G$
is a collection of edges $E'$ where $E' \subseteq E$ and no two edges in
$E'$ share an endpoint.

Question: If $G$ has $n$ vertices, what are the maximum and minimum
possible sizes of a matching?

\end{SLIDE}

\begin{SLIDE}[Defns]

A graph $G$ is \emph{bipartite} if it's vertex set $V$ can be
partitioned into two sets $L,R$ such that all edges in $G$ have one
edge in $L$ and one edge in $R$.

A matching is \emph{perfect} if for every vertex $l \in L$,
there is some edge in the matching which is incident to $l$.

Definition: Let $G=(L,R)$.  For any subset $L'$ of $L$, define $N
(L')$ to be the set of vertices which are neighbors of $L$.

Question: If $|N (L)| < |L|$, can there be a perfect matching?

Hard Question: When does a bipartite graph have a perfect matching?

\end{SLIDE}


\begin{SLIDE}[Hall's Theorem]

Statement of Hall's Marriage Theorem:

Let $G= (L,R)$ be a bipartite graph.  Then:

\begin{itemize}
\item There is a perfect matching for $G$
\end{itemize}

if and only if

\begin{itemize}
\item $\forall L' \subseteq L$, $|L'| \leq |N (L')|$
\end{itemize}

We will say a bipartite graph ``has Hall's property'' if it fulfills
this condition.

\end{SLIDE}

\begin{SLIDE}[Exercise]

Let $G= (L,R)$ be a $k$-regular bipartite graph.

\emph{Show that $G$ has Hall's Property (i.e. $\forall L' \subseteq L$,
$|L'| \leq |N (L')|$)}
\end{SLIDE}

\begin{SLIDE}[Euler Tour]

An \emph{Euler Tour} of a graph $G$ is a tour which starts and ends at
the same vertex and traverses every edge exactly once.

It is well known that a graph $G$ has an Euler Tour if and only if
edge vertex of the graph has even degree.
\end{SLIDE}


\begin{SLIDE}[Graph Factoring]

Let $G$ be a $k$-regular graph where $k$ is an even number.  We factor
$G$ as follows:

\begin{enumerate}

\item Construct an Euler-tour of $G$.

\item Orient the edges according to the direction of the tour.  That is, if
the tour enters $v$ on edge $e_1$ and leaves on edge $e_2$, then $e_1$
is an in-edge to $v$ and $e_2$ is an out-edge. Thus we have
$\din=\dout=k$.

\item Set up a bipartite matching problem, $B_G$, with a
representative of each vertex in the graph on both sides.  Add in all
directed edges going from left to right.  Note that each edge is
represented in the matching problem exactly once.

\item Find a matching (which is guaranteed to exist by Hall's Theorem).
The matched edges induce a 2-factor of the original graph.  Remove these edges
from $B_G$ and repeat this step until there are no edges left.
\end{enumerate}

\end{SLIDE}


\begin{SLIDE}[Migration Results]

Let $G$ be a graph with maximum degree $\Delta$.  Then:

Direct Migration (edge-coloring):
\begin{itemize}
\item Upperbound: $3\lceil \Delta/2 \rceil$ steps
\item Lowerbound: $2\lceil \Delta/2 \rceil$ steps
\end{itemize}

Indirect Migration (edge-coloring):
\begin{itemize}
\item Upperbound:  $2\lceil \Delta/2 \rceil$ steps with $n/3$ bypass nodes
\item Lowerbound:  $\Delta $ steps
\end{itemize}

\end{SLIDE}



\begin{SLIDE}[Direct Migration - Results] 

$3\lceil \Delta/2 \rceil$ steps maximum \\

Idea: Factor graph into set of 2-regular graphs\\

\begin{center}
\begin{tabular}{ccccc}
$ \xymatrix{
{\node} \ar[r] \ar @/^/[d] & {\node} \ar[d] \ar @/^/[d]\\
{\node} \ar[u] \ar @/^/[u] & {\node} \ar[l] \ar @/^/[u] \\
}
$
&
\raisebox{-2ex}{=}
&
$
\xymatrix{
{\node} \ar[r] & {\node} \ar[d]\\
{\node} \ar[u] & {\node} \ar[l]\\
}
$
&
\raisebox{-2ex}{$\cup$}
&
\xymatrix{
{\node} \ar @/^/[d] & {\node} \ar @/^/[d]\\
{\node} \ar @/^/[u] & {\node} \ar @/^/[u]\\
}
\end{tabular}
\end{center}
\end{SLIDE}

\begin{SLIDE}[Indirect Migration - Results] 

$2\lceil \Delta/2 \rceil$ steps with $n/3$ bypass nodes. \\

Idea: Factor graph into set of 2-regular graphs.  Use $n/3$ bypass
nodes for each ``factor'' to satisfy it in $2$ steps.

\begin{center}
\begin{tabular}{ccccc}
$ \xymatrix{
{\node} \ar[r] \ar @/^/[d] & {\node} \ar[d] \ar @/^/[d]\\
{\node} \ar[u] \ar @/^/[u] & {\node} \ar[l] \ar @/^/[u] \\
}
$
&
\raisebox{-2ex}{=}
&
$
\xymatrix{
{\node} \ar[r] & {\node} \ar[d]\\
{\node} \ar[u] & {\node} \ar[l]\\
}
$
&
\raisebox{-2ex}{$\cup$}
&
\xymatrix{
{\node} \ar @/^/[d] & {\node} \ar @/^/[d]\\
{\node} \ar @/^/[u] & {\node} \ar @/^/[u]\\
}
\end{tabular}
\end{center}
\end{SLIDE}


\begin{SLIDE}[Making a graph $\Delta'$-regular]

The following algorithm takes a graph with degree $\Delta$ and adds
edges to it to get a graph of degree $\Delta' = 2 \lceil \Delta/2
\rceil$

\begin{enumerate}

\item While there exists a vertex with degree less than $\Delta' - 1$,
add a self loop to that vertex.

\item While there exist two distinct vertices of degree $\Delta' - 1$,
add an arbitrarily directed edge between them.

\end{enumerate}

\end{SLIDE}


\begin{SLIDE}[Minute Paper]
\begin{enumerate}
\item What was the most important concept you learned in this class?
\item What important question remains unanswered?
\item What was the muddiest part of the class?
\end{enumerate}
\end{SLIDE}

\end{document}
