\documentclass{article}
\input{preamble.tex}
\usepackage{amsmath}
\usepackage{epsfig}


%%%%% Macros %%%%%
\newcommand{\comment}[1]{}
\newcommand{\abs}[1]{\lvert #1 \rvert}                          
\newcommand{\card}[1]{\abs{#1}}
\newcommand{\set}[1]{\left \{ #1 \right \}}                     % Set notation: { ... }
\newcommand{\setst}[2]{\left \{ #1 \mid #2 \right \}}           % Set notation: { ... | ... }
\newcommand{\union}{\cup}                                       
\newcommand{\symdiff}{\bigtriangleup}

\newcommand{\PropositionName}[1]{\label{prop:#1}}
\newcommand{\LemmaName}[1]{\label{lma:#1}}
\newcommand{\TheoremName}[1]{\label{thm:#1}}
\newcommand{\FigureName}[1]{\label{fig:#1}}

\newcommand{\Proposition}[1]{Proposition~\ref{prop:#1}}
\newcommand{\Lemma}[1]{Lemma~\ref{lma:#1}}
\newcommand{\Theorem}[1]{Theorem~\ref{thm:#1}}
\newcommand{\Figure}[1]{Figure~\ref{fig:#1}}


%%%%% Document Body %%%%%
\begin{document}
\lecture{1}{February 3rd, 2004}{\mxg}{Nick Harvey}


\section{Nonbipartite Matching}
Our first topic of study is matchings in graphs which are not necessarily bipartite.
We begin with some relevant terminology and definitions.
A \emph{matching} is a set of edges that share no endvertices.
A vertex $v$ is \emph{covered} by a matching if $v$ is incident with an edge in the matching.
A matching that covers every vertex is known as a \emph{perfect matching} or a \emph{$1$-factor}
(i.e., a spanning regular subgraph in which every vertex has degree $1$).
We will let $\nu(G)$ denote the cardinality of a maximum matching in graph $G$.
A \emph{vertex cover} is a set $C$ of vertices such that every edge is incident with at least
one vertex in $C$.
The minimum cardinality of a vertex cover is denoted $\tau(G)$.
The following simple proposition relates matchings and vertex covers.

\begin{proposition}
If $M$ is a matching and $C$ is a vertex cover then $\card{M} \leq \card{C}$.
\end{proposition}
\begin{proof}
For each edge in $M$, at least one of the endvertices must be in $C$, since $C$ covers every edge.
Since the edges in $M$ do not share any endvertices, we must have $\card{M} \leq \card{C}$.
\end{proof}

This proposition implies that 
$\nu(G) = \max_M \card{M} \leq \min_C \card{C} = \tau(G)$,
so $\nu(G) \leq \tau(G)$.
K\H{o}nig showed that in fact equality holds if $G$ is a bipartite graph with no isolated vertices.
Unfortunately if $G$ is not bipartite then we may have $\nu(G) < \tau(G)$.
For example, if $G$ is the cycle on three vertices then $\nu(G)=1$ but $\tau(G)=2$.
We will give another upper-bound for $\nu(G)$ after introducing some more definitions.

If $G=(V,E)$ is a graph and $U \subseteq V$, $G-U$ denotes the subgraph of $G$
obtained by deleting the vertices of $U$ and all edges incident with them.
Let $o(G-U)$ denote the number of components of $G-U$ that contain an odd number of vertices.
Let $M$ be a matching in $G-U$ and consider a component of $G-U$ with an odd number of vertices.
There must be at least one unmatched vertex $v$ in this component, since any
matching necessarily covers an even number of vertices.
Treating $M$ as a matching in $G$, it is possible that we could increase the size of $M$
by matching $v$ with some vertex in $U$.
However, we can add at most $\card{U}$ edges to $M$ in this manner, since the vertices in $U$
will eventually all be matched.
Thus any matching in $G$ must have least $o(G-U)-\card{U}$ unmatched vertices.
This argument shows that the maximum size of a matching is upper-bounded by
$(\card{V} + \card{U} - o(G-U))/2$, for any subset $U$.
The following theorem strengthens this result.

\begin{theorem}[Tutte-Berge Formula]
Let $G=(V,E)$ be a graph. 
Then
$$\nu(G) = \max_M \,\card{M} = \min_{U \subset V} (\card{V} + \card{U} - o(G-U))/2, $$
where the maximization is over all matchings $M$ in $G$.
\end{theorem}
\begin{proof}
We will consider the case that $G$ is connected.
If $G$ is not connected, the result follows by adding the formulas for the individual components.
The proof proceeds by induction on the order of $G$.
If $G$ has at most one vertex then the result holds trivially.
Otherwise, suppose that $G$ has at least two vertices.
We consider two cases.

\textit{Case 1:} $G$ contains a vertex $v$ that is covered by \emph{all} maximum matchings.
The subgraph $G-v$ cannot have a matching of size $\nu(G)$, otherwise that would give
a maximum matching for $G$ that leaves $v$ unmatched. Thus $\nu(G-v) = \nu(G)-1$.
By induction the result holds for the graph $G-v$,
so there exists a set $U' \subset V - v$ that achieves equality in the Tutte-Berge
Formula.
Defining $U = U' \union \set{v}$, we see that
\begin{align*}
\nu(G) &= \nu(G-v) + 1 \\
 &= (\card{V - v} + \card{U'} - o(G-v-U'))/2 + 1 \\
 &= ( (\card{V}-1) + (\card{U}-1) - o(G-U))/2 + 1 \\
 &= ( \card{V} + \card{U} - o(G-U))/2 \\
\end{align*}

\vspace{-4mm}
\textit{Case 2:} For every vertex $v \in G$, there is a maximum matching that does not cover $v$.
We will prove that each maximum matching leaves exactly one vertex uncovered.
Suppose to the contrary, that is, each maximum matching leaves at least two vertices uncovered.
We choose a maximum matching $M$ and its two uncovered vertices $u$ and $v$
such that we minimize $d(u,v)$, the distance between vertices $u$ and $v$.
If $d(u,v)=1$ then the edge $uv$ can be added to $M$ to obtain a larger matching, which is a
contradiction.

Otherwise, $d(u,v) \geq 2$ so we may fix an intermediate vertex $t$ on some shortest $u$-$v$ path.
By the assumption of the present case, there is a maximum matching $N$ that does not cover $t$.
Furthermore, we may choose $N$ such that its symmetric difference with $M$ is minimal.
If $N$ does not cover $u$ then $(N, u, t)$ contradicts our choice of $(M,u,v)$.
Thus $N$ covers $u$ and, by symmetry, $v$ as well.
Since $N$ and $M$ both leave at least two vertices uncovered, there exists a second vertex
$x \neq t$ that is covered by $M$ but not by $N$.
Let $xy$ be the edge in $M$ that is incident with $x$.
If $y$ is also uncovered by $N$ then $N + xy$ is a larger matching than $N$, a contradiction.
So let $yz$ be the edge in $N$ that is incident with $y$, and note that $z \neq x$.
Then $N + xy - yz$ is a maximum matching that does not cover $t$ and has smaller symmetric
difference with $M$ than $N$ does.
This contradicts our choice of $N$, so each maximum matching must leave exactly one vertex uncovered.
Then $\nu(G) = (\card{V}-1)/2$.
The Tutte-Berge Formula then follows by choosing $U = \emptyset$.
\end{proof}

A natural question to ask next is:
Given a graph $G$, what is a set $U \subset V(G)$ giving equality in the Tutte-Berge Formula?
Such a set is provided by the \textbf{Edmonds-Gallai Decomposition} of $G$.
This decomposition partitions $V(G)$ into three sets:
$D(G)$ is the set of all vertices $v$ such that there is some maximum matching that leaves $v$
uncovered,
$A(G)$ is the neighbour set of $D(G)$, and
$C(G)$ is the set of all remaining vertices.

\begin{theorem}
The set $U = A(G)$ gives equality in the Tutte-Berge Formula.
The set $D(G)$ contains all vertices in odd components of $G-U$,
and $C(G)$ contains all vertices in even components of $G-U$.
\end{theorem}

Let $G[\, D(G) \,]$ be the subgraph of $G$ induced by $D(G)$.
It turns out that every connected component $H$ of $G[\, D(G) \,]$ is \emph{factor critical},
meaning that $H - v$ has a perfect matching for every $v \in V(H)$.
Thus for any odd component in $G[\, D(G) \,]$ we can actually choose any particular vertex
to be left uncovered.

The Edmonds-Gallai Decomposition of a graph can be found as a byproduct of
Edmonds' algorithm for finding a maximum matching.
Before describing this algorithm, we need some more basic results.
Let $M$ be a matching in a graph $G$.
An \emph{alternating path} (relative to $M$) is a path $P$
whose edges are alternately in $M$ and not in $M$.
An \emph{augmenting path} for $M$ is an alternating path with both endvertices uncovered by $M$.
Let $M'$ be the matching obtained by switching $M$-edges and non-$M$-edges along path $P$
(i.e., $M' = M \symdiff E(P)$).
Then $\card{M'} = \card{M} + 1$, which explains why $P$ is called an augmenting path.

\begin{theorem}[Berge]
\TheoremName{berge}
$M$ is a maximum matching if and only if $G$ contains no $M$-augmenting path.
\end{theorem}
\begin{proof}
The ``only if'' direction is trivial, since any augmenting path can be used to increase
the size of $M$.
To prove the other direction, suppose that $M$ is not maximum and let $N$ be a maximum matching
chosen with minimum symmetric difference with $M$.
Consider the subgraph spanned by $M \union N$.
Each vertex has degree at most $2$, so the subgraph is a disjoint union of paths and cycles.
There are no cycles or paths with equal number of edges from $N$ and $M$, since $N \symdiff M$
is minimum.
It follows that there is at least one component with more $N$-edges than $M$-edges.
Such a component is an augmenting path for $M$.
\end{proof}

\Theorem{berge} implies the following approach for finding a maximum matching:
start with an empty matching and repeatedly find augmenting paths to increase its size.
\textbf{Edmonds' Algorithm} uses this approach and gives a specific
method for finding augmenting paths.
Consider a graph $G=(V,E)$ and a matching $M$ in $G$.
Let $X$ be the set of uncovered vertices in $G$.
To find an augmenting path for $M$, 
it will be helpful to define an auxiliary directed graph $G'$ with vertex set $V$
and arc set $A = \setst{ uv }{ \text{$\exists x \in V$ such that $ux \in E$ and $xv \in M$} }$.
Observe that a directed path in $G'$ corresponds to an (even length) alternating path in $G$.
Furthermore, if there is an augmenting path for $M$ then
there is a directed path in $G'$ starting at a vertex in $X$ and ending at a neighbour of $X$.
Unfortunately, the converse does not necessarily hold:
$G$ may contain a directed path in $G'$ starting at a vertex in $X$ and ending at a neighbour of $X$
that does \emph{not} correspond to an augmenting path.
Such a path must necessarily have a prefix that is a \emph{flower}, as shown in this figure.

\begin{figure}[h]
\FigureName{flower}
\centering
\vspace{8pt}
\epsfig{file=lec1-flower.eps,width=3in,clip=}
\vspace{8pt}
\end{figure}

The dotted arcs show a directed path in the auxiliary
graph that starts at a vertex in $X$ and ends at a neighbour of set $X$ but
does not correspond to an augmenting path.
The graph contains a flower, which consists of a \emph{stem} and a \emph{blossom}.
The stem is simply an alternating path and the blossom is an odd-length cycle.

\end{document}
