Download presentation
Presentation is loading. Please wait.
1
Stable Matchings
2
There are n men and n women
There are n men and n women. Each man ranks the women in order of preference. Similarly, each woman ranks the men in order of preference. e.g. Men a: y>v>x>w>u b: x>y>w>v>u c: v>x>w>y>u d: u>y>w>v>x e: y>u>x>v>w Women u: b>c>a>d>e v: e>d>a>c>b w: b>a>c>d>e x: e>b>a>c>d y: d>e>b>a>c
3
Consider the matching: ay, bx, cv, dw, eu.
Consider the unmatched pair du. d prefers u to his current partner, and u prefers d to her current partner. du form an unstable pair. Men a: y>v>x>w>u b: x>y>w>v>u c: v>x>w>y>u d: u>y>w>v>x e: y>u>x>v>w Women u: b>c>a>d>e v: e>d>a>c>b w: b>a>c>d>e x: e>b>a>c>d y: d>e>b>a>c
4
DefinitionS: An unstable pair is an unmatched pair AX for which A prefers X to his current partner, and X prefers A to her current partner. A stable matching is a matching with no unstable pair.
5
The matching shown below is stable
The matching shown below is stable. It is possible to verify this directly by looking at all the possible unstable pairs ay, cv, cx. None of these is unstable, so this is a stable matching. Men a: y>v>x>w>u b: x>y>w>v>u c: v>x>w>y>u d: u>y>w>v>x e: y>u>x>v>w Women u: b>c>a>d>e v: e>d>a>c>b w: b>a>c>d>e x: e>b>a>c>d y: d>e>b>a>c
6
Gale-Shapely Proposal Algorithm
Each man proposes to the highest woman on his list who has not yet rejected him. If a woman receives two proposals she rejects the man who is lower in her preference list and keeps the other man on a string. When a man is rejected he proposes to the next woman on his list. This is continued until every woman receives a proposal. The final set of proposals form a stable matching.
7
Theorem: The Gale-Shapely algorithm produces a stable matching.
Proof: Clearly the algorithm terminates with a matching. Suppose the algorithm matches man A to woman X. Suppose that Y is a woman higher than X on A’s preference list. Then Y must have rejected A during the execution of the algorithm. So Y would have received a better proposal and the algorithm would have paired Y with a man B who is higher than A on Y’s preference list. So AY is not an unstable pair because Y does not prefer A to her current partner B.
8
Since this is true for any man A and any woman Y that A prefers to the partner assigned by the algorithm, the algorithm cannot produce an unstable pair. □ Algorithm Men A: .>…….>..>X>.>. B: ..>..>..>..>.. . : ..>..>..>..>.. Women . : ..>..>..>..>.. . : ..>..>..>..>.. X: ..>..>A>..>.. Y: .>……..>..>..…. >… >Y Algorithm >B >A Not unstable
9
Example 1. Find a Stable Matching for the following:
Men a: y>v>x>w>u b: x>y>w>v>u c: v>x>w>y>u d: u>y>w>v>x e: y>u>x>v>w Women u: b>c>a>d>e v: e>d>a>c>b w: b>a>c>d>e x: e>b>a>c>d y: d>e>b>a>c
10
Men proposing: Men a: b: c: d: e: Women u: v: w: x: y: y v
b > c > a > d x e > d > a > c v x w b > a > c u e > b y d > e > b > a
11
Women proposing: Men a: b: c: d: e: Women u: v: w: x: y: y>v b c
x>y>w>v>u e d a v>x>w>y>u b u>y>w>v e y>u>x>v d
12
Example 2. Find a Stable Matching for the following:
Men a: x>w>v>u>y b: v>x>y>u>w c: u>v>y>x>w d: v>x>y>w>u e: v>y>w>u>x Women u: a>d>c>e>b v: e>c>b>d>a w: b>a>e>d>c x: e>d>a>b>c y: b>e>c>a>d
13
Example 2: Men proposing:
b: c: d: e: Women u: v: w: x: y: x w a > d > c v x y e > c > b u b > a v x e > d > a v b
14
Example 2: Women proposing:
b: c: d: e: Women u: v: w: x: y: x > w > v > u a d c v > x > y > u >w e u b a v > x e d v b This matching is the same as with the men proposing. It is the only stable matching for this problem.
15
Example 3: Find a Stable Matching for the following:
Men a: t>w>u>y>a>z>x b: w>z>v>t>y>x>u c: y>x>z>w>u>v>t d: v>u>x>y>t>z>w e: x>y>w>v>u>t>z f: y>z>u>t>w>v>x g: x>t>v>w>y>z>u Women t: d>e>b>c>g>a>f u: c>f>g>d>b>a>e v: c>g>a>b>e>d>f w: f>e>d>a>c>b>d x: b>d>c>f>e>g>a y: d>a>b>e>f>c>g z: d>g>c>f>a>e>b
16
Example 3: Men proposing:
b: c: d: e: f: g: Women t: u: v: w: x: y: z: t w d > e > b > c > g > a w z v c>f>g>d y x c > g > a > b > e > d v u f > e > d > a > c > b x y b > d > c > f > e y z d > a > b > e > f > c x t d > g > c > f
17
Example 3: Women proposing:
b: c: d: e: f: g: Women t: u: v: w: x: y: z: t>w>u>y d e b w>z>v>t>y>x c f y>x>z>w>u c g v>u>x>y>t f e x>y>w>v>u>t b d y>z>u>t>w d a x>t>v d g c
18
Lemma: If a woman Y is rejected by a man A in the proposal algorithm with the men proposing, then there is no stable matching in which A and Y are paired. Proof: If a woman
19
Matching from Proposal Algorithm. First rejection.
Another Matching with A matched with Y. Men A: Y B: Z C: . : ..>..>.. Women . : ..>..>..>..>.. . : ..>..>..>..>.. X: ..>.. >..>.. Y: .> >..>A> .. Men A: Y B: Z C: Y>..>W . : ..>..>.. Women . : ..>..>..>..>.. . : ..>..>..>..>.. X: ..>.. >..>.. Y: .> C >..>A> .. >X Y A C Algorithm Has unstable pair. So cannot be a stable matching.
20
Matching from Proposal Algorithm. st rejection.
Men A: Y B: Z C: . : ..>..>.. Women . : ..>..>..>..>.. . : ..>..>..>..>.. X: ..>.. >..>.. Y: .> >..>A> .. Algorithm
21
https://sites.google.com/site/mrrlakhan/
THE END
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.