Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405.

Slides:



Advertisements
Similar presentations
Blah blah blah. Zoes shark Thanks to the conference artist Phoebe.
Advertisements

The Mathematics Of 1950s Dating: Who wins the battle of the sexes? Great Theoretical Ideas In Computer Science Steven Rudich CS Spring 2003 Lecture.
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013 Lecture 2.
Marriage, Honesty, & Stability N ICOLE I MMORLICA, N ORTHWESTERN U NIVERSITY.
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.
Social Networks 101 P ROF. J ASON H ARTLINE AND P ROF. N ICOLE I MMORLICA.
1 Discrete Structures & Algorithms Graphs and Trees: IV EECE 320.
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 8 CSE 331 Sep 17, HW 1 due today Place Q1 and Q2 in separate piles I will not accept HWs after 1:15pm.
Piyush Kumar (Lecture 1: Introduction) Welcome to COT5405.
The Stable Marriage Problem
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.
Complexity & Analysis of Data Structures & Algorithms Piyush Kumar (Lecture 1: Introduction) Welcome to COP4531 Based on slides from J. Edmonds, S. Rudich,
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.
Lecture 3 CSE 331. Stable Matching Problem Problem Statement Algorithm Problem Definition Implementation Analysis.
Advanced Algorithms Piyush Kumar (Lecture 1: Introduction) Welcome to COT5405.
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.
All Pair Shortest Path IOI/ACM ICPC Training June 2004.
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.
Stable Marriages (Lecture modified from Carnegie Mellon University course Great Theoretical Ideas in Computer Science)
Complexity & Analysis of Data Structures & Algorithms Piyush Kumar (Lecture 1: Introduction) Welcome to COP4531 Based on slides from J. Edmonds, S. Rudich,
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.
Matching Lecture 19: Nov 23.
Fair Shares.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? CS Lecture 2.
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 ( 陈宁 )
18.1 CompSci 102 Today’s topics 1950s TV Dating1950s TV Dating.
Algorithms used by CDNs Stable Marriage Algorithm Consistent Hashing.
18.1 CompSci 102 Today’s topics Impaired wanderingImpaired wandering Instant InsanityInstant Insanity 1950s TV Dating1950s TV Dating Final Exam reviewFinal.
Dating Advice from Mathematics
Matching Boys Girls A B C D E
Cybernetica AS & Tartu University
Stable Matching.
Chapter 1 Introduction: Some Representative Problems
Stable Marriage Problem
The Stable Marriage Problem
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes?
Maximum Flow - Best algorithms
CSE 421: Introduction to Algorithms
The Mathematics Of 1950’s Dating: Who wins The Battle of The Sexes?
Lecture 6 CSE 331 Sep 11, 2017.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes?
Complexity & Analysis of Data Structures & Algorithms
S. Raskhodnikova; based on slides by K. Wayne
Computational Processes II
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
Blah blah blah.
Chapter 1 Introduction: Some Representative Problems
Computational Processes II
Lecture 6 CSE 331 Sep 12, 2011.
Lecture 6 CSE 331 Sep 12, 2016.
Lecture 7 CSE 331 Sep 10, 2014.
Piyush Kumar (Lecture 3: Stable Marriage)
Lecture 7 CSE 331 Sep 11, 2013.
Presentation transcript:

Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405

WARNING: This lecture contains mathematical content that may be shocking to some students.

Based on S. Rudich, S. H. Teng, K. Wayne and my own lecture slides.

The problem There are n men and n women Each man has a preference list, so does the woman. These lists have no ties. Devise a system by which each of the n men and n women can end up getting married.

Other Similar problems Given a set of colleges and students pair them. (Internship – Company assignments) Given airlines and pilots, pair them. Given two images, pair the points belonging to the same point in 3D to extract depth from the two images. Dorm room assignments. Hospital residency assignments**.

Stereo Matching Fact: If one knows the distance between the cameras And the matching, its almost trivial to recover depth..

Stereo Matching Fact: If one knows the distance between the cameras And the matching, its almost trivial to recover depth..

A Good matching/pairing Maximize the number of people who get their first match? Maximize the average satisfaction? Maximize the minimum satisfaction? Can anything go wrong?

Example Preference Lists Z Y X Man A B A 1 st B A B 2 nd C C C 3 rd C B A Woman X X Y 1 st Y Y X 2 nd Z Z Z 3 rd What goes wrong? Unstable pairs: (X,C) and (B,Y) They prefer each other to current pairs.

Stable Matching Z Y X Man A B A 1 st B A B 2 nd C C C 3 rd C B A Woman X X Y 1 st Y Y X 2 nd Z Z Z 3 rd No Pairs creating instability.

Another Stable Matching Z Y X Man A B A 1 st B A B 2 nd C C C 3 rd C B A Woman X X Y 1 st Y Y X 2 nd Z Z Z 3 rd Number of Stable matchings? Open Problem: Maximum number of stable matchings? Known Average number of stable matchings? O(nlogn) Exponential : (2 n )

Stability is Primary. Any reasonable list of criteria must contain the stability criterion. A pairing is doomed if it contains a rogue couple.

Main Idea Idea: Allow the pairs to keep breaking up and reforming until they become stable Can you argue that the couples will not continue breaking up and reforming forever?

Men Propose (Women dispose) Gale-Shapley Algorithm (men propose) Initialize each person to be free. while (some man m is free and hasn't proposed to every woman) w = first woman on m's list to whom m has not yet proposed if (w is free) assign m and w to be engaged else if (w prefers m to her fiancé m') assign m and w to be engaged, and m' to be free else w rejects m

Analysis Does the algorithm terminate? Running time? Space requirement?

Improvement Lemma Improvement Lemma: If a woman has a committed suitor, then she will always have someone at least as good, from that point in time onwards (and on the termination of the algorithm).

Corollary : Improvement Lemma Each woman will marry her absolute favorite of the men who proposed to her.

Demotion Lemma The sequence of women to whom m proposes gets worse and worse (in terms of his preference list)

Lemma 1 No Man can be rejected by all the Women. Proof: ?? Suppose Bob is rejected by all the women. At that point: Each women must have a suitor other than Bob (By Improvement Lemma, once a woman has a suitor she will always have at least one) The n women have n suitors, Bob not among them. Thus, there must be at least n+1 men ! Contradiction

Corollary: Lemma 1 If m is free at some point in the execution of the algorithm, then there is a woman to whom he has not yet proposed.

Corollary: Lemma 1 The algorithm returns a matching. (Since no man is free?) The algorithm returns a perfect matching. (Since there is no free man?) A perfect matching is a matching which covers all vertices of the graph.

Lemma 2 Consider the execution of the G-S algorithm that returns a set of pairs S. The set S is a stable matching. Proof?

Lemma 2 Proof by contradiction Unstable pair : Bob and Mia This means Bob likes Mia more than his partner, Alice. Thus, Bob proposed to Mia before he proposed to Alice. Mia must have rejected Bob for someone she preferred. Luke By the Improvement lemma, she must like her parnter Luke more than Bob. Bob Alice Mia Luke

Question! Who is better off, the men or the women?

Best (Valid?) Parter for Bob? Best woman for Bob? The woman at the top of Bobs list? valid partner A woman w is a valid partner of a man m if there is a Stable matching that contains (m,w). best valid partner A mans optimal match or best valid partner is the highest ranked woman for whom there is some stable pairing in which they are matched She is the best woman he can conceivably be matched in a stable world. Presumably, she might be better than the woman he gets matched to in the stable pairing output by GS.

Example M { w, w } W { m, m } Two stable matchings: (m,w) (m,w) Or (m,w) (m,w)

Worst Valid Partner Match. A Mans worst valid partner is the lowest ranked woman in his preference list that is a valid partner.

Dating Dilemma A pairing is man-optimal if every man gets his best valid partner. This is the best of all possible stable worlds for every man simultaneously. A pairing is man-pessimal if every man gets his worst valid partner. This is the worst of all possible stable worlds for every man simultaneously.

Dating Dilemmas A pairing is woman-optimal if every woman gets her best valid partner. This is the best of all possible stable worlds for every woman simultaneously. A pairing is woman-pessimal if every woman gets her worst valid partner. This is the worst of all possible stable worlds for every woman simultaneously.

Question! Who is better off, the men or the women?

Mathematical FACT. The traditional marriage algorithm (a.k.a. G-S alg.) always produces a man-optimal and woman-pessimal pairing.

Theorem 1: GS Produces man-optimal pairing. Theorem 2: GS produced pairing is woman-pessimal.

Theorem 1 Proof by contradiction Suppose not: That some man gets rejected by his best valid partner during the execution of GS. (w.l.o.g. Let Bob be the first such man) Bob gets rejected by his optimal match Mia who says maybe to Luke (whom she prefers) Since Bob was the only man to be rejected by his optimal match so far, Luke must like Mia at least as much as his optimal match.

We are assuming that Mia is Bobs optimal match, Mia likes Luke more than Bob. Luke likes Mia at least as much as his optimal match. We now show that any pairing S in which Bob marries Mia cannot be stable (for a contradiction). Suppose S is stable: Luke likes Mia more than his partner in S Luke likes Mia at least as much as his best match, but he is not matched to Mia in S Mia likes Luke more than her partner Bob in S Luke Mia Contradiction!

We are assuming that Mia is Bobs optimal match, Mia likes Luke more than Bob. Luke likes Mia at least as much as his optimal match. Weve shown that any pairing in which Bob marries Mia cannot be stable. Thus, Mia cannot be Bobs optimal match (since he can never marry her in a stable world). So Bob never gets rejected by his optimal match in GS, and thus GS is man-optimal.

GS is woman-pessimal We know it is man-optimal. Suppose there is a GS stable pairing S* with (Luke, Alice) such that Luke is not the worst valid partner of Alice. Let Bob be Alices worst valid partner. Then there is a stable matching S with (Bob,Alice) Contradiction: S is not stable. By assumption, Alice likes Luke better than her partner Bob in S Luke likes Alice better than his partner in S We already know that Alice is his optimal match ! Luke Alice Contradiction!

Marry Well!

Advice to females Learn to make the first move.

Extensions Sets of Unequal size Unacceptable partners Indifference Deceit, Coalitions and Strategy In some cases, honesty is the best policy. In general, lying cannot be totally discouraged in SMP. Other similar problems Hospital/Residents Problem Machiavellian hospitals. Roomates problem. Many Many Matchings

Review Problem Initialize each person to be free. while (some man m is free) w = first woman on m's list if (some man p is engaged to w) assign p to be free engage (m,w) for each successor m of m on ws list delete the pair (m,w) end Complexity and Space requirements?

Review Problem How can one generalize what you have learnt about SMP to the hospital/resident problem? Complexity and Space requirements?