\newcounter{lecture} \setcounter{lecture}{16}
\def\thetoday{March 5, 2009}
\def\thetitle{Marriage, Stability and Honesty}

\input{lec_hdr.tex}

Assume that we have $n$ men and $m$ women, and that each person gives a
ranking in order of preference of members of the opposite sex. The \emph
{stable marriage} problem asks to pair the men and women in such a way
that no two persons prefer each other over their partner.


{\bf Example:} Assume that we have men labeled $a,b,c$, and women labeled 
$1, 2, 3$ with preferences (rankings) given by,  
\begin{align*}
a:~~1 3 2 \hspace{60pt} 1: ~~a b c \\
b:~~2 3 1 \hspace{60pt} 2: ~~b c a \\
c:~~1 2 3 \hspace{60pt} 3: ~~a c b
\end{align*}

A \defn{matching} is a one-to-one correspondence, e.g. 
\[1\leftrightarrow b~~~~2\leftrightarrow a~~~~3\leftrightarrow c.\]
For a matching $M$, a pair $(m,w)$ is a \defn{blocking pair} if and
only iff both $m$ and $w$ prefer each other to their current partners
$P_M(m)$ and $P_M(w)$.  A matching is \defn{stable} if it doesn't have
a blocking pair.  In the example above,
\[1\leftrightarrow a~~~~2\leftrightarrow b~~~~3\leftrightarrow c\]
is a stable matching.

How can we find a stable matching?  Gale and Shapley, in 1962, proposed
the Defered Acceptance Algorithm \ref{GSalg}.
\begin{algorithm}[htp]
\begin{algorithmic}
\STATE let all men and women be unmatched.
\REPEAT 
\STATE unmatched man $m$ proposes to most prefered woman $w$ in his list
\IF {$w$ is unmatched}
\STATE match $w$ and $m$
\ELSIF {$w$ is matched to $m'$ and she prefers $m$ to $m'$}
\STATE match $w$ and $m$ and leave $m'$ unmatched.
\ELSE 
\STATE $m$ removes $w$ from his preference list
\ENDIF
\UNTIL {every man or every woman is matched}
\RETURN matching $M$ of all pairs $(m, P_M(m))$
\end{algorithmic}
\caption{Defered Acceptance [Gale-Shapley] (men-proposing version)}
\label{GSalg}
\end{algorithm}

\begin{claim}  The GS algorithm terminates.
\end{claim}
\begin{proof} 
A man is rejected at most $m$ times, each time removing a woman from his 
preference list. Each list is of size $m$, thus we take at most $nm$ steps.
\end{proof}

\begin{claim} 
GS algorithm produces a perfect matching whenever $m = n$.
\end{claim} 
\begin{proof}  
Since $m = n$ for every unmatched man the must be an unmatched woman.
Suppose there is some unmatched man $m$ and unmatched woman $w$. Since
$w$ is unmatched she has never rejected a proposal. Since $m$ is 
unmatched he has always been rejected. This is a contradiction since $w$
is in some position in $m$'s preference list.
\end{proof}

\begin{claim} 
The matching found by the GS algorithm is stable.
\end{claim}
\begin{proof} 
Suppose $(m,w)$ is a blocking pair for the result of GS algorithm
$M$.  If $m$ has proposed to $w$ and was rejected, it means $w$
prefers her current partner to $m$.  If $m$ has not proposed to $w$,
then $m$ prefers his current partner to $w$.  So there cannot be a
blocking pair.
\end{proof}

\begin{thm} 
The men-proposing algorithm is \emph{man-optimal} in a very strong
sense: every man will be matched to the \emph{best} partner he could be
matched to in any stable matching.
\end{thm}
\begin{proof} By contradiction. \\ 
Denote $M$ as the matching produced by Algorithm \ref{GSalg}. Consider
the {\bf first} event that a man is rejected by a woman in the algorithm. 
Label this man $m$, the woman $w$ and suppose
there exists some other stable matching $M'$ such that $m$ and $w$ are 
matched i.e. $m = P_{M'}(w)$.

Let $m' = P_M(w)$, and $w' = P_{M'}(m')$. Then we have that $w$ must prefer 
$m'$′ to $m$, otherwise $w$ wouldn't have  rejected $m$ over $m'$.

Now, if $m'$ prefers $w$ to $w'$, then $M'$ is not stable, contradiction.

And, if $m'$ prefers $w'$ to $w$, it means $m'$ was rejected by $w'$ since
$m'$ and $w$ are matched in $M$, contradicting that $m$ getting rejected 
was the first such event.
\end{proof}

\begin{thm} 
The men-proposing algorithm is \emph{female-pessimal}: every woman will
be matched to the \emph{worst} partner she could be matched to in any
stable matching.
\end{thm}

\begin{proof}
Again by contradiction, let $M$ be the output of Algorithm \ref{GSalg}.
Suppose there is another stable matching $M'$ and $w$ prefers $m' =
P_{M'}(w)$ to $m = P_{M}(w)$.  Let $w' = P_{M'}(m)$.  By man-optimality,
$m$ prefers $w$ to $w'$. Therefore, $(m,w)$ is a blocking pair for $M'$.
\end{proof}

\subsection*{Extensions and Applications}

Generalization to stable marriage present some difficulties. In more
realistic scenarios we can expects that ranking lists to be incomplete,
a rather be alone than with someone preference, and to model indifference 
between subsets of partners. While each of these are solvable in 
polynomial time separately, solving incomplete lists with indifference
preference together makes the problem NP-hard.

Another issue of concern is whether there are any incentives to change
preference lists. In game theory, a game is called \emph{strategyproof
(thruthful)}, if players have no incentive to hide information from
each other. Could someone state false preferences to gain a benefit 
from the match? For men, it is trivially truthful, but there is no 
incentive for women to be truthful! One can design cases where changing 
the list of preferences will increase the happiness of a given woman
with the final match results.

Furthermore, in the real world matching with preferences is usually not
one to one.  Many to one marriage problems, commonly referred to as the
college admissions model is famously employed in several entry level
professional labor markets such as the National Residency Matching
Program (NRMP). The college admission model assumes some population of 
students, a number of colleges with certain student capacities and
preferences stated by the colleges and the students.


NRMP has been in effect since the $1950$'s and has experimented with
different matching models to match medical school graduates to hospitals
as they enter residency programs. For a long time the system was run as
\emph{hospital optimal}. For this reason, the system was sued for being
anti-competitive;  the system held up, but was switched from being
hospital optimal to resident optimal. Interestingly, this switch didn't
change the rankings much, because rankings are highly correlated.  

Rules for the algorithm used to conduct the matching for NRMP have
been updated many times through the years as complications arose.
One of the major ones was the introduction of couples, that is an
application to a hospital coming not from a single student but from
a married couple. Economist, Al Roth, proved that introducing couples
into the match leaves a possibility that no stable match exists.





\end{document}
