Almost stable matchings in the Roommates problem David
“Almost stable” matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University Péter Biró Department of Computer Science and Information Theory Budapest University of Technology and Economics David Manlove University of Glasgow Department of Computing Science Supported by EPSRC grant GR/R 84597/01, RSE / Scottish Exec Personal Research 1
Stable Roommates Problem (SR) D Gale and L Shapley, “College Admissions and the Stability of Marriage”, American Mathematical Monthly, 1962 Input: Output: 2 n agents; each agent ranks all 2 n-1 other agents in strict order a stable matching A matching is a set of n disjoint pairs of agents A blocking pair of a matching M is a pair of agents {p, q} M such that: • p prefers q to his partner in M, and • q prefers p to his partner in M A matching is stable if it admits no blocking pair 2
Example SR Instance (1) Example SR instance I 1: 2: 3: 4: 3 4 2 1 2 3 1 3 4 1 4 2 3
Example SR Instance (1) Example SR instance I 1: 2: 3: 4: 3 4 2 1 2 3 1 3 4 1 4 2 The matching is not stable as {1, 3} blocks. Stable matching in I 1: 2: 3: 4: 3 4 2 1 2 3 1 3 4 1 4 2 4
Example SR Instance (2) Example SR instance I 2: 1: 2: 3: 4: 2 3 1 1 3 1 2 2 4 4 4 3 5
Example SR Instance (2) Example SR instance I 2: 1: 2: 3: 4: 2 3 1 1 3 1 2 2 4 4 4 3 The three matchings containing the pairs {1, 2}, {1, 3}, {1, 4} are blocked by the pairs {2, 3}, {1, 2}, {1, 3} respectively. instance I 2 has no stable matching. 6
Application: kidney exchange d 1 p 1 7
Application: kidney exchange d 1 d 2 p 1 p 2 8
Application: kidney exchange d 1 d 2 p 1 p 2 A. Roth, T. Sönmez, U. Ünver, Pairwise Kidney Exchange, Journal of Economic Theory, to appear 9
Application: kidney exchange d 1 d 2 p 1 p 2 (d 1 , p 1) (d 2 , p 2) A. Roth, T. Sönmez, U. Ünver, Pairwise Kidney Exchange, Journal of Economic Theory, to appear • Create a vertex for each donorpatient pair • Edges represent compatibility • Preference lists can take into account degrees of compatibility 10
Efficient algorithm for SR • • Knuth (1976): is there an efficient algorithm for deciding whethere exists a stable matching, given an instance of SR? Irving (1985): “An efficient algorithm for the ‘Stable Roommates’ Problem”, Journal of Algorithms, 6: 577 -595 Ø given an instance of SR, decides whether a stable matching exists; Ø if so, finds one • Algorithm is in two phases Ø Phase 1: similar to GS algorithm for the Stable Marriage problem Ø Phase 2: elimination of “rotations” 11
Empirical results 20 % soluble 82. 9 73. 1 64. 3 55. 1 45. 1 38. 8 96. 3 50 100 Experiments based on taking average of s 1 , s 2 , s 3 where sj is number of soluble instances among 10, 000 randomly generated instances, each of given size 2 n 200 500 1000 2000 4000 6000 8000 32. 2 27. 8 25. 0 23. 6 % soluble Instance 4 size Results due to Colin Sng Instance size 12
Coping with insoluble SR instances • Coalition formation games Ø Partition agents into sets of size 1 Ø Notions of B-preferences / W-preferences Ø Cechlárová and Hajduková, 1999 Ø Cechlárová and Romero-Medina, 2001 Ø Cechlárová and Hajduková, 2002 • Stable partition Ø Every SR instance admits such a structure Ø Tan 1991 (Journal of Algorithms) Ø Can be used to find a maximum matching such that the matched pairs are stable within themselves Ø Tan 1991 (International Journal of Computer Mathematics) • Matching with the fewest number of blocking pairs Ø Abraham, Biró, DFM, 2005 13
“Almost stable” matchings • The following instance I 3 of SR is insoluble 1: 2: 3: 4: 5: 6: • 2 3 1 5 6 4 3 1 2 6 4 5 5 6 4 2 3 1 6 4 5 3 1 2 4 5 6 1 2 3 • Stable partition { 1, 2, 3 , 4, 5, 6 } Let bp(M) denote the number of blocking pairs of matching M 1: 2: 3: 4: 5: 6: 2 3 1 5 6 4 3 1 2 6 4 5 5 6 4 2 3 1 bp(M 1)=2 6 4 5 3 1 2 4 5 6 1 2 3 1: 2: 3: 4: 5: 6: 2 3 1 5 6 4 3 1 2 6 4 5 5 6 4 2 3 1 6 4 5 3 1 2 bp(M 2)=12 4 5 6 1 2 3 14
Algorithmic results • Let I be an SR instance • Define bp(I)=min{bp(M) : M is a matching in I} • Problem of determining bp(I) is NP-hard • • • Given an integer n, problem of deciding whether bp(I)=n is NP-complete Given a fixed integer K 0, problem of deciding whether bp(I)=K is solvable in O(n 2(K+1)) time Problem of finding bp(I) is not approximable within n½- , for any > 0, unless P=NP Ø Abraham, Biró, DFM, 2005 15
Preference lists with ties • • • Let I be an instance of SR with ties Problem of deciding whether I admits a stable matching is NP-complete Ø Ronn, Journal of Algorithms, 1990 Ø Irving and DFM, Journal of Algorithms, 2002 Problem of finding bp(I) is NP-hard Ø Follows immediately from no-ties case Given a fixed integer K 0, problem of deciding whether bp(I)=K is NP-complete Problem of finding bp(I) is not approximable within n 1 - , for any > 0, unless P=NP Ø Abraham, Biró, DFM, 2005 16
Interpolation of bp(M) • • Clearly bp(M) ½(2 n)(2 n-2)=2 n(n-1) Is bp(M) an interpolating invariant? That is, given an SR instance I, if I admits matchings M 1, M 2 such that bp(M 1)=k and bp(M 2)=k+2 , is there a matching M 3 in I such that bp(M 3)=k+1 ? Not in general! Ø 1: 2: 3: 4: 5: 6: 2 3 1 5 6 4 3 1 2 6 4 5 5 6 4 2 3 1 6 4 5 3 1 2 4 5 6 1 2 3 Instance I 3 admits 15 matchings: • 9 admit 2 blocking pairs • 2 admit 6 blocking pairs • 3 admit 8 blocking pairs • 1 admits 12 blocking pairs 17
Open problems 1. Is there an approximation algorithm for the problem of determining bp(I) that has performance guarantee o(n 2)? Ø Trivial upper bound is 2 n(n-1) 2. Determine values of kn and obtain a characterisation of In such that In is an SR instance with 2 n agents in which bp(In)=kn and kn = max{bp(I) : I is an SR instance with 2 n agents} 18
- Slides: 18