• Nem Talált Eredményt

and M is a closest solution,MX cannot be stable. Thus Extension Rule 6 is applicable, a contradiction.

Now, Claims 1, 2, and 3 together imply the lemma.

If no extension rule is applicable, then we easily obtain the solutionM by Lemma 6.2.3.

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`. To derandomize the algorithm, we can use the standard method ofk-perfect hash functions [8]

instead of randomly coloringV(G). This yields a running time of O(`O(`)|C|`|I|log|I|).

6.3 Maximum matching without preferences

In this section, we define a variant of the Hospitals/Residents problem that involve couples, but do not deal with preferences, using only a notion of acceptability instead.

A couples’ market with acceptance, or shortly cma is a tuple (S, C, H, f, A). Here, the setsS, CandHdenote the set of singles, couples and hospitals, respectively, andf(h) denotes the capacity of the hospitalhfor eachh∈H. But instead of describing the preferences, we only define a set A(s) ⊆ H for each single s ∈ S representing acceptable hospitals for s, and a setA(c)⊆He for each couplec∈C representingacceptable hospital pairs forc. Here, He and the symbol are defined the same way as before. We also keep the definitions of agents, resident, andf0-uniformity as given for a couples market with preference. To define anassignment for a cma (S, C, H, f, A), we also refer to the corresponding definition for a cmp. Note that this definition only relies on the concept of acceptability, and has no direct reference to the preference lists.

TheMaximum Matching with Couples problem is an optimization problem, where given a cma I, the set of solutions is the set of assignments for I, and the task is to find an assignment forI of maximum size. We investigate the parameterized complexity of this problem in Section 6.3.1. We also examine the possibility of finding a local search algorithm for it in Section 6.3.2.

6.3.1 Parameterized complexity

First, we investigate a slightly modified version of Maximum Matching with Couples.

We say that an assignment for a cma (S, C, H, f, A) is a (k, n)-assignment if it covers at leastkcouples and at leastnsingles. We denote the following problem as (k, n)-Matching with Couples: given a cma I and two integersk and n, find a (k, n)-assignment for I if possible.

Clearly, if there are no couples in a given instance, then this 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, the decision version of this problem is NP-complete [66, 12], 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 6.3.1.

Theorem 6.3.1. (k, n)-Matching with Couplescan be solved in randomized FPT time with parameter |C|.

To prove Theorem 6.3.1, we need some results from [100] concerning matroids.

Although we only use basic concepts of matroid theory, here we give a brief outline of the main definitions used. For some setU and collectionI ⊆2U, the pair (U,I) is amatroid if the followings hold: (1)∅ ∈ I, (2) ifX ∈ I andX0 ⊆X then X0 ∈ I, and (3) ifX, Y ∈ I and|X|<|Y|thenX∪{y} ∈ Ifor somey∈Y\X. The elements ofIare calledindependent sets. A matrixA over a fieldF is alinear representation of a matroid ({ui |i∈ [n]},I), if for any setJ of indices in [n], the set of columns in A corresponding to the indices J are independent overF if and only if{uj |j∈J} ∈ I. A matroid islinear if it admits a linear representation. A maximal independent set of a matroid is called abasis of the matroid. The dual of a matroid (U,I) with basis set Bis the matroid with ground setU whose basis set is{U\B|B∈ B}. Thek-truncation of (U,I) is the matroid (U,I0) whereI∈ I0 if and only ifI∈ I and|I| ≤k. Given a bipartite graphG(A, B;E), itstransversal matroid has ground setA, andX is defined to be independent if there is a matching inGcoveringX.

Theorem 6.3.2 ([100]). Let M(U,I) be a linear matroid where the ground set U is par-titioned into blocks 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 ofk blocks. (||A|| denotes the length ofAin the input.)

Corollary 6.3.3. LetM(U,I)be a linear matroid and letX ={X1, X2, . . . Xn}be a collec-tion of subsets ofU, each of sizeb. Given a linear representationAofM, it can be determined in f(k, b)· ||A||O(1) randomized time whether there is an independent set that is the union ofk disjoint sets in X.

Proof. First, let us make n(u) copies for each u ∈ U, where n(u) is the number of sets in X containing u, i.e. let U0 = {ui | u ∈ U, n(u) > 0, i ∈ [n(u)]}. Let M0(U0,I0) be the matroid whereI0contains those sets which can be obtained from some setI∈ Iby replacing eachu∈Iwith an arbitrary element from{ui|i∈[n(u)]}. A representationA0ofM0 can be obtained fromAby puttingn(u) copies of the column representinguintoA0 for eachu∈U. For each i∈[n], let Xi0 ⊆U0 be obtained by replacing each element uin Xi with uj ifXi

is the j-th set in X containing u. Clearly, by letting Xi0 to be a block (having size b) 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 6.3.2 provides the solution.

Lemma 6.3.4 ([100]). (1) Given a representation A over a field F of a matroid M, a representation of the dual matroidM overF can be found in polynomial time. (2) Given a representationAoverNof a matroidMand an integerk, a representation of thek-truncation ofMk can be found in randomized polynomial time. (3) Given a bipartite graphG(A, B;E), a representation of its transversal matroid overNcan be constructed in randomized polynomial time.

Now, we are ready to prove Theorem 6.3.1.

Proof of Theorem 6.3.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 substitute h with the newly introduced hospitalsh1, . . . , hf(h), also modifying A(p) for eachp ∈ 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|=kandA0is 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.

6.3. Maximum matching without preferences 101 Moreover, we can assume A(c) ⊆H ×H, since for eachc ∈ C we can eliminate each pair of the form (h,) or (, h) (h∈H) in the setA(c) by adding a new hospitaluc to H with capacity 1 and substituting the symbolwithuc in the pairs contained inA(c).

Now, let G(H, S;E) be the bipartite graph where a single s ∈ S is connected with a hospitalh ∈H if and only if h∈ A(s). We can assume w.l.o.g. thatG 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 set X ⊆H is independent if and only if there is a matching inGthat covers at least nsingles but covers no hospitals fromX. Observe that Mis exactly the dual of then-truncation of the transversal matroid ofG, and thus it is indeed a matroid. By Lemma 6.3.4, we can find a linear representationA ofMin 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 ofM0can be obtained by taking the direct sum of the matricesAandEkwhereEkis the unit matrix of sizek×k. LetX be the collection of the sets that are of the form{c, h1, h2}wherec∈C and (h1, h2)∈A(c).

Observe that ifX1, X2, . . . , Xk arekdisjoint sets inX whose union is independent inM0, 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) arbitrarily. The disjointness of the setsX1, . . . , Xk

guarantees that this way we assign exactly one resident to each hospital inX =S

i[k]Xi∩H.

Now, letN be a matching in Gthat covers at leastnsingles, but no hospitals fromX. Such a matching exists, asX is independent in M. Thus, lettingM(s) to beN(s) ifsis covered byN andotherwise for eachs∈S yields thatM is a (k, n)-assignment. Conversely, ifM is a (k, n)-assignment then the sets {c, h1, h2} for each c ∈ C and M(c) = (h1, h2) form a collection of k disjoint sets inX whose union is independent in M0. By Corollary 6.3.3, such a collection can be found in randomized FPT time whenkis the parameter, yielding a solution if existent.

Theorem 6.3.1 shows that (k, n)-Matching with Couplescan be solved by a random-ized FPT algorithm with parameter |C|. We remark that our method can also be applied when there are groups of fixed size instead of couples in the given market, or when the task is to maximize (or minimize) some arbitrary functionf(k, n) wherekandnare the number of covered couples and singles, respectively, in the solution. This latter can be done by sim-ply searching for a (k, n)-assignment for all possible and relevant values ofk and n. Thus, as a consequence we get that Maximum Matching with Couplescan also be solved in randomized FPT time with parameter|C|.

Theorem 6.3.1 also has a useful consequence in connection to the following scheduling problem. We are given a set of parallel machines, a set of independent jobs, and a set of job assignment restrictions describing for each job j the set of machines which j may be assigned to. The task is to find a minimum makespan assignment of the jobs to the machines respecting the given restrictions. Considering the remarks of the previous paragraph, we get that Theorem 6.3.1 yields a randomized FPT algorithm for the special case of this problem, wherek jobs have processing timep∈N and all other jobs have processing time 1, and we regardk as a parameter.

6.3.2 Local search

Here, we investigate the applicability of the local search approach to handle the intractability of theMaximum Matching with Couples problem. We define thedistance d(M, M0) of two assignmentsM and M0 for some cma Ias the number of residents rfor whichM(r)6= M0(r). The following theorem shows that no permissive local search algorithm is likely to

run in FPT time, if the parameter is the radius of the explored neighborhood and we restrict the problem to the 2-uniform case.

Theorem 6.3.5. There is no permissive local search algorithm for the 2-uniform Maximum Matching with Couplesthat runs in FPT time with parameter ` denoting the radius of the explored neighborhood, unless W[1]=FPT.

Proof. Let G be the input graph for the Clique problem and k be the parameter given.

We denote the vertices of G by v1, v2, . . . , vn. We claim that if there is a permissive local search algorithm A for Maximum Matching with Couples running in FPT time with parameter`, then we can useA to solveClique in FPT time. To prove this, we construct an input Λ = (I, M0, `) ofA with the following properties: every assignment forI with size at least|M0|+ 1 is`-close toM0, and there is such an assignment forI if and only ifGhas a clique of sizek. Thus,Ghas a clique of sizekif and only if Aoutputs an assignment forI with size at least|M0|+ 1.

To construct Λ, we first define the cmaItogether with the assignmentM0for it. Let the setH of hospitals be the union ofD=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 eachi6=j,{i, j} ⊆[k], and for each hospitalhin B (Hi,j, respectively) we also define a hospitalh0 to be inB0 (H0i,j, respectively). For brevity, we will use the notationHh,i,j={h| ∃y:h=hi,jh,y∈Hi,j}andHi,j,h={h| ∃x:h=hi,jx,h∈Hi,j}. The capacity of each hospital is 2. For each hospitalh∈D we define a couple denoted by c(h), and for each h0 ∈D0 we define two singles s1(h0) and s2(h0). Let C ={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 assignmentM0 forI, as this will not cause any confusion. LetM0(s0) =, and letM0(p) =hwhere eitherh∈D andpis a member of the couplec(h), or h∈D0 andp∈ {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 top besidesM0(p). We defineA0(p) for eachp∈S∪C as follows.

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

A0(s1(b0i)) =H1,i for 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(b02k1)) =Hk,1

A0(s1(h0x,yi,j)) =Hx,i,j+1 for eachi∈[k], j∈[k−1] and every possible xandy A0(s1(h0x,yi,k)) ={fi} for eachi∈[k] and every possiblexandy

A0(s2(h0x,yi,j)) =Hi+1,j,y for eachi∈[k−1], j∈[k] and every possiblexandy A0(s2(h0x,yk,i)) ={fi} for eachi∈[k] and every possiblexandy

This completes the definition of the cmaI= (S, C, H, f, A). Observe thatM0indeed is an assignment forI. Finally, setting`= 4k2+ 8k−3 finishes the definition of the instance Λ = (I, M0, `). Figure 6.6 shows an illustration.

First, suppose thatM is an assignment forIsuch that|M|>|M0|. We do not requireM to be (4k2+ 8k−3)-close to M0, 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 assignb1 tos0. 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 everyi∈[2k−2].

6.3. Maximum matching without preferences 103

Figure 6.6: A block diagram showing the hospitals in the proof of Theorem 6.3.5. For two setsH1, H2 of hospitals, (H1, H2) is an arc ifA0(s)⊆H2 for somes∈S withM0(s)∈H1.

We say that a single s enters Hi,j if M(s) ∈ Hi,j but M0(s) ∈/ Hi,j, and leaves H0i,j ifM0(s)∈H0i,j but M(s)∈/ H0i,j. A couplec moves from a hospital hifM0(c) = (h, h)6= M(c), and we say thatcmoves from a setJ⊆H of hospitals if it moves from a hospital inJ. Observe that ifcmoves fromHi,j, then two singles leaveH0i,j, one of them entering Hi+1,j ifi 6=k, and the other entering Hi,j+1 ifj 6=k. If a singles leavesH0i,j but does not en-terHi+1,jorHi,j+1, thenM(s)∈F must hold, and therefore there can exist at most 2ksuch singles. Moreover, if a set ofmsingles enterHi,j then at leastdm/2ecouples have to move from Hi,j. For each i∈ [k], exactly one single from {s1(b01), s1(b02), . . . , s1(b0k)} entersH1,i, and exactly one single from{s1(b0k+1), s1(b0k+2), . . . , s1(b02k1), s2(b02k1)} entersHi,1. These altogether imply that exactly one couple moves from Hi,j for eachi, j ∈ [k], and that if s ands0 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 fromHi+1,j,y . For eachi∈

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

For the other direction, supposevσ(1), vσ(2), . . . , vσ(k) form a clique inG. By definingM as below, it is straightforward to verify that M is an assignment for (S, C, H, f, A) which covers every resident, and is`-close toM0.

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

M(c(hi,jσ(i),σ(j))) = (h0σ(i),σ(j)i,j , h0σ(i),σ(j)i,j ) for each i, 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(b02k1)) =hk,1σ(k),σ(1)

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

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

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

M(s1(h0σ(i),σ(k)i,k )) =fifor eachi∈[k]

M(s2(h0σ(k),σ(i)k,i )) =fifor eachi∈[k]

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

CHAPTER 7

Conclusions

In this dissertation we considered the parameterized complexity of several graph modifica-tion and stable assignment problems. In Chapter 2 we discussed the parameterizedk-Apex problem, where given a graph G and a parameter k, the task is to decide whether there arek vertices in Gwhose removal yields a planar graph. Using treewidth-based techniques including results by Robertson and Seymour from graph minor theory and a theorem by Courcelle, we presented an FPT algorithm for this problem whose running time is quadratic in the number of vertices ofGfor every fixed k.

In Chapters 3 and 4 we presented various results considering the parameterized complexity of deciding whether two graphs can be made isomorphic by deleting a few vertices from the larger one. To this end, we defined theCleaning(H,G) problem: given a pair of graphs (H, G) withH ∈ HandG∈ G, find a set of verticesS inGsuch thatG−S is isomorphic toH. We investigated the complexity of this problem with a non-standard parameterization, where the parameter of an input (H, G) is the difference of the number of vertices inG and H. This parameterization has not been studied before in the literature for this problem.

In Section 3.1, we focused on the special case where both input graphs are planar and the smaller one is 3-connected. After showing the NP-hardness of this problem, we presented a quadratic time FPT algorithm for it. In Section 3.2, we dealt with the case where the smaller input graph is a tree and the larger one can be arbitrary. This case was already known to be NP-hard, and we settled the parameterized complexity of this problem by providing an FPT algorithm for it, running in cubic time for each fixed value of the parameter.

Chapter 3 contains the study of the Cleaning(H,G) problem for the case where both input graphs are interval graphs. We gave an FPT algorithm for this problem, when param-eterized by the non-standard parameterization used also in Chapter 3. We also proved the NP-hardness of this problem.

In Chapters 5 and 6, we turned our attention to stable assignment problems. None of the problems discussed in these chapters have been studied from a parameterized viewpoint before. In Chapter 5, we showed that finding a maximum stable matching in the Stable Marriage with Ties and Incomplete Listsproblem is W[1]-hard, when parameterized by the number of ties. In contrast with this, we showed that the problem becomes FPT, when parameterized by the total length of ties.

We also obtained results concerning the applicability of local search for this problem. We

studied the problem of deciding for a given instanceI of SMTI, a stable matching M forI, and an integer`, whetherIadmits a stable matchingM0larger thanM such that the number of persons having different partners inMand inM0is at most`. We showed that no algorithm for this problem can run in FPT time (unless W[1] = FPT) if we regard` as a parameter, and besides, either the number of ties is a parameter as well, or the maximum length of the ties is at most 2. In addition, we investigated two optimization problems, namely the Egalitarian Stable Marriage with Ties and Incomplete Listsand the Minimum Regret Stable Marriage with Ties and Incomplete Lists. On the one hand, we gave an FPT algorithm for them with the parameterization where the parameter is the total length of the ties. On the other hand, we showed strong FPT-inapproximability results for both of these problems concerning the case when the parameter is only the number of ties.

In Chapter 6 we studied the parameterized complexity of the Hospitals/Residents with Couples problem. We proved that finding a stable assignment is W[1]-hard, if the parameter is the number of couples in the instance. We also proved that no permissive local search algorithm for the problem of finding a stable assignment of maximum size can run in FPT time (unless W[1] = FPT), if parameterized by only the radius of the explored neighborhood. By contrast, we described a strict local search algorithm for this problem that runs in FPT time, if both the radius of the neighborhood and the number of couples are regarded as parameters.

Additionally, we also investigated a variant of theHospitals/Residents with Couples problem, calledMaximum Matching with Couples, where no preferences are involved, and the task is to find an acceptable assignment having maximum size. We described a randomized FPT algorithm for this problem with the parameter being the number of couples, by using FPT results from matroid theory. We also showed that no permissive local search algorithm can run in FPT time for this problem (unless W[1] = FPT), if the parameter is the radius of the explored neighborhood.

There are several possible directions for further research. First, considering applicability in practice, it is a relevant question whether the running times of the presented algorithms can be improved. In the case of the three algorithms proposed for theCleaning problem, we believe that an effective implementation would result in much better running times for practical instances than the proven upper bounds suggest. Thus, an empirical study of these algorithms would be interesting.

Regarding theCleaning problem, another natural direction for future research is to in-vestigate further graph classes. A possible candidate for such research could be the class of permutation graphs, since theGraph Isomorphismproblem is solvable for such graphs [34].

An important open question is whether the Cleaning problem on planar graphs can be solved by an FPT algorithm. We conjecture that the answer is yes. Also, it would be inter-esting to examine whether unit interval graphs are different from general interval graphs in the context of Induced Subgraph Isomorphism.

Yet another possibility for future investigations is the generalization of the Cleaning

Yet another possibility for future investigations is the generalization of the Cleaning