Download presentation
Presentation is loading. Please wait.
1
Lecture 6 CSE 331 Sep 13, 2010
2
New tougher deadline If you do not form a group by Sep 14
You will get a ZERO on group leader scribe
3
Return signed forms I’ll need confirmation in writing. No graded material will be handed back till I get this signed form from you!
4
HW 0 solutions posted Use them as model solutions for your future HWs
5
The Brangelina show…
6
Not a stable marriage
7
Even though BBT and JA are not very happy
A stable marriage Even though BBT and JA are not very happy
8
The naïve algorithm Go through all possible perfect matchings S
n! matchings If S is a stable matching then Stop Else move to the next perfect matching
9
Gale-Shapley Algorithm
David Gale Lloyd Shapley O(n3) algorithm
10
Moral of the story… >
11
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
12
Preferences
13
GS algorithm: Firefly Edition
1 2 3 4 5 6 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.