1 / 27

Lecture 5

Lecture 5. CSE 331 Sep 6, 2013. Submit the form. I ’ ll need confirmation in writing. No graded material will be handed back till I get this signed form from you!. Sign-up for mini projects. Email me your group (=6) composition + your chosen algorithm. Homeworks.

barth
Download Presentation

Lecture 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 5 CSE 331 Sep 6, 2013

  2. Submit the form I’ll need confirmation in writing. No graded material will be handed back till I get this signed form from you!

  3. Sign-up for mini projects Email me your group (=6) composition + your chosen algorithm

  4. Homeworks HW 1 posted online: see piazza Pickup graded HW 0 starting Monday

  5. Remember to read the HW policies

  6. Separate Proof idea/proof details Proof details with no proof idea will get you a zero for the entire problem

  7. Talks by Ed Lazowska

  8. On matchings Mal Inara Wash Zoe Simon Kaylee

  9. A valid matching Mal Inara Wash Zoe Simon Kaylee

  10. Not a matching Mal Inara Wash Zoe Simon Kaylee

  11. Perfect Matching Mal Inara Wash Zoe Simon Kaylee

  12. Preferences Mal Inara Wash Zoe Simon Kaylee

  13. Instability Mal Inara Wash Zoe Simon Kaylee

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

  15. Two stable marriages

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

  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 n! matchings Else move to the next perfect matching

  22. Gale-Shapley Algorithm David Gale Lloyd Shapley O(n3) algorithm

  23. Moral of the story… >

  24. Questions/Comments?

  25. 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

  26. Preferences Mal Inara Wash Zoe Simon Kaylee

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

More Related