A Longer Example: Stable Matching UNC Chapel HillZ. Guo.

Slides:



Advertisements
Similar presentations
Modelling and Solving the Stable Marriage problem using Constraint Programming David Manlove and Gregg OMalley University Of Glasgow Department of Computing.
Advertisements

Stable Matching Problems with Constant Length Preference Lists Rob Irving, David Manlove, Gregg OMalley University Of Glasgow Department of Computing Science.
Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405.
Theory Of Automata By Dr. MM Alam
Naveen Garg, CSE, IIT Delhi
Matching Theory.
Lecture 2: Greedy Algorithms II Shang-Hua Teng Optimization Problems A problem that may have many feasible solutions. Each solution has a value In maximization.
Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision  Preferences for a.
Online Scheduling with Known Arrival Times Nicholas G Hall (Ohio State University) Marc E Posner (Ohio State University) Chris N Potts (University of Southampton)
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
1 Stable Marriage Problem. 2 Consider a society with n men (denoted by capital letters) and n women (denoted by lower case letters). A marriage M is a.
National Intern Matching Program. History Internship introduced around the turn of the 20 th century – A concentrated exposure to clinical medicine to.
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.
Algorithm Efficiency and Sorting
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
Strong Stability in the Hospitals/Residents Problem Robert W. Irving, David F. Manlove and Sandy Scott University of Glasgow Department of Computing Science.
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.
L3 #1 The Hospitals / Residents Problem and Some Extensions David Manlove University of Glasgow Department of Computing Science Supported by EPSRC grant.
The Mathematics Of Dating and Marriage: Who wins the battle of the sexes? The Mathematics Of Dating and Marriage: Who wins the battle of the sexes? (adapted.
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
Great Theoretical Ideas in Computer Science.
1 The Stable Marriage Problem Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Marriage and Mathematics Lau Ting Sum Samson Suen Wai.
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.
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.
CSE 421 Algorithms Richard Anderson (for Anna Karlin) Winter 2006 Lecture 2.
The Stable Marriage Problem
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.
1 Chapter 5-1 Greedy Algorithms Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSCI 256 Data Structures and Algorithm Analysis lecture 1 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Fair Shares.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? CS Lecture 2.
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.
Dating Advice from Mathematics
CSC 421: Algorithm Design & Analysis
How to Plan for College: After you Apply
מתמטיקה בדידה Discrete Math Lecture 12 1 TexPoint fonts used in EMF.
Matching Boys Girls A B C D E
Stable Matching.
Chapter 1 Introduction: Some Representative Problems
The Stable Marriage Problem
Redesign of the Matching Market for American Physicians
Richard Anderson (for Anna Karlin) Winter 2006 Lecture 1
Matching Tas to courses in the CS department
S. Raskhodnikova; based on slides by K. Wayne
Richard Anderson Autumn 2006 Lecture 1
CSE 421: Introduction to Algorithms
1.1 A First Problem: Stable Matching
Discrete Math for CS CMPSC 360 LECTURE 9 Last time: Strong induction
Richard Anderson Autumn 2015 Lecture 1
Chapter 1 Introduction: Some Representative Problems
Matching and Resource Allocation
Richard Anderson Autumn 2006 Lecture 1
Richard Anderson Winter 2019 Lecture 1
CSC 421: Algorithm Design & Analysis
Richard Anderson Winter 2019 Lecture 2
CSC 421: Algorithm Design & Analysis
Richard Anderson Autumn 2019 Lecture 2
Presentation transcript:

A Longer Example: Stable Matching UNC Chapel HillZ. Guo

Matching Residents to Hospitals Goal. Given a set of preferences among n hospitals and n medical school students, design a self-reinforcing admissions process. Suppose four doctors q,r,s,t, and four hospitals A,B,C,D rank each other as follows: UNC Chapel HillZ. Guo qrst AABD BDAB CCCC DBDA ABCD trts strr rqsq qsqt

Matching Residents to Hospitals Goal. Given a set of preferences among n hospitals and n medical school students, design a self- reinforcing admissions process. Unstable pair: doctor x and hospital A are unstable if: – x prefers A to its assigned hospital, and – A prefers x to its admitted student. Stable assignment. Assignment with no unstable pairs. – Natural and desirable condition. – Individual self-interest will prevent any applicant/hospital deal from being made. UNC Chapel HillZ. Guo

Example Suppose four doctors q,r,s,t, and four hospitals A,B,C,D rank each other as follows: (A, s), (B, t), (C, q), (D, r) (stable) (A, t), (B, q), (C, s), (D, r) (un-stable pair: (B, t)) UNC Chapel HillZ. Guo qrst AABD BDAB CCCC DBDA ABCD trts strr rqsq qsqt

A Simple Approach Function Simple-Proposal-But-Invalid – Start with some assignment between doctors and hospitals – While unstable pair exists “swap” to satisfy the pair – end while UNC Chapel HillZ. Guo

Example Suppose four doctors q,r,s,t, and four hospitals A,B,C,D rank each other as follows: (A, t), (B, q), (C, s), (D, r) (un-stable pair: (B, t)) -> (A, q), (B, t), (C, s), (D, r) UNC Chapel HillZ. Guo qrst AABD BDAB CCCC DBDA ABCD trts strr rqsq qsqt

A Simple Approach Function Simple-Proposal-But-Invalid – Start with some assignment between doctors and hospitals – While unstable pair exists “swap” to satisfy the pair – end while UNC Chapel HillZ. Guo This will NOT work since a loop can occur. Swaps might continually result in new “dissatisfied” pairs.

The Boston Pool Algorithm So named because it was previously used by a regional clearinghouse in the Boston area. The algorithm is often misattributed to David Gale and Lloyd Shapley, who formally analyzed the algorithm and first proved that it computes a stable matching in Shapley was awarded the 2012 Nobel Prize in Economics for his research on stable matching and… UNC Chapel HillZ. Guo

The Boston Pool algorithm proceeds in rounds until every position has been filled. Each round has two stages: 1. An arbitrary unassigned hospital A offers its position to the best doctor x (according to the hospital’s preference list) who has not already rejected it. 2. Each doctor ultimately accepts the best offer that she receives, according to her preference list. Thus, if x is currently unassigned, she (tentatively) accepts the offer from A. If x already has an assignment but prefers A, she rejects her existing assignment and (tentatively) accepts the new offer from A. Otherwise, x rejects the new offer. UNC Chapel HillZ. Guo The Boston Pool Algorithm

Example Suppose four doctors q,r,s,t, and four hospitals A,B,C,D rank each other as follows: UNC Chapel HillZ. Guo qrst AABD BDAB CCCC DBDA ABCD trts strr rqsq qsqt

Example Suppose four doctors q,r,s,t, and four hospitals A,B,C,D rank each other as follows: (A, s), (B, t), (C, q), (D, r) UNC Chapel HillZ. Guo qrst AABD BDAB CCCC DBDA ABCD trts strr rqsq qsqt

Example Suppose four doctors q,r,s,t, and four hospitals A,B,C,D rank each other as follows: (A, s), (B, t), (C, q), (D, r) The matching (A, r), (B, s), (C, q), (D, t) is also stable UNC Chapel HillZ. Guo qrst AABD BDAB CCCC DBDA ABCD trts strr rqsq qsqt

Correctness - Termination Observation 1. Hospitals propose to doctors in decreasing order of preference. Observation 2. Once a doctor accepts an offer he/she never becomes unmatched, he/she only "trades up“. Claim. Algorithm terminates after at most n 2 rounds. – Pf. Each hospital makes an offer to each doctor at most once (only make offer to “new” doctor), so the algorithm requires at most n 2 rounds. – The average (expected) case is O(n lg n). UNC Chapel HillZ. Guo

Correctness Claim. The algorithm always computes a matching (to all hospitals and doctors) – Pf. It’s obvious that throughout the process, no doctor can accept more than one position, and no hospital can hire more than one doctor. – Pf. (by contradiction) Suppose that Hospital A is not matched upon termination of algorithm. Then some doctor x is not matched upon termination. By Observation 2, x never received an offer. But, A made offers to everyone, since A ends up unmatched. UNC Chapel HillZ. Guo

Correctness Claim. No unstable pair. – Pf. Suppose doctor x is assigned to hospital A in the final matching, but prefers B. Because every doctor accepts the best offer she receives, x received no offer she liked more than A. In particular, B never made an offer to x. On the other hand, B made offers to every doctor they like more than y. Thus, B prefers y to x, and so there is no instability. UNC Chapel HillZ. Guo

More properties Def. x is a feasible doctor for A if there exists a stable matching that assigns doctor x to hospital A. Claim. Each hospital A is rejected only by doctors that are infeasible for A. (Hospital-Optimal) Pf. (by induction) Consider an arbitrary round of the algorithm, in which doctor x rejects A for B (B is offering x, x prefers B to A). Every doctor that appears higher than x in B’s preference list has already rejected B and therefore is infeasible for B (why?). Now consider an arbitrary matching that assigns x to A: B prefers x to its partner => unstable. B prefers its partner to x => its partner is infeasible (why?), and again the matching is unstable. UNC Chapel HillZ. Guo

More properties Def. x is a feasible doctor for A if there exists a stable matching that assigns doctor x to hospital A. Claim. Each hospital A is rejected only by doctors that are infeasible for A. (Hospital-Optimal) Claim. Each doctor x prefers every other feasible match to its final assignment A. (Doctor-Pessimal) Pf. Consider an arbitrary stable matching where A is not matched with x but with another doctor y.The previous Claim implies that A prefers x to y (why?). Because the matching is stable, x must therefore prefer her assigned hospital to A. UNC Chapel HillZ. Guo

More properties No matter which unassigned hospital makes an offer in each round, the algorithm always computes the same matching (why?) A doctor can potentially improve her assignment by lying about her preferences NRMP reversed its matching algorithm in 1998 – So that potential residents offer to work for hospitals in preference order, and each hospital accepts its best offer. – The precise effect of this change on the patients is an open problem. UNC Chapel HillZ. Guo

About its history Until 1950’s – Competition among hospitals for the best doctors led to earlier and earlier offers of internships, along with tighter deadlines for acceptance. – In the 1940s, medical schools agreed not to release information until a common date during their students’ fourth year. In response, hospitals began demanding faster decisions. – Interns were forced to gamble if their third-choice hospital called first. UNC Chapel HillZ. Guo

In Academia For graduate school admission, we have the “April 15 Resolution”. However, the academic job market involves similar gambles, at least in computer science. – Some departments start making offers in February with two-week decision deadlines; others don’t even start interviewing until late March; – MIT notoriously waits until May, when all its interviews are over, before making any faculty offer. UNC Chapel HillZ. Guo

About its history In the early 1950’s – A central clearinghouse for internship assignments, now called the National Resident Matching Program (NRMP), was established – Each year, doctors submit a ranked list of all hospitals where they would accept an internship, and each hospital submits a ranked list of doctors they would accept as interns. – The NRMP then computes a stable assignment of interns to hospitals. UNC Chapel HillZ. Guo

It’s not the end of the story In reality, most hospitals offer multiple internships, each doctor ranks only a subset of the hospitals and vice versa, and There are typically more internships than interested doctors. And then it starts getting complicated, moreover, e.g., – There are couples that willing to stay in the same city/hospital whenever possible… UNC Chapel HillZ. Guo

This course This class is ultimately about learning two skills that are crucial for all computer scientists: – Intuition: How to think about abstract computation. UNC Chapel HillZ. Guo

This course This class is ultimately about learning two skills that are crucial for all computer scientists: – Intuition: How to think about abstract computation. – Language: How to talk about abstract computation. UNC Chapel HillZ. Guo

This course This class is ultimately about learning two skills that are crucial for all computer scientists: – Intuition: How to think about abstract computation. – Language: How to talk about abstract computation. You can only develop good problem solving skills by solving problems. You can only develop good communication skills by communicating. UNC Chapel HillZ. Guo

Example - Process Suppose four doctors q,r,s,t, and four hospitals A,B,C,D rank each other as follows: (A,t); (A,t)(B,r); (C,t)(B,r); (C,t)(B,r)(D,s); (A,s)(C,t)(B,r); (A,s)(C,t)(D,r); (A,s)(B,t)(D,r); +(C,r?);+(C,s?); (A,s)(B,t)(D,r)(C,q); UNC Chapel HillZ. Guo qrst AABD BDAB CCCC DBDA ABCD trts strr rqsq qsqt