Download presentation
Presentation is loading. Please wait.
1
Lecture 6 CSE 331 Sep 14
2
A run of the GS algorithm Mal Wash Simon Inara Zoe Kaylee
3
The Preferences
4
Gale-Shapley Algorithm Intially all men and women are free While there exists a free woman who can propose Let w be such a woman and m be the best man she has not proposed to w proposes to m If m is free (m,w) get engaged Else (m,w’) are engaged If m prefers w’ to w w remains free Else (m,w) get engaged and w’ is free Output the engaged pairs as the final output
5
GS algorithm: Firefly Edition 1 1 2 2 3 3 4 4 5 5 6 6
6
Last Lecture Intially all men and women are free While there exists a free woman who can propose Let w be such a woman and m be the best man she has not proposed to w proposes to m If m is free (m,w) get engaged Else (m,w’) are engaged If m prefers w’ to w w remains free Else (m,w) get engaged and w’ is free Output the engaged pairs as the final output At most n 2 iterations
7
Two Observations Every man is free until he gets engaged 1 1 2 2 3 3 4 4 5 5 6 6 After that he gets engaged to better women No monotone property for a woman Her engagements get worse and worse
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.