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 -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 (D
kS) [
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 D
kS is W[1]-hard with parameter
k [
5]. We give an FPT-reduction from D
kS to MMI(
k).
Given an instance
of D
kS, we construct an instance
of MMI(
k) as follows. First, we let
. Next, we construct
I from
. For each vertex
, we construct a man
and a woman
. For each edge
, we construct two men
and
and two women
and
. For a vertex
, let
be the set of edges incident to
and
be the set of women
corresponding to
. Each person’s preference list is constructed as follows, where
is an arbitrarily ordered list of women in
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: wi,j … | ((i, j) ∈ E) | wi,j: mi,j mi mj … | ((i, j) ∈ E) |
: wi,j … | ((i, j) ∈ E) | : mi, j … | ((i,j) ∈ E) |
It is not hard to see that the man-optimal stable matching of I consists of pairs for and and for . 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 . Hence these are the woman-oriented reduced lists with respect to I and , i.e., .
Clearly, the reduction can be performed in time polynomial in . To complete the proof, we show that G has an induced subgraph with vertices and at least s edges if and only if there is a proper -neighbor of I such that . Since , in the following we use k to denote and just for simplicity. First, suppose that G has an induced subgraph with k vertices and at least s edges, and let be the set of those k vertices. Then, for each , we modify ’s preference list by moving his man-optimal partner to the top of the list, and let be the resulting instance. We will show that, by doing this, and ’s scores in the man-optimal stable matching of are decreased by one respectively, if and . Since there are at least s such edges, the score is decreased by at least in total.
Recall that ’s reduced list in is “ ”. Since and and ’s preference lists are modified as mentioned above, ’s reduced list in becomes “ ”, i.e., . Note that ’s reduced list “ ” is unchanged. Then we have a directed cycle of length two in and if we eliminate this rotation, the scores of and 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 of I such that and let be the man-optimal stable matching of . First, note that in , each man is matched with a woman on the reduced lists because by the condition of the problem, no man can be worse off in than in . Since is a perfect matching, we know that for each i () and either “ and ” or “ and ” for each . Therefore, only the case of “ and ”, the scores of and will each be decreased by one. This can happen only when becomes , that is, and are removed from ’s reduced list. This implies that precedes in ’s reduced list and precedes in ’s reduced list. Therefore, both and ’s lists are modified in . Since , there are at least s such pairs . Let S be the set of vertices such that ’s preference list is modified in constructing . Then 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
-time algorithm since there are
combinations of selecting
k men and for each of them, we run GS whose time complexity is
. 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 . Man-optimal partners are underlined. An optimal solution is obtained by moving and to the top in ’s and ’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 . Man-optimal partners are underlined. An optimal solution is obtained by moving and to the top in ’s and ’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.
Lemma 4.2 For an instance I, let be an optimal solution and be the man-optimal stable matching of . Let S () be the set of men whose preference lists are modified in . Let be the instance obtained from I by moving to the top of m’s list for each . Then is stable, and in fact man-optimal stable, for .
Proof. Suppose that has a blocking pair in . Each cannot be a part of a blocking pair because lies at the top of m’s list. But men not in S and all the women have the same preference list in and , so if is a blocking pair for in , then is also a blocking pair for in , a contradiction. Hence is stable for . ☐
Now suppose that is not man-optimal for and let be the man-optimal stable matching for . Since matches every man in S to his top choice in , so does . Thus some of the men not in S (whose preference lists are the same in I and ) obtain better partners in than in . This means that , which contradicts the optimality of .
By the definition of the problem, each man is matched in
to the woman
or a woman preceding
. 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,
or a woman preceding
to the top. Furthermore, we know that there is no stable matching for
in which
every man in
S is matched to a woman strictly better than his man-optimal partner in
[
2]. Hence for at least one man
in
S,
.
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 ’s preference list unchanged. Therefore at least one execution of Algorithm 3, i.e., an execution for which in the above discussion is selected in line 2 as m and the rest of the men in S are selected in line 4, creates in Lemma 4.2 and hence finds an optimal solution. The overall running time of Algorithm 3 is .
Theorem 4.3 MMI(k) can be solved in 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
and construct the reduced list
and the rotation digraph
using
time. For each of the
possible modifications of preference lists, we modify
in time
and check if the resulting graph contains a directed cycle in time
. If at least one execution creates a directed cycle, then the answer is “yes”, otherwise “no”. This results in the time complexity of
.
We can reduce the search space significantly using the following idea. Suppose that input
I is a “yes”-instance of PMI(
k), and let
be its optimal solution (when
I is viewed as an MMI(
k) instance). Let
S (
) be the set of men whose preference lists are modified in
. From the discussion in
Section 4.2, we can assume that in the preference list of one man
,
is moved to the top in
, and in the preference list of other men
,
or a woman preceding
is moved to the top. Clearly, the rotation digraph
must contain a directed cycle. Now, define
as
is moved to the top of
m’s list in
and consider the instance
constructed from
I by moving
to the top of
m’s list for each
(and leaving
m’s preference list for each
unchanged). By the construction of reduced lists and rotation digraphs, it is not hard to see that
is identical to
and hence
contains a directed cycle. (This can be seen as follows: If a man
m is in
or not in
S, then
m’s preference list is the same in
and
. If a man
m is in
, then the
set of women preceding
in
m’s preference list is the same in
and
.) Therefore, it suffices, for each combination of choosing
men, to move their man-optimal partners to the top of the lists, to modify the rotation digraph accordingly in
time, and to check if the resulting digraph contains a directed cycle in
time. The overall time complexity is
Theorem 4.4 PMI(k) can be solved in time.