Stable Matchings

Scribe: Puneet Arora, Ishan Vaishnavi
Lecture 16 by Prof. Pradeep Dubey

We are given a group of women and a group of men and we are required to find a desirable matching among them, i.e. we have to form couples from among them. A few instances of this problem occuring in real life are mentioned below :

Description of the problem

Let us assume there are 'n' women and 'n' men and we need to form 'n' couples. Each of these women ranks all men in an order of preference and similarly each man ranks all women.

Let's illustrate this with an example. Assume there are 5 men labelled A, B, C, D, E and women labelled $\alpha, \beta, \gamma, \delta, \epsilon$

The following assumptions are made

Let the preferences for men be given as follows.

      A : $\gamma$ $>$ $\delta$ $>$ $\alpha$ $>$ $\beta$ $>$ $\epsilon$
B : $\alpha$ $>$ $\gamma$ $>$ $\beta$ $>$ $\delta$ $>$ $\epsilon$
C : $\alpha$ $>$ $\epsilon$ $>$ $\beta$ $>$ $\delta$ $>$ $\gamma$
D : $\beta$ $>$ $\alpha$ $>$ $\gamma$ $>$ $\epsilon$ $>$ $\delta$
E : $\beta$ $>$ $\gamma$ $>$ $\alpha$ $>$ $\delta$ $>$ $\epsilon$

Let the preferences for women be as follows.

   $\alpha$ : A $>$ D $>$ C $>$ E $>$ B
$\beta$ : A $>$ B $>$ D $>$ C $>$ E
$\gamma$ : D $>$ E $>$ C $>$ A $>$ B
$\delta$ : C $>$ B $>$ A $>$ E $>$ D
$\epsilon$ : A $>$ B $>$ D $>$ E $>$ C

For $\alpha$, A $>$ B implies $\alpha$ prefers A over B, similarly A prefers $\alpha$ to $\beta$.

Consider the matching

``(A,$\alpha$)        (B, $\beta$)        (C, $\gamma$)        (D, $\delta$)        (E, $\epsilon$)''

Assuming that there is no dictatorship, i.e. there is no external factor that can force couples to stay together after getting matched. Therefore a pair can break their current marriage if both the partners prefer each other to their current partners. Formally: In the above example (A, $\delta$) can destabilise the matching as both of them rank each other higher than their currently matched partners i.e. A prefers $\delta$ to $\alpha$ and similarly $\delta$ prefers A to her current match. So if free will is assumed then they will elope destabilising the above matchings.

Also note that the couple (A,$\gamma$) cannot destabilize this matching since $\gamma$ prefers C to A and is matched to C in reality although A may want to match with $\gamma$ but $\gamma$ has no incentive of doing so.

So the desirable matching is the one where there is no pair consisting of a woman and a man who prefer each other to the partners with whom they are currently matched. Such a matching is called a Stable Matching.

The question now is that given any arbitary preferences does there always exist such a stable matching? D.Gale and L.Shapley proposed a method which gives a stable matching. The algorithm as we call it is the ``Man Proposal Procedure (MPP)``.

Man Proposal Procedure

The algorithm proceeds in rounds. For simplicity we refer to these rounds as 'days'. On day 1, every man proposes to the woman he likes best, i.e. the woman highest in his priority list. Now each woman has a list (possibly empty) of men who have proposed to her. She selects her most favoured man according to her personal preference. She keeps him 'on hold' and rejects others. So at the end of day 1, each woman who was proposed by at least one man has someone on hold. On day 2 each of the rejected men, propose to their next best choice. Now again each woman selects the best man from those who have proposed her and the one on hold, if any, and puts him on hold while rejecting others. This procedure continues till no man is rejected and all couples formed. We will see later that the procedure is guranteed to end.

Remarks on this procedure

Note:The procedure can be framed as the Woman Proposing Procedure (WPP) as well, the man woman terminology is purely a matter of choice of society!!!

Theorem 1   This Procedure results in a stable matching.

Proof: The proof procedes by the method of contradiction. We assume for contradiction that the procedure does not result in a stable matching. This implies that there exist two couples (given by our matching procedure) viz. A,$\alpha$ and B,$\beta$ such that A prefers $\beta$ over $\alpha$ and $\beta$ prefers A over B. So A must have proposed to $\beta$ before proposing to $\alpha$ but $\beta$ rejected A because there was somebody better than A in her list at some time. So it is not possible that later she ends up with B, who she prefers less than A. Hence the assumption is false.

A similar theorem can be formulated for WPP. A point here to note is that the matching obtained by WPP may be different from the one obtained by MPP.

A Comparison of MPP with WPP

Consider the following example. Let the preferences of men be :

A: $\alpha$ $>$ ... $>$ $\delta$
B: $\beta$ $>$ ... $>$ $\alpha$
C: $\gamma$ $>$ ... $>$ $\beta$
D: $\delta$ $>$ ... $>$ $\gamma$

Let the preferences of women be:

$\alpha$: B $>$ ... $>$A
$\beta$: C $>$ ... $>$B
$\gamma$: D $>$ ... $>$C
$\delta$: A $>$ ... $>$D

In this case MPP results in the following matching:

(A,$\alpha$)        (B, $\beta$)        (C, $\gamma$)        (D, $\delta$)

And WPP results in the following matching:

($\alpha$,B)        ($\beta$,C)        ($\gamma$,D)        ($\delta$,A)


Theorem 2   When MPP is followed then each man A, ends up with his top choice in the set poss(A).

Proof: We proceed by showing that in the course of MPP no man is rejected by a woman who is in poss(A). We call a 'bad event' as the rejection of a man by a woman who is possible for him (is in his poss set).We proceed to show therefore that a bad event never occurs. Using mathematical induction on days.

Claim: Assuming that no bad event occurs from days 1 to $k$, no bad event will occur on day $k+1$.

Proof: Suppose a bad event occurs on day $k+1$. Let $\gamma$ reject A for B although $\gamma$ belongs to poss(A) (call this event E1). There exists some stable matching (call it S1) where A and $\gamma$ are matched. Now in this stable matching, assume that B is paired with $\alpha$. This implies that B prefers $\alpha$ over $\gamma$ since S1 is stable else B and $\gamma$ would destabilise the matching since E1 implies that $\gamma$ prefers B over A. This inturn implies that B proposed to $\alpha$ and was rejected by her before proposing to $\gamma$. Which is a contradiction since $\alpha$ is in poss B and we assumed no bad event occurred on days $1$ through $k$.

What remains to be proven is that no bad event occured on the 1st day. Let $\gamma$ reject A for B although $\gamma$ belongs to poss(A) (call this event E0). There exists some stable matching (call it S0) where A and $\gamma$ are matched. Assume that E0 occurs on day 1. So since S0 is stable B prefers $\alpha$ over $\gamma$ hence B will propose to $\gamma$ only after being rejected by $\alpha$ which is not possible on day 1.

A similar theorem can be formulated for WPP.
The above theorem suggests that there exists an inherent competition between men and women since men would prefer MPP and women would prefer WPP. However there is no competition among men since each men gets his best choice in his possible set, when MPP is followed.

Game Theoretic Perspective

Game Theory can be used to analyze if there exists any incentive for a person (or a group) to misrepresent his (their) true preferences and end with a better partner (partners). In other words is the matching given by MPP a strong Nash equilibrium?
Definition : A profile is in strong Nash-equilibrium if there is no subgroup that can deviate by changing strategies jointly in a manner that increases the payoff of all its members, given that nonmembers stick to their original choice.


One can think of variations of this problem in different settings. Two major variations to this problem are

Homework: Prove the following claim:
"If MPP and WPP result in the same stable matching then that is the only existing stable matching for the given problem."

Puneet Arora 2002-11-22