Proof of Correctness: Stability. Claim. No unstable pairs. Pf. (by contradiction) Q. How to start this proof?

Similar documents
Two-Sided Matching Theory

How To Solve The Stable Roommates Problem

The Student-Project Allocation Problem

Matching Markets: Theory and Practice

Stable matching: Theory, evidence, and practical design

Two Algorithms for the Student-Project Allocation Problem

Matching with Waiting Times: The German Entry-Level Labor Market for Lawyers

Online Appendix. A2 : Description of New York City High School Admissions

The Role of Priorities in Assigning Indivisible Objects: A Characterization of Top Trading Cycles

Making Efficient School Assignment Fairer

An Alternative Characterization of Top Trading Cycles

Dimitris Chatzidimitriou. Corelab NTUA. June 28, 2013

What s the Matter with Tie-breaking? Improving Efficiency in School Choice

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

How To Solve Two Sided Bandit Problems

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Performance of networks containing both MaxNet and SumNet links

Unraveling versus Unraveling: A Memo on Competitive Equilibriums and Trade in Insurance Markets

Topic: Greedy Approximations: Set Cover and Min Makespan Date: 1/30/06

Course Bidding at Business Schools

The Design of School Choice Systems in NYC and Boston: Game-Theoretic Issues

each college c i C has a capacity q i - the maximum number of students it will admit

Computer Science 210: Data Structures. Searching

CS 3719 (Theory of Computation and Algorithms) Lecture 4

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Near Optimal Solutions

Introduction to Auction Design

Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

We study strategic issues in the Gale-Shapley stable marriage model. In the first part

Synthetic Projective Treatment of Cevian Nests and Graves Triangles

CMPSCI611: Approximating MAX-CUT Lecture 20

11 Multivariate Polynomials

The Common Application and the DA Algorithm in School Assignment. Christopher Avery Cara Nickolaus Parag Pathak June, 2015

Guide 7 Iceberg beliefs underlying beliefs that can undermine our resilience

Lecture Note 7: Revealed Preference and Consumer Welfare

Carl Weisman Q&A So Why Have You Never Been Married?

Normal Distribution. Definition A continuous random variable has a normal distribution if its probability density. f ( y ) = 1.

Tiers, Preference Similarity, and the Limits on Stable Partners

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

The Relative Worst Order Ratio for On-Line Algorithms

14.1 Rent-or-buy problem

Iterated Dynamic Belief Revision. Sonja Smets, University of Groningen. website:

Algorithm Design and Analysis

Linear functions Increasing Linear Functions. Decreasing Linear Functions

Class 19: Two Way Tables, Conditional Distributions, Chi-Square (Text: Sections 2.5; 9.1)

1. Explain what causes the liquidity preference money (LM) curve to shift and why.

Introduction to the Practice of Statistics Fifth Edition Moore, McCabe

1 Construction of CCA-secure encryption

Forward exchange rates

Basic Proof Techniques

Lessons from the Life of King David. Lesson One: A Heart that is Pleasing to God

Chapter 7. Sealed-bid Auctions

CPS221 Lecture - ACID Transactions

A Few Basics of Probability

Matching with (Branch-of-Choice) Contracts at United States Military Academy

On Two Kinds of Manipulation for School Choice Problems

Veri cation and Validation of Simulation Models

Low upper bound of ideals, coding into rich Π 0 1 classes

Statistics 100A Homework 2 Solutions

Definition and Calculus of Probability

Making Decisions in Chess

Session 7 Bivariate Data and Analysis

Today s topic: So far, we have talked about. Question. Task models

Practical Guide to the Simplex Method of Linear Programming

MGT 162: NEGOTIATION Winter 2015

7 Gaussian Elimination and LU Factorization

Practice with Proofs

Contract Auctions for Sponsored Search

Women in Free/Open Source Software Development Hanna M. Wallach

Solving Quadratic Equations

Rossmoor Website SEO Tracking Sheet Updated: April 1, 2014

Motivation Suppose we have a database of people We want to gure out who is related to whom Initially, we only have a list of people, and information a

1. Write the number of the left-hand item next to the item on the right that corresponds to it.

Exercise 8: SRS - Student Registration System

A Gentle Introduction to Hash Tables. Kevin Martin, Dept. of Veteran Affairs July 15, 2009

Part 2: Community Detection

LECTURE 5: DUALITY AND SENSITIVITY ANALYSIS. 1. Dual linear program 2. Duality theory 3. Sensitivity analysis 4. Dual simplex method

Notes on Complexity Theory Last updated: August, Lecture 1

Binary Search Trees CMPSC 122

Applied Algorithm Design Lecture 5

Online Appendix (not for publication) College Admissions as Non-Price Competition: The Case of South Korea Index

Homework until Test #2

Effective affirmative action in school choice

Christmas Gift Exchange Games

INTERVALS. An INTERVAL is the distance between two notes /pitches. Intervals are named by size and quality:

Elaboration Can you tell me more? What else? What other ideas/thoughts/feelings do you have about it?

STAT 350 Practice Final Exam Solution (Spring 2015)

The Gospel Plan of Salvation

Linear Programming. March 14, 2014

Alok Gupta. Dmitry Zhdanov

Guessing Game: NP-Complete?

9 Days of Revolutionary Prayer for Your Girl

The Inversion Transformation

Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA

Deep Agile Blending Scrum and Extreme Programming. Jeff Sutherland Ron Jeffries

Section IV.1: Recursive Algorithms and Recursion Trees

Transcription:

Proof of Correctness: Stability Claim. No unstable pairs. Pf. (by contradiction) Q. How to start this proof? 1

Proof of Correctness: Stability Claim. No unstable pairs. Pf. (by contradiction) Suppose - is an unstable pair: and prefer each other to their partner in the Gale-Shapley matching S*. Q. How could this have happened? 2

Proof of Correctness: Stability Claim. No unstable pairs. Pf. (by contradiction) Suppose - is an unstable pair: and prefer each other to their partner in the Gale-Shapley matching S*. Q. How could this have happened? Case 1: never proposed to. Case 2: proposed to and rejected/dumped 3

Proof of Correctness: Stability Claim. No unstable pairs. Pf. (by contradiction) Suppose - is an unstable pair: and prefer each other to their partner in the Gale-Shapley matching S*. Case 1: never proposed to. prefers his partner in S* to. - is not an unstable pair. Case 2: proposed to. rejected (right away or later) prefers her partner in S* to. - is not an unstable pair. men propose in decreasing order of preference women only trade up S* nna-youp Bertha-eger... In either case - is not an unstable pair, a contradiction. 4

Propose-nd-Reject lgorithm Propose-and-reject algorithm. [Gale-Shapley 1962] Intuitive method that guarantees to find a stable matching. Initialize each person to be free. while (some man is free and hasn't proposed to every woman) { Choose such a man m w = 1 st 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 } Claim. lgorithm terminates after at most n 2 iterations of while loop. 5

Propose-nd-Reject lgorithm Propose-and-reject algorithm. [Gale-Shapley 1962] Intuitive method that guarantees to find a stable matching. Initialize each person to be free. while (1.some man is free and hasn't proposed to every woman) { 1.Choose such a man m w = 2. 1 st woman on m's list to whom m has not yet proposed if (3.w is free) 4.assign m and w to be engaged else if (5.w prefers m to her fiancé m') 4.assign m and w to be engaged, and 1.m' to be free else 2.w rejects m } Claim. lgorithm terminates after at most n 2 iterations of while loop. 6

Efficient Implementation Efficient implementation. We describe O(n 2 ) time implementation. Representing men and women. ssume men are named 1,, n. ssume women are named 1',, n'. Engagements. Maintain list of free men, e.g., in a queue. (1.) Maintain two arrays wife[m], and husband[w]. set entry to 0 if unmatched (3.) if m matched to w then wife[m]=w and husband[w]=m (4.) Men proposing. For each man, maintain list of women, ordered by preference. (2.) Maintain array count[m] for the number of proposals of man m. (2.) 7

Efficient Implementation Women rejecting/accepting. (5.) Q. How to implement efficiently: does woman w prefer man m to man m'? (1 min) nna Pref 1 st 8 2 nd 3 rd 3 7 4 th 5 th 6 th 7 th 8 th 1 4 5 6 2 nna prefers man 3 to 6? 8

Efficient Implementation Women rejecting/accepting. (5.) Q. How to implement efficiently: does woman w prefer man m to man m'? For each woman, create inverse of preference list of men. Constant time access for each query after O(n) preprocessing. mortized constant time: worst-case O(1) on average nna Pref 1 st 8 2 nd 3 rd 3 7 4 th 5 th 6 th 7 th 8 th 1 4 5 6 2 nna 1 2 3 4 5 6 7 8 Inverse 4 th 8 th 2 nd 5 th 6 th 7 th 3 rd 1 st for i = 1 to n inverse[pref[i]] = i nna prefers man 3 to 6 since inverse[3] < inverse[6] 2 7 9

Understanding the Solution Q. For a given problem instance, there may be several stable matchings. Do all executions of Gale-Shapley yield the same stable matching? If so, which one? 1 st 2 nd 3 rd 1 st 2 nd 3 rd Xander B C nna Y X Youp B C Bertha X Y eger B C Clara X Y 10

Understanding the Solution Q. For a given problem instance, there may be several stable matchings. Do all executions of Gale-Shapley yield the same stable matching? If so, which one? n instance with two stable matchings. -X, B-Y, C-. -Y, B-X, C-. 1 st 2 nd 3 rd 1 st 2 nd 3 rd Xander B C nna Y X Youp B C Bertha X Y eger B C Clara X Y 11

Understanding the Solution Q. For a given problem instance, there may be several stable matchings. Do all executions of Gale-Shapley yield the same stable matching? If so, which one? n instance with two stable matchings. -X, B-Y, C-. -Y, B-X, C-. 1 st 2 nd 3 rd 1 st 2 nd 3 rd Xander B C nna Y X Youp B C Bertha X Y eger B C Clara X Y 12

Understanding the Solution Q. For a given problem instance, there may be several stable matchings. Do all executions of Gale-Shapley yield the same stable matching? If so, which one? Def. Man m is a valid partner of woman w if there exists some stable matching in which they are matched. Q. Does each man receive best valid partner based on the given preferences? 13

Understanding the Solution Q. For a given problem instance, there may be several stable matchings. Do all executions of Gale-Shapley yield the same stable matching? If so, which one? Def. Man m is a valid partner of woman w if there exists some stable matching in which they are matched. Q. Does each man receive best valid partner based on the given preferences? Claim. ll executions of GS yield man-optimal assignment, which is a stable matching! No reason a priori to believe that man-optimal assignment is perfect, let alone stable. Simultaneously best for each and every man. No reason for lying about your preferences (incentive compatible). 14

Man Optimality Claim. GS matching S is man-optimal. Pf. 15

Man Optimality Claim. GS matching S is man-optimal. Pf. by contradiction: suppose S is not man-optimal Q. What does this mean? Contradiction! 16

Man Optimality Claim. GS matching S is man-optimal. Pf. by contradiction: suppose S is not man-optimal In execution: first moment some man Y is rejected by best valid partner in S. (idea: create another stable matching S where Y is not rejected to derive contradiction) Contradiction! 17

Man Optimality Claim. GS matching S is man-optimal. Pf. by contradiction: suppose S is not man-optimal In execution: first moment some man Y is rejected by best valid partner in S. When Y is rejected, forms/stays engagement with a man, say, whom she prefers to Y. S -Youp nna-eger... (idea: create another stable matching S where Y is not rejected to derive contradiction) Contradiction! 1 st 2 nd 3 rd 1 st 2 nd 3 rd Xander nna Y Youp Bertha eger B Clara 18

Man Optimality Claim. GS matching S is man-optimal. Pf. by contradiction: suppose S is not man-optimal In execution: first moment some man Y is rejected by best valid partner in S. When Y is rejected, forms/stays engagement with a man, say, whom she prefers to Y. Stable S with Y- exists because Y- is valid. Let B be 's partner in S. Q. Given what happened in S, does prefer or B? S -Youp nna-eger... should exist: S nna-youp Bertha-eger... Contradiction! S 1 st 2 nd 3 rd 1 st 2 nd 3 rd Xander nna Y Youp Bertha eger B Clara 19

Man Optimality S Claim. GS matching S is man-optimal. Pf. by contradiction: suppose S is not man-optimal In execution: first moment some man Y is rejected by best valid partner in S. When Y is rejected, forms/stays engagement with a man, say, whom she prefers to Y. Stable S with Y- exists because Y- is valid. Let B be 's partner in S. not rejected by any valid partner at the point when Y is rejected by (in S). Thus, prefers to B. But prefers to Y. Thus - is unstable in S. Contradiction! S 1 st 2 nd 3 rd 1 st -Youp nna-eger... S nna-youp Bertha-eger... since Y was first rejected by a valid partner 2 nd 3 rd should exist: Xander nna Y Youp Bertha eger This proof can be found on pages 10-11. B Clara 20

Stable Matching Summary Stable matching problem. Given preference profiles of n men and n women, find a stable matching. no man and woman prefer to be with each other than assigned partner Gale-Shapley algorithm. Finds a stable matching in O(n 2 ) time. Man-optimality. In version of GS where men propose, each man receives best valid partner. w is a valid partner of m if there exist some stable matching where m and w are paired Q. Does man-optimality come at the expense of the women? 21

Woman Pessimality Woman-pessimal assignment. Each woman receives worst valid partner. Claim. GS finds woman-pessimal stable matching S. Pf. (by contradiction) Q. Which assumption to make? Contradiction! 22

Woman Pessimality Woman-pessimal assignment. Each woman receives worst valid partner. Claim. GS finds woman-pessimal stable matching S. Pf. (by contradiction) Suppose - matched in S, but is not worst valid partner for. Idea: similar proof as man-optimal, and also use that fact! S nna-eger Contradiction!...... 23

Woman Pessimality Woman-pessimal assignment. Each woman receives worst valid partner. Claim. GS finds woman-pessimal stable matching S. Pf. (by contradiction) Suppose - matched in S, but is not worst valid partner for. There exists stable matching S in which is paired with a man, say Y, whom she likes less than. Let B be 's partner in S. S Q. Given what happened in S, does prefer or B? nna-eger Contradiction! S nna-youp Bertha-eger......... 24

Woman Pessimality Woman-pessimal assignment. Each woman receives worst valid partner. Claim. GS finds woman-pessimal stable matching S. Pf. (by contradiction) Suppose - matched in S, but is not worst valid partner for. There exists stable matching S in which is paired with a man, say Y, whom she likes less than. Let B be 's partner in S. S prefers to B. man-optimality by GS in S nna-eger Thus, - is an unstable pair in S. Contradiction: S was stable!...... S nna-youp Bertha-eger This proof can be found on pages 11-12.... 25

Extensions: Matching Residents to Hospitals Ex: Men hospitals, Women med school residents. Variant 1. Some participants declare others as unacceptable. Variant 2. Unequal number of men and women. Variant 3. Limited polygamy. Variant 4. lso allow weak preferences. Variant 5. Online mechanism (new students / hospitals may arrive). Variant 6. Include contract details. hospital X wants to hire 3 residents resident unwilling to work in Cleveland Def. Matching S unstable if there is a hospital h and resident r such that: h and r are acceptable to each other; and either r is unmatched, or r prefers h to her assigned hospital; and either h does not have all its places filled, or h prefers r to at least one of its assigned residents. Q. Does it help students to lie about their preferences if the hospitals are the men? 26

Extensions: Matching Residents to Hospitals Q. Does it help students to lie about their preferences?. Yes (because they are the women ), but: even for about 20,000 students/year in 1991-1996 only two years 2 students worse off because they were the women lvin E. Roth & Elliott Peranson, 1999. "The Redesign of the Matching Market for merican Physicians: Some Engineering spects of Economic Design," merican Economic Review, merican Economic ssociation, vol. 89(4), pages 748-780. 27

Recent research Weak preferences Erdil,., and H. Ergin (2008). "What's the Matter with Tie-Breaking? Improving Efficiency in School Choice." merican Economic Review 98(3), 669-689. Online matching Roth,.E., Sonmez, T., and Unver, M.U. (2004). Kidney exchange. Quarterly Journal of Economics, 119(2), 457-488. Jalilzadeh, B., L.R. Planken, and M.M. de Weerdt (2009). Mechanism Design for the Online llocation of Items without Monetary Payments. In O. Shehory and D. Sarne and E. David (Eds.). Proc. of the workshop on gent-mediated Electronic Commerce, 71-84. Contract matching Hatfield, J.W., and Paul R. Milgrom (2005). Matching with Contracts. The merican Economic Review 95(4), 913-935. Harrenstein, B.P., M.M. de Weerdt, and V. Conitzer (2009). Qualitative Vickrey uction. In J. Chuang and L. Fortnow and P. Pu (Eds.). Proc. of the CM Conference on Electronic Commerce, 197-206. 28

Lessons Learned Powerful ideas learned in course. Isolate underlying structure of problem. Create useful and efficient algorithms. Potentially deep social ramifications. [legal disclaimer] Historically, men propose to women. Why not vice versa? Men: propose early and often. Women: ask out the guys. Theory can be socially enriching and fun! CS students get the best partners! 29