1 The Stable Marriage Problem Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.

Slides:



Advertisements
Similar presentations
Stable Matching Problems with Constant Length Preference Lists Rob Irving, David Manlove, Gregg OMalley University Of Glasgow Department of Computing Science.
Advertisements

Blah blah blah. Zoes shark Thanks to the conference artist Phoebe.
Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405.
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013 Lecture 2.
Naveen Garg, CSE, IIT Delhi
Matching Theory.
Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision  Preferences for a.
Joint work with Rob Irving
Stabile Marriage Thanks to Mohammad Mahdian Lab for Computer Science, MIT.
Lecture 6 CSE 331 Sep 14. A run of the GS algorithm Mal Wash Simon Inara Zoe Kaylee.
CSE 421 Algorithms Richard Anderson Lecture 2. Announcements Office Hours –Richard Anderson, CSE 582 Monday, 10:00 – 11:00 Friday, 11:00 – 12:00 –Yiannis.
Lecture 4 CSE 331 Sep 9, Blog posts for lectures Starts from today See Sep 8 post on the blog.
Lecture 5 CSE 331 Sep 11, HW 1 out today Will be handed out at the END of the lecture Read the homework policy document carefully START EARLY! ©ehow.com.
A Longer Example: Stable Matching UNC Chapel HillZ. Guo.
Lecture 8 CSE 331 Sep 17, HW 1 due today Place Q1 and Q2 in separate piles I will not accept HWs after 1:15pm.
Lecture 6 CSE 331 Sep 10, Homeworks HW 1 posted online: see blog/piazza Pickup graded HW 0 in TA OHs.
The Stable Marriage Problem
1 Chapter 1 Introduction: Some Representative Problems Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 Stable Matching Problem Goal. Given n men and n women, find a "suitable" matching. n Participants rate members of opposite sex. n Each man lists women.
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013.
L3 #1 The Hospitals / Residents Problem and Some Extensions David Manlove University of Glasgow Department of Computing Science Supported by EPSRC grant.
Lecture 4 CSE 331 Sep 6, TA change Swapnoneel will leave us for 531 Jiun-Jie Wang will join us.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? Adapted from a presentation by Stephen Rudich.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? Presentation by Shuchi Chawla with some modifications.
Introduction to Matching Theory E. Maskin Jerusalem Summer School in Economic Theory June 2014.
Stable Matchings a.k.a. the Stable Marriage Problem
Lecture 5 CSE 331 Sep 11, Submit the form I’ll need confirmation in writing. No graded material will be handed back till I get this signed form.
Stable Marriage Problem Introductory talk Yosuke KIKUCHI Dept Comp. and Info. Eng. Tsuyama College of Tech OKAYAMA, JAPAN.
Great Theoretical Ideas in Computer Science.
Lecture 23: Stable Marriage ( Based on Lectures of Steven Rudich of CMU and Amit Sahai of Princeton) Shang-Hua Teng.
Stable Matching Lecture 7: Oct 3. Matching A B C DE Boys Girls Today’s goal: to “match” the boys and the girls in a “good” way.
1 Chapter 1 Introduction: Some Representative Problems Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 1.
Stable Marriages (Lecture modified from Carnegie Mellon University course Great Theoretical Ideas in Computer Science)
Design & Co-design of Embedded Systems Final Project: “The Match Maker” Second Phase Oral Presentation Safa S. Mahmoodian.
Bipartite Matching. Unweighted Bipartite Matching.
CSE 421 Algorithms Richard Anderson (for Anna Karlin) Winter 2006 Lecture 2.
The Stable Marriage Problem
Great Theoretical Ideas in Computer Science for Some.
Assignments and matchings Chapter 12 Presented by Yorai Geffen.
Matching Lecture 19: Nov 23.
Sep 29, 2014 Lirong Xia Matching. Report your preferences over papers soon! –deadline this Thursday before the class Drop deadline Oct 17 Catalan independence.
Network Flows Chun-Ta, Yu Graduate Institute Information Management Dept. National Taiwan University.
Fair Shares.
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
CSCI 256 Data Structures and Algorithm Analysis Lecture 2 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Market Design and Analysis Lecture 2 Lecturer: Ning Chen ( 陈宁 )
Algorithms used by CDNs Stable Marriage Algorithm Consistent Hashing.
Matching Boys Girls A B C D E
Cybernetica AS & Tartu University
Stable Matching.
Chapter 1 Introduction: Some Representative Problems
Stable Marriage Problem
Chapter 10 Iterative Improvement
The Stable Marriage Problem
Maximum Flow - Best algorithms
CSE 421: Introduction to Algorithms
Lecture 6 CSE 331 Sep 11, 2017.
Richard Anderson (for Anna Karlin) Winter 2006 Lecture 1
S. Raskhodnikova; based on slides by K. Wayne
Richard Anderson Autumn 2006 Lecture 1
CSE 421: Introduction to Algorithms
Discrete Math for CS CMPSC 360 LECTURE 9 Last time: Strong induction
Lecture 6 CSE 331 Sep 12, 2011.
Lecture 6 CSE 331 Sep 12, 2016.
Lecture 7 CSE 331 Sep 10, 2014.
Richard Anderson Winter 2019 Lecture 1
Piyush Kumar (Lecture 3: Stable Marriage)
Lecture 7 CSE 331 Sep 11, 2013.
Richard Anderson Autumn 2019 Lecture 2
Presentation transcript:

1 The Stable Marriage Problem Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

2 A Prize Winning Algorithm  Lloyd Shapley, Nobel Prize Winner 2012 in economics.  Obtained the prize for a number of contributions, one being the Gale-Shapley algorithm, discussed today. Photo Bengt Nyman

3 The stable marriage problem  Story: there are n men and n women, which are unmarried. Each has a preference list on the persons of the opposite sex.  Does there exist and can we find a stable matching (stable marriage): a matching of men and women, such that there is no pair of a man and a woman who both prefer each other above their partner in the matching?

4 Application  Origin: assignment of medical students to hospitals (for internships)  Students list hospitals in order of preference  Hospitals list students in order of preference

5 Example  Arie: Ann Cindy Betty  Bert: Betty Ann Cindy  Carl: Betty Ann Cindy  Ann: Bert Carl Arie  Betty: Carl Bert Arie  Cindy: Bert Carl Arie  Stable matching: (Arie, Cindy), (Bert, Ann), (Carl, Betty).  Matching (Arie, Cindy), (Bert, Betty), (Carl,Ann) is not stable.  Carland Betty prefer each other above given partner: they form a Blocking pair.

6 Problem: Greedy Algorithm Does Not Need to Terminate  Greedy or ‘Soap-Series’ Algorithm: While there is a blocking pair Do Switch the blocking pair  Greedy “local search” approach does not need to terminate:  Can go on for ever!  So, we need something else…

7 Result  Gale/Stanley algorithm: always finds a stable matching.  Input: list of men, women, and their preference list.  Output: stable matching.

8 The algorithm  Fix some ordering on the men.  Repeat until everyone is matched.  Let X be the first unmatched man in the ordering.  Find woman Y such that Y is the most desirable woman in X’s list such that Y is unmatched, or Y is currently matched to a Z and X is more preferable to Y than Z.  Match X and Y; possibly this turns Z to be unmatched. Questions: Does this terminate? How fast? Does this give a stable matching? Questions: Does this terminate? How fast? Does this give a stable matching?

9 A demonstration on the blackboard. Example:  Arie: Ann Cindy Betty  Bert: Betty Ann Cindy  Carl: Betty Ann Cindy  Ann: Bert Carl Arie  Betty: Carl Bert Arie  Cindy: Bert Carl Arie  Repeat until everyone is matched.  Let X be the first unmatched man.  Find woman Y such that Y is the most desirable woman in X’s list such that Y is unmatched, or Y is currently matched to a Z and X is more preferable to Y than Z.  Match X and Y; possibly this turns Z to be unmatched. The Stable Marriage Problem

10 Termination and number of steps  Once a woman is matched, she stays matched (her partner can change).  When the partner of a woman changes, this is to a more preferable partner for her: at most n – 1 times.  Every step, either an unmatched woman becomes matched, or a matched woman changes partner: at most n 2 steps.

11 Stability of final matching  Suppose final matching is not stable.  Take:  Arie is matched to Ann,  Bert is matched to Betty,  Arie prefers Betty to Ann,  Betty prefers Arie to Bert.  So: Betty is before Ann in the preference list of Arie, but Arie is not matched to Betty. Two cases:  When Arie considers Betty, she has a partner (say) Carl preferable to Arie: Carl is also preferable to Bert, but in the algorithm woman can get only more preferable partners, contradiction.  When Arie considers Betty, she is free, but Arie is later replaced by someone preferable to Arie. Again, Betty can never end up with Bert.

12 Conclusion  A stable matching exists and can be found in polynomial time.  But: the algorithm is better for the men (hospitals in the application).

13 Man-Optimal Stable Matchings Theorem: 1. All possible executions of the Gale-Shapley algorithm give the same stable matching. 2. In this matching, the men have the best partner they can have in any stable matching. 3. In this matching, the women have the worst partner they can have in any stable matching.  Proof of (1) and (2) on the next slide.

14 Proof  Suppose the algorithm gives matching M.  Suppose there is a stable matching M’ with Arie matched to Betty in M’, and to Ann in M, with Arie preferring Betty over Ann.  Look at run of algorithm that produces M. Betty has rejected Arie at some point.  Of all such choices for Arie, Ann and Betty, take a triple such that the rejection of Arie by Betty happens first.  Suppose Betty prefers Bert to Arie, as reason for the rejection.  Bert must prefer Betty to his partner in M’: see next slide  Thus Bert, Betty is a blocking pair in M’: M’ not stable; contradiction.  So, all men are matched to the woman that appears in a stable matching that they prefer most.  Unique solution

15 Bert Prefers Betty  Bert is matched in M’ with Carol  If Bert prefers Carol to Betty:  In execution of algorithm, we have At some point Carol must reject Bert as later Bert is matched with Betty (while Betty rejects Arie at that step). This is earlier than the rejection of Betty of Arie  Now Bert, Betty and Carol form an earlier choice for the triple.

16 Stable roommates  Variant of problem with boys that must share two-person rooms (US campus)  Each has preference list  Stable marriage problem is special case

17 Not always a stable matching for the stable roommates  Consider the following instance:  Person Arie: Carl Bert Dirk  Person Bert: Arie Carl Dirk  Person Carl: Bert Arie Dirk  Person Dirk: no difference  Each matching is unstable e.g., (Arie,Bert)(Carl,Dirk) has {Carl,Arie} as blocking pair The Stable Marriage Problem 17

18 Testing stable roommates  Complicated algorithm  Uses O(n 2 ) time The Stable Marriage Problem 18

19 Comments  Much further work has been done, e.g.:  Random / Fair stable matchings  Many variants of stable matching are also solvable (indifferences, groups, forbidden pairs, …)  What happens if some participants lie about their preferences?  Stable roommates with indifferences: NP-complete The Stable Marriage Problem 19