• Nem Talált Eredményt

Parameterized Complexity of Eulerian Deletion Problems

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Parameterized Complexity of Eulerian Deletion Problems"

Copied!
20
0
0

Teljes szövegt

(1)

(will be inserted by the editor)

Parameterized Complexity of Eulerian Deletion Problems

Marek Cygan · D´aniel Marx · Marcin Pilipczuk · Michał Pilipczuk · Ildik´o Schlotter

Abstract We study a family of problems where the goal is to make a graph Eule- rian, i.e., connected and with all the vertices having even degrees, by a minimum number of deletions. We completely classify the parameterized complexity of vari- ous versions: undirected or directed graphs, vertex or edge deletions, with or with- out the requirement of connectivity, etc. The collection of results shows an interest- ing contrast: while the node-deletion variants remain intractable, i.e., W[1]-hard for all the studied cases, edge-deletion problems are either fixed-parameter tractable or polynomial-time solvable. Of particular interest is a randomized FPT algorithm for making an undirected graph Eulerian by deleting the minimum number of edges, based on a novel application of the colour coding technique. For versions that re- main NP-complete but fixed-parameter tractable we consider also possibilities of polynomial kernelization; unfortunately, we prove that this is not possible unless NP⊆coNP/poly.

Keywords fixed-parameter tractability, kernelization, Eulerian graph, deletion distance

Marek Cygan, Marcin Pilipczuk

Institute of Informatics, University of Warsaw, ul. Banacha 2, 02-097 Warsaw, Poland E-mail:{cygan,malcin}@mimuw.edu.pl D´aniel Marx

Institut f¨ur Informatik, Humboldt-Universit¨at zu Berlin, Unter den Linden 6, 10099 Berlin, Germany

E-mail: dmarx@cs.bme.hu Michał Pilipczuk

Department of Informatics, University of Bergen, Postboks 7803, 5020 Bergen, Norway

E-mail: michal.pilipczuk@ii.uib.no Ildik´o Schlotter

Department of Computer Science and Information Theory, Budapest University of Technology and Economics 1117 Budapest, Magyar tud´osok k¨or´utja 2., Hungary E-mail: ildi@cs.bme.hu

(2)

1 Introduction

An undirected graph is Eulerian if it is connected and every vertex has even degree;

a directed graph is Eulerian if it is strongly connected and every vertex is balanced (i.e., the indegree equals the outdegree). The class of Eulerian graphs is a well-studied and classical notion in the graph theory. We investigate several algorithmic problems related to the question of how to make a graph Eulerian. We focus on deletion prob- lems, where either vertices or edges can be deleted from the input graph to make it Eulerian, using as few deletions as possible. What makes these problems interesting is the interplay of two different type of constraints: each vertex locally prescribes the constraint that it has to be even/balanced, while retaining connectivity is a global requirement. For comparison, we also investigate the variant of the problem where we have only the local constraints (i.e., the task is to delete the minimum number of edges or nodes to make every vertex even/balanced). As many of the studied prob- lems turn out to be NP-hard, we apply the framework of parameterized complexity to get a more detailed insight.

The investigation of these problems was initiated by Cai and Yang [9] who pre- sented parameterized results for some cases. We complement their work by answering several open questions raised in [9]. Another motivation for our work comes from an observation of Cechl´arov´a and Schlotter [10]: computing the deficiency for a certain type of housing market is equivalent to finding the minimum number of arcs whose deletion makes every strongly connected component of the graph balanced. While we are not able to determine the parameterized complexity of this problem, our results shed light on the complexity of several related ones.

Related work.Subgraph problems have been widely studied in the literature. To name a few examples, Lewis and Yannakakis [21] investigated the complexity of the node-deletion problem for hereditary properties, Alon et al. [2] examined edge- deletion problems for monotone properties, while Natanzon et al. [28] and Burzyn et al. [6] studied the classical complexity of edge modification problems for various graph classes.

Subgraph problems have also been looked at from the parameterized perspective.

The most extensively studied variants are the node-deletion problems for hereditary properties: the results by Cai [8], and Khot and Raman [18], yield a complete char- acterization of the fixed-parameter tractable cases. Apart from hereditary properties, FPT algorithms are known for node-deletion problems where the task is to obtain a regular graph [26], a chordal graph [23], a grid [12], etc. Parameterized hardness results have been obtained in numerous cases as well [22, 24]. Recently, researchers focused on the issue of kernelization, yielding both positive [4, 17, 29] and negative results [20].

There is much less known about directed graphs. Raman and Sikdar [32] in- vestigated the parameterized complexity of hereditary node-deletion problems in di- graphs, while Raman and Saurabh [31] examined feedback set problems in tourna- ments. The FPT algorithm by Chen et al. for finding a feedback vertex set in a directed graph [11] resolved a long-standing open question.

(3)

Work related to the class of Eulerian graphs mainly concentrated on the extension problem, where the task is to add a minimum number of edges or arcs in order to make the given graph Eulerian. FPT algorithms were given for various settings by Dorn et al. [13] and by Sorge [33]. Eulerian deletion problems were studied by Cai and Yang [9].

Our contribution. To settle the classical complexity of the examined problems, first we observe (Thms. 1 and 2) that classical results imply polynomial-time al- gorithms for the edge-deletion problems where the task is to make the given graph even/balanced: in the undirected case, this is essentially aT-join problem, while the directed case can be reduced to a flow problem. These observations answer a question raised by Cai and Yang [9], who observed that the analogous node-deletion problems are NP-hard. Moreover, the aforementioned algorithms are used as subroutines in our FPT results.

By contrast to the polynomial time algorithms, we show that the seemingly simi- lar edge- (or arc-) deletion problems where we aim for an Eulerian graph are NP-hard, even in the extremely restricted case when the input is a cubic planar graph and the number of deletions can be arbitrary (Theorem 3). We investigate both the undirected and the directed cases of Eulerian edge-deletion problem thoroughly from the pa- rameterized point of view: we present a fixed-parameter tractable algorithm for both cases where the parameter is the number of deletions allowed (Theorem 4), and prove that these problems do not admit a polynomial-size kernel unless NP⊆coNP/poly (Theorem 5), which is known to imply a collapse of the polynomial hierarchy to its third level [34, 7]. The FPT results use a novel argument that might be of independent interest. Intuitively, we need to find a solutionS to aT-join problem and a witness (disjoint fromS) certifying that the graph remains connected after the removal ofS.

Using a random colouring, we partition the edges into two types: each edge can con- tribute either to the solution or to the witness of the solution. This partition ensures that the solution and the witness are disjoint. While the use of random colourings is a standard technique for finding a solution consisting of disjoint objects [3], we use this technique to separate the solution from its proof of feasibility.

The undirected node-deletion problems, where the task is to obtain an Eulerian or an even graph, were already handled by Cai and Yang [9] who proved their W[1]- hardness. We complemented these results by showing W[1]-hardness for the directed cases as well in Theorem 7. Additionally, we also focus on a slight modification of the node-deletion problems where certain forbidden vertices are not allowed to be deleted. Theorem 8 shows that each of the four node-deletion problems remains W[1]-hard, even if we are only allowed to delete vertices of degree at most 4. This contrasts the easy FPT algorithm applicable if the parameter is not only the number of deletions but also the maximum degree of the graph (Theorem 11).

Table 1 shows a summary of our main results.

Organization of the paper. Section 2 describes our notation, and provides basic concepts of parameterized complexity. Section 3 discusses polynomial-time solvable edge-deletion problems. We deal with the NP-hard Eulerian edge-deletion problems in Section 4, first covering the issue of NP-completeness, and then fixed-parameter

(4)

Undirected Undirected Directed Directed

even Eulerian balanced Eulerian

Vertex W[1]-hard W[1]-hard W[1]-hard W[1]-hard

deletion: [9] [9] Thm. 7 Thm. 7

Edge P FPT, no poly kernel P FPT, no poly kernel deletion: Thm. 1 Thms. 3, 4, 5 Thm. 2 Thms. 3, 4, 5

Table 1: Summary of the main results. Parameterized results only appear when the corresponding problem is NP-hard; the parameter considered is the number of dele- tions allowed.

tractability and kernelization. Node-deletion problems are discussed in Section 5. We summarize our results and draw conclusions in Section 6.

2 Notation and preliminaries

Given a graphG, letV(G)denote its vertex set andE(G)denote its edge set (or, in the directed case, its arc set). Thedegreeof a vertexvin an undirected graphG is denoted by dG(v); we say thatv is even, if dG(v)is even. For a vertexv in a directed graphG, we denote bydinG(v)anddoutG (v)its indegree and its outdegree, respectively. We say thatv isbalanced, ifdinG(v) = doutG (v). We define the degree ofvinG(whereGis directed), asdG(v) =dinG(v) +doutG (v); whenever we discuss the maximum degree of a directed graph, we refer to this notion. IfGis clear from the context, we might omit the subscript. A directed graph isweakly connectedif the underlying undirected graph is connected. A directed graph isstrongly connectedif for every two verticesv, wthere is a path fromvtow. Aneven (balanced) graphis an undirected (directed) graph where each vertex is even (balanced). An undirected Eulerian graph is a connected even graph, and a directed Eulerian graph is a strongly connected balanced graph.1A straightforward degree counting argument shows that a balanced directed graph is weakly connected if and only if it is strongly connected.

Given a pathP in a (directed or undirected) graph, theinternal verticesofP are the vertices lying onPexcept for the two end-vertices. IfdG(v) = 2holds (meaning dinG(v) =doutG (v) = 1in the directed case) for each internal vertexvofP, then we say that the pathP is anunattached path.In a directed graph, apair of twin arcsis two arcs(a, b)and(b, a).

Given a setXof vertices, edges, or arcs in a graphG, letG\Xdenote the graph obtained by deletingX from G. WhenX has only one element x, we might also writeG\xinstead ofG\ {x}.

Parameterized complexity. In the parameterized complexity setting, an instance comes with an integer parameter k — formally, a parameterized problem Qis a

1 Strictly speaking, the usual definition of being Eulerian requires only that the graph is connected after removing the isolated vertices. However, we feel that requiring connectivity instead leads to more natural and fundamental problems.

(5)

subset of Σ ×N for some finite alphabet Σ. We say that the problem is fixed- parameter tractable(FPT) if there exists an algorithm solving any instance(x, k) in timef(k)poly(|x|)for some (usually exponential) computable functionf. It is known that a problem is FPT if and only if it is kernelizable: a kernelization algo- rithm for a problemQtakes an instance (x, k)and in time polynomial in |x|+k produces an equivalent instance(x0, k0)(i.e.,(x, k)∈Qif and only if(x0, k0)∈Q) such that|x0|+k0≤g(k)for some computable functiong. The functiongis thesize of the kernel, and if it is polynomial, we say thatQadmits a polynomial kernel.

3 Polynomial-time solvable cases

First, we give a simple polynomial time algorithm for the following problem:

UNDIRECTEDEVENEDGEDELETION Parameter:k

Input:An undirected graphGand an integerk.

Question: Does there exist a setS of at mostkedges inGsuch thatG\S is even?

It turns out that this problem is strongly connected to the concept of aT-join. If we defineT to be the set of vertices having odd degree, then UNDIRECTEDEVEN

EDGEDELETIONis equivalent with the following classical problem of finding aT- join of minimum size:

MINIMUMT-JOIN

Input:A graphG= (V, E)and a setT ⊆V of even size.

Question: Find a minimumT-join, i.e., a setS ⊆Eof minimum size such that Tis exactly the set of vertices of odd degree in the graphH = (V, S).

Since MINIMUMT-JOINcan be solved in cubic time by the algorithm of Edmonds and Johnson [14], we obtain the following consequence:

Theorem 1 UNDIRECTEDEVENEDGEDELETIONcan be solved inO(n3)time for ann-vertex graph.

Now we turn our attention to the directed version of the problem:

DIRECTEDBALANCEDEDGEDELETION Parameter:k

Input:A directed graphGand an integerk.

Question: Does there exist a setS of at mostk arcs inGsuch thatG\S is balanced?

This problem can be formulated as a minimum cost flow problem with unit costs as follows. We create a digraphG0 by takingGand adding two verticess,t(source and sink). Each edge ofE(G)has unit capacity and unit cost. For each vertexv ∈ V(G)such thatdin(v)< dout(v)we add toG0 an arc(s, v)of capacitydout(v)− din(v)and cost zero. Similarly, for each vertexv∈V(G)such thatdin(v)> dout(v) we add toG0an arc(v, t)of capacitydin(v)−dout(v)and cost zero. Letfdenote the total capacity of the added arcs(s, v). In a solvable instance we know thatf≤k.

It is straightforward to see that a flow of sizefand costkcorresponds to a set S ofkarcs for whichG\S balanced, and vice versa. Indeed, as the capacities are

(6)

integral, the flow is integral as well. Supposing that it has sizef, it corresponds to a system of paths inGsuch that in every vertexvwithdin(v)< dout(v)exactly dout(v)−din(v)paths originate, and in every vertexvwithdin(v)> dout(v)exactly din(v)−dout(v)paths end. Hence, if we remove the set of arcs of these paths from the graph, we end with a balanced graph. On the other hand, ifSis such thatG\S balanced, then setting unit flow onS, zero flow on the other arcs ofG, and maximum flow on arcs adjacent to the source and the sink yields a correct flow betweensandt of sizefand cost|S|.

Therefore, in order to find a solution of minimum size it suffices to find a mini- mum cost flow of sizef. Asf≤kand each arc has unit cost, this can be done in O(nmlognlog logk)time [1], wheren=|V(G)|andm=|E(G)|. Note that the above argument also handles an annotated case, where we require thatS ⊆Eafor a setEa ⊆Egiven in the input, as we can put zero capacities onE\Ea. This yields the following:

Theorem 2 DIRECTED BALANCEDEDGE DELETION can be solved in time com- plexityO(nmlognlog logk)for an input graph withnvertices andmedges, even in an annotated case where some edges are forbidden to delete.

4 Eulerian edge-deletion problems

In this section we examine the following problems:

UNDIRECTEDEULERIANEDGEDELETION Parameter:k

Input:A connected undirected graphGand an integerk.

Question: Does there exist a setS of at mostkedges ofGsuch thatG\S is Eulerian, i.e., even and connected?

DIRECTEDEULERIANEDGEDELETION Parameter:k

Input:A strongly connected directed graphGand an integerk.

Question: Does there exist a setS of at mostkarcs ofGsuch thatG\S is Eulerian, i.e., balanced and strongly connected?

The undirected problem can be easily seen to be NP-hard by observing that a cubic graph contains a Hamiltonian cycle if and only if it can be made Eulerian by edge deletions. Indeed, if deleting a set of edges from a cubic graph Gresults in an Eulerian graphG0, then each vertex in G0 must have degree 2, so G0 must be a Hamiltonian cycle ofG. Since the HAMILTONIAN CYCLE problem restricted to cubic planar graphs is NP-hard [16] the result follows. The directed version can be treated in a similar way using NP-hardness from [30].

Theorem 3 TheUNDIRECTEDandDIRECTEDEULERIANEDGEDELETIONprob- lems are NP-hard, even when restricted to inputs(G, k)whereGis a planar (di- rected) graph with maximum degree at most 3, andk=|E(G)|.

In Section 4.1, we show that both versions of the problem are FPT and can be solved in time2O(klogk)nO(1). The algorithm is based on a novel randomized selec- tion argument. In Section 4.3, we sharpen Theorem 3 by showing that the problems

(7)

do not admit a polynomial kernel. In some sense, the nonexistence of polynomial ker- nels suggests that randomized selection or a similar technique is inherently required for the problems, as they cannot be solved by simple reduction rules.

4.1 FPT algorithms

We have seen in Section 3 that removing edges to make all the vertices even can be expressed as aT-join problem, whereT is the set of odd vertices. Thus UNDI-

RECTEDEULERIANEDGEDELETIONrequires us to find aT-joinSsuch thatG\S is connected. Observe that ifGis connected, andG\S has a connected subgraph W containing the endpoints of every edge inS, thenG\Sis connected as well. We will call such a subgraphW awitnessofS. Therefore, the right way to look at the problem is that we need to find a pair(S, W), where isS is aT-join andW is the witness ofS. It is clear that the problem has a solution if and only if such a pair exists.

Our approach for finding a pair(S, W)is the following. We randomly colour the edges of the graph red and blue, and try to find a pair(S, W)whereSuses only red edges and the subgraphW uses only blue edges. We would like to ensure that if a suitable pair(S, W)exists, then it is correctly coloured red and blue with probability at least2−O(klogk). However, in general the size ofW can be very large (unbounded ink; an example is provided in Section 4.2) and therefore the probability of a correct colouring can be very small. We get around this problem by observing that edges

“far” fromT can be always coloured blue, and there is a witnessW that uses only a bounded number of edges “close” toT. Formally, we say that an edgeeisclose if at least one endpoint ofeis at distance at mostkfromT; otherwise,eisfar.The following two lemmas contain the crucial combinatorial ideas of the algorithm:

Lemma 1 IfSis an optimum solution of size at mostk, then each edge ofSis close.

Proof As removing a cycle fromSwould still yield a solution,H= (V, S)has to be a forest for an optimum solutionS. Each connected component ofH that is not an isolated vertex contains a vertex fromT, as each tree contains vertices of odd degree (for example, leaves). Since|S| ≤k, each vertex in such a connected component is at distance at mostkfromT, and thus each edge inSis close. ut

Lemma 2 IfS is an optimum solution of size at mostk, thenS has a witnessW having at most(2k−1)(2k+ 2)close edges.

Proof LetXbe the set of endpoints of the edges inS. Note thatT ⊆Xand|X| ≤ 2|S| ≤2k. Letibe the smallest integer such thatG\Shas a subgraphW containing X, having exactlyiconnected components and at most(|X| −i)(2k+ 2)close edges (suchiandW always exist as fori=|X|we can takeW = (X,∅)). Ifi= 1, then we are done. Otherwise, we can assume that each component ofWcontains a vertex ofX; letPbe a shortest path inG\Sthat connects two different components ofW. Denote these componentsK1andK2.

We claim that only the firstk+ 1and the lastk+ 1edges ofP may be close. If this is true, then addingP toW decreases the number of components and increases the number of close edges by at most2k+ 2, contradicting the minimality ofi.

(8)

Suppose that an edgeeis close, but it is not among the first or lastk+ 1edges, i.e., both of its endpoints are at distance greater thankfrom bothK1andK2onP.

Aseis close, it has an endpointv such that there is a pathP0 of length at mostk connectingvandT. AsT ⊆ X, the pathP0 connectsvto a componentK0 ofW. Assuming without loss of generality thatK0 6=K1, the concatenation ofP0and the subpath ofPbetweenK1andvis a walkP00connecting two different components ofW. As the distance ofvfromK2onPis more thank, the walkP00is shorter than P, contradicting the minimality ofP. ut

We observe that even though the number of close edges in the witness can be bounded polynomially ink, the whole witness can be arbitrarily large. An example of such a situation is described in Section 4.2.

Now, we are ready to state our algorithm, working as follows:

1. Determine which edges are close and which are far.

2. Make each close edge independently with probability1/k2red; every edge that is not red becomes blue.

3. If there is more than one connected component of the blue edges containing a vertex fromT, return NO; otherwise letKBbe this unique component.

4. Solve MINIMUMT-JOINinstance(GR, T), whereGRis the graph induced by the red edges with both endpoints inKB. If the solution is of size at mostk, return it, otherwise return NO.

Lemma 3 If the algorithm returns a solutionS, thenSis a proper solution toUNDI-

RECTEDEULERIANEDGEDELETION.

Proof By the definition of MINIMUMT-JOIN,G\Sis even. The componentKBof blue edges ensures that the endpoints ofSare in the same component ofG\S, i.e., G\Sis connected. ut

Lemma 4 If theUNDIRECTEDEULERIANEDGEDELETIONinstance(G, k)was a YES-instance, the algorithm returns a solution with probability at least1/2O(klogk). Proof LetSbe an optimum solution to(G, k), and letWbe a witness having at most (2k−1)(2k+ 2)close edges, guaranteed by Lemma 2. In the algorithm:

1. With probability at least(1/k2)k= 1/22klogkeach edge ofSbecomes red.

2. With probability at least(1−1/k2)(2k−1)(2k+2) =Ω(1)each close edge ofW becomes blue (and hence every edge ofW is blue).

The above events are independent, sinceSandW do not share edges. Furthermore, if both events happen, thenW will connect all the endpoints of the edges fromS.

Therefore, all of these endpoints will be contained in one connected componentKB of the graph induced by blue edges, which in particular connects all the vertices from T. Thus, with probability1/2O(klogk), every edge ofSappears inGRin the last step of the algorithm and the MINIMUMT-JOINinstance has a solution of size at mostk.

u t

Theorem 4 Both theUNDIRECTEDand DIRECTED EULERIAN EDGEDELETION

problems are fixed-parameter tractable with parameterk.

(9)

Proof By Lemmas 3 and 4, the presented algorithm for UNDIRECTEDEULERIAN

EDGEDELETIONfinds a solution with probability1/2O(klogk), and never produces a wrong output, that is removal of the returned set of edges always makes the graph Eulerian. Since the algorithm runs inO(n3)time for ann-vertex graph, we immedi- ately obtain a randomized FPT Monte-Carlo algorithm, running in2O(klogk)n3time.

We present how to derandomize the described algorithm using the standard tech- nique of splitters. A(m, r, r2)-splitter is a family of functions from{1,2, . . . , m}

to{1,2, . . . , r2}, such that for any subsetX ⊆ {1,2, . . . , m} of sizer, one of the functions in the family is injective onX. Naor et al [27] gave an explicit construction of an(m, r, r2)-splitter of sizeO(r6logrlogm).

In Step 3 of the algorithm we want to separate the solutionS(of size at mostk) from the set of close edges of the witnessW (of size at most`= (2k−1)(2k+ 2)).

Let m be the cardinality of the set of close edges in the graph, we may identify {1,2, . . . , m}with this set. Instead of the random colouring process, we can try every functionf in a(m, k+`,(k+`)2)-splitter and every setF ⊆ {1,2, . . . ,(k+`)2} of sizek. For a particular choice off andF, we colour red those close edgesefor whichf(e) ∈ F. By the definition of the splitter, if there exists a solutionS with a witnessW, there will be a functionf that is injective on the set of close edges of S∪W and a subsetFsuch thatf(e)∈F ife∈Sandf(e)∈/ Fifeis a close edge inW. Note that the size of(m, k+`,(k+`)2)-splitter is bounded polynomially in the input size, whereas there are2O(klogk)choices for the setF.

Regarding DIRECTEDEULERIANEDGEDELETION, we can use a slightly modi- fied version of our randomized algorithm, which then can be derandomized in exactly the same manner. After defining the setT of terminals to contain the unbalanced ver- tices, we forget about the orientation of the arcs, and perform Steps1 −3 of the algorithm. We adjust Step4by solving an annotated DIRECTEDBALANCEDEDGE

DELETIONinstance(G, k)where only red arcs can be deleted. Observe that this al- gorithm in fact looks for a set of edgesSof size at mostksuch thatG\Sis balanced and weakly connected. However, every graph that is weakly connected and balanced is Eulerian, thus the algorithm returns the solution to DIRECTEDBALANCEDEDGE

DELETIONwith high probability, if one exists. ut

4.2 An example of a large witness setW

In this section we give a simple example that the witness graphW, considered in the FPT algorithms in Section 4.1, may be arbitrarily large and may containΩ(k2) close edges. This lower bound on the number of close edges matches the upper bound given by Lemma 2. We construct a graphGas follows. First take a cycle of length 2kMfor someM >2kand letv0, v1, . . . , v2k−1be a sequence of evenly distributed vertices on this cycle, i.e.,vi =wiM, wherew0, w1, . . . , w2kM−1are vertices of the cycle, lying in this order. Moreover, for each0 ≤i < kwe connect the verticesv2i

andv2i+1. Note thatS = {v2iv2i+1 : 0 ≤ i < k}is the only feasible solution of sizekto the UNDIRECTED EULERIAN EDGEDELETIONproblem in the graphG, but any witnessW ofSneeds to contain a path of length(2k−1)M. Moreover, such a path contains roughly2k(2k−1) =Ω(k2)close edges.

(10)

Note that in the above construction it is not crucial to start from a long cycle, as any Eulerian graph of large diameter would suffice. In such a graph we simply take the vertices{vi: 0≤i <2k}to be any set of vertices that are pairwise distant.

4.3 Non-existence of a polynomial kernel for UNDIRECTEDand DIRECTED

EULERIANEDGEDELETION

The aim of this subsection is to prove the following theorem.

Theorem 5 If NP 6⊆coNP/poly, then there is no polynomial kernel for theUNDI-

RECTEDandDIRECTEDEULERIANEDGEDELETIONproblems with parameterk, even if the input graph has maximum degree at most 4.

We use the cross-composition technique introduced by Bodlaender et al. [5]. Let us recall the crucial definitions.

Definition 1 (Polynomial equivalence relation [5])An equivalence relationRon Σis called apolynomial equivalence relationif (1) there is an algorithm that given two stringsx, y ∈Σ decides whetherR(x, y)in(|x|+|y|)O(1) time; (2) for any finite setS ⊆Σthe equivalence relationRpartitions the elements ofSinto at most (maxx∈S|x|)O(1)classes.

Definition 2 (Cross-composition [5])LetL ⊆ Σ and letQ ⊆Σ×Nbe a pa- rameterized problem. We say thatLcross-composesintoQif there is a polynomial equivalence relationRand an algorithm which, givenpstringsx1, x2, . . . xpbelong- ing to the same equivalence class ofR, computes an instance(x, k)∈Σ×Nin time polynomial inPp

i=1|xi|such that (1)(x, k) ∈Qif and only ifxi ∈ Lfor some1≤i≤p; (2)kis bounded polynomially inmaxpi=1|xi|+ logp.

Theorem 6 ([5], Theorem 9)IfL⊆Σis NP-hard under Karp reductions andL cross-composes into the parameterized problemQthat has a polynomial kernel, then NP⊆coNP/poly.

We apply Theorem 6 on the following languageL:

UNDIRECTEDor DIRECTEDs−tPATH WITHFORBIDDENPAIRS OFEDGES

Input:An undirected or directed graphG= (V, E), two verticess, t∈V, and a setC⊆E×Ecalledthe constraints.

Question:Does there exist ans−tpathPinGsuch that from each constraint (e1, e2)∈Cat least one edge (arc) does not lie onP?

The undirected version of this problem with forbidden pairs of vertices was proven to be NP-hard by Kolman and Pangr´ac [19] and their proof can be easily modified to handle our case as well.

Lemma 5 UNDIRECTEDandDIRECTEDs−tPATH WITHFORBIDDENPAIRS OF

EDGESareNP-hard under Karp reductions, even in the case where each vertex has maximum degree three,sandthave degree one, and, in the directed case, each vertex has maximum in- and outdegree two.

(11)

Proof We first provide a Karp reduction from the CLIQUEproblem to our problems without the degree condition. Let (H, k) be a CLIQUEinstance. We construct an UNDIRECTEDor DIRECTEDs−tPATH WITHFORBIDDEN PAIRS OFEDGES in- stance(G, s, t,C)as follows. To construct the graphG, we start by adding vertices s,tandpifor0 ≤i ≤kand edgessp0andpkt(arcs(s, p0)and(pk, t)). Then for each 1 ≤ i ≤ kandv ∈ V(H)we introduce a vertexxvi and edgespi−1xvi and xvipi(arcs(pi−1, xvi)and(xvi, pi)). Finally, for each1 ≤i, j ≤kandu, v ∈V(H) such thatuv /∈ E(H)(possiblyu=v), we introduce constraints(xuipi, xvjpj)and (xujpj, xvipi).

Let us now verify the correctness of the above reduction. If{v1, v2, . . . , vk} ⊆ V(H)is a vertex set of ak-clique inH, then a path consisting of edges (or corre- sponding arcs)sp0,pktandpi−1xvii,xviipi for1 ≤i ≤kis a feasible solution to the instance(G, s, t,C). In the other direction, note that any simple path fromsto tvisits for each1 ≤ i≤ kexactly one vertex from the set{xvi : v ∈ V(H)}, say xvii. We claim that{v1, v2, . . . , vk}induces ak-clique inH. To see this note that the introduced constraints imply that ifi6=jthenvi6=vjandvivj ∈E(H).

To obtain the degree bounds, note that each vertexv∈V(G)withdG(v)≥3can be replaced with a (directed) cycle of lengthdG(v), where each edge (arc) previously incident tovis now connected to a different vertex on the cycle. ut

To finish the proof of Theorem 5 we need to show a cross-composition algorithm.

This is done in the following lemma.

Lemma 6 UNDIRECTED (DIRECTED) s−t PATH WITH FORBIDDEN PAIRS OF

EDGES cross-composes to UNDIRECTED (DIRECTED) EULERIAN EDGE DELE-

TION. If the input instances have degrees bounded as in Lemma 5 then the output instance can be made to have maximum degree4.

Proof For the equivalence relationR we take an almost trivial relation that sorts all malformed instances into one equivalence class and all well-formed into another one. If we are given malformed instances, we simply output a trivial NO-instance.

Thus in the rest of the proof we assume we are given a sequence(Gi, si, ti,Ci)pi=1 of UNDIRECTED or DIRECTED s−t PATH WITH FORBIDDENPAIRS OF EDGES

instances.

We now construct an UNDIRECTEDor DIRECTEDEULERIANEDGEDELETION

instance(G, k). We start by obtaining a graphG0ifor each1≤i≤pas follows. First we subdivide each edgee∈E(Gi)with new verticesxCe, one for each constraintC∈ Cithat containse. Then for each constraintC= (e1, e2)∈Ciwe introduce vertices z1CandzC2 and create a (directed) cyclexCe

1, z1C, xCe

2, zC2. ByV(Gi)we denote the subset ofV(G0i)containing vertices different thanxCe andzαC. To construct the graph G, we first take the union of all graphsG0iand identify all verticessiinto one vertex sand all verticestiinto one vertext. LetV0={s, t} ∪Sp

i=1V(Gi)\ {si, ti}.

Second, we introduce a new vertexrand connect it to the rest of the graph as follows.

In the undirected case for eachv∈V0\ {s, t}we connectrandvwith one or two unattached paths of length2, so that inGthe vertexvis even. In the directed case, we connectrandvwith some positive number of unattached directed paths of length2, so that inGthe vertexvis balanced. We do almost the same construction to connect

(12)

sandttor, but we ensure that the degrees ofsandtare odd (in the undirected case) or thatdinG(s) + 1 = doutG (s)anddinG(t) = doutG (t) + 1(in the directed case). Note thatris even (balanced). Finally, we setk = maxpi=1|V(G0i)| −1 = O(maxpi=1|V(Gi)|+|Ci|).

It is clear that the above construction can be done in polynomial time and that the parameterkis bounded polynomially in the maximum size of the input instances.

We now verify the correctness of the construction, i.e.,(G, k)is a YES-instance of UNDIRECTED or DIRECTED EULERIAN EDGE DELETION if and only if at least one of the instances(Gi, si, ti,Ci)pi=1 of UNDIRECTEDor DIRECTEDs−t PATH WITH FORBIDDENPAIRS OFEDGES is a YES-instance. Then, we discuss how we can modify the construction so that all the vertices of the resulting graph have degree bounded by4.

Correctness.First, letPbe a simple path that is a feasible solution to(Gj, sj, tj,Cj) for some1 ≤j ≤p. The pathPnaturally defines a simple pathP0 inG0j and inG.

We claim that the edge setSofP0is a feasible solution to the constructed DIRECTED

or UNDIRECTEDEULERIANEDGEDELETIONinstance. As it is contained inG0j, we have|S| ≤k. Since inGthe only odd (unbalanced) vertices weresandt,G\S is even (balanced). We now verify that each vertexv ∈V(G)is (weakly) connected to the vertexr inG\S. It is clear for each v ∈ V0, sinceEr ∩S = ∅, where Erdenotes the set of edges in the paths betweenV0andr(note that eachv ∈V0 is connected torby a positive number of paths). For the other vertices, note that if C= (e1, e2)∈Sp

i=1Ci, then eithere1ore2does not belong toP(saye1∈/ P) and the cyclexCe1, z1C, xCe2, zC2 is connected torvia subdivided edgee1and its endpoints.

Note that in the directed case it is sufficient to ensure only weak connectivity, as a balanced graph is weakly connected if and only if it is strongly connected.

In the opposite direction, let S be a solution to the constructed DIRECTED or UNDIRECTEDEULERIANEDGE DELETIONinstance. We assume that|S|is mini- mum possible. It is easy to see that sinceG\Sis even (balanced) and|S|is minimal, Sneeds to induce a simple pathP0 fromstot. This path cannot contain a neigh- bourr0 ofr, since otherwiser0 becomes isolated inG\S. ThusP0is contained in graphG0jfor some1≤j ≤p. Moreover, note thatP0cannot contain any vertexzCα, as otherwisezCα becomes isolated inG\S. ThusP0 naturally defines a pathPin Gj with endpointssj andtj. Observe that if for someC = (e1, e2) ∈ Cjthe path Pcontained bothe1ande2, then inG\S the cyclexCe1, z1C, xCe2, z2Cwould be un- reachable from the rest of the graphG. Thus,Pis a feasible solution to the instance (Gj, sj, tj,Cj).

Degree reduction.We now show how to modify the presented construction to obtain an instance with maximum degree4. First note that ifv ∈ V(G)\(V0∪ {r})we clearly havedG(v)≤4. Moreover, if the degrees in(Gi, si, ti,Ci)are bounded as in Lemma 5, then for anyv∈V0\ {s, t}the number of unattached paths connecting v andrcan be chosen so thatv is even (balanced) and we havedG(v) ≤ 4in the undirected case anddinG(v), doutG (v)≤2in the directed one. Thus, we are left with the verticess,tandr.

We first reduce the degree of verticess andt. By duplicating some input in- stances we may ensure that their number is a power of two,p = 2`. We replaces

(13)

andtwith full binary treesTsandTtof height`, rooted atsrandtr. In the directed case, the edges in the treeTsare directed towards the leaves, whereas the edges in the treeTtare directed towards the roottr. For each instance(Gj, sj, tj,Cj)we identify sjwith one leaf inTsandtjwith one leaf inTt, so that each instance is assigned to different leaves inTsandTt. Finally, we connect each vertex of the treesTsandTt withrusing one or two unattached paths of length two, so thatdG(sr) =dG(tr) = 3 (doutG (sr) = 2 = 1 +dinG(sr)anddinG(tr) = 2 = 1 +doutG (tr)in the directed case) and each other vertex inTsandTtis of degree4and, in the directed case, balanced.

As for the vertex r, we replace it with a (directed) cycle of length dG(r)/2, with each vertex on the cycle adjacent to exactly two edges previously incident tor(one incoming arc and one outgoing arc in the directed case). Finally, we set k= 2`+ maxpi=1|V(G0i)| −1 =O(logp+ maxpi=1|V(Gi)|+|Ci|). Note that now a minimum solutionS to the constructed DIRECTEDor UNDIRECTEDEULERIAN

EDGE DELETIONinstance needs to induce a simple pathP0fromsrtotrthat first goes down the treeTsto a leafsj(for some1≤j ≤p), then traverses the graphG0j, inducing a solutionPto the instance(Gj, sj, tj,Cj), and finally goes up the treeTt

starting at the leaftj. ut

5 Node-deletion problems

We first consider the following two node-deletion problems:

DIRECTEDBALANCED(or EULERIAN) NODEDELETION Parameter:k Input: A directed graphGand an integerk

Question: Does there exist a set of at mostkverticesS⊆V(G)such thatG\S is balanced (or Eulerian)?

The undirected versions of these problems, namely UNDIRECTED EVEN and UNDIRECTEDEULERIANNODEDELETION, are defined analogously. While these undirected variants were already shown to be W[1]-hard with parameterk by Cai and Yang [9], the complexity of the directed versions has not been studied yet. The following theorem shows that they are intractable as well.

Theorem 7 DIRECTEDBALANCEDNODEDELETIONandDIRECTEDEULERIAN

NODEDELETIONareNP-hard andW[1]-hard with parameterk.

Proof We firstly treat the balanced case, then we proceed to the eulerian case.

Balanced case.We present an FPT-reduction from the DISJOINTSETCOVERprob- lem to DIRECTED BALANCED NODE DELETION. The input of this problem is a triple(U,F, k)whereU is some universe,F ={F1, . . . , Fn}is a family of subsets ofU, andkis an integer. The task is to decide whether there is a collectionH⊆F with|H| ≤kthat covers each element ofU exactly once, i.e., such that the sets in Hare pairwise disjoint and their union isU. Given such an input, we are going to construct a directed graphGsuch that(G, k)is a YES-instance of DIRECTEDBAL-

ANCEDNODEDELETIONif and only if(U,F, k)is a YES-instance of DISJOINTSET

COVER. Moreover, the presented reduction will be polynomial-time computable. As

(14)

DISJOINT SETCOVERis NP-hard, and also W[1]-hard with parameterk[25], this suffices to prove the theorem.

Given (U,F, k), for any u ∈ U, letn(u) denote the number of sets inF that containu. For eachu∈U, we introduce two verticesu1andu2inG, and connect them byn(u)−1unattached paths of lengthk+ 2, each starting fromu1and leading tou2. We denote byD the set of all internal vertices on these paths, each having degree 2 inG. Furthermore, for eachFi ∈Fwe introduce a vertexfi, and add the arcs(fi, u1)and(u2, fi)for eachu∈ Fi. This finishes the construction ofG. It is not hard to see that the reduction is indeed polynomial.

Now, suppose thatG\Sis balanced for someS⊆V(G),|S| ≤k. Note that ifS contains any vertexdon a path of lengthk+ 2leading from someu1tou2(allowing d=u1ord=u2), then allk+ 1internal vertices of this path should be inS, which contradicts|S| ≤k. Thus, we get thatS⊆ {fi|Fi∈F}. Observe also that for each u∈U, we getdinG(u1) =doutG (u1)+1 =doutG\S(u1)+1, hence the deletion ofSmust decrease the indegree of each vertexu1(u∈U) by exactly one. By the definition of G, this means that the setsFiforfi∈Sform a family of at mostkpairwise disjoint sets together coveringU, as required.

For the other direction, it is straightforward to see that if S ⊆ F is a solution for the DISJOINT SET COVER instance, then deleting the vertex set{fi | Fi ∈ S} fromGresults in a balanced graph. This observation relies on the fact thatdinG(u1) = doutG (u1) + 1anddinG(u2) =doutG (u2)−1hold for eachu∈U, and thatdin(v) = dout(v)holds for each remaining vertexv. This proves our statement for DIRECTED

BALANCEDNODEDELETION.

Eulerian case.Now, we give a reduction from DIRECTEDBALANCEDNODEDELE-

TIONproblem to DIRECTEDEULERIANNODEDELETION. Given an input(G, k)we construct(G0, k)in polynomial time such that there is a setS ⊆V(G)with|S| ≤k for whichG\Sis balanced if and only if there is a setS0 ⊆V(G0)with|S0| ≤kfor whichG0\S0is Eulerian.

To constructG0, we simply add toGa new vertexr, and connect each vertex tor by a pair of twin arcs. On one hand, ifG0\S0is Eulerian for someS0 ⊆V(G0), then G\(S0\ {r})must be balanced, as deletingrfrom the balanced graphG0\S0still yields a balanced graph. On the other hand, ifG\Sis balanced for someS⊆V(G), then observe thatG0\Sis balanced as well. Furthermore, since each vertex inG0\S is connected by a pair of twin arcs tor,G0\Sis Eulerian as well, finishing the proof.

u t

As Table 1 shows, the node-deletion variant is W[1]-hard in all four cases, while the edge-deletion version is FPT or even polynomial-time solvable. What makes the node-deletion versions harder? One obvious difference is that in the edge-deletion problem the answer is trivially no if there are more than2kodd/unbalanced vertices, but the node-deletion versions can have a solution even if the number of such nodes is unbounded. This suggests that the higher complexity comes from the ability of affecting the degree of many vertices by a single vertex deletion. Indeed, if every vertex has degree bounded by∆, then we can solve all of the above defined node- deletion problems in O((∆+ 1)k(|V(G)|+|E(G)|))time by a simple branching algorithm. However, this interpretation is not fully correct: as we shall show, the

(15)

node-deletion problems are hard even if we are allowed to delete only vertices of constant degree.

To this end, we define the following variation of the four different node-deletion problems, where α can be UNDIRECTED EVEN, UNDIRECTED EULERIAN, DI-

RECTEDBALANCED, or DIRECTEDEULERIAN:

αNODEDELETION WITHFORBIDDENNODES Parameter:k

Input: A graphG, a setF ⊆V(G)offorbidden nodes, and an integerk.

Question: Does there exist a solutionS ⊆V(G)for(G, k)with respect to the correspondingαNODEDELETIONproblem such thatS∩F =∅and|S| ≤k?

In other words, we require the solution to be disjoint from a set of forbidden vertices. A vertex isallowed, if it is not forbidden. For each of the four node-deletion problems, the above variant is at least as hard as the original problem, and in fact has the same complexity: this variant can easily be reduced to the original version, by attaching long unattached cycles to every forbidden vertex. Furthermore, we show that allowing only the deletion of bounded-degree vertices does not make the problem easier:

Theorem 8 Each of the problemsαNODE DELETION WITHFORBIDDEN NODES

whereαisUNDIRECTEDEVEN, UNDIRECTEDEULERIAN, DIRECTEDBALANCED, orDIRECTEDEULERIANremainsW[1]-hard with parameterk, even if each allowed vertex has degree at most 4.

We prove Theorem 8 in two steps. Theorem 9 deals with the cases where we aim for an even or a balanced graph, while Theorem 10 handles the two Eulerian cases.

Let∆abe the maximum degree taken over all allowed vertices.

Theorem 9 UNDIRECTED EVEN and DIRECTED BALANCED NODE DELETION WITHFORBIDDENNODESremainW[1]-hard with parameterk, even if∆a= 4.

Proof We firstly describe the undirected case, then we present how the construction can be refined for the directed case.

Undirected case.We present a parameterized reduction from the W[1]-hard MULTI-

COLOUREDCLIQUEproblem [15] to UNDIRECTEDEVENNODEDELETION WITH

FORBIDDEN NODES with∆a = 4. The input of MULTICOLOURED CLIQUEis a graphG = (V, E)and an integerk together with a partitionV1, V2, . . . , Vk of V where eachViis an independent set; the task is to find a clique of sizekinG. W.l.o.g.

we assume thatk≥3, as otherwise the instance can be solved via brute-force.

Firstly, we claim that one can assume that for each vertex vand for each Vj it holds that|N(v)∩Vj|is even. This can be achieved without changing the answer to our instance in the following manner. For each pairi, j(1 ≤i, j ≤k,i 6=j) we introduce a new vertexai,jintoVjand connect it with all the vertices ofVihaving an odd number of neighbours inVj. Consider the graph induced byVi∪Vj∪ {ai,j, aj,i}.

By the definition ofai,j, aj,iwe know that all the vertices of Vi andVj have even degrees in this graph. As the sum of degrees in every graph is even, ai,j has odd degree if and only ifaj,ihas. Therefore, we introduce an edgeai,jaj,iif the degree ofai,j is odd. From the construction we infer that the claimed property holds, i.e.,

(16)

for each vertexv and for eachVj we have that|N(v)∩Vj|is even. Note that the vertexai,jcannot be contained in anyk-clique inG, asN(ai,j)⊆Vi. This ensures correctness of the construction.

We are going to construct an instance(G0, F, k0)of UNDIRECTEDEVENNODE

DELETION WITHFORBIDDENNODESwithk0=k2+k. For each vertexv∈Vi, we build a node gadgetGvas follows. We introduce verticesvjfor each0≤j≤k+ 1 and a vertex ev,z for each z ∈ NG(v). For each z ∈ NG(v)∩Vj wherej < i we connect ev,z withvj and vj+1, and for eachz ∈ NG(v)∩Vj wherej > i we connectev,zwithvj−1 andvj. For eachj ∈ {1,2, . . . , k} \ {i}we denote by Aj(v)the vertices connected to bothvjandvj+1. Furthermore, we introduce edges v0v1,v1vk, andvkvk+1; this finishes the definition ofGv. Notice that each vertex inV(Gv)\ {v0, vk+1}has even degree, due to the property ensured in the previous paragraph. Moreover, the union of all the setsAj(v)forms an independent set, and every member of this set has degree exactly2. See Fig. 1 for reference.

v0 v1 v2 v3

. . . vi−1 vi vi+1

. . . vk−2vk−1 vk vk+1

. . . . . .

A1 A2 Ai−1 Ai+1 Ak−1 Ak

Fig. 1: Vertex gadgetGvforv∈Vi.

Let G0 contain the disjoint union of graphsGv for v ∈ V, and let us add the vertex setsP = {si, ti | 1 ≤ i ≤ k} andD = {dx,y, dy,x | xy ∈ E} toG0. We connect eachsi with the verticesv0 wherev ∈ Vi, and similarly, eachti with the vertices vk+1 wherev ∈ Vi. In addition, for each edgexy in Gwe connect the verticesex,y, dx,y, ey,x, dy,xin this order via a cycle of length 4. To finish the construction ofG0, we add the edgesitiin casesi(and henceti) would have an even degree otherwise. Notice that the odd degree vertices inG0 are exactly the vertices ofP. Finally, we let the set of forbidden vertices to beF ={vj |v ∈V,1 ≤j ≤ k} ∪D∪P. As the allowed vertices are only the vertices of the formv0,vk+1, or ex,y, the claimed property∆a= 4indeed holds.

First suppose that X = {x1, . . . , xk}is a clique in Gwith eachxi ∈ Vi. We prove thatS={x0, xk+1|x∈X} ∪ {ex,y, ey,x|x, y∈X, x6=y}is a solution for (G0, F, k0). Clearly,|S|=k2+k =k0andS∩F =∅hold, so it suffices to show thatG0\S is an even graph. AsX contains exactly one vertex from each partition Vi, each vertex inP has one neighbour inS, so the vertices ofP will become even inG0\S. RegardingD, only those verticesdx,yanddy,xhave a neighbour inS, for whichx, y ∈X holds, and these vertices will lose exactly two neighbours, namely ex,yandey,x, when deletingS. A vertexvjcan only have a neighbour inSifv∈X, and in such a case it is not hard to verify thatvjwill have exactly two neighbours in

(17)

S. Verticesex,y ∈/Sdo not have neighbours inS, so they stay even. This shows that the first direction of the reduction is sound.

For the other direction, suppose thatSis a solution for(G0, F, k0). For eachi, the vertexsimust have at least one neighbour inS; suppose thatv0is such a vertex. Then, sincev1is connected tov0andN(v1)\ {v0}=A1(v), we know that|A1(v)∩S|is odd. Using thatN(vj)\Aj−1(v) =Aj(v)for each2≤j≤k−1, and thatv1, . . . , vk are forbidden vertices, we can deduce for eachj= 2, . . . , k−1that|Aj(v)∩S|must be odd as well. Hence,vk+1∈Sfollows. Therefore, ifScontains a vertexv0, then it must contain altogether at leastk+1vertices from the node gadgetGv. By our bound on the size ofS, we obtain thatScontains vertices from exactlyknode gadgets, and ifScontains a vertex fromGv, then it containsv0,vk+1, and one vertex from each of the setsA1(v), . . . , Ak−1(v). LetXcontain those verticesxinGfor whichx0∈S, and letY contain those pairs(x, y)for whichex,y ∈S. By the previous observations, we know|Y|=k(k−1)and|X|=k. Suppose that(x, y)∈Y. Note thatx∈ X andy∈NG(x)are immediate from the definition ofGv. By looking at the forbidden verticesdx,y anddy,x, we getey,x ∈ S, yielding(y, x) ∈Y. Therefore,y ∈ X as well, and thus each pair inY must contain the end-vertices of an edge connecting two vertices ofX. By the size ofX andY we get thatXmust be a clique of sizek, finishing the proof for the undirected case.

Directed case.The reduction for the directed case is very similar to the one used in the undirected case, and hence we only describe the differences. First, we direct the edges of each cycleex,y, dx,y, ey,x, dy,xin a way that they span a directed cycle.

Then for each setVi of the partition and for eachv ∈ Vi, we direct every edgee incident to a vertex ofGv, except for the edgev1vk, in the direction in whicheis traversed when going fromsitotithroughevia a shortest path throughGv\ {v1vk}.

We remove the edgev1vk, but for eachvjwith1≤j≤k−1we introduce a certain number of parallel arcs fromvj+1tovj in order to ensure each vertex ofGv to be balanced; this means|A1(v)| −1arcs fromv2tov1,|Ak−1(v)| −1arcs fromvkto vk−1, and|Aj(v)|arcs fromvj+1tovjfor each remainingj. As a result, each vertex ofV(G)\P becomes balanced. Finally, we add|Vi| −1arcs fromtitosi, for each i. The set of forbidden verticesF and the parameterk0 remains unchanged. Also,

a = 4remains true.

Clearly, eachsimust lose an outgoing arc and each vertextimust lose an incom- ing arc in a solution. Arguing along similar thoughts as above, one can show that the constructed instance is equivalent with the original one.

In case we want to get rid of parallel arcs, we can simply subdivide each arc contained in a set of parallel arcs with a newly introduced forbidden vertex of degree 2. ut

Theorem 10 UNDIRECTED and DIRECTED EULERIAN NODE DELETION WITH

FORBIDDENNODESremainW[1]-hard with parameterk, even if∆a= 4.

Proof Considering the directed version of the problem, the theorem follows from the proof of Theorem 9.

Consider the construction given in the proof of Theorem 9. Observe that each al- lowed vertex is only connected to forbidden vertices. Thus, if we ensure that the for- bidden vertices remain in one connected component ofGafter deleting an arbitrary

(18)

set of allowed vertices, then we also ensure that the whole graph remains connected.

This can be done by introducing a new forbidden vertexr, and connectingrto each forbidden vertex by a pair of twin arcs. As each allowed vertex has the same degree as originally, we can conclude that∆a = 4will still hold in the transformed instance.

For the undirected version we can use the modified version of the reduction above, by connecting each forbidden vertex tor using a pair of parallel edges (or two unattached paths of length 2 with middle vertices fobidden) instead of the twin arcs. ut

Now we prove that ifeveryvertex has bounded degree, then we can solve all of theαNODE DELETION WITH FORBIDDENNODESproblems, even with forbidden nodes, efficiently. The following simple algorithm works:

1. If the parameterkis negative, or we aim for an Eulerian induced subgraph andG is disconnected, then stop and return NO.

2. If the given graphGis already balanced/even/Eulerian, then stop and return the solution collected so far.

3. Otherwise, choose an arbitrary vertexvthat is not balanced/even, and branch on removing fromGeithervor one of its neighbours. In case the deleted vertexx was forbidden, stop and return NO in the corresponding branch. Otherwise, put the deleted vertexxinto the solution, decrease the value of the parameter tok−1, and go to Step 1.

The above algorithm can clearly be implemented to run inO((∆+ 1)k(|V(G)|+

|E(G)|))time. Its soundness can be proven easily by induction w.r.t. the size of the solution, using the simple observation that ifvis a vertex that is not balanced/even, then eithervor at least one of its neighbours must be in the solution. Thus, we can conclude:

Theorem 11 There is anO((∆+ 1)k(|V(G)|+|E(G)|))time algorithm that solves theαNODEDELETION WITHFORBIDDENNODESproblem, whereαcan beUNDI-

RECTED EVEN, UNDIRECTEDEULERIAN, DIRECTEDBALANCED,orDIRECTED

EULERIAN.

6 Conclusion

We completed the analysis of the complexity of making a graph Eulerian via edge or vertex deletions. There are two open problems that we would like to emphasise here.

First, do there exist FPT algorithms for the edge-deletions problems running in timecknO(1)? It seems hard to obtain such algorithms using our techniques, mainly due to the fact that the witness subgraphW may containΩ(k2)close edges, as was discussed in Section 4.2.

Second, Cechl´arov´a and Schlotter in [10] asked for the parameterized complexity of a related problem, where the task is to delete at mostkarcs from a directed graph to obtain a graph where each strongly connected component is Eulerian. This problem seems to be significantly different than the problems considered in this paper, as for example it includes DIRECTEDFEEDBACK VERTEXSET [10], and, to the best of our knowledge, the question of its parameterized complexity still remains open.

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

The following problem, called Maximum Stable Marriage with Ties and Incomplete Lists (or shortly MaxSMTI), has been shown to be NP-hard [84]: given an instance I of SMTI and an

Edge Clique Cover : Given a graph G and an integer k, cover the edges of G with at most k cliques.. (the cliques need not be edge disjoint) Equivalently: can G be represented as

Patterns with small vertex cover number are is easy to count:. Theorem

bounds for polynomial time solvable problems, and for running time of

1.2 Related Works on Parameterized Graph Modification Problems The F-Vertex Deletion problems corresponding to the families of edgeless graphs, forests, chordal graphs, interval

In this paper, we describe new complexity results and approximation algorithms for single-machine scheduling problems with non-renewable resource constraints and the total

We showed that Bounded P -Component Vertex Deletion and Bounded P -Block Vertex Deletion admit single-exponential time algorithms parameterized by treewidth, whenever P is a class

We also remark that the number of iterations in algorithms for the transfer theorems give generic upper bounds on the trial complexity of the hidden CSPs In the constraint index