\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 5}

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

\date{}
\maketitle

\end{titlepage}

\begin{SLIDE}[Class Outline]
\begin{itemize}
\item Feedback and Homeworks
\item Review of ``Augmenting Chains''
\item Experimental Results
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Feedback]
\begin{itemize}
\item ``More proofs'', ``More examples'' - will do
\item ``too much notation'' - difficult to reduce amount of notation
in a mathematical course.  I'll try to make notation more intuitive by
giving more examples and more doing in-class exercises.
\item ``Leave out simple proofs'' - will do, I might put these in hws.
\item ``Large intuitive leaps in proofs'' - I'll try to address this
with more intuition about proofs
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Review]
\emph{``Marriage is not a word, it is a sentence''} - King Vigor

\begin{itemize}
\item Hall's Marriage Theorem gives us conditions under which there is a
perfect matching but not an algorithm for finding it.

\item The Find-Matching algorithm will find the largest possible matching

\item The Find-Matching algorithm uses the idea of augmented chains.

\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Matching Algorithm]

For a bipartite graph $G$ with edge set $E$:

Defn: A \emph{chain} is a sequence of vertices and edges
$v_{1},e_{1},v_{2},e_{2},...,e_{l},v_{l}$ such that the edge $e_{i} =
(v_{i-1},v_{i})$.

Let $M$ be some (possibly non-maximum) matching on $G$.

Defn: A chain $v_{1},e_{1},v_{2},e_{2},\dots, e_{l},v_{l}$ is called
\emph{M-alternating} if the edges $e_{2},e_{4},\dots $ are in $M$.

\end{SLIDE}

\begin{SLIDE}[Example]
$M = \{e1,e3 \}$\\
$C = \{v6,e5,v3,e3,v4 \}$ is an $M$-alternating chain\\
$C' = \{v6,e5,v3,e4,v5 \}$ is not an $M$-alternating chain\\

\ifig{alt-chain}
\end{SLIDE}

\begin{SLIDE}[$M$-Augmenting Chain]

Defn: A chain $v_{1},e_{1},v_{2},e_{2},\dots, e_{l},v_{l}$ is called
\emph{M-augmenting} if it is M-alternating and the vertices $v_{1}$
and $v_{l}$ are not incident to any edges in $M$.

{\bf Chain Theorem}: A Matching M is maximum for a graph $G$ if and
only if $G$ contains no $M$-augmenting chains.

\end{SLIDE}

\begin{SLIDE}[Example]
$M = \{e1,e3 \}$\\
$C = \{v6,e5,v3,e3,v4,e2,v2 \}$ is an $M$-augmenting chain\\
$C' = \{v6,e5,v3,e4,v5 \}$ is not an $M$-augmenting chain\\
\ifig{alt-chain}
\end{SLIDE}

\begin{SLIDE}[Algorithm Find-Matching]
Input: A bipartite graph $G= (L,R)$

\alg{Find-Matching}:

\begin{enumerate}

\item Let $M = \phi$
\item While there exist $M$-augmenting chains do:

\begin{enumerate}

\item Let $A = v_{1},e_{1},v_{2},e_{2},v_{3},e_{3} \dots, e_{l-1},
v_{l-1}, e_{l},v_{l}$ be some $M$-augmenting chain.

\item Set the new matching $M$ to be $M \cup
\{e_{1},e_{3},\dots,e_{l}\} - \{e_{2},e_{4},\dots ,e_{l-1}\} $
\end{enumerate}
\end{enumerate}

\end{SLIDE}


\begin{SLIDE}[Exercise]
In the graph below, let $M = \{e1,e3 \}$\\
Increase the size of $M$ by finding an $M$-augmenting chain.\\
Give the $M$-augmenting chain and the new larger matching.

\ifig{alt-chain}

\end{SLIDE}


\begin{SLIDE}[Algorithm Find-Matching]

Input: A bipartite graph $G= (L,R)$

\alg{Find-Matching}:

\begin{enumerate}

\item Let $M = \phi$
\item While there are still unmatched vertices in $L$ do

\begin{enumerate}

\item For each $v$ that is unmatched in $L$ do

\begin{enumerate}
\item Search for an $M$-augmenting chain by doing a breadth first search
from $v$
\item If a chain was found, let $A =
v_{1},e_{1},v_{2},e_{2},v_{3},e_{3} \dots, e_{l-1}, v_{l-1},
e_{l},v_{l}$ be that chain. Set the new matching $M$ to be $M \cup
\{e_{1},e_{3},\dots,e_{l}\} - \{e_{2},e_{4},\dots ,e_{l-1}\}$
\end{enumerate}

\end{enumerate}
\end{enumerate}
\end{SLIDE}

\begin{SLIDE}[Proof of Chain Theorem]

{\bf Chain Theorem}: A Matching $M$ is maximum for a graph $G$ if and
only if $G$ contains no $M$-augmenting chains.

Easy direction: If a matching $M$ is maximum then $G$ contains
no $M$-augmenting chain.

To show this, assume, by way of contradiction, that $M$ is a maximum
matching and that there is an $M$-augmenting chain $C =
v_{1},e_{1},v_{2},e_{2},v_{3},e_{3}, v_{4}, e_{4}, \dots,
e_{l},v_{l}$.  Let $E' = M \cup \{e_{1},e_{3},\dots,e_{l}\} -
\{e_{2},e_{4},\dots ,e_{l-1}\}$.

\end{SLIDE}

\begin{SLIDE}[Easy direction]

We note the following:

\begin{itemize}
\item $|E'| > |M|$ 

\item The edge set $E'$ is a matching on $G$.

\end{itemize}

This implies that $E'$ is a larger matching than $M$ which is a
contradiction.
\end{SLIDE}

\begin{SLIDE}[Hard Direction]

If $G$ contains no $M$-augmenting chain, then the matching $M$ is
maximum.

Proof: Assume there exists some matching $M'$ such that $|M'|>|M|$.

Let $H$ be the subgraph of $G$ which has only those edges which appear
in either $M$ or $M'$ but not both.  We know:

\begin{itemize}
\item $H$ is a graph of degree no more than $2$ (it consists of cycles and paths)

\item The edges of each cycle or path in $H$ alternate between being
in $M$ and $M'$.

\end{itemize}

\end{SLIDE}

\begin{SLIDE}[Picture of $H$]
\ifig{aug}
\end{SLIDE}

\begin{SLIDE}[More about $H$]

\begin{itemize}
\item All cycles in $H$ are of even length.
\item There must be some path in $H$ with more $M'$ edges than $M$
edges.
\item This path is an $M$-augmenting chain
\end{itemize}

\end{SLIDE}

\begin{SLIDE}[Experimental Results]

\begin{center}
\begin{tabular}{c}

\psfig{file=eplots/real-bypass.eps,width=4.25in,angle=-0}\\

\psfig{file=eplots/real-greedy-only.eps,width=4.25in,angle=0}\\

\end{tabular}
\end{center}
\end{SLIDE}


\end{document}
