Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 “Almost stable” matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University, USA Péter Biró Department of.

Similar presentations


Presentation on theme: "1 “Almost stable” matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University, USA Péter Biró Department of."— Presentation transcript:

1 1 “Almost stable” matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University, USA Péter Biró Department of Computer Science and Information Theory Budapest University of Technology and Economics, Hungary David Manlove Department of Computing Science University of Glasgow, UK Supported by EPSRC grant GR/R84597/01, RSE / Scottish Exec Personal Research Fellowship

2 2 Stable Roommates Problem (SR) D Gale and L Shapley, “College Admissions and the Stability of Marriage”, American Mathematical Monthly, 1962 Input: 2n agents; each agent ranks all 2n-1 other agents in strict order Output: 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

3 3 Example SR Instance (1) Example SR instance I 1 : 1: 3 2 4 2: 4 3 1 3: 2 1 4 4: 1 3 2

4 4 Example SR Instance (1) Example SR instance I 1 : 1: 3 2 4 2: 4 3 1 3: 2 1 4 4: 1 3 2 Stable matching in I 1 : 1: 3 2 4 2: 4 3 1 3: 2 1 4 4: 1 3 2 The matching is not stable as {1,3} blocks.

5 5 Example SR Instance (2) Example SR instance I 2 : 1: 2 3 4 2: 3 1 4 3: 1 2 4 4: 1 2 3

6 6 Example SR Instance (2) Example SR instance I 2 : 1: 2 3 4 2: 3 1 4 3: 1 2 4 4: 1 2 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. 1: 2 3 4 2: 3 1 4 3: 1 2 4 4: 1 2 3 1: 2 3 4 2: 3 1 4 3: 1 2 4 4: 1 2 3

7 7 Application: kidney exchange d1d1 p1p1

8 8 d1d1 p1p1 d2d2 p2p2

9 9 d1d1 p1p1 d2d2 p2p2 A. Roth, T. Sönmez, U. Ünver, Pairwise Kidney Exchange, Journal of Economic Theory, to appear

10 10 Application: kidney exchange d1d1 p1p1 d2d2 p2p2 A. Roth, T. Sönmez, U. Ünver, Pairwise Kidney Exchange, Journal of Economic Theory, to appear (d 1, p 1 ) (d 2, p 2 ) Create a vertex for each donor- patient pair Edges represent compatibility Preference lists can take into account degrees of compatibility

11 11 Efficient algorithm for SR Knuth (1976): is there an efficient algorithm for deciding whether there 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”

12 12 Empirical results Instance size % soluble Experiments based on taking average of s 1, s 2, s 3 where s j is number of soluble instances among 10,000 randomly generated instances, each of given size 2n Results due to Colin Sng Instance size 4205010020050010002000400060008000 % soluble 96.382.973.164.355.145.138.832.227.825.023.6

13 13 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

14 14 “Almost stable” matchings The following instance I 3 of SR is insoluble 1: 2 3 5 6 4 2: 3 1 6 4 5 3: 1 2 4 5 6 4: 5 6 2 3 1 5: 6 4 3 1 2 6: 4 5 1 2 3 Let bp(M) denote the set of blocking pairs of matching M |bp(M 2 )|=12 1: 2 3 5 6 4 2: 3 1 6 4 5 3: 1 2 4 5 6 4: 5 6 2 3 1 5: 6 4 3 1 2 6: 4 5 1 2 3 1: 2 3 5 6 4 2: 3 1 6 4 5 3: 1 2 4 5 6 4: 5 6 2 3 1 5: 6 4 3 1 2 6: 4 5 1 2 3 |bp(M 1 )|=2 Stable partition {  1,2,3 ,  4,5,6  }

15 15 Hardness results for SR Let I be an SR instance Define bp(I)=min{|bp(M)|: M is a matching in I} Define MIN-BP-SR to be problem of computing bp(I), given an SR instance I Theorem 1: MIN-BP-SR is not approximable within n ½- , for any  > 0, unless P=NP Define EXACT-BP-SR to be problem of deciding whether I admits a matching M such that |bp(M)|=K, given an integer K Theorem 2: EXACT-BP-SR is NP-complete

16 16 Outline of the proof Using a “gap introducing” reduction from EXACT-MM Given a cubic graph G=(V,E) and an integer K, decide whether G admits a maximal matching of size K  EXACT-MM is NP-complete, by transformation from MIN-MM (Minimization version), which is NP-complete for cubic graphs  Horton and Kilakos, 1993 Create an instance I of SR with n agents If G admits a maximal matching of size K then I admits a matching with p blocking pairs, where p =| V | If G admits no maximal matching of size K, then bp(I) > p n ½- 

17 17 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 Manlove, Journal of Algorithms, 2002 Can define MIN-BP-SRT analogously to MIN-BP-SR Theorem 3: MIN-BP-SRT is not approximable within n 1- , for any  > 0, unless P=NP, even if each tie has length 2 and there is at most one tie per list Define EXACT-BP-SRT analogously to EXACT-BP-SR Theorem 4: EXACT-BP-SRT is NP-complete for each fixed K  0

18 18 Polynomial-time algorithm Theorem 5: EXACT-BP-SR is solvable in polynomial time if K is fixed Algorithm also works for possibly incomplete preference lists Given an SR instance I where m is the total length of the preference lists, O(m K+1 ) algorithm finds a matching M where |bp(M)|=K or reports that none exists Idea: 1. For each subset B of agent pairs {a i, a j } where |B|=K 2. Try to construct a matching M in I such that bp(M)=B Step 1: O(m K ) subsets to consider Step 2: O(m) time

19 19 Outline of the algorithm Let {a i, a j }  B where |B|=K Preference list of a i : … … a k … … a j … … If {a i, a j }  bp(M) then {a i, a k }  M Delete {a i, a k } but must not introduce new blocking pairs Preference list of a k : … … a i … … a j … … If {a i, a k }  B then {a j, a k }  M Delete {a k, a j } and mark a k Check whether there is a stable matching M in reduced SR instance such that all marked agents are matched in M

20 20 Interpolation of |bp(M)| Clearly |bp(M)|  ½(2n)(2n-2)=2n(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 5 6 4 2: 3 1 6 4 5 3: 1 2 4 5 6 4: 5 6 2 3 1 5: 6 4 3 1 2 6: 4 5 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

21 21 Open problems 1.Is there an approximation algorithm for MIN-BP-SR that has performance guarantee o(n 2 ) ?  Trivial upper bound is 2n(n-1) 2.Determine values of k n and obtain a characterisation of I n such that I n is an SR instance with 2n agents in which bp(I n )=k n and k n = max{bp(I) : I is an SR instance with 2n agents}


Download ppt "1 “Almost stable” matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University, USA Péter Biró Department of."

Similar presentations


Ads by Google