Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/...

64
1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of Computer Sciences Florida Institute of Technology Melbourne, Florida USA 32901 http://www.cs.fit.edu/ ~ ryan/ 25 March 2017

Transcript of Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/...

Page 1: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

1/ 58

Stable Marriage ProblemA Million Dollar Problem

Ryan Stansifer

Department of Computer SciencesFlorida Institute of TechnologyMelbourne, Florida USA 32901

http://www.cs.fit.edu/~ryan/

25 March 2017

Page 2: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

2/ 58

A matching algorithm

A ranking algorithm

A ???? problem

Page 3: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

3/ 58

Problem 1:known as the

stable marriage problem

Solution: known as thedeferred acceptance algorithm

Page 4: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

4/ 58

Shapely and Roth won the 2012 Nobel Prize in Economics

Page 5: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

5/ 58

10 million SEKUS$ 1.4 millione 950,000

Page 6: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

6/ 58

The problem is to find mutually acceptable matching of n things ofone kind to n things of another. For example:

donors to receipients,

residents to hospital opportunities,

students to available spots in schools, and

men to women

Page 7: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

7/ 58

Let us meet the men and the women.

Let us make a matching.

Page 8: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

8/ 58

AMY BETH CLARE DOT ELLA FRAN

ZACK

YORK

XAVIER

WALTER

VICTOR

ULRIC

Page 9: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

9/ 58

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK CLARE

YORK

XAVIER

WALTER

VICTOR

ULRIC

Page 10: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

10/ 58

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK CLARE

YORK YORK ELLA

XAVIER

WALTER

VICTOR

ULRIC

Page 11: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

11/ 58

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK CLARE

YORK YORK ELLA

XAVIER XAVIERBETH

WALTER

VICTOR

ULRIC

Page 12: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

12/ 58

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK CLARE

YORK YORK ELLA

XAVIER XAVIERBETH

WALTER

VICTOR VICTOR DOT

ULRIC

Page 13: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

13/ 58

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK CLARE

YORK YORK ELLA

XAVIER XAVIERBETH

WALTER WALTERAMY

VICTOR VICTOR DOT

ULRIC

Page 14: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

14/ 58

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK CLARE

YORK YORK ELLA

XAVIER XAVIERBETH

WALTER WALTERAMY

VICTOR VICTOR DOT

ULRIC ULRIC FRAN

Page 15: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

15/ 58

There are many possible matching.

Page 16: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK DOT

YORK YORK BETH

XAVIER XAVIER ELLA

WALTER WALTERFRAN

VICTOR VICTORCLARE

ULRIC ULRIC AMY

Several example matchings example 1: WXZVYU men emoji 16

Page 17: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK BETH

YORK YORK ELLA

XAVIER XAVIERCLARE

WALTER WALTERFRAN

VICTOR VICTOR DOT

ULRIC ULRIC AMY

Several example matchings example 2: UZXVYW men emoji 17

Page 18: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK ELLA

YORK YORKCLARE

XAVIER XAVIER AMY

WALTER WALTERFRAN

VICTOR VICTOR DOT

ULRIC ULRIC BETH

Several example matchings example 3: XUYVZW men emoji 18

Page 19: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK AMY

YORK YORK BETH

XAVIER XAVIERCLARE

WALTER WALTERDOT

VICTOR VICTORELLA

ULRIC ULRIC FRAN

Several example matchings example 4: ZYXWVU men emoji 19

Page 20: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

20/ 58

There is always a matching of all.

Is there a best one?

For that we need to consider the preferences of the all the men andwomen.

Page 21: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

21/ 58

Men’s Preferences

1 2 3 4 5 6

ZACK CLARE AMY BETH ELLA FRAN DOT

YORK ELLA CLARE BETH AMY FRAN DOT

XAVIER BETH CLARE AMY ELLA FRAN DOT

WALTER AMY CLARE BETH ELLA FRAN DOT

VICTOR CLARE DOT FRAN BETH AMY ELLA

ULRIC AMY FRAN DOT CLARE BETH ELLA

Page 22: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

22/ 58

Women’s Preferences

1 2 3 4 5 6

AMY ULRIC WALTER XAVIER YORK ZACK VICTOR

BETH ULRIC VICTOR XAVIER YORK ZACK WALTER

CLARE ZACK XAVIER YORK VICTOR ULRIC WALTER

DOT YORK XAVIER ZACK VICTOR ULRIC WALTER

ELLA VICTOR XAVIER YORK ZACK WALTER ULRIC

FRAN ZACK XAVIER YORK VICTOR ULRIC WALTER

Page 23: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

23/ 58

We can look at a matchingas a table for the men or for the women.

Page 24: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

24/ 58

AMY BETH CLARE DOT ELLA FRAN

ZACK ZACK BETH

YORK YORK ELLA

XAVIER XAVIERCLARE

WALTER WALTERFRAN

VICTOR VICTOR DOT

ULRIC ULRIC AMY

Page 25: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

25/ 58

ZACK YORK XAVIER WALTER VICTOR ULRIC

AMY ULRIC AMY

BETH ZACK BETH

CLARE XAVIERCLARE

DOT VICTOR DOT

ELLA YORK ELLA

FRAN WALTERFRAN

Page 26: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

26/ 58

Recall:We are looking for a good matching.

It not possible for everyone to get their first choice. But it wouldbe nice to eliminate dissatification leading to instability.

What do we mean? Consider the following example . . .

Page 27: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

27/ 58

A B C D E F

CABEFD Zack BethECBAFD York EllaBCAEFD Xavier ClareACBEFD Walter FranCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth ZackZXYVUW Clare XavierYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran Walter

Page 28: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

28/ 58

A B C D E F

CABEFD Zack BethECBAFD York EllaBCAEFD Xavier ♥ ClareACBEFD Walter FranCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth Zack ♥ZXYVUW Clare XavierYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran Walter

Page 29: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

29/ 58

A B C D E F

CABEFD Zack Beth ♥ECBAFD York EllaBCAEFD Xavier ClareACBEFD Walter FranCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth ZackZXYVUW Clare ♥ XavierYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran Walter

Page 30: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

30/ 58

Deferred Acceptance Algorithm

Is there an algorithm that will matchall the men and women efficiently with no unhappy couples?

Page 31: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

31/ 58

Deferred Acceptance Algorithm

Repeat the following steps until all are matched.

An unmatched man proposes to the more preferred womanwho has not previously rejected his proposal.

Then, a woman (tentatively) accepts the proposal breaking anexisting engagement when the new suitor is preferred (if any).

Page 32: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD ZackECBAFD YorkBCAEFD XavierACBEFD WalterCDFBAE VictorAFDCBE Ulric

Z Y X W V U

UWXYZV AmyUVXYZW BethZXYVUW ClareYXZVUW DotVXYZWU EllaZXYVUW Fran

Deferred acceptance algorithm step 0: no matches 32

Page 33: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD YorkBCAEFD XavierACBEFD WalterCDFBAE VictorAFDCBE Ulric

Z Y X W V U

UWXYZV AmyUVXYZW BethZXYVUW Clare ZackYXZVUW DotVXYZWU EllaZXYVUW Fran

Deferred acceptance algorithm step 1: Zack proposes to Clare 33

Page 34: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD XavierACBEFD WalterCDFBAE VictorAFDCBE Ulric

Z Y X W V U

UWXYZV AmyUVXYZW BethZXYVUW Clare ZackYXZVUW DotVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 2: York proposes to Ella 34

Page 35: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD WalterCDFBAE VictorAFDCBE Ulric

Z Y X W V U

UWXYZV AmyUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW DotVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 3: Xavior proposes to Beth 35

Page 36: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD Walter AmyCDFBAE VictorAFDCBE Ulric

Z Y X W V U

UWXYZV Amy WalterUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW DotVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 4: Walter proposes to Amy 36

Page 37: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD Walter AmyCDFBAE VictorAFDCBE Ulric

Z Y X W V U

UWXYZV Amy WalterUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW DotVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 5: Clare rejects Victor’s proposal 37

Page 38: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD Walter AmyCDFBAE Victor DotAFDCBE Ulric

Z Y X W V U

UWXYZV Amy WalterUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 6: Victor proposes to Dot 38

Page 39: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD WalterCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 7: Ulric proposes to Amy 39

Page 40: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD WalterCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 8: Clare rejects Walter’s proposal 40

Page 41: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD WalterCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 9: Beth rejects Walter’s proposal 41

Page 42: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD WalterCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran

Deferred acceptance algorithm step 10: Ella rejects Walter’s proposal 42

Page 43: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD Walter FranCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran Walter

Deferred acceptance algorithm step 11: Walter proposes to Fran 43

Page 44: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

All are matched.No blocking pairs.

There might be many stable matchings(but in this particular case there are not)

Page 45: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack Clare •ECBAFD York EllaBCAEFD Xavier BethACBEFD Walter FranCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy UlricUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW Dot • VictorVXYZWU Ella YorkZXYVUW Fran Walter

Blocking Pair? No. Dot-Zack 45

Page 46: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

A B C D E F

CABEFD Zack ClareECBAFD York EllaBCAEFD Xavier BethACBEFD Walter • FranCDFBAE Victor DotAFDCBE Ulric Amy

Z Y X W V U

UWXYZV Amy • UlricUVXYZW Beth XavierZXYVUW Clare ZackYXZVUW Dot VictorVXYZWU Ella YorkZXYVUW Fran Walter

Blocking Pair? No. Amy-Walter 46

Page 47: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

47/ 58

Definition

A pair (m,w) is blocking for a matching if m prefers w to hismatch and also w prefers m to her match.

A blocking pair destablizes a matching as the pair have incentiveto abandoned their partners.

Page 48: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

48/ 58

Definition

A matching is perfect if all are paired up.

Definition

A matching is stable if there are no blocking pairs.

It is not obvious, but there is always a stable matching no matterwhat the preferences are.

Theorem

There is always a perfect, stable matching.

Page 49: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

49/ 58

Definition

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

Theorem (Gale-Shapley)

Every man gets his best possible match.

Theorem (Gale-Shapley)

Every woman gets her worse possible match.

Page 50: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

50/ 58

Theorem (Dubins-Freedman)

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

Page 51: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

51/ 58

Efficient Implmetnation

Does woman w prefer man m to man m′?Create inverse of preference list of men.

Amy 1 2 3 4 5 6

pref 6(U) 4(W) 3(X) 2(Y) 1(Z) 5(V)

Amy 1 2 3 4 5 6

inv 5 4 3 2 1 1

for i=1 to n

inv [pref[i]] = i

Amy prefers man 6 to man 3 since inv[6]=1 ¡ inv[3]=3

Page 52: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

52/ 58

Social Utility

There are many ways to do matching. But the remarkable thingabout the deferred acceptance algorithm is that:

1 there is no advantage to lie or cheat about the preference, and

2 no swap will improve all the parties involved

This means making matchings this way can reduce strife and otherproblems.

Page 53: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

53/ 58

National Resident Matching Program (NRMP)www.nrmp.org

NRMP places applicants for postgraduate medical trainingpositions into residency programs at teaching hospitals throughoutthe United States.

Page 54: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

54/ 58

Historical Context

Hospitals made offers earlier and earlier and residents waitedlonger and longer to accept.

In 1952 a centralized clearing house (NRMP) was formed.

Originally used the “Boston Pool” algorithm. Mostlyequivalent to the deferred acceptance algorithm whichhospital optimality.

Algorithm overhauled and new algorithm adopted May 1997.

Resident optimalSide constraints (couples, unacceptability, unequal numbers)

Today over 42,000 residents for over 30,000 positions.

Page 55: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

55/ 58

Page 56: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

56/ 58

In New York City in the late 1990s tens of thousands of childrenwere placed in badly matched schools.

The process was so byzantine it appeared nothingshort of a Nobel Prize-worthy algorithm could fix it.Three economists Atila Abdulkadiroglu (Duke), ParagPathak (M.I.T.) and Alvin E. Roth (Stanford), all expertsin game theory and market design were invited to attackthe sorting problem together. Their solution was a modelof mathematical efficiency and elegance.

In 2014 75,000 eight grade students applied for a spot at one of426 public high schools, in a few hours the Class of 2019 wasarranged.

Page 57: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

57/ 58

College Admissions

Page 58: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

58/ 58

Kidney

Page 59: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

59/ 58

National Kidney RegistryFacilitating Living Donor Transplantshttp://www.kidneyregistry.org/

The National Kidney Registry uses the power oftechnology and large pools of donor/recipient pairs tofind better matches through paired exchange.

Page 60: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

60/ 58

The top trading cycle algorithm may produce long chains (SeeNYT) and the maximal matching algorithm can be distorted by ahospital’s goal of minimizing its costs over the greater social good.In general, the goal is to incentive hospitals to report all of theirpatient-donor pairs, to save as many lives as possible.

Page 61: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

References I

D. Gale and Lloyd S. Shapley. “College Admissions and theStability of Marriage”. In: American Mathematical Monthly120.5 (May 2013), pp. 386–391. doi: http://dx.doi.org/10.4169/amer.math.monthly.120.05.386. url:http://www.jstor.org/stable/pdfplus/10.4169/amer.

math.monthly.120.05.386.pdf.

D. Gusfield and R. W. Irving. The Stable Marriage Problems:Structure and Algorithms. Cambridge, Massachusetts: MITPress, 1989.

Grace Lyo. The Stable Marriage Problem. Girls’ AngleWomen in Mathematics Video Series. Presented by EmilyRhiel. 2012. url: http://www.girlsangle.org/page/filmpage.php?num=16.

Numberphile. The Stable Marriage Problem. YouTube.Presented by Emily Rhiel. 2014. url:https://www.youtube.com/watch?v=Qcv1IqHWAzg.

61/ 58

Page 62: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

References II

Alvin E. Roth. “The Economics of Matching: Stability andIncentives”. In: Mathematics of Operation Research 7.4(2009), pp. 79–112.

Alvin E. Roth. “The Evolution and the Labor Market forMedical Interns and Residents: A Case Study in GameTheory”. In: Political Economy Y2.6 (1984).

Alvin E. Roth. “The Evolution of the Labor Market forMedical Interns and Residents: A Case Study in GameTheory”. In: Journal of Polical Enconomy 92 (1984),pp. 991–1016. url: http://www.economics.harvard.edu/~aroth/papers/evolut.pdf.

Alvin E. Roth and Elliot Peranson. “The Redesign of theMatching Market for American Physicians: Some EngineeringAspects of Ecnomic Design”. In: The American EconomicReview 89.4 (1999).

62/ 58

Page 63: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

References III

Alvin E. Roth, T. Sonmez, and M. U. Unver. “KidneyExchange”. In: Quaterly Journal of Economics 119 (2004),pp. 457–488.

Alvin E. Roth, T. Sonmez, and M. U. Unver. “PairwiseKidney Exchange”. In: Journal of Economic Theory 125(2005), pp. 151–1888.

Kevin Sack. “60 lives, 30 kidneys, all linked”. In: New YorkTimes (February 2012). url:http://www.nytimes.com/2012/02/19/health/lives-

forever-linked-through-kidney-transplant-chain-

124.html.

63/ 58

Page 64: Stable Marriage Problem - Florida Institute of Technologypkc/cs4hs/million/stableMarriage.pdf · 1/ 58 Stable Marriage Problem A Million Dollar Problem Ryan Stansifer Department of

References IV

Tracey Tullis. “How Game Thoery Helped Improve New YorkCity’s High School Application Process”. In: New YorkTimes (December 2014). url:https://www.nytimes.com/2014/12/07/nyregion/how-

game-theory-helped-improve-new-york-city-high-

school-application-process.html.

64/ 58