1 / 32

Stable Marriage Problem: Gale-Shapley Algorithm Explained

Explore the Gale-Shapley algorithm for the Stable Marriage problem, covering the naïve algorithm and incremental approach to finding perfect matchings. Learn about the algorithm's process, implications, and significance. Questions and comments are encouraged throughout the lecture.

gsimmons
Download Presentation

Stable Marriage Problem: Gale-Shapley Algorithm Explained

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 4 CSE 331 Sep 5, 2018

  2. Please do keep on asking Qs!

  3. Read the syllabus CAREFULLY! No graded material will be handed back till you pass the syllabus quiz!

  4. Separate Proof idea/proof details

  5. TA office hours finalized

  6. 1-on-1 appointments

  7. New TA: Dhruv

  8. Peer Notetaker Request

  9. Makeup recitations TODAY, 9-9:50am in Davis 338A TODAY, 11-11:50am in Davis 338A

  10. Sign-up for mini projects Deadline: Monday, Sep 24, 11:59pm

  11. Questions/Comments?

  12. On matchings Mal Inara Wash Zoe Simon Kaylee

  13. A valid matching Mal Inara Wash Zoe Simon Kaylee

  14. Not a matching Mal Inara Wash Zoe Simon Kaylee

  15. Perfect Matching Mal Inara Wash Zoe Simon Kaylee

  16. Back to couple more definitions

  17. Preferences Mal Inara Wash Zoe Simon Kaylee

  18. Instability Mal Inara Wash Zoe Simon Kaylee

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

  20. Two stable marriages

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

  22. Questions/Comments?

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

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

  25. Discuss: Naïve algorithm!

  26. The naïve algorithm Incremental algorithm to produce all n! prefect matchings? Go through all possible perfect matchings S If S is a stable matching then Stop n! matchings Else move to the next perfect matching

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

  28. Moral of the story… >

  29. Questions/Comments?

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

  31. Preferences Mal Inara Wash Zoe Simon Kaylee

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

More Related