Download presentation
Published byBritton Walters Modified over 9 years ago
1
Stable Matchings a.k.a. the Stable Marriage Problem
Samia Qader 252a-az CSC 254
2
The Stable Marriage Problem
Overview Real - life application The stable marriage problem Theorems Termination Correctness of algorithm Open problems
3
Real-life application
Residency: after medical school “The Match” was developed to assign prospective students to residency programs The students submit a rank-order list (ROL) to the National Residency Match Program (NRMP) Hospitals rank-order their students NRMP finds a match.
4
Simple Problem We’ve got n boys and n girls.
Each boy submits an ROL of all n girls and the girls do the same A matching is unstable if a boy A and a girl a, not married to each other, mutually prefer each other to their spouses. A marriage is a bijection between the boys and girls
5
Example 1: 4 boys (A,B,C,D) married to 4 girls (a,b,c,d)
Men Preference A c b d a B b a c d C c a d b D c a d b Women Preference a A B D C b C A D B c C B D A d B A C D Matching (Aa, Bb, Cc, Dd) Is it stable? Look at Aa and Bb: A(4) + a(1) = 5 B(1) + b(4) = 5 total = 10
6
Ex 1: 4 boys (A,B,C,D) married to 4 girls (a,b,c,d)
Women Preference a A B D C b C A D B c C B D A d B A C D Men Preference A c b d a B b a c d C c a d b D c a d b Check Ab and Ba: A(2) + a(2) = 4 B(2) + b(2) = 4 total = 8
7
Marriage Algorithm – in words
The boys are all single and free to propose
8
Marriage Algorithm – in words
The girls are all engaged temporarily to (the ugly man) Ugly man
9
Marriage Algorithm – in words
The boys propose to the best girl on their list (who hasn’t rejected them yet). The girls accept - tentatively. If the girl gets a better offer from a boy that she prefers to her fiancé, she will break off the engagement. STOP when all the boys are engaged
10
ROL
11
Results 3 happy couples:
12
ROL Brown man wants blonde girl – But she doesn’t want him
13
ROL Scratch off blonde from brown’s list
14
New Results 3 different couples:
15
More detail…. n= no.of men & women k = no. of couples formed
X = man suitor x = woman = ugly man while (k<n) do begin X = (k+1)st man; while (X ! = ) do { x= best remaining choice on X’s list if (x prefers X to her fiancé) { engage X and x X = former fiancé of } // end if }// end while if (X != ) withdraw x from X’s list end k = k+1; } // end while
16
Some Theorems The order in which the boys propose does not matter
The final matching is stable The boys get to marry the best girl the could possibly get in a stable marriage
17
Termination: the algorithm has to end
In what situation would the algorithm run forever - if a boy B keeps getting rejected by all girls This can never happen: a boy in only rejected by all girls if all the girls are engaged to someone better Impossible - since there are n girls and n-1 boys that are better than B
18
Correctness of the Algorithm
Is the final marriage stable? Proof by contradiction: There exists some pair (b,g) that mutually prefer each other to whomever they are matched to. Since b proposed in the order of his ROL, he must have proposed to g already
19
Correctness continued...
But if g is not engaged to b, she must have rejected him g would only reject b if she is already engaged to someone she prefers Therefore, g’s fiancé must be ranked more highly than b CONTRADICTION
20
Boy Optimality The marriage returned by this algorithm assigns every boy to his favorite stable partner. Consider matching each girl to her least favorite choice. The matching produced is stable and is the same as the matching returned by the algorithm described.
21
Residency Problem Who gets to play the boy? Answer : the hospitals
22
Bipartite matching In a complete bipartite graph, each node would have an ROL of the nodes that it prefers. 1 1 a 2 2 b 3 3 c 4 4 d
23
Open Problems… Maximum number of stable matches grows exponentially with n. What is the instance of size n with the largest possible number of stable matchings? Sex-equal matching: where the sum of the male scores is equal to the sum of the female scores. Is it possible to test the stability of every matching in a set of matchings faster (significantly) than by checking each of the matchings from scratch?
24
References Asratian A.S, Denley T.M.J, Bipartite Graphs and their Applications, Cambridge University Press, N.Y. (1998). Gusfield, D., Irving R.W., The Stable Marriage Problem :Structure and Algorithms, The MIT Press, Cambridge (1989). Knuth D.E., Stable Marriage and its Relation to Other Combinatorial Problems, American Mathematical Society, Providence (1997). Littman M.L., lectures/lect13/lect13.html, (1998). Lovasz L., Plummer M.D., Matching Theory, North-Holland, North- Holland (1986).
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.