CSC304 Lecture 13 Mechanism Design w/o Money 2: Stable Matching Gale-Shapley Algorithm CSC304 - Nisarg Shah 1
Stable Matching β’ Recap Graph Theory: β’ In graph π» = (π, πΉ) , a matching π β πΉ is a set of edges with no common vertices β’ That is, each vertex should have at most one incident edge β’ A matching is perfect if no vertex is left unmatched. β’ π» is a bipartite graph if there exist π 1 , π 2 such that π = π 1 βͺ π 2 and πΉ β π 1 Γ π 2 CSC304 - Nisarg Shah 2
Stable Marriage Problem β’ Bipartite graph, two sides with equal vertices β’ π men and π women (old school terminology ο ) β’ Each man has a ranking over women & vice versa β’ E.g., Eden might prefer Alice β» Tina β» Maya β’ And Tina might prefer Tony β» Alan β» Eden β’ Want: a perfect, stable matching β’ Match each man to a unique woman such that no pair of man π and woman π₯ prefer each other to their current matches (such a pair is called a βblocking pairβ) CSC304 - Nisarg Shah 3
Why ranked preferences? β’ Until now, we dealt with cardinal values. β’ Our goal was welfare maximization. β’ This was sensitive to the exact numerical values. β’ Our goal here is stability. β’ Stability is a property of the ranked preference. β’ That is, you can check whether a matching is stable or not using only the ranked preferences. β’ So ranked information suffices. CSC304 - Nisarg Shah 4
Example: Preferences Albert Diane Emily Fergie Bradley Emily Diane Fergie Charles Diane Emily Fergie Diane Bradley Albert Charles Emily Albert Bradley Charles Fergie Albert Bradley Charles β» β» CSC304 - Nisarg Shah 5
Example: Matching 1 Albert Diane Emily Fergie Bradley Emily Diane Fergie Charles Diane Emily Fergie Diane Bradley Albert Charles Emily Albert Bradley Charles Fergie Albert Bradley Charles Question: Is this a stable matching? CSC304 - Nisarg Shah 6
Example: Matching 1 Albert Diane Emily Fergie Bradley Emily Diane Fergie Charles Diane Emily Fergie Diane Bradley Albert Charles Emily Albert Bradley Charles Fergie Albert Bradley Charles No, Albert and Emily form a blocking pair . CSC304 - Nisarg Shah 7
Example: Matching 2 Albert Diane Emily Fergie Bradley Emily Diane Fergie Charles Diane Emily Fergie Diane Bradley Albert Charles Emily Albert Bradley Charles Fergie Albert Bradley Charles Question: What about this matching? CSC304 - Nisarg Shah 8
Example: Matching 2 Albert Diane Emily Fergie Bradley Emily Diane Fergie Charles Diane Emily Fergie Diane Bradley Albert Charles Emily Albert Bradley Charles Fergie Albert Bradley Charles Yes! (Charles and Fergie are unhappy, but helpless.) CSC304 - Nisarg Shah 9
Does a stable matching always exist in the marriage problem? Can we compute it in a strategyproof way? Can we compute it efficiently? CSC304 - Nisarg Shah 10
Gale-Shapley 1962 β’ Men-Proposing Deferred Acceptance (MPDA): 1. Initially, no one has proposed, no one is engaged, and no one is matched. 2. While some man π is unengaged: β’ π₯ β π βs most preferred woman to whom π has not proposed yet β’ π proposes to π₯ β’ If π₯ is unengaged: o π and π₯ are engaged β’ Else if π₯ prefers π to her current partner πβ² o π and π₯ are engaged, πβ² becomes unengaged β’ Else: π₯ rejects π 3. Match all engaged pairs. CSC304 - Nisarg Shah 11
Example: MPDA Albert Diane Emily Fergie Bradley Emily Diane Fergie Charles Diane Emily Fergie Diane Bradley Albert Charles Emily Albert Bradley Charles Fergie Albert Bradley Charles = engaged = proposed = rejected CSC304 - Nisarg Shah 12
Running Time β’ Theorem: DA terminates in polynomial time (at most π 2 iterations of the outer loop) β’ Proof: β’ In each iteration, a man proposes to someone to whom he has never proposed before. β’ π men, π women β π Γ π possible proposals β’ Can actually tighten a bit to π π β 1 + 1 iterations β’ At termination, it must return a perfect matching. CSC304 - Nisarg Shah 13
Stable Matching β’ Theorem: DA always returns a stable matching. β’ Proof by contradiction: β’ Assume (π, π₯) is a blocking pair. β’ Case 1: π never proposed to π₯ o π cannot be unmatched o/w algorithm would not terminate. o Men propose in the order of preference. o Hence, π must be matched with a woman he prefers to π₯ o (π, π₯) is not a blocking pair CSC304 - Nisarg Shah 14
Stable Matching β’ Theorem: DA always returns a stable matching. β’ Proof by contradiction: β’ Assume (π, π₯) is a blocking pair. β’ Case 2: π proposed to π₯ o π₯ must have rejected π at some point o Women only reject to get better partners o π₯ must be matched at the end, with a partner she prefers to π o (π, π₯) is not a blocking pair CSC304 - Nisarg Shah 15
Men-Optimal Stable Matching β’ The stable matching found by MPDA is special. β’ Valid partner: For a man π , call a woman π₯ a valid partner if (π, π₯) is in some stable matching. β’ Best valid partner: For a man π , a woman π₯ is the best valid partner if she is a valid partner, and π prefers her to every other valid partner. β’ Denote the best valid partner of π by πππ‘π’(π) . CSC304 - Nisarg Shah 16
Men-Optimal Stable Matching β’ Theorem: Every execution of MPDA returns the men- optimal stable matching in which every man is matched to his best valid partner πππ‘π’ π . β’ Surprising that this is even a matching. E.g., why canβt two men have the same best valid partner? β’ Every man is simultaneously matched with his best possible partner across all stable matchings β’ Theorem: Every execution of MPDA produces the women- pessimal stable matching in which every woman is matched to her worst valid partner. CSC304 - Nisarg Shah 17
Men-Optimal Stable Matching β’ Theorem: Every execution of MPDA returns the men- optimal stable matching. β’ Proof by contradiction: β’ Let π = matching returned by MPDA. β’ π β first man rejected by πππ‘π’ π = π₯ β’ π β² β the man π₯ preferred more and rejected π β’ π₯ is valid for π , so (π, π₯) part of stable matching πβ² β’ π₯β² β woman πβ² is matched to in πβ² β’ Mic drop: πβ² cannot be stable because (π β² , π₯) is a blocking pair. CSC304 - Nisarg Shah 18
Men-Optimal Stable Matching β’ Theorem: Every execution of MPDA returns the men- optimal stable matching. β’ Proof by contradiction: Blocking pair πβ² πβ² Not yet rejected by a valid partner β X hasnβt proposed to π₯β² π π₯ π π₯ β prefers π₯ to π₯β² π₯β² π πβ² First to be rejected by Rejects π because best valid partner ( π₯ ) prefers πβ² to π CSC304 - Nisarg Shah 19
Strategyproofness β’ Theorem: MPDA is strategyproof for men, i.e., reporting the true ranking is a weakly dominant strategy for every man. β’ Weβll skip the proof of this. β’ Actually, it is group-strategyproof. β’ But the women might want to misreport. β’ Theorem: No algorithm for the stable matching problem is strategyproof for both men and women. CSC304 - Nisarg Shah 20
Women-Proposing Version β’ Women-Proposing Deferred Acceptance (WPDA) β’ Just flip the roles of men and women β’ Strategyproof for women, not strategyproof for men β’ Returns the women-optimal and men-pessimal stable matching CSC304 - Nisarg Shah 21
Extensions β’ Unacceptable matches β’ Allow every agent to report a partial ranking β’ If woman π₯ does not include man π in her preference list, it means she would rather be unmatched than matched with π . And vice versa. β’ (π, π₯) is blocking if each prefers the other over their current state (matched with another partner or unmatched) β’ Just π (or just π₯ ) can also be blocking if they prefer being unmatched than be matched to their current partner β’ Magically, DA still produces a stable matching. CSC304 - Nisarg Shah 22
Extensions β’ Resident Matching (or College Admission) β’ Men β residents (or students) β’ Women β hospitals (or colleges) β’ Each side has a ranked preference over the other side β’ But each hospital (or college) π can accept π π > 1 residents (or students) β’ Many-to-one matching β’ An extension of Deferred Acceptance works β’ Resident-proposing (resp. hospital-proposing) results in resident-optimal (resp. hospital-optimal) stable matching CSC304 - Nisarg Shah 23
Extensions β’ For ~20 years, most people thought that these problems are very similar to the stable marriage problem β’ Roth [1985] shows: β’ No stable matching algorithm exists such that truth- telling is a weakly dominant strategy for hospitals (or colleges). CSC304 - Nisarg Shah 24
Extensions β’ Roommate Matching β’ Still one-to-one matching β’ But no partition into men and women o βGeneralizing from bipartite graphs to general graphsβ β’ Each of π agents submits a ranking over the other π β 1 agents β’ Unfortunately, there are instances where no stable matching exist. β’ A variant of DA can still find a stable matching if it exists. β’ Due to Irving [1985] CSC304 - Nisarg Shah 25
Recommend
More recommend