Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 CSE 331 Sep 6, 2011. TA change Swapnoneel will leave us for 531 Jiun-Jie Wang will join us.

Similar presentations


Presentation on theme: "Lecture 4 CSE 331 Sep 6, 2011. TA change Swapnoneel will leave us for 531 Jiun-Jie Wang will join us."— Presentation transcript:

1 Lecture 4 CSE 331 Sep 6, 2011

2 TA change Swapnoneel will leave us for 531 Jiun-Jie Wang will join us

3 Office Hours Jesse: R 1-1:50pm Jiun-Jie: T 1-1:50pm; W 2-2:50pm; Atri: M, F 2-2:50pm Bell 232

4 Not all signed forms turned in I’ll need confirmation in writing. No graded material will be handed back till I get this signed form from you!

5 Email subscription is now enabled

6 On matchings Mal Wash Simon Inara Zoe Kaylee

7 A valid matching Mal Wash Simon Inara Zoe Kaylee

8 Not a matching Mal Wash Simon Inara Zoe Kaylee

9 Perfect Matching Mal Wash Simon Inara Zoe Kaylee

10 Preferences Mal Wash Simon Inara Zoe Kaylee

11 Instability Mal Wash Simon Inara Zoe Kaylee

12 A stable marriage Even though BBT and JA are not very happy

13 Stable Marriage problem Set of men M and women W Matching (no polygamy in M X W) Perfect Matching (everyone gets married) Instablity m m w w m’w’ Preferences (ranking of potential spouses) Stable matching = perfect matching+ no instablity

14 A puzzle (if you’re bored) For any n, what is the maximum number of stable matchings (for the same problem instance)? Prove as tight upper and lower bounds as you can.

15 If you’re still bored Come talk to me if you’re interested in a research problem If there is enough interest, I’ll work with up to two of you Use the last lecture for your research presentations (Make some solid progress on the puzzle without google first though)

16 If you’re free this weekend http://www.cse.buffalo.edu/events/theory-IV/

17 Questions/Comments?

18 Two Questions Does a stable marriage always exist? If one exists, how quickly can we compute one?

19 Today’s lecture Naïve algorithm Gale-Shapley algorithm for Stable Marriage problem

20 Discuss: Naïve algorithm!

21 The naïve algorithm Go through all possible perfect matchings S If S is a stable matching then Stop Else move to the next perfect matching n! matchings

22 Gale-Shapley Algorithm David Gale Lloyd Shapley O(n 3 ) algorithm

23 Moral of the story… >

24 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

25 Preferences Mal Wash Simon Inara Zoe Kaylee

26 GS algorithm: Firefly Edition 1 1 2 2 3 3 4 4 5 5 6 6 Mal Wash Simon Inara Zoe Kaylee


Download ppt "Lecture 4 CSE 331 Sep 6, 2011. TA change Swapnoneel will leave us for 531 Jiun-Jie Wang will join us."

Similar presentations


Ads by Google