stable matching - swarthmore collegebryce/cs91/f18/... · a matching is stable if it has no...

14
Stable Matching Oct. 11, 2018

Upload: others

Post on 04-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

StableMatchingOct.11,2018

Page 2: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

MaximumMatchingAmaximummatching isthelargestsubsetofagraph’sedgessuchthatnotwoedgesshareavertex.

Aretherededgesamaximummatching?

Page 3: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

FindingMaximumMatchingsAnaugmentingpath startsandwithedgesdistinctnodesandedgesnotinthematching,thealternatesbetweenedgesinandnotinthematching.

Allnon-maximummatchingscanbeenlargedbyfindinganaugmentingpath.

IF

Page 4: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

KidneyExchangeMechanism• AskeachPi Di pairfor

• BuildagraphG = (V,E) with

• ComputeandreturnamaximummatchingofG.

Ei = {PjDj | Dj can donate to Pi}<latexit sha1_base64="89JqWZT2FT6g/Zxbot72u119j40=">AAACIXicbZBNSwMxEIazflu/qh69BIvgSXZFsAcFQQWPFawtdMuSzU41mmSXZFYsS/+KF/+KFw+KeBP/jOnHQVtfGHh4Z4Zk3jiTwqLvf3lT0zOzc/MLi6Wl5ZXVtfL6xrVNc8OhzlOZmmbMLEihoY4CJTQzA0zFEhrx/Wm/33gAY0Wqr7CbQVuxGy06gjN0VlSunkeCHtOwqEV39MxVqEQyBIRHNKqgnGmapJohUExpj9bcRtiLyhV/zx+ITkIwggoZqRaVP8Mk5bkCjVwya1uBn2G7YAYFl9ArhbmFjPF7dgMth5opsO1icGGP7jgn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JxO3WWtJf+nLSpavV7W0pQVoRHbQatKtWtsPwNyaVGQ2njAhZX+riBOueWC/JcN/BLiy0++CuYvJrHHn16ODt7169hhT9gu22Mxe8UO2Ec2ZTMm2O9gN3ge7IdB+DSchNG2NAx6z2P2T4Rv/gDs3Lrn</latexit>

Page 5: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

IsthismechanismDSIC?ShouldagentsreportFi �Ei ?

ShouldagentsreportFi �Ei ?

Depends on the alg

tf

Page 6: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

PriorityMatchingSupposepatientsarerankedbypriority:• Howlongthey’vebeenwaitingforatransplant.• Howbadlytheyneedatransplant.

Howcanwemodifythemechanismtoaccountforpriorities?

Page 7: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

IncentivesforHospitals• Hospitalswanttomatchtheirownpatients.• Theycanidentifymatchesbetweentheirownpatients.

Whatarethemaximummatchings?

FEI

Page 8: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

EE l

01111 I

C

Page 9: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

TheoremTherecannotexistamechanismthatmaximizespatientwelfare(findsamaximummatching)andisDSICforthehospitals(ensurestheyreporttruthfullyaboutalltheirpatients).

Proof:thecounterexamplewejustsaw.

Page 10: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

ResidencyMatchingEveryyear,thousandsofdoctorsfinishmedicalschoolandapplytoresidencyprograms.

Doctorsarematchedtohospitalsbyacentralizedmechanism,whichwewillmodel.

D = setofdoctorsH = setofhospitals

| D | = | H |

Ps3 lol IH

Page 11: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

Doctorsreport:

Hospitalsreport:

Giventhesereports,themechanismcomputesastablematching.

preference ordering of all hospitals

D Hz Hit H Hz Hs

preference ordering of all doctors

Hi Ds Dz Dz D Da

A matching is stable if it hasNo blocking pairsA pair d h is blocking if

each prefers the other over the mechanism

Page 12: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

Deferred Acceptance Algorithmwhile 7 unmatched d e D

d applies to favorite heftthat hasn't rejected them

III

isi tchn a

d't h's current matchif h prefers dy dh permanently rejects dtentatively natch d h

elsepermanently rejects d

finalize matches

Page 13: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

Runningtimeworst case lol I Hl

Page 14: Stable Matching - Swarthmore Collegebryce/cs91/f18/... · A matching is stable if it has No blocking pairs A pair d h is blocking if each prefers the other over the mechanism. Deferred

WhatsthIs it a matching

Is it stableDoctors go down

their list

Hospitals move up by re matching

d h