Next Article in Journal / Special Issue
Maximum Locally Stable Matchings
Previous Article in Journal
Filtering Degenerate Patterns with Application to Protein Sequence Analysis
Previous Article in Special Issue
Stable Multicommodity Flows
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Improving Man-Optimal Stable Matchings by Minimum Change of Preference Lists †

1
Graduate School of Informatics, Kyoto University, Yoshida-honmachi, Sakyo-ku, Kyoto 606-8501, Japan
2
School of Computing Science, University of Glasgow, Glasgow, G12 8QQ, Scotland
3
Academic Center for Computing and Media Studies, Kyoto University, Yoshida-honmachi, Sakyo-ku, Kyoto 606-8501, Japan
4
Communication Service Group, Research and Development Center, Nippon Telegraph and Telephone West Corporation, 1-2-31 Sonezaki Kita-ku Osaka 530-0057, Japan
*
Author to whom correspondence should be addressed.
A part of this paper was presented at the 7th Hungarian-Japanese Symposium on Discrete Mathematics and Its Applications (HJ 2011) and the 6th Annual Meeting of the Asian Association for Algorithms and Computation (AAAC 2013).
Algorithms 2013, 6(2), 371-382; https://doi.org/10.3390/a6020371
Submission received: 27 December 2012 / Revised: 17 May 2013 / Accepted: 20 May 2013 / Published: 28 May 2013
(This article belongs to the Special Issue Special Issue on Matching under Preferences)

Abstract

:
In the stable marriage problem, any instance admits the so-called man-optimal stable matching, in which every man is assigned the best possible partner. However, there are instances for which all men receive low-ranked partners even in the man-optimal stable matching. In this paper we consider the problem of improving the man-optimal stable matching by changing only one man’s preference list. We show that the optimization variant and the decision variant of this problem can be solved in time O ( n 3 ) and O ( n 2 ) , respectively, where n is the number of men (women) in an input. We further extend the problem so that we are allowed to change k men’s preference lists. We show that the problem is W[1]-hard with respect to the parameter k and give O ( n 2 k + 1 ) -time and O ( n k + 1 ) -time exact algorithms for the optimization and decision variants, respectively. Finally, we show that the problems become easy when k = n ; we give O ( n 2 . 5 log n ) -time and O ( n 2 ) -time algorithms for the optimization and decision variants, respectively.

1. Introduction

An instance of the stable marriage problem [1] consists of the same number n of men and women, and each person’s preference list. In a preference list, each person ranks all the members of the opposite sex in a strict order. A matching is a set of n disjoint man–woman pairs in which each person appears exactly once. A blocking pair for a matching M is a man–woman pair each of whom prefers the other to his/her partner in M. A matching is stable if it contains no blocking pair.
It is known that there exists at least one stable matching in any instance, and one can be found by the Gale–Shapley algorithm (GS) in O ( n 2 ) time [1,2]. The stable matching found by GS is called the man-optimal stable matching that has an extreme property that every man is assigned the best possible partner among all the stable matchings. In applications for asymmetric settings, such as assigning residents to hospitals or students to schools, it is common to formulate the problem by setting residents or students to the men’s side, so that those people can receive benefit. Nevertheless, there are instances for which all (or almost all) men are assigned low-ranked partners even in the man-optimal stable matching, (e.g., a worst case instance for GS given in Figure 1, which originates from [2]). For such instances, the merit of using the man-optimal mechanism cannot be sufficiently exploited.
Figure 1. Worst case example for the Gale–Shapley algorithm for n = 5 . Partners in the man-optimal stable matching are underlined. Each preference list is ordered from left to right in increasing order of the rank, i.e., the leftmost person is the most preferable and the rightmost person is the least preferable.
Figure 1. Worst case example for the Gale–Shapley algorithm for n = 5 . Partners in the man-optimal stable matching are underlined. Each preference list is ordered from left to right in increasing order of the rank, i.e., the leftmost person is the most preferable and the rightmost person is the least preferable.
Algorithms 06 00371 g001
To overcome this drawback, we consider the problem of improving the man-optimal stable matching by allowing small changes in preference lists. In this paper we first allow only one man’s preference list to be changed, and consider optimization and decision variants. In the optimization variant, we are asked to find a man and a way of changing his list that cause the maximum improvement. In the decision variant, we ask if we can obtain a positive improvement. For both problems, we impose a restriction that no man should be assigned a worse partner than the man-optimal partner in the original instance. We show that these problems can be solved in time O ( n 3 ) and O ( n 2 ) , respectively. We then extend the problem so that we are allowed to change k men’s preference lists. We show that the optimization variant is W[1]-hard with respect to the parameter k. We also give O ( n 2 k + 1 ) -time and O ( n k + 1 ) -time exact algorithms for the optimization and decision variants, respectively. Finally, we show that the problems become easy when k = n , i.e., we are allowed to change the preference lists of any number of men. We give O ( n 2 . 5 log n ) -time and O ( n 2 ) -time algorithms for the optimization and decision variants, respectively.
Our problem can also be viewed as an issue of coalition strategy by men. Knowing all the preference lists, men are trying to maximize their total profit by submitting falsified preference lists, while bounding the number of such liars and guaranteeing that no one becomes worse off. Results of this paper show the computational complexities of obtaining an optimal strategy depending on the number k of liars. Strategic issue in the stable marriage problem is an extensively studied topic (see [3] for example).

2. Preliminaries

2.1. Problem Definitions

Let I be an instance of the stable marriage problem. In this paper, we consider only complete preference lists with no ties. The rank of a woman w in man m’s preference list, denoted r m ( w ) , is one plus the number of women that precede w in m’s list. For a matching M and a person p, let M ( p ) be p’s partner in M. The score of m in M is the rank of his partner in M, i.e., r m ( M ( m ) ) . The score of M is the sum of the scores of all men, i.e., m r m ( M ( m ) ) . The man-optimal score of I, denoted M O ( I ) , is the score of the man-optimal stable matching M 0 of I.
Let k be a positive integer. If I ˜ is an instance obtained by changing the preference lists of at most k men in I in some way, then we say that I ˜ is a k-neighbor of I. Suppose that I ˜ is a k-neighbor obtained by changing the preference lists of m 1 ˜ , m 2 ˜ , , m ˜ ( k ) and let M 0 ˜ be the man-optimal stable matching for I ˜ . The man-optimal score of I ˜ with respect to I, denoted M O I ( I ˜ ) , is the score of M 0 ˜ where m 1 ˜ , m 2 ˜ , , m ˜ ’s scores are measured in terms of their preference lists in I. (Intuitively, their scores are measured in their true preference lists.) We say that I ˜ is proper if each man receives at least as good a partner in M 0 ˜ as in M 0 , i.e., r m ( M 0 ˜ ( m ) ) r m ( M 0 ( m ) ) for each m, where m 1 ˜ , m 2 ˜ , , m ˜ ’s scores are measured in their preference lists in I.
The problem MAX MAN-OPT IMPROVE(k) (MMI(k) for short) is, given a stable marriage instance I, to find a proper k-neighbor I ˜ of I such that M O ( I ) M O I ( I ˜ ) is maximized. The problem POSITIVE MAN-OPT IMPROVE(k) (PMI(k) for short) is to determine if there is a proper k-neighbor I ˜ of I such that M O ( I ) M O I ( I ˜ ) > 0 .

2.2. Reduced Lists and Rotation Digraphs

In constructing algorithms and proving W[1]-hardness, we use reduced lists and rotation digraphs. These are defined on an instance I and its stable matching M, and are constructed in the following way: For each man m and each woman w below M ( m ) in m’s preference list, delete w from m’s list and m from w’s list. The resulting preference lists are called the woman-oriented reduced lists with respect to I and M, denoted R L I , M . (We may simply call them the reduced lists if there is no ambiguity). Note that for each woman w, M ( w ) lies at the top of w’s reduced list since M is stable. For each woman w, let n e x t I , M ( w ) be the man at the second position of w’s reduced list (if any). The woman-oriented rotation digraph with respect to I and M (or simply the rotation digraph) is a digraph D I , M = ( V , A ) where V is the set of men and A includes an arc ( M ( w ) , n e x t I , M ( w ) ) (i.e., a directed edge from M ( w ) to n e x t I , M ( w ) ) for each woman w such that n e x t I , M ( w ) exists. Suppose that there is a directed cycle m 0 , m 1 , , m r 1 ( r 2 ) in D I , M , and let w i = M ( m i ) for all i ( 0 i r 1 ). Then we call an ordered list of pairs ρ = ( m 0 , w 0 ) , ( m 1 , w 1 ) , , ( m r 1 , w r 1 ) a rotation exposed in M. If we modify M by removing the pairs of rotation ρ and adding ( m i , w i 1 mod r ) for each i, then the resulting matching is also stable [2]. In this case we say that the new matching is obtained by eliminating the rotation ρ from M. Note that by eliminating a rotation, every man in the rotation obtains a better partner, while every woman in the rotation obtains a worse partner. It is also known that M is the man-optimal stable matching of I if and only if there is no rotation exposed in M (or equivalently, D I , M has no directed cycle) [2].

3. Changing One Man’s Preference List

3.1. Optimization Variant

Let I be a given instance and M 0 be its man-optimal stable matching. Let us fix a man m whose preference list is to be changed. The following proposition, due to Huang [3], is useful for our purpose. Recall that a preference list is ordered from left to right in increasing order of the rank.
Proposition 3.1 
[3] Let P L ( m ) M 0 ( m ) P R ( m ) be m’s preference list in I, where P L ( m ) ( P R ( m ) ) denotes the left (right) part of M 0 ( m ) in m’s list. Let I be an instance constructed in the following way: Take any number of women from P L ( m ) , move them to the right of M 0 ( m ) , and arbitrarily permute each of the (new) left and right parts of M 0 ( m ) . Let M 0 be the man-optimal stable matching for I . Then in M 0 no man is worse off than in M 0 (with respect to preference order of I).
Then we can claim that there is an optimal solution in which M 0 ( m ) lies at the top of m’s list for the following reason: Note that m cannot be matched with a woman worse than M 0 ( m ) by the requirement of the problem. On the other hand, it is shown in [2] (page 56, Theorem 1.7.1) that m cannot get a better man-optimal partner by falsifying his preference list. Hence, in any feasible solution, m must be matched with M 0 ( m ) . If M 0 ( m ) is not at the top of m’s list in some feasible solution, we can move women on the left of M 0 ( m ) to the right of M 0 ( m ) without increasing the man-optimal score, by Proposition 3.1. Hence our claim holds. Since m is matched with M 0 ( m ) in a feasible solution, the order of women other than M 0 ( m ) in m’s list is not important. Hence all we need to do is to move M 0 ( m ) to the top of m’s list, which implies the following simple Algorithm 1.
Example. 
We give an example of the execution of Algorithm 1 for instance I given in Figure 1. The man-optimal stable matching M 0 is given in Figure 1 and M O ( I ) = 21 . At line 2, we first consider m 1 . At line 3, we construct an instance I m 1 by moving w 5 to the top of m 1 ’s list. By applying GS, we find that the man-optimal stable matching of I m 1 is M m 1 = { ( m 1 , w 5 ) , ( m 2 , w 2 ) , ( m 3 , w 3 ) , ( m 4 , w 4 ) , ( m 5 , w 1 ) } and M O I ( I m 1 ) = 9 . Next, we consider m 2 . The instance I m 2 is constructed by moving w 1 to the top of m 2 ’s list. The man-optimal stable matching of I m 2 is also M 0 and M O I ( I m 2 ) = 21 . By continuing this, we can find that M O I ( I m 3 ) = M O I ( I m 4 ) = M O I ( I m 5 ) = 21 . Hence, Algorithm 1 outputs I m 1 since M O I ( I m 1 ) is the smallest.
   ☐
Algorithm 1:
  1: Find the man-optimal stable matching M0 of I.
  2: for each man m do
  3:  Modify I by moving M0(m) to the top of m’s list. Let Im be the resulting instance.
  4:  Apply GS to Im and find its man-optimal stable matching Mm.
  5: end for
  6: Let m* be a man such that the score of Mm* is minimum.
  7: Output Im* .
Since GS runs in time O ( n 2 ) , line 1 and the body of the for loop can be executed in time O ( n 2 ) . Since there are n men, the overall time complexity of Algorithm 1 is O ( n 3 ) .
Theorem 3.2 
MMI(1) can be solved in O ( n 3 ) time.

3.2. Decision Variant

Note that a direct application of Algorithm 1 solves PMI(1) in O ( n 3 ) time. We improve this to O ( n 2 ) using a structural property of stable matchings. Let I be an input. From the discussion in Section 3.1, it suffices to consider the instance I m for each man m (see the description of Algorithm 1 for the definition of I m .) It is not hard to see that the man-optimal stable matching M 0 of I is also stable in I m for any m. Hence, if M 0 is not the man-optimal stable matching of I m for some m, then the man-optimal stable matching of I m is better than M 0 , so the answer is “yes”; otherwise, the answer is “no”. To check whether M 0 is the man-optimal stable matching of I m or not in time O ( n ) per man, we use the woman-oriented rotation digraphs defined in Section 2.2.
Given I, we construct the rotation digraph D I , M 0 with respect to the man-optimal stable matching M 0 . Clearly it is acyclic. For a man m, we construct the instance I m (defined before) and the rotation digraph D I m , M 0 (recall that M 0 is stable in I m and hence D I m , M 0 is defined). From the discussion in Section 2.2, we know that M 0 is the man-optimal stable matching of I m if and only if D I m , M 0 contains no cycle. Hence our task can be reduced to checking if D I m , M 0 contains a cycle. The pseudocode of our algorithm is given as Algorithm 2:
Algorithm 2:
  1: Find the man-optimal stable matching M0 of I.
  2: Construct DI,M0 .
  3: for each man m do
  4:  Modify I by moving M0(m) to the top of m’s list. Let Im be the resulting instance.
  5:  Construct DIm,M0 .
  6:  if DIm,M0 contains a cycle then
  7:   Output “yes” and terminate.
  8:  end if
  9: end for
 10: Output “no”.
Example. We give an example of the execution of Algorithm 2 for instance I of Figure 1. The man-optimal stable matching M 0 is depicted in Figure 1. In constructing the reduced lists R L I , M 0 , we delete w 5 from m 2 , m 3 , m 4 , and m 5 ’s lists, and m 2 , m 3 , m 4 , and m 5 from w 5 ’s list. Hence R L I , M 0 is as follows:
m1:  w1 w2 w3 w4 w5  w1:  m2 m3 m4 m5 m1
m2:  w2 w3 w4 w1  w2:  m3 m4 m5 m1 m2
m3:  w3 w4 w1 w2  w3:  m4 m5 m1 m2 m3
m4:  w4 w1 w2 w3  w4:  m5 m1 m2 m3 m4
m5:  w1 w2 w3 w4  w5:  m1
The rotation digraph D I , M 0 has four arcs ( m 2 , m 3 ) , ( m 3 , m 4 ) , ( m 4 , m 5 ) , and ( m 5 , m 1 ) , as illustrated in Figure 2(a).
Figure 2. Rotation digraphs.
Figure 2. Rotation digraphs.
Algorithms 06 00371 g002
For a better exposition, let us first choose m 5 at line 3. To construct I m 5 , we move w 4 to the top of m 5 ’s list. We then delete w 1 , w 2 , and w 3 from m 5 ’s list and m 5 from w 1 , w 2 , and w 3 ’s lists in R L I , M 0 , and we obtain the following R L I m 5 , M 0 :
m1:  w1 w2 w3 w4 w5  w1:  m2 m3 m4 m1
m2:  w2 w3 w4 w1  w2:  m3 m4 m1 m2
m3:  w3 w4 w1 w2  w3:  m4 m1 m2 m3
m4:  w4 w1 w2 w3  w4:  m5 m1 m2 m3 m4
m5:  w4  w5:  m1
To construct the rotation digraph D I m 5 , M 0 , we remove an arc ( m 4 , m 5 ) from D I , M 0 and add ( m 4 , m 1 ) because n e x t I , M 0 ( w 3 ) = m 5 but n e x t I m 5 , M 0 ( w 3 ) = m 1 . The resulting D I m 5 , M 0 is depicted in Figure 2(b). This digraph D I m 5 , M 0 contains no cycle and hence we proceed to the next man.
Next, suppose that we choose m 1 at line 3. Then R L I m 1 , M 0 is as follows:
m1:  w5  w1:  m2 m3 m4 m5
m2:  w2 w3 w4 w1  w2:  m3 m4 m5 m2
m3:  w3 w4 w1 w2  w3:  m4 m5 m2 m3
m4:  w4 w1 w2 w3  w4:  m5 m2 m3 m4
m5:  w1 w2 w3w4  w5:  m1
To construct the rotation digraph D I m 1 , M 0 , we remove an arc ( m 5 , m 1 ) from D I , M 0 and add ( m 5 , m 2 ) and obtain D I m 1 , M 0 in Figure 2(c). Since D I m 1 , M 0 contains a cycle, Algorithm 2 outputs “yes” and terminates.    ☐
Lines 1 and 2 can be performed in time O ( n 2 ) . Checking whether D I m , M 0 contains a directed cycle or not can be done by a standard topological sorting algorithm in time linear in the size of D I m , M 0 . Since each vertex of D I m , M 0 has outdegree at most one, the size of D I m , M 0 is O ( n ) and line 6 can be done in O ( n ) time. Shortly, we show that D I m , M 0 can be constructed from D I , M 0 in time O ( n ) . Then the overall time complexity of Algorithm 2 is O ( n 2 ) .
Note that the reduced lists R L I m , M 0 can be constructed from R L I , M 0 by deleting each woman w who precedes M 0 ( m ) from m’s preference list, and correspondingly m from w’s list. If m is not n e x t I , M 0 ( w ) , then n e x t I m , M 0 ( w ) = n e x t I , M 0 ( w ) . Otherwise, i.e., if n e x t I , M 0 ( w ) = m , then the man (say, m ) at the third position of R L I , M 0 (if any) will be at the second position of R L I m , M 0 , i.e., n e x t I m , M 0 ( w ) = m . Accordingly we must replace the directed edge ( M 0 ( w ) , m ) by ( M 0 ( w ) , m ) . By doing this for every such w, we can obtain D I m , M 0 in time O ( n ) .
Theorem 3.3 
PMI(1) can be solved in O ( n 2 ) time.

4. Changing k Men’s Preference Lists

4.1. Hardness Result

In this section, we show W[1]-hardness of MMI(k). This hardness implies that MMI(k) probably does not admit an FPT algorithm with parameter k, i.e., an O ( f ( k ) · p ( n ) ) -time algorithm where f is any function and p is a polynomial.
Theorem 4.1 
MMI(k) with parameter k is W[1]-hard.
Proof. 
The Densest k Subgraph problem (DkS) [4] is the following problem. We are given a graph G and a positive integer k. The task is to find an induced subgraph of G with k vertices that contains the maximum number of edges. It is known that DkS is W[1]-hard with parameter k [5]. We give an FPT-reduction from DkS to MMI(k).
Given an instance ( G , k 1 ) of DkS, we construct an instance ( I , k 2 ) of MMI(k) as follows. First, we let k 2 = k 1 . Next, we construct I from G = ( V , E ) . For each vertex v i V , we construct a man m i and a woman w i . For each edge ( v i , v j ) E , we construct two men m i , j and m i , j and two women w i , j and w i , j . For a vertex v i V , let E i E be the set of edges incident to v i and W i be the set of women w i , j corresponding to E i . Each person’s preference list is constructed as follows, where L ( W i ) is an arbitrarily ordered list of women in W i and “⋯” means an arbitrarily ordered list of those people who do not appear explicitly in the list.
mi:  L(Wi) wi  (1 ≤ i ≤ |V|)  wi:  mi  (1 ≤ i ≤ |V|)
mi,j:   w i , j wi,j  ((i, j) ∈ E)  wi,j:  mi,j mi mj m i , j   ((i, j) ∈ E)
m i , j :  wi,j w i , j   ((i, j) ∈ E)   w i , j :   m i , j mi, j  ((i,j) ∈ E)
It is not hard to see that the man-optimal stable matching M 0 of I consists of pairs ( m i , w i ) for 1 i | V | and ( m i , j , w i , j ) and ( m i , j , w i , j ) for ( i , j ) E . Note that if we ignore the “⋯” part in the above preference lists, each man is matched with the last woman and each woman is matched with the first man in M 0 . Hence these are the woman-oriented reduced lists with respect to I and M 0 , i.e., R L I , M 0 .
Clearly, the reduction can be performed in time polynomial in | G | . To complete the proof, we show that G has an induced subgraph with k 1 vertices and at least s edges if and only if there is a proper k 2 -neighbor I ˜ of I such that M O ( I ) M O I ( I ˜ ) 2 s . Since k 1 = k 2 , in the following we use k to denote k 1 and k 2 just for simplicity. First, suppose that G has an induced subgraph with k vertices and at least s edges, and let S ( V ) be the set of those k vertices. Then, for each v i S , we modify m i ’s preference list by moving his man-optimal partner w i to the top of the list, and let I ˜ be the resulting instance. We will show that, by doing this, m i , j and m i , j ’s scores in the man-optimal stable matching of I ˜ are decreased by one respectively, if v i , v j S and ( v i , v j ) E . Since there are at least s such edges, the score is decreased by at least 2 s in total.
Recall that w i , j ’s reduced list in R L I , M 0 is “ m i , j m i m j m i , j ”. Since v i , v j S and m i and m j ’s preference lists are modified as mentioned above, w i , j ’s reduced list in R L I ˜ , M 0 becomes “ m i , j m i , j ”, i.e., n e x t I ˜ , M 0 ( w i , j ) = m i , j . Note that w i , j ’s reduced list “ m i , j m i , j ” is unchanged. Then we have a directed cycle m i , j m i , j of length two in D I ˜ , M 0 and if we eliminate this rotation, the scores of m i , j and m i , j will each be decreased by one. Note that we can repeat this argument independently for each edge.
Next, suppose that there is a proper k-neighbor I ˜ of I such that M O ( I ) M O I ( I ˜ ) 2 s and let M 0 ˜ be the man-optimal stable matching of I ˜ . First, note that in M 0 ˜ , each man is matched with a woman on the reduced lists R L I , M 0 because by the condition of the problem, no man can be worse off in M 0 ˜ than in M 0 . Since M 0 ˜ is a perfect matching, we know that M 0 ˜ ( m i ) = w i for each i ( 1 i | V | ) and either “ M 0 ˜ ( m i , j ) = w i , j and M 0 ˜ ( m i , j ) = w i , j ” or “ M 0 ˜ ( m i , j ) = w i , j and M 0 ˜ ( m i , j ) = w i , j ” for each ( v i , v j ) E . Therefore, only the case of “ M 0 ˜ ( m i , j ) = w i , j and M 0 ˜ ( m i , j ) = w i , j ”, the scores of m i , j and m i , j will each be decreased by one. This can happen only when m i , j becomes n e x t I ˜ , M 0 ( w i , j ) , that is, m i and m j are removed from w i , j ’s reduced list. This implies that w i precedes w i , j in m i ’s reduced list and w j precedes w i , j in m j ’s reduced list. Therefore, both m i and m j ’s lists are modified in I ˜ . Since M O ( I ) M O I ( I ˜ ) 2 s , there are at least s such pairs ( i , j ) . Let S be the set of vertices v i such that m i ’s preference list is modified in constructing I ˜ . Then | S | k and by the above discussion, S induces at least s edges, which completes the proof.    ☐

4.2. Optimization Variant

From the discussion in Section 3.1, it seems that it would suffice to choose k men whose preference lists are to be modified, and move their man-optimal partners to the top of their respective preference lists. If this is true, we obtain an O ( n k + 2 ) -time algorithm since there are O ( n k ) combinations of selecting k men and for each of them, we run GS whose time complexity is O ( n 2 ) . However, the following example (Figure 3) shows that this is not true.
Nevertheless, the following lemma allows the search space to be bounded.
Figure 3. A counter example for the naive algorithm where k = 2 . Man-optimal partners are underlined. An optimal solution is obtained by moving w 4 and w 5 to the top in m 4 ’s and m 5 ’s preference lists respectively, as a result of which the score decreases by seven. Any choice of two men and moving their man-optimal partners to the top decreases the score by at most five.
Figure 3. A counter example for the naive algorithm where k = 2 . Man-optimal partners are underlined. An optimal solution is obtained by moving w 4 and w 5 to the top in m 4 ’s and m 5 ’s preference lists respectively, as a result of which the score decreases by seven. Any choice of two men and moving their man-optimal partners to the top decreases the score by at most five.
Algorithms 06 00371 g003
Lemma 4.2 
For an instance I, let I o p t be an optimal solution and M o p t be the man-optimal stable matching of I o p t . Let S ( | S | k ) be the set of men whose preference lists are modified in I o p t . Let I ˜ be the instance obtained from I by moving M o p t ( m ) to the top of m’s list for each m S . Then M o p t is stable, and in fact man-optimal stable, for I ˜ .
Proof. 
Suppose that M o p t has a blocking pair in I ˜ . Each m S cannot be a part of a blocking pair because M o p t ( m ) lies at the top of m’s list. But men not in S and all the women have the same preference list in I o p t and I ˜ , so if ( m , w ) is a blocking pair for M o p t in I ˜ , then ( m , w ) is also a blocking pair for M o p t in I o p t , a contradiction. Hence M o p t is stable for I ˜ .   ☐
Now suppose that M o p t is not man-optimal for I ˜ and let M ( M o p t ) be the man-optimal stable matching for I ˜ . Since M o p t matches every man in S to his top choice in I ˜ , so does M . Thus some of the men not in S (whose preference lists are the same in I and I ˜ ) obtain better partners in M than in M o p t . This means that M O I ( I ˜ ) < M O I ( I o p t ) , which contradicts the optimality of I o p t .
By the definition of the problem, each man is matched in M o p t to the woman M 0 ( m ) or a woman preceding M 0 ( m ) . Hence by Lemma 4.2, if we fix the set of men whose preference lists are to be modified, it suffices to bring, for each selected man m, M 0 ( m ) or a woman preceding M 0 ( m ) to the top. Furthermore, we know that there is no stable matching for I o p t in which every man in S is matched to a woman strictly better than his man-optimal partner in M 0 [2]. Hence for at least one man m * in S, M o p t ( m * ) = M 0 ( m * ) .
Putting these observations together, we have the following Algorithm 3. Let X be the set of men in a given instance.
Note that the operation of line 6 includes the case of leaving m i ’s preference list unchanged. Therefore at least one execution of Algorithm 3, i.e., an execution for which m * in the above discussion is selected in line 2 as m and the rest of the 1 men in S are selected in line 4, creates I ˜ in Lemma 4.2 and hence finds an optimal solution. The overall running time of Algorithm 3 is O ( n 2 + n · n 1 k 1 · n k 1 · n 2 ) = O ( n 2 k + 1 ) .
Theorem 4.3 
MMI(k) can be solved in O ( n 2 k + 1 ) time.
Algorithm 3:
  1: Find the man-optimal stable matching M0 of I.
  2: for each man m do
  3:  Moving M0(m) to the top of m’s list.
  4:  for each choice of k ‒ 1 men (m1, … , mk‒1) from X ‒ {m} do
  5:   for each combination of k ‒ 1 women (w1, … , wk‒1) such that each wi is M0(mi) or precedes M0(mi) in mi’s list of I do
  6:    Move wi to the top of mi’s preference list.
  7:   end for
  8:   Apply GS to the current instance and find its man-optimal stable matching.
  9:  end for
10: end for
11: Output the instance that minimizes the man-optimal score.

4.3. Decision Variant

A straightforward extension of Section 3.2 and Section 4.2 is as follows. We first find the man-optimal stable matching M 0 and construct the reduced list R L I , M 0 and the rotation digraph D I , M 0 using O ( n 2 ) time. For each of the O ( n 2 k 1 ) possible modifications of preference lists, we modify D I , M 0 in time O ( k n ) and check if the resulting graph contains a directed cycle in time O ( n ) . If at least one execution creates a directed cycle, then the answer is “yes”, otherwise “no”. This results in the time complexity of O ( n 2 + n 2 k 1 ( k n + n ) ) = O ( k n 2 k ) .
We can reduce the search space significantly using the following idea. Suppose that input I is a “yes”-instance of PMI(k), and let I o p t be its optimal solution (when I is viewed as an MMI(k) instance). Let S ( | S | k ) be the set of men whose preference lists are modified in I o p t . From the discussion in Section 4.2, we can assume that in the preference list of one man m * , M 0 ( m * ) is moved to the top in I o p t , and in the preference list of other men m ( S { m * } ) , M 0 ( m ) or a woman preceding M 0 ( m ) is moved to the top. Clearly, the rotation digraph D I o p t , M 0 must contain a directed cycle. Now, define S ( S ) as S = { m | M 0 ( m ) is moved to the top of m’s list in I o p t } and consider the instance I ¯ constructed from I by moving M 0 ( m ) to the top of m’s list for each m S (and leaving m’s preference list for each m S unchanged). By the construction of reduced lists and rotation digraphs, it is not hard to see that D I ¯ , M 0 is identical to D I o p t , M 0 and hence D I ¯ , M 0 contains a directed cycle. (This can be seen as follows: If a man m is in S or not in S, then m’s preference list is the same in I o p t and I ¯ . If a man m is in S S , then the set of women preceding M 0 ( m ) in m’s preference list is the same in I o p t and I ¯ .) Therefore, it suffices, for each combination of choosing i ( k ) men, to move their man-optimal partners to the top of the lists, to modify the rotation digraph accordingly in O ( i n ) time, and to check if the resulting digraph contains a directed cycle in O ( n ) time. The overall time complexity is
O ( n 2 + i = 1 k ( n i ( i n + n ) ) ) = O ( i = 1 k n ! ( n i ) ! i ! · i n ) = O ( i = 1 k ( n 1 i 1 n 2 ) ) = O ( n k + 1 ) .
Theorem 4.4 
PMI(k) can be solved in O ( n k + 1 ) time.

5. Changing n Men’s Preference Lists

In this section, we show that MMI(k) and PMI(k) become easy if we are allowed to change any number of men’s preference lists. We first consider the optimization variant. Consider an instance I and its man-optimal stable matching M 0 . By the requirement of the problem, in a new matching each man m should be matched with the woman M 0 ( m ) or a woman preceding M 0 ( m ) in m’s list in I; in other words, each man should be matched with a woman on the reduced lists R L I , M 0 . Let M * be a minimum score perfect matching with this property. If we move M * ( m ) to the top of m’s list for each m, we are done because M * is clearly the man-optimal stable matching of the resulting instance.
It is easy to find M * : We construct the edge-weighted bipartite graph G = ( V , U , E ) where V and U are the sets of men and women respectively, and ( m , w ) E if and only if w appears on m’s reduced list in R L I , M 0 . The weight of ( m , w ) is the rank of w in m’s list in I, that is, r m ( w ) . We can obtain M * by finding a minimum cost perfect matching in G, which can be done in O ( n 2 . 5 log n ) time [6,7]. Since finding M 0 and constructing R L I , M 0 can be done in O ( n 2 ) time, the overall time complexity is O ( n 2 . 5 log n ) .
Theorem 5.1 
MMI(n) can be solved in O ( n 2 . 5 log n ) time.
As for the decision variant, we do not need to find a minimum cost perfect matching but it suffices to check if M 0 can be Pareto improved. We can do this by constructing the digraph G = ( V , A ) , where each vertex of G corresponds to a woman in a given instance I. For each man m, we include an arc from M 0 ( m ) to each woman preceding M 0 ( m ) in m’s preference list. It is not hard to see that M 0 can be Pareto improved if and only if G contains a directed cycle. As mentioned in the analysis of the time complexity of Algorithm 2 in Section 3.2, we can check whether G contains a directed cycle or not by a topological sorting algorithm in time linear in the size of G. Since the size of G is O ( n 2 ) , it is not hard to see that the overall time complexity is O ( n 2 ) .
Theorem 5.2 
PMI(n) can be solved in O ( n 2 ) time.

6. Conclusions

In this paper we considered the problem of changing at most k men’s preference lists to improve man-optimal stable matchings. We have proved that the problem is W[1]-hard with the parameter k. We also presented O ( n 2 k + 1 ) -time and O ( n k + 1 ) -time exact algorithms for the optimization and decision variants, respectively. Finally, we have presented O ( n 2 . 5 log n ) -time and O ( n 2 ) -time algorithms for the optimization and decision variants, respectively, when k = n . Since the problem is important when k is small, it is interesting future work to reduce the time complexity of MMI(1) from O ( n 3 ) to o ( n 3 ) . Another future work is to determine whether PMI(k) is NP-complete or not.

Acknowledgements

Kazuo Iwama is supported by JSPS KAKENHI Grant Number 22240001, and Shuichi Miyazaki is supported by JSPS KAKENHI Grant Number 20700009 and 24500013.

References

  1. Gale, D.; Shapley, L.S. College admissions and the stability of marriage. Am. Math. Mon. 1962, 69, 9–15. [Google Scholar] [CrossRef]
  2. Gusfield, D.; Irving, R.W. The Stable Marriage Problem: Structure and Algorithms; MIT Press: Boston, MA, USA, 1989. [Google Scholar]
  3. Huang, C.-C. Cheating by Men in the Gale-Shapley Stable Matching Algorithm. In Proceedings of the ESA 2006, Zurich, Switzerland, 11–13 September 2006; pp. 418–431.
  4. Bhaskara, A.; Charikar, M.; Chlamtac, E.; Feige, U.; Vijayaraghavan, A. Detecting High Log-densities–an O(n1/4) Approximation for Densest k-Subgraph. In Proceedings of the STOC 2010, Cambridge, USA, 5–8 June 2010; pp. 201–210.
  5. Komusiewicz, C.; Sorge, M. Finding dense subgraphs of sparse graphs. Proc. IPEC 2012 2012, 7535, 242–251. [Google Scholar]
  6. Burkard, R.; Dell’Amico, M.; Martello, S. Assignment Problems; SIAM: Philadelphia, PA, USA, 2008. [Google Scholar]
  7. Gabow, H.N.; Tarjan, R.E. Faster scaling algorithms for network problems. SIAM J. Comput. 1989, 18, 1013–1036. [Google Scholar] [CrossRef]

Share and Cite

MDPI and ACS Style

Inoshita, T.; Irving, R.W.; Iwama, K.; Miyazaki, S.; Nagase, T. Improving Man-Optimal Stable Matchings by Minimum Change of Preference Lists. Algorithms 2013, 6, 371-382. https://doi.org/10.3390/a6020371

AMA Style

Inoshita T, Irving RW, Iwama K, Miyazaki S, Nagase T. Improving Man-Optimal Stable Matchings by Minimum Change of Preference Lists. Algorithms. 2013; 6(2):371-382. https://doi.org/10.3390/a6020371

Chicago/Turabian Style

Inoshita, Takao, Robert W. Irving, Kazuo Iwama, Shuichi Miyazaki, and Takashi Nagase. 2013. "Improving Man-Optimal Stable Matchings by Minimum Change of Preference Lists" Algorithms 6, no. 2: 371-382. https://doi.org/10.3390/a6020371

APA Style

Inoshita, T., Irving, R. W., Iwama, K., Miyazaki, S., & Nagase, T. (2013). Improving Man-Optimal Stable Matchings by Minimum Change of Preference Lists. Algorithms, 6(2), 371-382. https://doi.org/10.3390/a6020371

Article Metrics

Back to TopTop