• Nem Talált Eredményt

Stable Assignment with Couples: Parameterized Complexity and Local Search

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Stable Assignment with Couples: Parameterized Complexity and Local Search"

Copied!
21
0
0

Teljes szövegt

(1)

Stable Assignment with Couples: Parameterized Complexity and Local Search

D´aniel Marx and Ildik´o Schlotter

Department of Computer Science and Information Theory, Budapest University of Technology and Economics,

H-1521 Budapest, Hungary.

{dmarx,ildi}@cs.bme.hu

Abstract. We study the Hospitals/Residents with Couples problem, a variant of the classical Stable Marriage problem. This is the extension of the Hospitals/Residents problem where residents are allowed to form pairs and submit joint rankings over hospitals. We use the framework of parameterized complexity, considering the number of couples as a param- eter. We also apply a local search approach, and examine the possibili- ties for giving FPT algorithms applicable in this context. Furthermore, we also investigate the matching problem containing couples that is the simplified version of the Hospitals/Residents problem modeling the case when no preferences are given.

1 Introduction

The classical Hospitals/Residents problem (which is a generalization of the well- known Stable Marriage problem) was introduced by Gale and Shapley [6] to model the following situation. We are given a set of hospitals, each having a number of open positions, and a set of residents applying for jobs in the hospitals.

Each resident has a ranking over the hospitals, and conversely, each hospital has a ranking over the residents. Our aim is to assign as many residents to a hospital as possible, with the restrictions that the capacities of the hospitals are not exceeded and the resulting assignment is stable (no hospital-resident pair would benefit from rejecting the assignment and contracting each other).

The original version of the Hospitals/Residents problem is well understood: a stable assignment always exists, and every stable assignment has the same size.

(The size of an assignment is the number of residents that have a job.) Moreover, the classical Gale-Shapley algorithm [6] can find a stable assignment in linear time. However, several practical applications motivate some kind of extension or modification of the problem (see e.g. the NRMP program for assigning medical residents in the USA [17, 18]), and in the recent decade various versions have been investigated. We study an extension of this problem, called Hospitals/Residents with Couples (or HRC), where residents may form couples, and thus have joint rankings over the hospitals. This extension models a situation that arises in many real world applications [18], and was introduced by Roth [17] who also discovered that a stable assignment need not exist when couples are involved.

(2)

Later, Ronn [16] proved that it is NP-hard to decide whether a stable assignment exists in such a setting. There have been investigations of different assumptions on the preferences of couples that guarantee some kind of tractability [10, 14].

Algorithmic approaches. In the Hospitals/Residents problem, practical scenarios usually involve much fewer couples than singles, e.g. the ratio of couples to singles participating in the NRMP program is around 2.5 percent1. Thus, the number of couples in the HRC problem is a natural parameter. Investigating the parameterized complexity of HRC with this parameter is our first goal.

Local search is a basic technique that has been widely applied in heuristics for practical optimization problems for several decades [1]. However, investiga- tions considering the connection of local search and parameterized algorithms have only been started a few years ago, and research in this area has been gain- ing increasing attention lately [12]. The basic idea of local search is to find an optimal solution by an iteration in which we improve the current solution step by step through local modifications. Local search can become more efficient if we can decide whether there exists a better solutionS0 that is`modification steps away from a given solutionS. Typically, the`-neighborhood of a solutionS can be explored in nO(`)time by examining all possibilities to find those parts of S that should be modified. (Here n is the input size.) The question whether an FPT algorithm with parameter`can be found for the neighborhood exploration problem has already been studied in connection with different optimization prob- lems ([9, 13, 4]). Our second goal is to investigate this approach for assignment problems.

We also contribute to the framework of parameterized local search algorithms by distinguishing between “strict” algorithms that perform the local search step in some neighborhood of a solution as described above, and “permissive” algo- rithms whose task is the following: given some problem with an initial solution S, find any better solution, provided that a better solution exists in the local neighborhood of S. Our motivation for this distinction is that finding an im- proved solution in the neighborhood of a given solution may be hard, even for problems where an optimal solution is easily found.

Most of the questions examined here are also worth studying in a simplified model that does not involve preferences. In the Maximum Matching with Couples problem, or shortly MMC, no stability requirement is given, and we aim for an assignment of maximum size.

Results.For lack of space, we stated some of our results without proof, see Appendix for these proofs. Our main results are outlined below (see Table 1).

We denote by C the set of couples in a problem instance, and we denote by` the neighborhood size in a given local search problem.

– Theorem 1 gives a randomized FPT algorithm with parameter|C|for Max- imum Matchig with Couples. The presented algorithm uses an FPT result from matroid theory.

– Theorem 3 shows that no permissive local search FPT algorithm exists for MMC, where the parameter is`, unless W[1] = FPT.

1 http://www.nrmp.org/data/resultsanddata2008.pdf

(3)

Task: Existence Maximum Local search algorithm

problem problem with FPT running time

Parameter: |C| ` (|C|, `)

MMC P randomized FPT No permissive alg. Permissive alg.

(no pref’s) (trivial) (Theorem 1) (Theorem 3) (Theorem 1) HRC W[1]-hard W[1]-hard No permissive alg. Strict alg.

(with pref’s) (Theorem 4) (Theorem 4) (Theorem 5) (Theorem 7)

Table 1.Summary of our results (assuming W[1]6= FPT).

– Theorem 4 proves that the existence version of the HRC problem is W[1]- hard with parameter|C|.

– Theorem 5 shows that no permissive local search FPT algorithm exists for the maximization version of HRC with parameter`, unless W[1] = FPT.

– Theorem 7 presents a strict local search FPT algorithm for the maximization version of HRC, with combined parameters|C| and `. The algorithm uses color coding and a set of non-trivial reduction rules.

2 Preliminaries

For some integerk, we use [k] ={1,2, . . . , k}, and [k]2

={(i, j)|1≤i < j≤k}.

If a matching M in a graph contains an edge xy, then we write M(x) = y and M(y) = x. For other graph theoretic concepts, we use standard notation.

We assume basic knowledge of matroid theory in Sect. 4. We also assume that the reader is familiar with the framework of parameterized complexity. For an introduction, see [15] or [5].

To formalize the task of a local search algorithm, let Qbe an optimization problem with an objective function T which we want to maximize. To define the concept of neighborhoods, we suppose there is somedistance d(x, y) defined for each pair (x, y) of solutions for some instance I of Q. A strict local search algorithm forQhas the following task:

Strict local search forQ

Input: (I, S0, `) whereI is an instance ofQ,S0is a solution forI, and`∈N. Task: If there exists a solutionS forI such thatd(S, S0)≤` andT(S)>

T(S0), then output such anS.

In contrast, apermissive local search algorithm forQis allowed to output a solution that is not close toS0, provided that it is better thanS0. In local search methods, such an algorithm is as useful as its strict version.

(4)

Permissive local search for Q

Input: (I, S0, `) whereI is an instance ofQ,S0is a solution forI, and`∈N. Task: If there exists a solutionS forI such thatd(S, S0)≤` andT(S)>

T(S0), then outputany solutionS0 forI withT(S0)> T(S).

Note that if an optimal solution can be found by some algorithm, then this yields a permissive local search algorithm for the given problem. On the other hand, finding a strict local search algorithm might be hard even if an optimal solution is easily found. An example for such a case is the Minimum Vertex Cover problem for bipartite graphs [9]. Besides, proving that no permissive local search algorithm exists for some problem is clearly harder than it is for strict local search algorithms. We also present results of this kind.

3 Hospitals/Resident with Couples

Acouples’ market with preference, or shortlycmp, consists of the setsS, CandH representing singles, couples and hospitals, respectively, acapacityf(h) for each h∈H, and apreference listL(a) for eacha∈S∪C∪H. The setA=S∪C∪H is called the set of agents. Each couplec is a pair (c(1), c(2)), and we call the elements of the setR=S

c∈C{c(1), c(2)} ∪S residents. For a hospitalh,L(h) is a list of residents, for a singles,L(s) is a list of hospitals, and for a couplec,L(c) is a list containing pairs of hospitals, or more precisely, a list containing elements from (H ∪ {u})×(H ∪ {u})\ {(u, u)} where u is a special symbol indicating that someone is unemployed. The preference lists can be incomplete, but cannot involve ties, so these lists are strictly ordered.

The set of elements appearing in the listL(a) isAL(a), and somex is con- sideredacceptable foraifx∈AL(a). Clearly, we may assume that acceptance is mutual, soh∈AL(s) holds if and only ifs∈AL(h) for eachs∈S andh∈H, and (h1, h2) ∈ AL(c) implies c(i) ∈ AL(hi) or hi = ufor both i ∈ {1,2}, for eachc ∈C. For somex ∈AL(a), the rank of x w.r.t. a, denoted byρ(a, x), is r∈Nifxis ther-th element inL(a). Ifx /∈AL(a), then we letρ(a, x) =∞for all meaningful x. We say that the cmp isf0-uniform iff ≡f0for some f0∈N. Anassignment is a functionM:R→H∪ {u}such thatM(s)∈AL(s)∪ {u}

for each s ∈ S, M(c) ∈ AL(c)∪ {(u, u)} for each c ∈ C, and|M(h)| ≤ f(h) holds for each hospital h. Here,M(c) denotes the pair (M(c(1)), M(c(2))), and M(h) ={r|r∈R, M(r) =h}is the set of residents assigned tohin M. We say that an assignmentM covers a residentr ifM(r)6=u, andM covers a couple c, if it coversc(1) or c(2). We define the size of M, denoted by |M|, to be the number of residents covered by M. The distance d(M, M0) of two assignments M andM0 is the number of residentsrfor whichM(r)6=M0(r).

We say thatx isbeneficial for the agentawith respect to an assignmentM ifx∈AL(a) and one of the following cases holds: (1)a∈S∪C and eitherais not covered by M orρ(a, x)< ρ(a, M(a)), (2)a∈H and either|M(a)|< f(a) or there exists a residentr0∈M(a) such thatρ(a, x)< ρ(a, r0). Ablocking pair forM can be of three types:

(5)

– it is either a pair formed by a singlesand a hospitalhsuch that bothsand hare beneficial for each other w.r.t.M,

– or a pair formed by a couplec and a pair (h1, h2) with h1 6=h2 such that (h1, h2) is beneficial forc w.r.t. M, and for both i∈ {1,2}it holds that if hi6=uthen eitherc(i) is beneficial forhi w.r.t.M orc(i)∈M(hi),

– or a pair formed by a couplecand a hospitalhsuch that (h, h) is beneficial forcw.r.t. M, andthe couple c is beneficial forh. If hprefersc(1) toc(2), this latter means that either |M(h)| ≤ f(h)−2, or |M(h)| ≤ f(h)−1 and ρ(h, c(1)) < ρ(h, r) for some r ∈ M(h), or ρ(h, c(1)) < ρ(h, r1) and ρ(h, c(2))< ρ(h, r2) for somer16=r2 inM(h).2

An assignmentM forI isstable if there is no blocking pair forM.

The input of theHospitals/Residents with Couplesproblem is a cmp I, and the task is to determine a stable assignment forI, if such an assignment exists. If no couples are involved, then a stable assignment can always be found in linear time with the Gale-Shapley algorithm [6]. In the case when couples are present, a stable assignment may not exist, as first proved by Roth [17].

Ronn proved that deciding whether a stable assignment exists for a cmp is NP- complete [16]. Moreover, an instance of theHospitals/Residents with Cou- plesproblem may admit stable assignments of different sizes, see the Appendix for an example. In the optimization problemMaximum Hospitals/Residents with Couples, the task is to determine a stable assignment of maximum size for a given cmp. This problem is trivially NP-hard, as it contains the Hospi- tals/Residents with Couplesproblem. We study these problems in Sect. 5.

We also study a version of theHospitals/Residents with Couplesprob- lem that does not contain preferences and only deals with the notion of accept- ability. To describe the input of this problem, we define a couples’ market with acceptance, or shortly cma, as a quintuple (S, C, H, f, A) where S, C, H and f are defined analogously as in a cmp, butA(a) defines only the set of acceptable elements for an agent a, without any ordering. Each concept described above that does not rely on the preference lists (and thus on stability) is inherited also for cmas in the straightforward way. In Sect. 4, we investigate the optimization problemMaximum Matching with Couples, where given a cmaI, the task is to find an assignment forI of maximum size.

4 Matching without preferences

First, we investigate a slightly modified version of Maximum Matching with Couples, denoted as (k, n)-Matching with Couples: given a cmaI and two integers k and n, find an assignment for I that covers at least k couples and nsingles, if possible. Such an assignment is called a (k, n)-assignment. Clearly, if there are no couples in a given instance, then the problem is equivalent to finding a maximum matching in a bipartite graph, and can be solved by standard techniques. If couples are involved, the problem becomes hard. More precisely,

2 We thank David Manlove for pointing out this case.

(6)

the decision version of this problem is NP-complete [8, 3], even in the following special case: each hospital has capacity 2, and the acceptable hospital pairs for a couple are always of the form (h, h) for someh∈H. However, if the number of couples is small, which is a reasonable assumption in many practical applications, (k, n)-Matching with Couplesbecomes tractable, as shown by Theorem 1.

Theorem 1. (k, n)-Matching with Couples can be solved in randomized FPT time with parameter |C|.

To prove Theorem 1, we need a variant of a result from [11] concerning matroids.

Theorem 2. LetM(U,I)be a linear matroid and letX ={X1, X2, . . . Xn}be a collection of subsets of U, each of size b. Given a linear representation A of M, it can be determined in f(k, b)· ||A||O(1) randomized time whether there is an independent set that is the union of kdisjoint sets in X.

Proof (of Theorem 1). Let (S, C, H, f, A) be the cma for which we have to find a (k, n)-assignment. W.l.o.g. we can assume that each hospital has capacity 1 as otherwise we can “clone” the hospitals, i.e. for each h∈H we can substituteh with the newly introduced hospitals h1, . . . , hf(h), also modifying A(p) for each p∈S∪C appropriately. (As f(h)≤ |S|+ 2|C| can be assumed, this increases the input size only polynomially.) Note that the casek <|C| can be solved by finding a (k, n)-assignment for (S, C0, H, f, A0) for everyC0⊆C where|C0|=k andA0 is the restriction ofAonS∪C0. As this increases the running time only with a factor of at most 2|C|, it is sufficient to give an FPT algorithm for the case|C|=k. Moreover, we can assumeA(c)⊆H×H, since for eachc∈Cwe can eliminate each pair of the form (h, u) or (u, h) (h∈H) inA(c) by adding a new hospitaluc toH with capacity 1 and substitutinguwithuc.

Now, letG(H, S;E) be the bipartite graph where a singles∈Sis connected with a hospital h∈ H if and only if h∈A(s). We can assume w.l.o.g. that G has a matching of size at least n as otherwise no solution may exist, and this case can be detected easily in polynomial time. We define M(H,I) to be the matroid where a setX ⊆H is independent if and only if there is a matching in Gthat covers at leastnsingles but covers no hospitals fromX. Observe thatM is exactly the dual of then-truncation of the transversal matroid ofG, and thus it is indeed a matroid. By a lemma in [11], we can find a linear representation AofMin randomized polynomial time.

We define the matroid M0(U,I0) with ground set U = H ∪C such that X ⊆U is independent inM0ifX∩H is independent inM. A representation of M0 can be obtained by taking the direct sum of the matricesA andEk where Ek is the unit matrix of sizek×k. LetX be the collection of the sets that are of the form{c, h1, h2}where c∈C and (h1, h2)∈A(c).

Observe that ifX1, X2, . . . , Xk arekdisjoint sets in X whose union is inde- pendent in M0, then we can construct a (k, n)-assignment as follows. For each {c, h1, h2} ∈ {X1, . . . , Xk}we chooseM(c) from {(h1, h2),(h2, h1)} ∩A(c) ar- bitrarily. The disjointness of the sets X1, . . . , Xk guarantees that this way we

(7)

assign exactly one resident to each hospital inX =S

i∈[k]Xi∩H. Now, letN be a matching inGthat covers at leastnsingles, but no hospitals fromX. Such a matching exists, as X is independent in M. Thus letting M(s) to be N(s) if sis covered by N and u otherwise for eachs∈ S yields that M is a (k, n)- assignment. Conversely, ifM is a (k, n)-assignment then the sets{c, h1, h2}for eachc∈C andM(c) = (h1, h2) form a collection ofk disjoint sets inX whose union is independent in M0. By Theorem 2, such a collection can be found in randomized FPT time whenkis the parameter, yielding a solution if exists. ut

We remark that Theorem 1 also applies to the following cases.

– Markets containing groups of fixed size instead of couples.

– Maximization (or minimization) of an arbitrary function f(k, n), where k andnare the number of covered couples and singles, respectively.

– Minimizing the makespan in the scheduling problem containing parallel ma- chines and independent jobs with job assignment restrictions, if the process- ing time isp∈Nforkjobs, and 1 for the others, andkis the parameter.

Considering the parameterized complexity of the local search approach for the MMC problem with parameter`denoting the neighborhood size, Theorem 3 shows that no FPT local search algorithm is likely to exists. We omit the proof.

Theorem 3. No permissive local search algorithm for 2-uniform Maximum Matching with Couplesruns in FPT time with parameter`, if W[1]6=FPT.

5 Matching with preferences

In this section, we investigate several versions of the Hospitals/Residents prob- lem, where couples are involved and preferences play an important role.

After presenting some hardness results, Theorem 7 gives an FPT time strict local search algorithm for the Maximum Hospitals/Residents with Cou- ples problem, where |C| and ` are parameters. In contrast, Theorem 4 shows the W[1]-hardness of theHospitals/Residents with Couplesproblem with parameter |C|, which clearly implies that Maximum Hospitals/Residents with Couplesis also W[1]-hard with parameter|C|.

However, supposing that a stable assignment has already been determined by some method, it is a valid question whether we can increase its size. We will denote this problem Increase Hospitals/Residents with Couples. For- mally, its input is a cmp I and a stable assignment M0 for I, and the task is to find a stable assignment with size at least |M0|+1. If no couples are in- volved, then all stable assignments for the instance have the same size, so this problem is trivially polynomial-time solvable. Theorem 4 shows that Increase Hospitals/Residents with Couplesis also W[1]-hard with parameter|C|.

Theorem 4. (1) The decision version of Hospitals/Residents with Cou- ples is W[1]-hard with parameter|C|, even in the 1-uniform case.

(2) The decision version of Increase Hospitals/Residents with Couples is W[1]-hard with parameter |C|, even in the 1-uniform case.

(8)

Considering the applicability of the local search approach for theMaximum Hospitals/Residents with Couplesproblem, Theorem 5 shows that no per- missive local search algorithm is likely to run in FPT time with parameter `.

However, if we regard|C|as a parameter as well, then even a strict local search algorithm with FPT running time can be given, as presented in Theorem 7.

Theorem 5. No permissive local search algorithm for the 1-uniformMaximum Hospitals/Residents with Couplesruns in FPT time with parameter `, if W[1] 6=FPT.

To prove Theorems 4 and 5, we give FPT-reductions from the parameterized Clique problem, both reductions relying on the same idea. Although we omit the proofs, we describe the key structure used, whose main properties are stated in Lemma 6. For a graph G and some k ∈ N, we introduce a cmp IG,k = (S, C, H, f, L) as follows (see Fig. 1).

LetV(G) ={vi|i∈[n]}, |E(G)|=mand let ν be a bijection from [m] into the set{(x, y)|vxvy∈E(G), x < y}. First, we construct anode-gadgetGifor each i ∈[k] and an edge-gadget Gi,j for each pair (i, j)∈ [k]2

. The node-gadgetGi contains hospitalsHi∪Gi∪ {fi}, singlesSi∪Tiand a coupleai. Analogously, the edge-gadget Gi,j contains hospitals Hi,j∪Gi,j∪ {fi,j}, singles Si,j∪Ti,j and a couple ai,j. Here Ti = {tij|j ∈ [n−1]} and Ti,j = {ti,je |e ∈ [m−1]}, Hi={hij|j ∈[n]}andHi,j ={hi,je |e∈[m]}, and we define Gi, Si andGi,j, Si,j similarly toHi andHi,j. Observe that|C|=k+ k2

.

We let f ≡ 1, so IG,k is 1-uniform. The precedence lists for each agent in IG,k are defined below. The notation [X] for some set X in a preference list denotes an arbitrary ordering of the elements of X. We write Qix for the set {si,je |i < j≤k,∃y:ν(e) = (x, y)} ∪ {sj,ie |1≤j < i,∃y:ν(e) = (y, x)}andQi,je for {hix, hjy}whereν(e) = (x, y). The indices in the precedence lists take all possible values if not stated otherwise, and the symbolαcan be any index in [k] or a pair of indices in [k]2

. Ifαtakes a value in [k] thenN(α) =n, otherwiseN(α) =m.

L(gαx) :tαx−1, aα(2), tαx if 1< x < N(α) L(hix) :ai(1),[Qix], six L(gα1) :aα(2), tα1 L(hi,je ) :ai,j(1), si,je L(gαN(α)) :tαN(α)−1, aα(2), aα(1) L(six) :hix, fi

L(tαx) :gαx, gαx+1 L(si,je ) :hi,je ,[Qi,je ], fi,j L(fα) :sα1, sα2, . . . , sαN(α), aα(2)

L(aα) : (gN(α)α , fα),(hα1, gαN(α)),(hα2, gN(α)−1α ), . . . ,(hαN(α), gα1)

Lemma 6. For a graph Gandk∈N, IG,k has a stable assignment M0G,k that covers each resident. Moreover, statements (1), (2), and (3) are equivalent:

(1) There is a clique inGof size k.

(2) There is a stable assignment M for IG,k with the following property, which we will call propertyπ: M(fi,j)⊆Si,j for each(i, j)∈ [k]2

.

(3) There is a stable assignment forIG,k with propertyπ covering each resident.

(9)

PSfrag replacements

Gi,j Gi Si Hi Gi Ti

ai fi

Gi,j

Hi,j Ti,j

Si,j

ai,j fi,j

1

1 1 1 1

1 1

1 1 1

1 1

1 1 1

1 1

1 1

1

1 1

1

1

2

2 2

2

2 2 2

2 2 2

2 2

2 2

2 2

2

2

3

3 3

3

4

4 4

n m

n+1 m+1

di1 di2

din

Fig. 1.A node- and an edge-gadget ofIG,k. Hospitals, singles, and couples are repre- sented by rectangles, black, and double circles, resp. We connecth∈H andr∈R if r∈AL(h). Numbers show ranks, bold edges representM0G,k, anddix=|Qix|+ 2.

Proof. To see the first claim, we define an assignmentM0 by letting M0(aα) = (gN(α)α , fα),M0(tαx) = gxα, and M0(sαx) = hαx for all possibleα and x. As each resident is assigned to his best choice,M0 is stable and covers each resident.

To prove (2)⇒(1), suppose thatIG,khas a stable assignmentMwith prop- ertyπ. Let us define σ(i, j) for each (i, j)∈ [k]2

such thatM(fi,j) ={si,jσ(i,j)}.

Since si,jσ(i,j) prefers hi,jσ(i,j) to fi,j, the stability of M implies M(hi,jσ(i,j)) = {ai,j(1)}. From this, we get that M(si,je ) = hi,je must hold for each e ∈ [m]\ {σ(i, j)}as otherwise (si,je , hi,je ) would be a blocking pair. Note that each single inSi,jis assigned to a hospital inHi,j∪{fi,j}. As this holds for each (i, j)∈ [k]2

, we get thatM(hix)⊆Si∪ {ai(1)}holds for eachi∈[k], x∈[n].

Letν(σ(i, j)) = (x, y) for some (i, j)∈ [k]2

. Sincesi,jσ(i,j)prefers the hospitals inQi,jσ(i,j)={hix, hjy}tofi,j,Mcan only be stable if bothhixandhjy prefer their partner in M to si,jσ(i,j). This implies M(hix) = {ai(1)}and M(hjy) = {aj(1)}.

Thus, by defining σ(i) to be x if M(ai) = (hix, gin+1−x) for each i ∈ [k], we obtainν(σ(i, j)) = (σ(i), σ(j)). From the definition of ν, this implies that vσ(i)

and vσ(j) are adjacent in G. As this holds for every (i, j) ∈ [k]2

, we get that {vσ(i)|i∈[k]}is a clique inG.

Now we prove (1) ⇒ (3). If vσ(1), vσ(2), . . . , vσ(k) form a clique in G, then define σ(i, j) such that σ(i, j) =ν−1(σ(i), σ(j)). We define a stable assignment M fulfilling propertyπ and covering every resident as follows.

M(aα) = (hασ(α), gN(α)+1−σ(α)i ) M(tαx) =gxα ifx∈[N(α)−σ(α)]

M(sασ(α)) =fα M(tαx) =gx+1α otherwise M(sαx) =hαx ifx∈[N(α)]\ {σ(α)}

The stability ofM can be verified by simply checking all possibilities to find a blocking pair. (We note that many agents are only contained inIG,k to assure that M is indeed stable.) As (3)⇒(2) is trivial, this finishes the proof. ut Theorem 7. There is an FPT time strict local search algorithm for Maximum Hospitals/Residents with Couples with combined parameter(`,|C|).

(10)

PSfrag replacements

1 1

1 1

1 1 1

1 1

1+22 +22 22+ 22+ 2− +

Fig. 2. A possible component of Gδ. Winners and losers are marked by ’+’ and ’−’

signs, respectively. Bold edges representM0, normal edges representM.

Proof. LetI = (S, C, H, f, L) be given with the stable assignmentM0 and the integer `. Although the case f ≡1 is different from the general case in many aspects, the trick of cloning the hospitals is applicable in our case (see the Ap- pendix). Therefore, w.l.o.g. we may assumef ≡1. Thus, ifM(r) =hfor some r∈R, then we will writeM(h) =rinstead ofM(h) ={r}.

Before describing the strict local search algorithm for Maximum Hospi- tals/Residents with Couples, we introduce some notation to capture the structure of the solution. The bipartite graph G underlying I has vertex set H∪Rand edge setE={hr|h∈H, r∈AL(h)}. Clearly, an assignmentMforI determines a matchingE(M) inGin the natural way:hr∈E(M) if and only if M(r) =hfor some residentrand hospitalh. Suppose thatM is a closest solu- tion, i.e. a stable assignment forI with|M|>|M0|andd(M, M0)≤`that is the closest toM0among all such assignments. LetAδ ={a∈R∪H|M(a)6=M0(a)}, andEδ be the symmetric difference of E(M0) andE(M). Note thatEδ covers exactly the vertices of Aδ, andGδ = (Aδ, Eδ) is the union of paths and cycles which contain edges fromM0andM in an alternating manner. It is well-known that for a cmp not containing couples every stable assignment covers exactly the same agents [7]. Thus, it is easy to see that the stability ofMandM0imply that if a component ofGδ contains only single residents, then it must be a cycle. Let K0 denote the set of such cycles, andK1 the set of the remaining components ofGδ. We writeCδ for (R\S)∩Aδ, and we defineB(a) ={b|ais beneficial for b w.r.t. M0}for every a∈S∪H. We also let S+ ={s∈S|M(s) is beneficial for s w.r.t. M0}, and S = {s ∈ S|M0(s) is beneficial for s w.r.t. M}. Note that S+∪S = S ∩Aδ. We define H+ and H analogously. We call agents in A+ =S+∪H+ winners and agents in A =S∪H losers. For a simple illustration see Fig. 2.

Now, we describe an algorithm that finds vertices of Aδ. The algorithm first branches on guessing |Aδ| and a copy ¯G of the graph Gδ. Let ϕ denote an isomorphism from ¯G to Gδ. The algorithm also guesses the vertex sets ϕ−1(Cδ), ϕ−1(H+), ϕ−1(H), ϕ−1(S+), ϕ−1(S), and edge sets ¯EM0 and ¯EM

denotingϕ−1(E(M0)∩Eδ) andϕ−1(E(M)∩Eδ), respectively. Since|Aδ| ≤2`, it can be achieved by careful implementation that the algorithm branches into at most (2`)·62`directions in this phase. Now, letΓ be an ordering ofV( ¯G), i.e. a bi- jection fromV( ¯G) to [|Aδ|]. The algorithm colors the vertices ofGwith|Aδ| ≤2`

colors randomly with uniform and independent distribution, γ(a) denotes the color of a. The coloring γ is nice, if γ(ϕ(a)) = Γ(a) for each a ∈ V( ¯G). We suppose thatγ is nice, which clearly holds with probability|Aδ|−|Aδ|≥(2`)−2`. Given a coloring, the algorithm grows a subset X ⊆ V( ¯G) on which ϕ is already known. It applies the following extension rules repeatedly (see Fig. 3),

(11)

PSfrag replacements

1

1 2

2 3

3

− −

+ +

+

+ +

+

+

+ x

y ϕ(x)

ϕ(x) ϕ(y) ϕ(y)

h ϕ(rc)

h1

h2

c(1) c(1) c(2) c(2) ϕ(X)

ϕ( ¯X)

(R1) (R2) (R3)

(R4) (R5)

(R6)

Fig. 3.Subgraphs ofGδillustrating the rules of Theorem 7. Agents ofϕ(X) are shown in a rectangular box. Bold edges represent ¯EM0, normal edges represent ¯EM.

until none of them applies. When Rule 1 is applied, the algorithm branches into at most 2|C|branches, but no other branchings happen. We write ¯X =V( ¯G)\X. Rule 1 [guessing a member of a couple]: applicable ifrc∈X¯∩ϕ−1(Cδ).

In this case we simply branch on the vertices of (R\S)∩ {a|γ(a) = Γ(c)}to chooseϕ(rc). Note that this means at most 2|C|branches.

Rule 2 [finding pairs by M0]: applicable ifx ∈X, y∈X¯ and xy∈E¯M0

for somex andy. Byϕ(y) =M0(ϕ(x)), we can extendϕby addingy toX. Rule 3 [finding pairs byM for losers]: applicable ifx∈X∩ϕ−1(A), y∈X¯∩ϕ−1(A+) andxy∈E¯M for somexandy. Letybe the first element in the list L(ϕ(x)) contained in B(ϕ(x)) having colorΓ(y). We claimy =ϕ(y).

Clearly, ϕ(y) ∈ B(ϕ(x)) holds because ϕ(y) is a winner, and its color must be Γ(y) asγ is nice. Now, suppose for contradiction that y precedes ϕ(y) in L(ϕ(x)). Since the only vertex inAδ having colorΓ(y) isϕ(y), we getM(y) = M0(y) implying thaty andϕ(x) form a blocking pair forM. Thus,ϕ(y) =y can be found in linear time, so we can extendϕby addingyto X.

Rule 4 [finding pairs by M for couples with one winner hospital]:

applicable ifc(i)∈Cδ∩ϕ(X),y∈ϕ−1(H+)∩X¯,ϕ−1(c(i))y∈E¯M, andM(c(i0)) is already known for somec∈C,i6=i0 andy. W.l.o.g. we assumei= 1. Lethbe defined such that (h, M(c(2))) is the first element inL(c) for whichh∈B(c(1)) and h has color Γ(y). We claimϕ(y) = h. Observe that ϕ(y) ∈B(c(1)) must hold because ϕ(y) is a winner. Asγ is nice,ϕ(y) indeed has colorΓ(y). Thus, ifh6=ϕ(y) then (h, M(c(2))) precedes (ϕ(y), M(c(2))) inL(c), but this implies that the couple c and (h, M(c(2))) form a blocking pair forM. Therefore, we getϕ(y) =h, and we can extendϕin linear time by addingy toX.

Rule 5 [finding pairs byM for couples with two winner hospitals]:

applicable ifc(i)∈Cδ∩ϕ(X),yi∈ϕ−1(H+)∩X, and¯ ϕ−1(c(i))yi ∈E¯M holds for bothi∈ {1,2}, for somec∈C,y1andy2. We let (h1, h2) be the first element in L(c) such that hi∈B(c(i)) andγ(hi) =Γ(yi) for both i∈ {1,2}. Using the same arguments as in the previous case, we can showϕ(y1) =h1andϕ(y2) =h2. Thus, we can extendϕin linear time by adding bothy1 andy2 toX.

Rule 6 [dissolving a blocking pair]: applicable ifM(a)∈ϕ(X) if and only ifa∈ϕ(X) for all a∈Aδ, andxy is a blocking pair for the actual assignment MX. We defineMXby settingMX(a) =M0(a) ifa /∈ϕ(X) andMX(a) =M(a) ifa∈ϕ(X), for each agenta. Note that by our first condition,MX is indeed an

(12)

assignment. Now, asxycannot be a blocking pair forM orM0, eitherx∈ϕ(X) and y ∈Aδ \ϕ(X), or vice versa. W.l.o.g. we suppose the former. By defining

¯

y∈V( ¯G) such thatΓ(¯y) =γ(y), it can be seen thatϕ(¯y) =ymust hold because γ is nice. Thus,ϕcan be extended by adding ¯y toX.

Lemma 8. If none of the rules is applicable, thenϕ(X) =Aδ.

If no extension rule is applicable, then we can obtain the solution M by Lemma 8. Each step takes linear time, the number of steps is at most 2`, and the algorithm branches into at most (2`)62`(2|C|)` branches in total, thus the overall running time isO(`(72|C|)`|I|). The output is correct if the coloringγ is nice, which holds with probability at least (2`)−2`.3 ut

References

1. E. H. L. Aarts, J. K. Lenstra (Editors):Local Search in Combinatorial Optimiza- tion, Wiley, New York, 1997.

2. N. Alon, R. Yuster, U. Zwick: Color-coding.J. ACM, 42:844–856, 1995.

3. P. Bir´o, E. J. McDermid: Matching with couples is hard, but extra beds help.

Manuscript, 2009.

4. M. R. Fellows, F. V. Fomin, D. Lokshtanov, F. A. Rosamond, S. Saurabh, Y.

Villanger: Local search: Is brute-force avoidable?IJCAI 2009, 2009.

5. J. Flum, M. Grohe:Parameterized Complexity Theory, Springer, 2006.

6. D. Gale, L. S. Shapley: College admissions and the stability of marriage.American Mathematical Monthly, 69:9–15, 1962.

7. D. Gale, M. Sotomayor: Some remarks on the stable matching problem.Discrete Appl. Math.11:223–232, 1985.

8. C. A. Glass, H. Kellerer: Parallel machine scheduling with job assignment restric- tions.Naval Research Logistics54(3):250–257, 2007.

9. A. Krokhin, D. Marx: On the hardness of losing weight. ICALP 2008, LNCS 5125, 662–673, 2008.

10. B. Klaus, F. Klijn: Stable matchings and preferences of couples.J. Econ. Theory 121:75–106, 2005.

11. D. Marx: A parameterized view on matroid optimization problems.ICALP 2006, LNCS 4051, 656–667, 2006.

12. D. Marx: Local Search.Parameterized Complexity News, 3:7–8, 2008.

13. D. Marx: Searching thek-change neighborhood for TSP is W[1]-hard.Oper. Res.

Lett., 36(1):31–36, 2008.

14. E. J. McDermid, D. F. Manlove: Keeping partners together: Algorithmic results for the Hospitals/Residents problem with couples.To appear in J. of Comb. Opt.

15. R. Niedermeier: Invitation to Fixed-Parameter Algorithms. Oxford University Press, 2006.

16. E. Ronn: NP-Complete stable matching problems. J. Algorithms, 11:285–304, 1990.

17. A. E. Roth: The evolution of the labor market for medical interns and residents:

a case study in game theory.J. Polit. Econ., 92:991–1016, 1984.

18. A. E. Roth, M. Sotomayor: Two Sided Matching: A Study in Game-Theoretic Modelling and Analysis.Cambridge University Press, Cambridge, 1990.

3 To derandomize the algorithm, we can use the standard method of k-perfect hash functions [2], yielding a running time ofO(`O(`)|C|`|I|log|I|).

(13)

Appendix

A.1 HRC can admit stable assignments of different sizes

The following example by David Manlove shows that an instance of the Hos- pitals/Residents with Couples problem may admit stable assignments of different sizes. The example contains a singles, a couplec= (c1, c2) and hospitals h1andh2 withf(h1) = 2 andf(h2) = 1. The preferences are the following:

L(s) :h2, h1 L(h1) :s, c1, c2

L(c) : (h1, h1),(u, h2) L(h2) :c2, s

In this instance, assigningstoh1and cto (u, h2) yields a stable assignment of size 2, whilst assigningstoh2 andcto (h1, h1) results in a stable assignment of size 3.

A.2 Comments on the proof of Theorem 1

In Section 4, we stated Theorem 2 as a result in [11], to prove Theorem 1.

However, the result that appeared in [11] is the following.

Theorem 9 ([11]).LetM(U,I)be a linear matroid where the ground setU is partitioned into blocks of sizeb. Given a linear representationAof M, it can be determined inf(k, b)· ||A||O(1) randomized time whether there is an independent set that is the union of kblocks. (||A|| denotes the length of Ain the input.)

Using this result, Theorem 2 easily follows as a consequence.

Proof (of Theorem 2).First, let us maken(u) copies for eachu∈U, wheren(u) is the number of sets in X containingu, i.e. let U0 ={ui|u∈U, n(u)>0, i∈ [n(u)]}. Let M0(U0,I0) be the matroid whereI0 contains those sets which can be obtained from some set I ∈ I by replacing each u ∈ I with an arbitrary element from {ui|i∈[n(u)]}. A representation A0 ofM0 can be obtained from A by putting n(u) copies of the column representing uinto A0 for each u∈U. For eachi∈[n], letXi0⊆U0be obtained by replacing each elementuinXiwith uj ifXi is the j-th set inX containingu. Clearly, by lettingXi0 to be a block (having sizeb) for eachi∈[n], we get a partition ofU0.

The sets{Xij|j∈[k]}satisfy the requirements (being disjoint and having an independent union inM) if and only if the sets{Xi0j)|j∈[k]}arekblocks whose union is independent inM0, and thus the algorithm of Theorem 9 provides the

solution. ut

We remark that in the proof of Theorem 1 we also made use of the following lemma concerning matroid representations.

Lemma 10 ([11]). (1) Given a representation A over a field F of a matroid M, a representation of the dual matroid M overF can be found in polynomial time. (2) Given a representation Aover Nof a matroid Mand an integer k, a representation of thek-truncation ofMk can be found in randomized polynomial time. (3) Given a bipartite graph G(A, B;E), a representation of its transversal matroid over Ncan be constructed in randomized polynomial time.

(14)

A.3 Proof of Theorem 3

In most proofs that consider the local search version of a problem, the following definition is convenient. Given two assignmentsM andM0 for a cma or a cmp, we say thatM is`-close to M0 ifd(M, M0)≤`.

Proof (of Theorem 3). LetGbe the input graph for theCliqueproblem andk be the parameter given. We denote the vertices ofGbyv1, v2, . . . , vn. We claim that if there is a permissive local search algorithmAforMaximum Matching with Couplesrunning in FPT time with parameter`, then we can useAto solveCliquein FPT time. To prove this, we construct an inputΛ= (I, M0, `) of A with the following properties: every assignment for I with size at least

|M0|+ 1 is`-close toM0, and there is such an assignment forI if and only ifG has a clique of sizek. Thus,Ghas a clique of sizekif and only ifAoutputs an assignment forI with size at least|M0|+ 1.

To constructΛ, we first define the cmaI together with the assignmentM0

for it. Let the set H of hospitals be the union of D =B∪S{Hi,j|i, j ∈ [k]}, D0 =B0∪S{H0i,j|i, j∈[k]}andF ={fi|i∈[k]}, whereB={bi|i∈[2k−1]}, Hi,i = {hi,ij,j|j ∈ [n]} for each i ∈ [k], Hi,j = {hi,jx,y|vxvy ∈ E(G)} for each i 6= j,{i, j} ⊆ [k], and for each hospital h in B (Hi,j, respectively) we also define a hospitalh0 to be inB0(H0i,j, respectively). For brevity, we will use the notation Hz,•i,j ={h|∃y:h=hi,jz,y ∈Hi,j}and H•,zi,j ={h|∃x:h=hi,jx,z ∈Hi,j}.

The capacity of each hospital is 2. For each hospital h∈D we define a couple denoted by c(h), and for eachh0 ∈D0 we define two singles s1(h0) and s2(h0).

LetC={c(h)|h∈D}and letS={s0} ∪ {si(h0)|h0∈D0, i∈ {1,2}}.

Before defining A(p) for each p∈ S∪C, we define the assignment M0 for I, as this will not cause any confusion. Let M0(s0) = u, and let M0(p) = h where either h ∈ D and p is a member of the couple c(h), or h ∈ D0 and p ∈ {s1(h), s2(h)}. Now, for each p ∈ S∪C, we define the set of acceptable hospitals or pairs of hospitalsA(p) to be the union of{M0(p)}and the setA0(p) of hospitals, defined below, that can be assigned to pbesides M0(p). We define A0(p) for eachp∈S∪Cas follows.

A0(c(h)) ={(h0, h0)}for eachh∈D A0(s0) ={b1}

A0(s1(b0i)) =H1,ifor eachi∈[k]

A0(s2(b0i)) ={bi+1}for eachi∈[k]

A0(s1(b0k+i)) =Hi,1 for eachi∈[k−1]

A0(s2(b0k+i)) ={bk+i+1}for eachi∈[k−2]

A0(s2(b02k−1)) =Hk,1

A0(s1(h0i,jx,y)) =Hx,•i,j+1 for eachi∈[k], j∈[k−1] and every possiblexandy A0(s1(h0i,kx,y)) ={fi}for eachi∈[k] and every possiblex andy

A0(s2(h0i,jx,y)) =H•,yi+1,j for eachi∈[k−1], j∈[k] and every possiblexandy A0(s2(h0k,ix,y)) ={fi}for eachi∈[k] and every possiblex andy

This completes the definition of the cma I = (S, C, H, f, A). Observe that M0

indeed is an assignment for I. Finally, setting ` = 4k2+ 8k−3 finishes the definition of the instanceΛ= (I, M0, `). Figure 4 shows an illustration.

(15)

PSfrag replacements

b1

b01

bi

b0i

bk−1

b0k−1 bk

b0k

bk+1

b0k+1

bk+i

b0k+i

b2k−1

b02k−1

H1,1

H01,1 H1,i

H01,i H1,k

H01,k

Hi,1 H0i,1 Hk,1

H0k,1

Hk,1 H0k,1

Hi,i

H0i,i Hi,k

H0i,k

Hk,i

H0k,i Hk,k

H0k,k

f1

fi

fk−1

fk

Fig. 4.A block diagram showing the hospitals in the proof of Theorem 3. For two sets H1, H2 of hospitals, (H1, H2) is an arc ifA0(s)⊆H2 for somes∈SwithM0(s)∈H1.

First, suppose thatM is an assignment for I such that|M|>|M0|. We do not requireM to be (4k2+ 8k−3)-close toM0, but we will actually prove that this is necessary. Observe thatM0covers each resident except fors0, soM must cover all residents to satisfy|M|>|M0|. AsA(s0) ={b1},M must assigns0 to b1. This impliesM(c(b1)) = (b01, b01), and therefore we also haveM(s2(b01)) =b2, implyingM(c(b2)) = (b02, b02), and so on. Following this argument, it can be seen that M(c(bi)) = (b0i, b0i) for every i ∈[2k−1], and M(s2(b0i)) =bi+1 for every i∈[2k−2].

We say that a singlesentersHi,jifM(s)∈Hi,jbutM0(s)∈/Hi,j, andleaves H0i,j ifM0(s)∈H0i,j but M(s)∈/H0i,j. A couplecmoves from a hospitalhif M0(c) = (h, h)6=M(c), and we say thatcmoves from a setJ ⊆Hof hospitals if it moves from a hospital inJ. Observe that ifcmoves fromHi,j, then two singles leaveH0i,j, one of them enteringHi+1,j ifi6=k, and the other enteringHi,j+1if j6=k. If a singlesleavesH0i,j but does not enterHi+1,j orHi,j+1, thenM(s)∈ F must hold, and therefore there can exist at most 2k such singles. Moreover, if a set of msingles enter Hi,j then at least dm/2ecouples have to move from Hi,j. For eachi∈[k], exactly one single from{s1(b01), s1(b02), . . . , s1(b0k)}enters H1,i, and exactly one single from {s1(b0k+1), s1(b0k+2), . . . , s1(b02k−1), s2(b02k−1)}

entersHi,1. These altogether imply that exactly one couple moves fromHi,jfor eachi, j∈[k], and that if sand s0 enterHi,j thenM(s) =M(s0) must hold.

Suppose thatc moves from the hospital hi,jx,y. Observe that ifj < k then a couple must move fromHx,•i,j+1, and similarly, ifi < kthen a couple must move fromH•,yi+1,j. For eachi∈[k], lettingσh(i) to bexif for somej a couple moves fromHx,•i,j, andσv(i) to bey if for somej a couple moves fromH•,yj,i, we obtain that σh(i) andσv(i) are well-defined. Observe that by the definition ofHi,i we

(16)

getσh(i) =σv(i) :=σ(i), and from the definition ofHi,j we get that ifσ(i) =x and σ(j) =y for some i 6=j, then vxvy must be an edge in G. Thus, the set {vσ(i)|i∈[k]}forms a clique of sizekinG.

Remember that exactly one couple moves fromHi,j for eachi, j∈[k], which (considering also the size ofF) forces exactly two singles to leaveH0i,jfor each i, j∈[k]. Taking into account the couplesc(bi) and the singless1(b0i), s2(b0i) for each i ∈ [2k−1] and the single s0, we get that M is 4k2+ 4(2k−1) + 1 = (4k2+ 8k−3) =`-close toM0.

On the other hand, suppose vσ(1), vσ(2), . . . , vσ(k) form a clique in G. By definingM as below, it is straightforward to verify thatM is an assignment for (S, C, H, f, A) which covers every resident, and is`-close toM0.

M(c(bi)) = (b0i, b0i) for eachi∈[2k−1]

M(c(hi,jσ(i),σ(j))) = (h0i,jσ(i),σ(j), h0i,jσ(i),σ(j)) for eachi, j∈[k]

M(s0) =b1

M(s1(b0i)) =h1,iσ(1),σ(i)for eachi∈[k]

M(s1(b0k+i)) =hi,1σ(i),σ(1) for eachi∈[k−1]

M(s2(b02k−1)) =hk,1σ(k),σ(1)

M(s2(b0i)) =bi+1for eachi∈[2k−2]

M(s1(h0i,jσ(i),σ(j))) =hi,j+1σ(i),σ(j+1) for eachi∈[k], j∈[k−1]

M(s2(h0i,jσ(i),σ(j))) =hi+1,jσ(i+1),σ(j) for eachi∈[k−1], j∈[k]

M(s1(h0i,kσ(i),σ(k))) =fi for eachi∈[k]

M(s2(h0k,iσ(k),σ(i))) =fi for eachi∈[k]

M(p) =M0(p) for everyp∈S∪Cwhere M(p) was not defined above.

u t

A.4 Proofs of Theorem 4 and 5

In the proof of Theorem 4, we will use the following simple cmpI0= (S, C, H, f, L) having no stable assignments. Let H ={h1, h2, h3}, S =∅,C ={(a, b),(c, d)}

and f ≡ 1. The preference lists are defined below. It is easy to verify that no stable assignment exists for I0. For example, M(a) = h1, M(b) = h2 and M(c) =M(d) =uis not stable, because (c, d) and (h1, h3) form a blocking pair.

L((a, b)) : (h1, h2),(h2, h3),(h3, h1) L(h1) =L(h2) =L(h3) :c, a, b, d L((c, d)) : (h1, h3),(h2, h1),(h3, h2)

Proof (of Theorem 4). Let G be an arbitrary graph andk ∈N. We construct two 1-uniform cmpsI1andI2, together with a stable assignmentM2forI2such that the following three statements are equivalent:

(a) Ghas a clique of sizek, (b) I1 has a stable assignment,

(c) I2 has a stable assignment of size greater than|M2|.

(17)

PSfrag replacements

P fi,j Gi,j

b(1) p1 q1 p2 q2 qρ1(i,j) p(k2)+1 b(2) p(k2)+2 1

1 1

1 1 1 1

2 2 2

2 2

2 3

3 3

Fig. 5.The path-gadgetPinI2. Bold edges representM2.

Furthermore, the construction will take FPT time, and there will be k+ 3 k2 couples in I1, andk+ k2

+ 1 couples in I2. Thus, (a)⇐⇒(b) yields an FPT- reduction fromCliquetoHospitals/Residents with Couples, and (a)⇐⇒

(c) yields an FPT-reduction fromCliquetoIncrease Hospitals/Residents with Couples.

To getI1, we simply combine the cmp I0 having no stable assignment with the cmp IG,k. This is done by introducing new couplesbi,j and ci,j, and new hospitals ¯f1i,jand ¯f2i,jfor each (i, j)∈ [k]2

, and adding these agents toIG,k. We preserve the preference lists ofIG,k, except for hospitals{fi,j|(i, j)∈ [k]2

}, and we give the missing preference lists below.

L(bi,j) : (fi,j,f¯1i,j),( ¯f1i,j,f¯2i,j),( ¯f2i,j, fi,j) L(ci,j) : (fi,j,f¯2i,j),( ¯f1i,j, fi,j),( ¯f2i,j,f¯1i,j) L( ¯f1i,j) =L( ¯f2i,j) :ci,j(1), bi,j(1), bi,j(2), ci,j(2) L(fi,j) :si,j1 , si,j2 , . . . , si,jm, ci,j(1), bi,j(1), bi,j(2), ci,j(2)

Observe that if we restrictI1 to contain only the hospitalsfi,j,f¯1i,j and ¯f2i,j and the couplesbi,j andci,j for some (i, j)∈ [k]2

, we obtain a cmp isomorphic to I0, having no stable assignment. Therefore, any stable assignmentM must assign a single in Si,j to fi,j for each (i, j)∈ [k]2

, so M has propertyπ. The restriction of such anMon the agents ofIG,kmust also be stable, because agents ofIG,k cannot be assigned by M to agents outsideIG,k. Thus, by Lemma 6,G has ak-clique.

On the other hand, if there is ak-clique inG, then we can construct a stable assignmentM1forI1by settingM1(bi,j) = ( ¯f1i,j,f¯2i,j),M1(ci,j) = (u, u) for each (i, j) ∈ [k]2

, and M1(r) = MπG,k(r) for the residents in IG,k. Here, Mπ(G, k) is the stable assignment forIG,k with property π and covering each resident of IG,k, guaranteed by Lemma 6. It is easy to see thatM1 is stable, by using the stability ofMπ(G, k). This finishes the proof of the first claim.

To construct I2, we add a path-gadget P to IG,k that contains the newly introduced hospitals {pi|i ∈ [ k2

+ 2]}, singles {qi|i ∈ [ k2

]} and a couple b.

See Fig. 5 for an illustration. As before, we only modify the preferences of the hospitals{fi,j|(i, j)∈ [k]2

}, and we give the missing preference lists below. The notationρused there denotes a bijection from [ k2

] into [k]2 .

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

We suggest solutions for estimating network size and detecting partitioning, and we give estimations for the time complexity of global search in this environment.. Our methods rely

Using the terminology of parameterized complexity, we are interested in pa- rameterizations where the parameter associated with an instance of alc(S) is the feedback vertex set

⇒ Transforming an Independent Set instance (G , k) into a Vertex Cover instance (G , n − k) is a correct polynomial-time reduction.. However, Vertex Cover is FPT, but Independent Set

On the other hand, parameterized complexity theory may help to justify the shield provided by computational complexity: if a problem belongs to one of the parameterized hardness

Local search: walk in the solution space by iteratively replacing the current solution with a better solution in the local neighborhood....

Walk in the solution space by iteratively replacing the current solution with a better solution in the local neighborhood.. Problem: local search can stop at a local optimum (no

, 9 does not hold for some position i in (F, M ) or one of the first eight properties does not hold for some i in the reversed marked fragmentation (F rev , M rev ), then we will

Walk in the solution space by iteratively replacing the current solution with a better solution in the local neighborhood.. Problem: local search can stop at a local optimum (no