48
A solution to the stable marriage problem Emily Riehl Harvard University http://www.math.harvard.edu/~eriehl 6 March 2013 Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 1 / 20

A solution to the stable marriage problem

Embed Size (px)

Citation preview

Page 1: A solution to the stable marriage problem

A solution to the stable marriage problem

Emily Riehl

Harvard Universityhttp://www.math.harvard.edu/~eriehl

6 March 2013

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 1 / 20

Page 2: A solution to the stable marriage problem

Stable marriages

A matching is stable if no unmatched man and woman each prefers theother to his or her spouse.

The stable marriage problem

Find a stable matching for any dating pool.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 2 / 20

Page 3: A solution to the stable marriage problem

Stable marriages

A matching is stable if no unmatched man and woman each prefers theother to his or her spouse.

The stable marriage problem

Find a stable matching for any dating pool.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 2 / 20

Page 4: A solution to the stable marriage problem

The deferred-acceptance algorithm (Gale-Shapley)

description via a metaphor

Day 0: each individual ranks the opposite sex

Day 1: (a.m.) each man proposes to his top choice(p.m.) each woman rejects all but her top suitor

Day n+ 1: (a.m.) each man rejected on day n proposes to his topremaining choice(p.m.) each woman rejects all but her top suitor

When each man is engaged, the algorithm terminates.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 3 / 20

Page 5: A solution to the stable marriage problem

The deferred-acceptance algorithm (Gale-Shapley)

description via a metaphor

Day 0: each individual ranks the opposite sex

Day 1: (a.m.) each man proposes to his top choice(p.m.) each woman rejects all but her top suitor

Day n+ 1: (a.m.) each man rejected on day n proposes to his topremaining choice(p.m.) each woman rejects all but her top suitor

When each man is engaged, the algorithm terminates.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 3 / 20

Page 6: A solution to the stable marriage problem

The deferred-acceptance algorithm (Gale-Shapley)

description via a metaphor

Day 0: each individual ranks the opposite sex

Day 1: (a.m.) each man proposes to his top choice(p.m.) each woman rejects all but her top suitor

Day n+ 1: (a.m.) each man rejected on day n proposes to histop remaining choice(p.m.) each woman rejects all but her top suitor

When each man is engaged, the algorithm terminates.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 4 / 20

Page 7: A solution to the stable marriage problem

The deferred-acceptance algorithm (Gale-Shapley)

description via a metaphor

Day 0: each individual ranks the opposite sex

Day 1: (a.m.) each man proposes to his top choice(p.m.) each woman rejects all but her top suitor

Day n+ 1: (a.m.) each man rejected on day n proposes to histop remaining choice(p.m.) each woman rejects all but her top suitor

When each man is engaged, the algorithm terminates.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 4 / 20

Page 8: A solution to the stable marriage problem

An example

Ken Bev Cat AdaLeo Ada Cat BevMax Ada Bev Cat

Ada Ken Leo MaxBev Leo Max KenCat Max Leo Ken

Day 1:

Leo & Max propose to Ada. Ken proposes to Bev.

Ada rejects Max.

Ada & Leo and Bev & Ken are engaged.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 5 / 20

Page 9: A solution to the stable marriage problem

An example

Ken Bev Cat AdaLeo Ada Cat BevMax Ada Bev Cat

Ada Ken Leo MaxBev Leo Max KenCat Max Leo Ken

Day 1:

Leo & Max propose to Ada. Ken proposes to Bev.

Ada rejects Max.

Ada & Leo and Bev & Ken are engaged.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 5 / 20

Page 10: A solution to the stable marriage problem

An example

Ken Bev Cat Ada

Leo Ada Cat Bev

Max Ada Bev Cat

Ada Ken Leo Max

Bev Leo Max KenCat Max Leo Ken

Day 1:

Leo & Max propose to Ada. Ken proposes to Bev.

Ada rejects Max.

Ada & Leo and Bev & Ken are engaged.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 5 / 20

Page 11: A solution to the stable marriage problem

An example

Ken Bev Cat Ada

Leo Ada Cat Bev

Max /////Ada Bev Cat

Ada Ken Leo /////Max

Bev Leo Max KenCat Max Leo Ken

Day 1:

Leo & Max propose to Ada. Ken proposes to Bev.

Ada rejects Max.

Ada & Leo and Bev & Ken are engaged.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 5 / 20

Page 12: A solution to the stable marriage problem

An example

Ken Bev Cat Ada

Leo Ada Cat Bev

Max /////Ada Bev Cat

Ada Ken Leo Max

Bev Leo Max KenCat Max Leo Ken

Day 2:

Max proposes to Bev.

Bev rejects Ken.

Ada & Leo and Bev & Max are engaged.

Day 3:

Ken proposes to Cat.

It’s a match: Ada & Leo, Bev & Max, Cat & Ken.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 6 / 20

Page 13: A solution to the stable marriage problem

An example

Ken ////Bev Cat Ada

Leo Ada Cat Bev

Max /////Ada Bev Cat

Ada Ken Leo Max

Bev Leo Max /////Ken

Cat Max Leo Ken

Day 2:

Max proposes to Bev.

Bev rejects Ken.

Ada & Leo and Bev & Max are engaged.

Day 3:

Ken proposes to Cat.

It’s a match: Ada & Leo, Bev & Max, Cat & Ken.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 6 / 20

Page 14: A solution to the stable marriage problem

An example

Ken ////Bev Cat Ada

Leo Ada Cat Bev

Max /////Ada Bev Cat

Ada Ken Leo Max

Bev Leo Max /////Ken

Cat Max Leo Ken

Day 2:

Max proposes to Bev.

Bev rejects Ken.

Ada & Leo and Bev & Max are engaged.

Day 3:

Ken proposes to Cat.

It’s a match: Ada & Leo, Bev & Max, Cat & Ken.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 6 / 20

Page 15: A solution to the stable marriage problem

An example

Ken ////Bev Cat Ada

Leo Ada Cat Bev

Max /////Ada Bev Cat

Ada Ken Leo Max

Bev Leo Max /////Ken

Cat Max Leo Ken

Day 2:

Max proposes to Bev.

Bev rejects Ken.

Ada & Leo and Bev & Max are engaged.

Day 3:

Ken proposes to Cat.

It’s a match: Ada & Leo, Bev & Max, Cat & Ken.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 6 / 20

Page 16: A solution to the stable marriage problem

A solution to the stable marriage problem

Theorem

The deferred-acceptance algorithm arranges stable marriages.

Proof:

Each of the women that a given man prefers to his wife rejected him infavor of a suitor she preferred.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 7 / 20

Page 17: A solution to the stable marriage problem

A solution to the stable marriage problem

Theorem

The deferred-acceptance algorithm arranges stable marriages.

Proof:

Each of the women that a given man prefers to his wife rejected him infavor of a suitor she preferred.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 7 / 20

Page 18: A solution to the stable marriage problem

Heteronormativity

Heteronormativity is an essential feature of the algorithm: the “stableroommates” problem might have no solution!

Example

Given “roommate” preferences:

Ada Bet - DotBet Cat - DotCat Ada - DotDot - - -

then

whomever is paired with Dot would rather swap to be with the suitor whoranks her first.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 8 / 20

Page 19: A solution to the stable marriage problem

Heteronormativity

Heteronormativity is an essential feature of the algorithm: the “stableroommates” problem might have no solution!

Example

Given “roommate” preferences:

Ada Bet - DotBet Cat - DotCat Ada - DotDot - - -

then

whomever is paired with Dot would rather swap to be with the suitor whoranks her first.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 8 / 20

Page 20: A solution to the stable marriage problem

Comparing stable matchings

Say a man and a woman are possible for each other if some stablematching marries them.

Theorem (Gale-Shapley)

In the solution found by the deferred-acceptance algorithm, every mangets his best possible match!

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 9 / 20

Page 21: A solution to the stable marriage problem

Comparing stable matchings

Say a man and a woman are possible for each other if some stablematching marries them.

Theorem (Gale-Shapley)

In the solution found by the deferred-acceptance algorithm, every mangets his best possible match!

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 9 / 20

Page 22: A solution to the stable marriage problem

Comparing stable matchings

Theorem (Gale-Shapley)

Every man gets his best possible match.

Proof:

We show (by induction) that no man is rejected by a possible wife:

m̃’s preferences

w bb

possible match """b"b"b"b"b

w’s preferences

OO

m

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 10 / 20

Page 23: A solution to the stable marriage problem

Comparing stable matchings

Theorem (Gale-Shapley)

Every man gets his best possible match.

Proof:

We show (by induction) that no man is rejected by a possible wife:

m̃’s preferences

w oopropose �/o/o/o/o�

reject """b"b"b"b"b

m̃ w’s preferences

OO

m

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 10 / 20

Page 24: A solution to the stable marriage problem

Comparing stable matchings

Theorem (Gale-Shapley)

Every man gets his best possible match.

Proof:

We show (by induction) that no man is rejected by a possible wife:

w̃ aapossible match

!!!a!a!a!a!a

m̃’s preferences

OO

w bb

possible match """b"b"b"b"b

m̃ w’s preferences

OO

m

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 10 / 20

Page 25: A solution to the stable marriage problem

Comparing stable matchings

Theorem (Gale-Shapley)

Every man gets his best possible match.

Proof:

We show (by induction) that no man is rejected by a possible wife:

w̃ �reject

!!!a!a!a!a!a

m̃’s preferences

OO

w oo propose�/o/o/o/o m̃ w’s preferences

OO

m

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 10 / 20

Page 26: A solution to the stable marriage problem

Partial order on stable matchings

Define ≥M to mean preferred by every man and≥W to mean preferred by every woman.

Theorem

≥M is equivalent to ≤W .

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 11 / 20

Page 27: A solution to the stable marriage problem

Partial order on stable matchings

Define ≥M to mean preferred by every man and≥W to mean preferred by every woman.

Theorem

≥M is equivalent to ≤W .

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 11 / 20

Page 28: A solution to the stable marriage problem

Better for men is worse for women

Theorem

≥M is equivalent to ≤W .

Proof:

Suppose α ≥M ω but some woman w prefers α.

m’s preferences

w ooα ///o/o/o

__

ω ���_�_�_�_

m w’s preferences

OO

Stability of ω implies that ω matches m to some woman w̃ he prefers, butthen α �M ω.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 12 / 20

Page 29: A solution to the stable marriage problem

Better for men is worse for women

Theorem

≥M is equivalent to ≤W .

Proof:

Suppose α ≥M ω but some woman w prefers α.

w̃ __ω

���_�_�_�_�_

m’s preferences

OO

w ooα ///o/o/o

__

ω ���_�_�_�_

m w’s preferences

OO

Stability of ω implies that ω matches m to some woman w̃ he prefers, butthen α �M ω.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 12 / 20

Page 30: A solution to the stable marriage problem

The complete lattice of stable matchings

Theorem (Conway)

The set of stable matchings for any fixed dating pool is a complete latticewith partial order ≥M .

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 13 / 20

Page 31: A solution to the stable marriage problem

The complete lattice of stable matchings

Theorem (Conway)

The set of stable matchings for any fixed dating pool is a complete latticewith partial order ≥M .

Proof: construction of α ∨ ωSuppose everyone joins right hands with their α-match and left hands withtheir ω-match (forming disjoint circles with men facing in and womenfacing out).

If all drop hands and point at their preferred partner, in each circle,everyone will point in the same direction (so that the men and womenhave opposite preferences).

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 14 / 20

Page 32: A solution to the stable marriage problem

The complete lattice of stable matchings

Theorem (Conway)

The set of stable matchings for any fixed dating pool is a complete latticewith partial order ≥M .

Proof: construction of α ∨ ωSuppose everyone joins right hands with their α-match and left hands withtheir ω-match (forming disjoint circles with men facing in and womenfacing out).

If all drop hands and point at their preferred partner, in each circle,everyone will point in the same direction (so that the men and womenhave opposite preferences).

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 14 / 20

Page 33: A solution to the stable marriage problem

Sexism in the male-proposing algorithm

Corollary

In the stable matching found by the male-proposing algorithm, everywoman gets her worst possible match!

Of course it’s a different matter if the women propose...

Upshot: waiting to receive proposals is a bad strategy.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 15 / 20

Page 34: A solution to the stable marriage problem

Sexism in the male-proposing algorithm

Corollary

In the stable matching found by the male-proposing algorithm, everywoman gets her worst possible match!

Of course it’s a different matter if the women propose...

Upshot: waiting to receive proposals is a bad strategy.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 15 / 20

Page 35: A solution to the stable marriage problem

Can the women retaliate?

Yes! Strategy: truncate preference lists

The women steal preference lists and compute their optimal matches.

Each woman truncates her preference list below her best match.

Male proposals will be rejected until the result is women-optimal.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 16 / 20

Page 36: A solution to the stable marriage problem

Can the women retaliate?

Yes! Strategy: truncate preference lists

The women steal preference lists and compute their optimal matches.

Each woman truncates her preference list below her best match.

Male proposals will be rejected until the result is women-optimal.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 16 / 20

Page 37: A solution to the stable marriage problem

Can the women retaliate?

Yes! Strategy: truncate preference lists

The women steal preference lists and compute their optimal matches.

Each woman truncates her preference list below her best match.

Male proposals will be rejected until the result is women-optimal.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 16 / 20

Page 38: A solution to the stable marriage problem

Can the women retaliate?

Yes! Strategy: truncate preference lists

The women steal preference lists and compute their optimal matches.

Each woman truncates her preference list below her best match.

Male proposals will be rejected until the result is women-optimal.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 16 / 20

Page 39: A solution to the stable marriage problem

Men shouldn’t lie.

Theorem (Dubins-Freedman)

No man or consortium of men can improve their results in themale-proposing algorithm by submitting false preferences.

Real-world consequences

At least on one side, the deferred-acceptance algorithm is strategy-proof.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 17 / 20

Page 40: A solution to the stable marriage problem

Men shouldn’t lie.

Theorem (Dubins-Freedman)

No man or consortium of men can improve their results in themale-proposing algorithm by submitting false preferences.

Real-world consequences

At least on one side, the deferred-acceptance algorithm is strategy-proof.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 17 / 20

Page 41: A solution to the stable marriage problem

National Resident Matching Program: History

Prehistory

In the 1940s, hospitals competed for residents by making offers earlyin medical school and demanding immediate responses.

General instability encouraged private negotiations between studentsand hospitals.

The medical match

In 1952, after a few false starts, the National Intern MatchingProgram (NRMP) found a stable solution:

... the deferred-acceptance algorithm!

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 18 / 20

Page 42: A solution to the stable marriage problem

National Resident Matching Program: History

Prehistory

In the 1940s, hospitals competed for residents by making offers earlyin medical school and demanding immediate responses.

General instability encouraged private negotiations between studentsand hospitals.

The medical match

In 1952, after a few false starts, the National Intern MatchingProgram (NRMP) found a stable solution:

... the deferred-acceptance algorithm!

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 18 / 20

Page 43: A solution to the stable marriage problem

NRMP: Who proposes?

Failure to communicate (Gale-Sotomayor 1985)

“The question of course then arises as to whether these results can beapplied ‘in practice’. [Gale-Shapley ’62] had expressed some reservationson this point,—and then came another surprise. Not only could themethod be applied, it had been more than ten years earlier!”

But who proposes?

Prior to the mid-1990s the hospitals acted as the proposers.

After a review by Roth et al., the students propose.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 19 / 20

Page 44: A solution to the stable marriage problem

NRMP: Who proposes?

Failure to communicate (Gale-Sotomayor 1985)

“The question of course then arises as to whether these results can beapplied ‘in practice’. [Gale-Shapley ’62] had expressed some reservationson this point,—and then came another surprise. Not only could themethod be applied, it had been more than ten years earlier!”

But who proposes?

Prior to the mid-1990s the hospitals acted as the proposers.

After a review by Roth et al., the students propose.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 19 / 20

Page 45: A solution to the stable marriage problem

Real-world complications

A problem

Medical students are often married (in real life) to each other.

Solution: couples match

Couples rank pairs of preferences. Only one problem:

Theorem (Ronn)

The couples match is NP-complete.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 20 / 20

Page 46: A solution to the stable marriage problem

Real-world complications

A problem

Medical students are often married (in real life) to each other.

Solution: couples match

Couples rank pairs of preferences. Only one problem:

Theorem (Ronn)

The couples match is NP-complete.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 20 / 20

Page 47: A solution to the stable marriage problem

Real-world complications

A problem

Medical students are often married (in real life) to each other.

Solution: couples match

Couples rank pairs of preferences. Only one problem:

Theorem (Ronn)

The couples match is NP-complete.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 20 / 20

Page 48: A solution to the stable marriage problem

Real-world complications

A problem

Medical students are often married (in real life) to each other.

Solution: couples match

Couples rank pairs of preferences. Only one problem:

Theorem (Ronn)

The couples match is NP-complete.

Emily Riehl (Harvard University) A solution to the stable marriage problem 6 March 2013 20 / 20