• Nem Talált Eredményt

Hitting forbidden subgraphs in graphs of bounded treewidth

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Hitting forbidden subgraphs in graphs of bounded treewidth"

Copied!
23
0
0

Teljes szövegt

(1)

Hitting forbidden subgraphs in graphs of bounded treewidth

I

Marek Cygana, D´aniel Marxb, Marcin Pilipczukc, Michał Pilipczuka

aInstitute of Informatics, University of Warsaw, Poland

bInstitute for Computer Science and Control, Hungarian Academy of Sciences (MTA SZTAKI), Hungary

cDepartment of Computer Science, University of Warwick, United Kingdom

Abstract

We study the complexity of a generic hitting problemH-SubgraphHitting, where given a fixed pattern graphHand an input graphG, the task is to find a setX⊆V(G) of minimum size that hits all subgraphs ofGisomorphic toH. In the colorful variant of the problem, each vertex ofGis precolored with some color fromV(H) and we require to hit only H-subgraphs with matching colors. Standard techniques shows that for every fixedH, the problem is fixed-parameter tractable parameterized by the treewidth ofG; however, it is not clear how exactly the running time should depend on treewidth. For the colorful variant, we demonstrate matching upper and lower bounds showing that the dependence of the running time on treewidth ofGis tightly governed byµ(H), the maximum size of a minimal vertex separator inH. That is, we show for every fixedHthat, on a graph of treewidtht, the colorful problem can be solved in time 2O(tµ(H))· |V(G)|, but cannot be solved in time 2o(tµ(H))· |V(G)|O(1), assuming the Exponential Time Hypothesis (ETH).

Furthermore, we give some preliminary results showing that, in the absence of colors, the parameterized complexity landscape ofH-SubgraphHittingis much richer.

Keywords: fixed-parameter tractability, treewidth, forbidden subgraphs

1. Introduction

The “optimality programme” is a thriving trend within parameterized complexity, which focuses on pursuing tight bounds on the time complexity of parameterized problems. Instead of just determining whether the problem is fixed- parameter tractable, that is, whether the problem with a certain parameterkcan be solved in time f(k)·nO(1)for some computable function f(k), the goal is to determine the best possible dependence f(k) on the parameterk. For several problems, matching upper and lower bounds have been obtained on the function f(k). The lower bounds are under the complexity assumption Exponential Time Hypothesis (ETH), which roughly states thann-variable 3SAT cannot be solved in time 2o(n); see, e.g., the survey of Lokshtanov et al. [1].

One area where this line of research was particularly successful is the study of fixed-parameter algorithms param- eterized by the treewidth of the input graph and understanding how the running time has to depend on the treewidth.

Classic results on model checking monadic second-order logic on graphs of bounded treewidth, such as Courcelle’s Theorem, provide a unified and generic way of proving fixed-parameter tractability of most of the tractable cases of this parameterization [2, 3]. While these results show that certain problems are solvable in time f(t)·non graphs of treewidthtfor some functionf, the exact functionf(t) resulting from this approach is usually hard to determine and far from optimal. To get reasonable upper bounds on f(t), one typically resorts to constructing a dynamic programming algorithm, which often is straightforward, but tedious.

The question whether the straightforward dynamic programming algorithms for bounded treewidth graphs are optimal received particular attention in 2011. On the hardness side, Lokshtanov, Marx and Saurabh proved that many natural algorithms are probably optimal [4, 5]. In particular, they showed that there are problems for which

IA preliminary version of this work has been presented at MFCS 2014.

Email addresses:cygan@mimuw.edu.pl(Marek Cygan),dmarx@cs.bme.hu(D´aniel Marx),malcin@mimuw.edu.pl(Marcin Pilipczuk), michal.pilipczuk@mimuw.edu.pl(Michał Pilipczuk)

(2)

the 2O(tlogt)ntime algorithms are best possible, assuming ETH. On the algorithmic side, Cygan et al. [6] presented a new technique, calledCut&Count, that improved the running time of the previously known (natural) algorithms for many connectivity problems. For example, previously only 2O(tlogt) ·nO(1) algorithms were known for Hamiltonian Cycleand FeedbackVertexSet, which was improved to 2O(t)·nO(1)by Cut&Count. These results indicated that not only proving tight bounds for algorithms on tree decompositions is within our reach, but such a research may lead to surprising algorithmic developments. Further work includes derandomization of Cut&Count in [7, 8], an attempt to provide a meta-theorem to describe problems solvable in single-exponential time [9], and a new algorithm for Planarization[10].

We continue here this line of research by investigating a family of subgraph-hitting problems parameterized by treewidth and find surprisingly tight bounds for a number of problems. An interesting conceptual message of our results is that, for every integerc ≥ 1, there are fairly natural problems where the best possible dependence on treewidth is of the form 2O(tc).

Studied problems and motivation. In our paper we focus on the following genericH-SubgraphHittingproblem: for a pattern graphH and an input graphG, what is the minimum size of a setX ⊆ V(G) that hits all subgraphs of G that are isomorphic toH? (Henceforth we call themH-subgraphs for brevity.) This problem generalizes a few other problems studied in the literature, for example VertexCover(forH =P2) [4], or finding the largest induced subgraph of maximum degree at most∆(forH=K1,∆+1) [11]. We also study the followingcolorfulvariant Colorful H-SubgraphHitting, where the input graphGis additionally equipped with a coloringσ:V(G)→V(H), and we are only interested in hittingH-subgraphs where every vertex matches its color.

A direct source of motivation for our study is the work of Pilipczuk [9], which attempted to describe graph problems admitting fixed-parameter algorithms with running time of the form 2O(t)· |V(G)|O(1), wheretis the treewidth ofG. The proposed description is a logical formalism where one can quantify existence of some vertex/edge sets, whose properties can be verified “locally” by requesting satisfaction of a formula of modal logic in every vertex. In particular, Pilipczuk argued that the language for expressing local properties needs to be somehow modal, as it cannot be able to discover cycles in a constant-radius neighborhood of a vertex. This claim was supported by a lower bound:

unless ETH fails, for any constant`≥5, the problem of finding the minimum size of a set that hits all the cyclesC`

in a graph of treewidthtcannot be solved in time 2o(t2)· |V(G)|O(1). Motivated by this result, we think that it is natural to investigate the complexity of hitting subgraphs for more general patternsH, instead of just cycles.

We may see the colorful variant as an intermediate step towards full understanding of the complexity of H- SubgraphHitting, but it is also an interesting problem on its own. It often turns out that the colorful variants of problems are easier to investigate, while their study reveals useful insights; a remarkable example is the kernelization lower bound for SetCoverand related problems [12]. In our case, if we allow colors, a major combinatorial difficulty vanishes: when the algorithm keeps track of different parts of the patternHthat appear in the graphG, and combines a few parts into a larger one, the coloringσensures that the parts are vertex-disjoint. Hence, the colorful variant is easier to study, whereas at the same time it reveals interesting insight into the standard variant.

Our results and techniques. In the case of ColorfulH-SubgraphHitting, we obtain a tight bounds for the complexity of the treewidth parameterization. First, note that, in the presence of colors, one can actually solve Colorful H- SubgraphHittingfor each connected component ofHindependently; hence, we may focus only on connected patterns H. Second, we observe that there are two special cases. IfHis a path then ColorfulH-SubgraphHittingreduces to a maximum flow/minimum cut problem, and hence is polynomial-time solvable. IfHis a clique, then anyH-subgraph ofGneeds to be contained in a single bag of any tree decomposition, and there is a simple 2O(t)|V(G)|-time algorithm, wheretis the treewidth ofG. Finally, for the remaining cases we show that the dependence on treewidth is tightly connected to the value ofµ(H), the maximum size of a minimal vertex separator inH(a separatorS is minimal if there are two verticesx,ysuch thatS is anxy-separator, but no proper subset ofS is). We prove the following matching upper and lower bounds.

Theorem 1. AColorfulH-SubgraphHittinginstance(G, σ)can be solved in time2O(tµ(H))|V(G)|in the case when H is connected and is not a clique, where t is the treewidth of G.

Theorem 2. Let H be a graph that contains a connected component that is neither a path nor a clique. Then, unless ETH fails, there does not exist an algorithm that, given aColorfulH-SubgraphHittinginstance(G, σ)and a tree decomposition of G of width t, resolves(G, σ)in time2o(tµ(H))|V(G)|O(1).

(3)

In every theorem of this paper, we treatHas a fixed graph of constant size, and hence the factors hidden in the O-notation may depend on the size ofH.

In the absence of colors, we give preliminary results showing that the parameterized complexity of the treewidth parameterization ofH-SubgraphHittingis more involved than the one of the colorful counterpart. In this setting, we are able to relate the dependence on treewidth only to a larger parameter of the graphH. Letµ?(H) be the maximum size ofNH(A), whereAiterates over connected subsets ofV(H) such thatNH(NH[A]),∅, i.e.,NH[A] is not a whole connected component ofH. Observe thatµ(H)≤µ?(H) for anyH. First, we were able to construct a counterpart of Theorem 1 only with the exponentµ?(H).

Theorem 3. Assume H contains a connected component that is not a clique. Then, given a graph G of treewidth t, one can solve H-SubgraphHittingon G in time2O(tµ?(H)logt)|V(G)|.

We remark that for ColorfulH-SubgraphHitting, an algorithm with running time 2O(tµ?(H))|V(G)|(as opposed toµ(H) in the exponent in Theorem 1) is rather straightforward: in the state of dynamic programming one needs to remember, for every subsetXof the bag of size at mostµ?(G), all forgotten connected parts of Hthat are attached toX and not hit by the constructed solution. To decrease the exponent toµ(H), we introduce a “prediction-like”

definition of a state of the dynamic programming, leading to highly involved proof of correctness. For the problem without colors, however, even an algorithm with the exponentµ?(H) (Theorem 3) is far from trivial. We cannot limit ourselves to keeping track of forgotten connected parts of the graphHindependently of each other, since in the absence of colors these parts may not be vertex-disjoint and, hence, we would not be able to reason about their union in latter bags of the tree decomposition. To cope with this issue, we show that the set of forgotten (not necessarily connected) parts of the graphHthat are subgraphs ofGcan be represented as awitness graphwithO(tµ?(H)) vertices and edges. As there are only 2O(tµ?(H)logt)possible graphs of this size, the running time bound follows.

We also observe that the bound ofO(tµ?(H)) on the size of the witness graph is not tight for many patternsH. For example, ifHis a path, then we are able to find a witness graph withO(t) vertices and edges, and the algorithm of Theorem 3 runs in time 2O(tlogt)|V(G)|.

From the lower bound perspective, we were not able to prove an analogue of Theorem 2 in the absence of colors.

However, there is a good reason for that: we show that for any fixedh ≥2 andH =K2,h, theH-SubgraphHitting problem is solvable in time 2O(t2logt)|V(G)|for a graphGof treewidtht. This should be put in contrast withµ?(K2,h)= µ(K2,h)=h. Moreover, the lower bound of 2o(th)can be proven if we break the symmetry ofK2,hby attaching a triangle to each of the two degree-hvertices ofK2,h(obtaining a graph we denote byHh; see Figure 3).

Theorem 4. Unless ETH fails, for every h≥2there does not exist an algorithm that, given a Hh-SubgraphHitting instance G and a tree decomposition of G of width t, resolves G in time2o(th)|V(G)|O(1).

This indicates that the optimal dependency ontin an algorithm forH-SubgraphHittingmay heavily rely on the symmetries ofH, and may be more difficult to pinpoint.

Organization of the paper. After setting notation in Section 2, we prove Theorem 3 in Section 3, with a special emphasize on the existence of the witness graph in the begining of the section. We discuss the special cases of H- SubgraphHittingin Section 4. The proofs of results for the colorful variant, namely Theorems 1 and 2, are provided in Sections 5 and 6, respectively. Section 7 concludes the paper.

2. Preliminaries

Graph notation. In most cases, we use standard graph notation. At-boundaried graphis a graphGwith a prescribed (possibly empty)boundary∂G⊆V(G) with|∂G| ≤t, and an injective functionλG:∂G→ {1,2, . . . ,t}. For a vertex v∈∂Gthe valueλG(v) is called thelabelofv.

Acolored graphis a graphGwith a functionσ:V(G)→ L, whereLis some finite set of colors. A graphGis H-colored, for some other graphH, ifL=V(H). We also say in this case thatσis anH-coloring ofG.

A homomorphism from graph H to graphG is a function π : V(H) → V(G) such thatab ∈ E(H) implies π(a)π(b) ∈ E(G). In theH-colored setting, i.e., whenG isH-colored, we also require thatσ(π(a)) = a for any a ∈ V(H) (every vertex ofH is mapped onto appropriate color). The notion extends also tot-boundaried graphs:

(4)

Figure 1: Red vertices denote a slice (left), chunk (centre) and separator chunk (right) in a graphHbeing a path. The light-red vertices belong to the boundary.

if bothH andGaret-boundaried, we require that whenevera ∈ ∂Hthenπ(a) ∈ ∂GandλG(π(a)) = λH(a). Note, however, that we allow that a vertex ofV(H)\∂His mapped onto a vertex of∂G.

AnH-subgraph of Gis any injective homomorphismπ:V(H)→ V(G). Recall that in thet-boundaried setting, we require that the labels are preserved, whereas in the colored setting, we require that the homomorphism respects colors. In the latter case, we call it aσ-H-subgraph of Gfor clarity.

We say that a setX ⊆V(G)hitsa (σ-)H-subgraphπifX∩π(V(H)) ,∅. The (Colorful)H-SubgraphHitting problem asks for a minimum possible size of a set that hits all (σ-)H-subgraphs ofG.

(Nice) tree decompositions. For any nodesw,w0 in a rooted treeT, we say thatw0 is adescendantof w(denoted w0w) ifwlies on the unique path betweenw0androot(T), the root ofT. Atree decompositionof a graph is a pair (T, β), whereTis a rooted tree, andβ:V(T)→2V(G)is a mapping satisfying:

• for each vertexv∈V(G), the set{w∈V(T)|v∈β(w)}induces a nonempty and connected subtree ofT,

• for each edgee∈E(G), there existsw∈V(T) such thate⊆β(w).

The width of a decomposition (T, β) equals maxw∈V(T)|β(w)| −1, and the treewidth of a graph is the minimum possible width of its decomposition.

For a tree decomposition (T, β), we define two auxiliary mappings:

γ(w)= [

w0w

β(w0), α(w)=γ(w)\β(w).

In our dynamic programming algorithms, it is convenient to work on the so-callednice tree decompositions. A tree decomposition (T, β) isniceifβ(root(T))=∅and each nodew∈V(T) is of one of the following four types:

leaf node wis a leaf ofTandβ(w)=∅.

introduce node whas exactly one childw0, and there exists a vertexv∈V(G)\β(w0) such thatβ(w)=β(w0)∪ {v}.

forget node whas exactly one childw0, and there exists a vertexv∈β(w0), such thatβ(w)=β(w0)\ {v}.

join node whas exactly two childrenw1,w2andβ(w)=β(w1)=β(w2).

It is well known (see e.g. [13]) that any tree decomposition of widthtcan be transformed, without increasing its width, into a nice decomposition withO(t|V(G)|) nodes.

Hence, by an application of the recent 5-approximation for treewidth [14], in all our algorithmic results we im- plicitely assume that we are given a nice tree decomposition ofGwithO(t|V(G)|) nodes and of widthlessthant, so that each bag is of size at mostt. (This shift of the value oftby one is irrelevant for the complexity bounds, but makes the notation much cleaner.) Moreover, we may assume that we also have a functionΛ:V(G)→ {1,2, . . . ,t}such that, for each nodew∈V(T),Λ|β(w)is injective. (Observe that it is straightforwad to constructΛin a top-bottom manner. ) Consequently, we may treat each graphG[γ(w)] as at-boundaried graph with∂G[γ(w)]=β(w) and labelingΛ|β(w).

(5)

(a) In a pathPh,h≥5, we haveµ(Ph)=1 (a separa- tor chunk is depicted green) whereasµ?(Ph)=2 (a corresponding chunk is depicted red).

(b) In a double star we haveµ(H) =µ?(H) =1 (a chunk is depicted red).

(c) In a subdivided starµ?(H) equals the degree of the center (a corresponding chunk is depicted red), whereasµ(H) = 1 as in all trees on at least three vertices.

(d) In a clique without one edge,µ(H) =µ?(H) =

|V(H)| −2 (a corresponding separator chunk is de- picted red).

(e) In a biclique Ka,b, a,b ≥ 2, we have µ(H) = µ?(H) = max(a,b) (a corresponding separator chunk is depicted red).

Figure 2: Examples of graphs with the values ofµ(H) andµ?(H). In each example, the vertices with lighter color belong to the boundary of a corresponding chunk.

Important graph invariants, chunks, and slices. For two verticesa,b∈V(H), a setS ⊆V(H)\{a,b}is anab-separator ifaandbare not in the same connected component ofH\S. The setS is additionally aminimal ab-separatorif no proper subset ofS is anab-separator. A setS is aminimal separatorif it is a minimalab-separator for some a,b∈V(H). For a graphH, byµ(H) we denote the maximum size of a minimal separator inH.

For an induced subgraphH0 =H[D],D⊆V(H), we define the boundary∂H0 =NH(V(H)\D) and the interior intH0=D\∂H[D]; thusV(H0)=∂H0]intH0. Observe thatNH(intH0)⊆∂H0; the inclusion can be proper, as it is possible that a vertex of∂H0has no neighbor in intH0. An induced subgraphH0ofHis asliceifNH(intH0)=∂H0, and achunkif additionallyH[intH0] is connected. For a setA⊆V(H), we usep[A] (c[A]) to denote the unique slice (chunk) with interiorA(if it exists). The intuition behind this definition is that, when we consider some bagβ(w) in a tree decomposition, a slice is a part ofHthat may already be present inG[γ(w)] and we want to keep track of it. If a slice (chunk)pis additionally equipped with an injective labelingλp:∂p→ {1,2, . . . ,t}, then we call the resulting t-boundaried graph at-slice(t-chunk, respectively).

Byµ?(H) we denote the maximum size of∂c, whereciterates over all chunks ofH. We remark here that both µ(H) andµ?(H) are positive only for graphsHthat contain at least one connected component that is not a clique, as otherwise there are no chunks with nonempty boundary nor minimal separators inH.

Observe that ifS is a minimalab-separator in H, andAis the connected component of H\S that containsa, thenNH(A)=S andc[A] is a chunk inHwith boundaryS. Consequently,µ(H)≤µ?(H) for any graphH. A chunk

(6)

cfor which∂cis a minimal separator inHis henceforth called aseparator chunk. See also Figures 1 and 2 for an illustration.

Exponential Time Hypothesis and SAT instances. Our lower bounds are based on theExponential Time Hypothesis (ETH) of Impagliazzo and Paturi [15]. We do not need here its formal definition, but instead we rely on the following corollary of the celebrated Sparsification Lemma [16].

Theorem 5([16]). Unless ETH fails, there does not exist an algorithm that can resolve satisfiability of a n-variable m-clause3-CNF formula in time2o(n+m).

In our reductions we start from a slightly preprocessed 3-SAT instances. We say that a 3-CNF formulaΦisclean if each variable ofΦappears exactly three times, at least once positively and at least once negatively, and each clause ofΦcontains two or three literals and does not contain twice the same variable.

Lemma 6. Given any3-CNF formulaΦ, one can in polynomial time compute an equivalent clean formulaΦ0of size linearly bounded in the size ofΦ, such thatΦ0is satisfiable if and only ifΦis.

Proof. First, preprocessΦas follows:

1. Simplify all clauses that contain repeated variables: delete all clauses that contain both a variable and its nega- tion, and remove duplicate literals from the remaining clauses.

2. As long as there exists a variable xthat appears only positively or only negatively, fix the evaluation ofxthat satisfies all clauses containingxand simplify the formula.

3. As long as there exists a clauseC with only one literal, fix the evaluation of this literal that satisfiesC and simplify the formula.

4. If some clause becomes empty in the process, return a dummy unsatisfiable clean formula.

Observe that after this preprocessing the size ofΦcould have only shrunk, while each variable now appears at least twice.

Second, replace every variable xwith a cycle of implications x1 ⇒ x2 ⇒ . . . ⇒ xs(x) ⇒ x1, where s(x) is the number of appearances ofxinΦ. More formally, for every variablex:

1. introduce s(x) new variablesx1,x2, . . . ,xs(x), and replace each occurence of xinΦwith a distinct variable xi; and

2. introduces(x) new clausesxi⇒ xi+1(i.e.,¬xi∨xi+1) fori=1,2, . . . ,s(x), wherexs(x)+1=x1.

Observe that, after this replacement, each variablexiappears exactly three times in the formulaΦ: positively in the implicationxi−1 ⇒ xi, negatively in the implicationxi⇒ xi+1(with the conventionx0 =xs(x) andxs(x)+1 = x1), and the third time in one former literal of the variablex. Moreover, as after the first step each variable appears at least twice inΦ, for every former variablexwe haves(x)≥2 and no new clause contains twice the same variable. Finally, note that the second step increases the size of the formula only by a constant factor. The lemma follows.

3. General algorithm forH-SubgraphHitting

In this section we present an algorithm forH-SubgraphHittingrunning in time 2O(tµ?(H)logt)|V(G)|, wheretis the width of the tree decomposition we are working on. The general idea is the natural one: for each nodewof the tree decomposition, for each setbX ⊆β(w), and for each familyPoft-slices, we would like to find the minimum size of a setX ⊆α(w) such that, if we treatG[γ(w)] as at-boundaried graph with∂G[γ(w)]=β(w) and labelingΛ|β(w), then any slice that is a subgraph ofG[γ(w)\(X∪X)] belongs tob P. However, as the number oft-slices can be as many as t|H|, we have too many choices for the familyP.

(7)

3.1. The witness graph

The essence of the proof, encapsulated in the next lemma, is to show that each “reasonable” choice ofPcan be encoded as awitness graphof essentially sizeO(tµ?(H)). Such a claim would give a 2O(tµ?(H)logt)bound on the number of possible witness graphs, and provide a good bound on the size of state space.

Lemma 7. Assume H contains a connected component that is not a clique. Then, for any t-boundaried graph(G, λ) there exists a t-boundaried graph(G, λ)b that (a) is a subgraph of (G, λ), (b) ∂G = ∂G and G[∂G]b = G[∂bb G], (c) Gb\E(G[∂bb G]) containsO(tµ?(H))vertices and edges, and, (d) for any t-slice p and any set Y ⊆ V(G) such that

|Y|+|V(p)| ≤ |V(H)|, there exists ap-subgraph in(G\Y, λ)if and only if there exists one in(Gb\Y, λ).

Proof. We defineGbby a recursive procedure. We start withGb=G[∂G]. Then, for everyt-chunkc= (H0, λ0), we invoke a procedureenhance(c,∅). The procedureenhance(c,X), forX ⊆V(G), first tries to find ac-subgraphπin (G\X, λ). If there is none, the procedure terminates. Otherwise, it first adds all edges and vertices ofπ(c) toGbthat are not yet present there. Second, if|X|<|V(H)|, then it recursively invokesenhance(c,X∪ {v}) for eachv∈π(c).

We first bound the size of the constructed graphG. There are at most 2b |V(H)|tµ?(H)choices for the chunk, since a chunkcis defined by its vertex set, and there are at mosttµ?(H)labelings of its boundary. The procedureenhance(c,X) at each step adds at most one copy ofHtoG, and branches into at most|V(H)|directions. The depth of the recursion is bounded by|V(H)|. Hence, in total at most 2|V(H)|tµ?(H)·(|V(H)|+|E(H)|)· |V(H)||V(H)|=O(tµ?(H)) edges and vertices are added toG, except for the initial graphb G[∂G] (recall that we considerHto be a fixed graph and the constants hidden by the big-Onotation can depend onH).

It remains to argue thatGbsatisfies property (d). Clearly, since (bG, λ) is a subgraph of (G, λ), the implication in one direction is trivial. In the other direction, we start with the following claim.

Claim 8. For any set Z ⊆V(G)of size at most|V(H)|, and for any t-chunkc, if there exists ac-subgraph in(G\Z, λ) then there exists also one in(Gb\Z, λ).

Proof. Letπbe ac-subgraph in (G\Z, λ). DefineX0 =∅. We will construct setsX0 (X1 (. . ., whereXi ⊆Z for everyi, and analyse the calls to the procedureenhance(c,Xi) in the process of constructingG.b

Assume thatenhance(c,Xi) has been invoked at some point during the construction; clearly this is true forX0=∅. Since we assumeXi⊆Z, there exists ac-subgraph in (G\Xi, λ) —πis one such example. Hence,enhance(c,Xi) has found ac-subgraphπi, and added its image toG. Ifb πiis ac-subgraph also in (Gb\Z, λ), then we are done. Otherwise, there existsvi ∈Z\Xithat is also present in the image ofπi. In particular, since|Z| ≤ |V(H)|, we have|Xi|<|V(H)|

and the callenhance(c,Xi∪ {vi}) has been invoked. We defineXi+1:=Xi∪ {vi}.

Since the sizes of setsXigrow at each step, for someXi,i≤ |Z|, we reach the conclusion thatπiis ac-subgraph of

(Gb\Z, λ), and the claim is proven. y

Fix now a setY ⊆V(G) and at-slicepwith labelingλpand with|Y|+|V(p)| ≤ |V(H)|. Letπbe ap-subgraph of (G\Y, λ). LetA1,A2, . . . ,Arbe the connected components ofH[intp]. DefineHi=NH[Ai], and observe that eachHi

is a chunk with∂Hi =NH(Ai) ⊆∂p. We defineλip|∂Hi to obtain at-chunkci =(Hi, λi). By the properties of a t-slice, each vertex ofpis present in at least one graphci, and vertices of∂pmay be present in more than one.

We now inductively define injective homomorphismsπ0, π1, . . . , πrsuch thatπimaps the subgraph ofpinduced by∂p∪S

j≤iAjto (Gb\Y, λ), and does not use any vertex ofS

j>iπ(Aj). Observe thatπris ap-subgraph of (bG\Y, λ).

Hence, this construction will conclude the proof of the lemma.

For the base case, recall thatπ(∂p)⊆∂G=∂bGand defineπ0 =π|∂p. For the inductive case, assume thatπi−1has been constructed for some 1≤i≤r. Define

Zi=Y∪π(∂p\∂Hi)∪[

j<i

πi−1(Aj)∪[

j>i

π(Aj).

Note that sinceπandπi−1are injective andYis disjoint withπ(∂p), then we have thatZi∩π(∂p)=π(∂p\∂Hi). This observation and the inductive assumption onπi−1imply that the mappingπ|V(Hi)does not use any vertex ofZi. Thus, π|V(Hi)is aci-subgraph in (G\Zi, λ). Observe moreover that|Zi| ≤ |Y|+|V(p)| ≤ |V(H)|. By Claim 8, there exists a ci-subgraphπ0iin (bG\Zi, λ). Observe that, sinceπ0iandπi−1are required to preserve labelings on boundaries of their preimages,πi :=π0i ∪πi−1is a function and a homomorphism. Moreover, by the definition ofZiiis injective and

(8)

does not use any vertex ofS

j>iπ(Aj). Hence,πisatisfies all the required conditions, and the inductive construction is completed. This concludes the proof of the lemma.

3.2. The dynamic programming algorithm

Using Lemma 7, we now define states of the dynamic programming algorithm on the input tree decomposition (T, β). For every nodew∈V(T), astateis a pairs=(bX,G) whereb bX⊆β(w) andGbis a graph withO(tµ?(H)) vertices and edges such thatβ(w)\Xb ⊆ V(G) andb G[β(w)b \bX] = G[β(w)\bX]. We treatGbas at-boundaried graph with

∂bG=β(w)\bXand labelingΛ|β(w)\bX. We say that a setX ⊆α(w) isfeasibleforwandsif for everyY ⊆β(w)\bXand for everyt-slicepsuch that|Y|+|V(p)| ≤ |V(H)|, if there is ap-subgraph in (G[γ(w)\(X∪bX∪Y)],Λ|β(w)\(bX∪Y)) then there is also one in (bG\Y,Λ|β(w)\(bX∪Y)). For everywand every states, we would like to computeT[w,s], the minimum possible size of a feasible setX. Note that by Lemma 7 the answer to the inputH-SubgraphHittinginstance is the minimum value ofT[root(T),(∅,G)] whereb Gbiterates over all graphs withO(tµ?(H)) vertices and edges that do not contain thet-slice (H,∅) as a subgraph. Hence, it remains to show how to compute the valuesT[w,s] in a bottom-up manner in the tree decomposition.

We start the description with the following two auxiliary definitions.

For twot-boundaried graphs (G1, λ1) and (G2, λ2), we say that (G1, λ1) is awitness-subgraphof (G2, λ2) if∂G1 =

∂G212and, for every setY ⊆∂G1and everyt-slicepsuch that|Y|+|V(p)| ≤ |V(H)|, if there exists ap-subgraph in (G1\Y, λ1), then there exists also one in (G2 \Y, λ2). Let us emphasize that, maybe slightly counterintuitively, a witness-subgraph is not necessarily a subgraph; the ‘sub’ term corresponds to admitting a subfamily oft-slices as subgraphs. Observe that, if bothG1andG2are of sizetO(1)(e.g., they are parts of a state, or they were obtained from Lemma 7), a brute-force algorithm checks the relation of being a witness-subgraph intO(1)time.

LetP⊆V(H). Observe thatNH[intH[P]] ⊆PandH[NH[intH[P]]] is the unique inclusion-wise maximal slice with vertex set being a subset ofP. We call the sliceH[NH[intH[P]]] thecore sliceofP, and the remaining vertices P\NH[intH[P]] thepeelingsof P. Observe that intH[NH[intH[P]]] =intH[P],∂H[NH[intH[P]]] ⊆∂H[P], and

∂H[P]\∂H[NH[intH[P]]] equals the peelings ofP.

In the description, for brevity, we use∅to denote not only an empty set, but also an empty graph. Moreover, for a t-boundaried graph (G, λ) and a setY⊆V(G), we somewhat abuse the notation and write (G\Y, λ) for thet-boundaried graph (G\Y, λ|∂G\Y).

We assume we are given anice tree decomposition (T, β) of the input graph G, and a labeling Λ : V(G) → {1,2, . . . ,t}that is injective on every bag. We now describe how to conduct computations in each of the four types of nodes in the tree decomposition (T, β). In all cases, it will be clear from the description that all computations for a single nodewcan be done in time polynomial intand the number of states per one node, and hence we do not further discuss the time complexity of the algorithm.

Leaf node.It is immediate that∅is feasible for every leaf nodewand every statesatw, and henceT[w,s]=0 is the correct value.

Introduce node.Consider now an introduce nodewwith childw0, and the unique vertexv∈β(w)\β(w0). Furthemore, consider a single states=(bX,G) at nodeb w; we are to computeT[w,s].

First, consider the casev∈bX. Then, it is straightforward to observe thats0:=(bX\ {v},G) is a state forb w0, and the families of feasible sets for statesandwand for states0andw0are equal. Thus,T[w,s]=T[w0,s0] and we are done.

Consider now the casev<bX. Defineλ:= Λ|β(w)\bXandλ0:= Λ|β(w0)\bX. We compute a familySof states at the node w0and defineT[w,s]=mins0ST[w0,s0]. We are going to prove that

1. for everys0∈S, and everyXthat is feasible forw0ands0,Xis also feasible forwands;

2. for everyXthat is feasible forwands, there existss0∈Ssuch thatXis also feasible forw0ands0.

Observe that such properties ofSwill imply the correctness of the computation ofT[w,s]. We now proceed to the construction ofS.

We iterate through all statess0 = (bX0,Gb0) for the nodew0and inserts0intoS if the following conditions hold.

First, we requirebX=Xb0. Second, we construct a graphGb0vby adding the vertexvtoGb0, and makingvadjacent to all verticesu∈∂Gb0=β(w0)\bXfor whichvu∈E(G). Observe thatGb0v[β(w)\bX]=G[β(w)b \bX]=G[β(w)\bX], andvhas

(9)

exactly the same neighbourhood inGb0vand inG. To includeb s0inS, we require that (Gb0v, λ) is a witness-subgraph of (G, λ).b

We first argue about Property 1. Lets0=(bX,Gb0)∈Sand letXbe feasible forw0ands0; we are to prove thatXis also feasible forwands. To this end, consider a setY⊆β(w)\Xband at-slicepsuch that|Y|+|V(p)| ≤ |V(H)|. Letπbe ap-subgraph in (G[γ(w)\(X∪Xb∪Y)], λ). LetP=π−1(γ(w0)); note that in particularv<π(P). Letp0be the core slice ofP, and letQbe the peelings ofP. Observe that for everya∈∂P=Q∪∂p0we haveπ(a),vand, moreover, either a∈∂porπ(a)∈NG[γ(w)](v). In both cases,π(a)∈β(w0)\(bX∪Y) and we may defineλP(a) := Λ(π(a)). Note that with the labelingλP|∂p0, the slicep0becomes at-slice, andπ|V(p0)is ap0-subgraph of (G[γ(w0)\(X∪bX∪Y∪π(Q))], λ0).

SinceXis feasible forw0ands0, and|Y|+|π(Q)|+|V(p0)| ≤ |Y|+|V(p)| ≤ |V(H)|, we have that there exists ap0-subgraph π0in (Gb0\(Y∪π(Q)), λ0). As no vertex ofY,π(Q) norvbelongs to the image ofπ0, and vertices ofQare not adjacent to the vertices of intp0inH, a direct check shows thatπ0∪π|V(p)\V(p0) is ap-subgraph of (Gb0v\Y, λ). Recall that we require that (bG0v, λ) is a witness-subgraph of (bG, λ). Consequently, there exists ap-subgraph of (Gb\Y, λ). Since the choice ofYandpwas arbitrary,Xis feasible forwands.

For Property 2, letXbe a feasible set forwands. LetGb0be the witness graph, whose existence is guaranteed by Lemma 7 for the graph (G[γ(w0)\(X∪X)], λb 0). Defines0=(bX,Gb0). Observe thats0is a valid state forw0. By definition ofGb0, the setXis feasible forw0ands0. It remains to show thats0∈S, that is, that (bG0v, λ) is a witness-subgraph of (G, λ).b

To this end, consider a setY ⊆ β(w)\bX and at-slicepsuch that|Y|+|V(p)| ≤ |V(H)|. Letπbe ap-subgraph in (Gb0v\Y, λ). Similarly as before, let P = π−1(V(Gb0)); again, note that v < π(P). Letp0be the core slice of P, and letQbe the peelings ofP. Observe that for everya ∈ ∂P =Q∪∂p0we haveπ(a) , vand, moreover, either a ∈ ∂por π(a) ∈ N

Gb0v(v). In both cases, π(a) ∈ β(w0)\(bX∪Y), and we may defineλP(a) := Λ(π(a)). Note that with the labelingλP|∂p0, the slicep0becomes at-slice, andπ|V(p0) is ap0-subgraph of (Gb0\(Y ∪π(Q)), λ0). Since

|Y|+|π(Q)|+|V(p0)| ≤ |Y|+|V(p)| ≤ |V(H)|, by the properties of the witness graph guaranteed by Lemma 7, we have that there exists ap0-subgraphπ0of (G[γ(w0)\(X∪Xb∪Y∪π(Q))], λ0). As no vertex ofY,π(Q) norvbelongs to the image ofπ0, and vertices ofQare not adjacent to the vertices of intp0inH, a direct check shows thatπ0∪π|V(p)\V(p0) is ap-subgraph of (G[γ(w)\(X∪bX∪Y)], λ). SinceXis feasible forwands, there exists ap-subgraph of (Gb\Y, λ).

As the choice ofYandpwas arbitrary, (bG0v, λ) is a witness-subgraph of (G, λ), andb s0∈S. This finishes the proof of the correctness of computations at an introduce node.

Forget node.Consider now a forget nodewwith childw0, and the unique vertexv∈β(w0)\β(w). Lets=(bX,G) be ab state forw; we are to computeT[w,s]. Defineλ:= Λ|β(w)\bX andλ0:= Λ|β(w0)\bX.

First, observe thatsv:=(bX∪ {v},G) is also a valid state for the nodeb w0. Note thatX∪ {v}is feasible forsif and only ifXis feasible forw0andsv: the question of feasibility ofX∪ {v}forwandsandXforw0andsvin fact inspects the same subgraph ofG. Consequently, we take 1+T[w0,sv] as one candidate value forT[w,s].

In the remainder of the computations for the forget node we identify a familySof valid states for the nodew0. We prove that

1. for everys0∈S, and everyXthat is feasible forw0ands0,Xis also feasible forwands;

2. for everyXthat is feasible forwands, and such thatv<X, there existss0∈Ssuch thatXis also feasible forw0 ands0.

This claim will imply that

T[w,s]=min(1+T[w0,sv],min

s0S

T[w0,s0]).

The familySis defined as follows. We iterate through all valid statess0 = (bX0,Gb0) for the nodew0. First, we requirebX0=bX. Second, we define the graphGb0vas the graphGb0with the labelΛ(v) of the nodevforgotten, that is, Gb0vandGb0are equal as simple graphs and∂bG0v=∂Gb0\ {v}=β(w)\X. To includeb s0inS, we require that (Gb0v, λ) is a witness-subgraph of (G, λ).b

For Property 1, lets0=(bX,Gb0)∈Sand letXbe feasible forw0ands0; we are to prove thatXis also feasible forw ands. To this end, consider a setY ⊆β(w)\bXand at-slicepsuch that|Y|+|V(p)| ≤ |V(H)|. Letπbe ap-subgraph in (G[γ(w)\(X∪bX∪Y)], λ). Note thatπis also ap-subgraph in (G[γ(w0)\(X∪bX∪Y)], λ0). SinceXis feasible forw0 ands0, there exists ap-subgraphπ0in (Gb0\Y, λ0). Aspdoes not use the labelΛ(v), by the definition ofGb0v0is also a

(10)

p-subgraph of (Gb0v\Y, λ). Since (Gb0v, λ) is a witness-subgraph of (G, λ), there exists ab p-subgraph in (Gb\Y, λ). Since the choice ofYandpwas arbitrary,Xis feasible forwandsand Property 1 is proven.

For Property 2, letXbe a feasible set forwands, and assumev<X. LetGb0be the witness graph, whose existence is guaranteed by Lemma 7, for the graph (G[γ(w0)\(X∪bX)], λ0). Defines0=(bX,Gb0). Observe thats0is a valid state forw0. By definition ofGb0, the setXis feasible forw0ands0. It remains to show thats0 ∈S, that is, that (Gb0v, λ) is a witness-subgraph of (G, λ).b

To this end, consider a setY ⊆β(w)\bXand at-slicepsuch that|Y|+|V(p)| ≤ |V(H)|. Letπbe ap-subgraph in (Gb0v\Y, λ). By the definition ofGb0v,πis also ap-subgraph of (Gb0\Y, λ0). By the properties of the witness graph of Lemma 7, there exists ap-subgraphπ0of (G[γ(w0)\(X∪bX∪Y)], λ0). Aspdoes not use the labelΛ(v),π0is also a p-subgraph of (G[γ(w)\(X∪Xb∪Y)], λ). SinceXis feasible forwands, there exists ap-subgraph of (G, λ). As theb choice ofYandpwas arbitrary, (Gb0v, λ) is a witness-subgraph of (G, λ) and, consequently,b s0∈S.

This finishes the proof of the correctness of the computations at the forget node.

Join node.Letwbe a join node with childrenw1andw2, and lets=(bX,G) be a state forb w. Defineλ= Λ|β(w)\bX. Our goal is to define a familySof pairs of states (s1,s2) such thatsiis a valid state for the nodewifori=1,2, and:

1. for every (s1,s2) ∈ S, and every pair of setsX1,X2, such that Xi is feasible forwi andsi, i = 1,2, the set X:=X1∪X2is feasible forwands;.

2. for everyXthat is feasible forwands, there exists a pair (s1,s2)∈Ssuch that the setXi:=X∩α(wi) is feasible forwiandsi,i=1,2.

This claim will imply that

T[w,s]= min

(s1,s2)∈S

T[w1,s1]+T[w2,s2].

The familySis defined as follows. We iterate through all pairs (s1,s2) such thatsi =(bXi,Gbi) is a valid state for the nodewi,i=1,2. First, we requirebX=bX1 =Xb2. Second, we define the graphGb1⊕Gb2as a disjoint union of the graphsGb1andGb2 with the boundaries∂bG1 =∂bG2 =β(w)\Xbidentified. To include (s1,s2) intoS, we require that (Gb1⊕Gb2, λ) is a witness-subgraph of (G, λ).b

For Property 1, let (s1,s2) ∈ S,si = (bX,Gbi) fori = 1,2. Recall thatXi is feasible forwi andsi,i = 1,2, and X =X1∪X2; we are to prove thatXis feasible forwands. To this end, letY ⊆β(w)\Gband letpbe at-slice such that|Y|+|V(p)| ≤ |V(H)|. Assume there exists ap-subgraphπin (G[γ(w)\(X∪bX∪Y)], λ).

First, letP1 = π−1(γ(w1)). Letp1 be the core slice of P1, and letQ1 be the peelings of P1. Observe that for everya∈ ∂P1 =Q1∪∂p1we haveπ(a)∈ β(w)\(bX∪Y), and we may defineλ1(a) := Λ(π(a)). Note that with the labelingλ1|∂p1, the slicep1 becomes at-slice, andπ|V(p1) is ap1-subgraph of (G[γ(w1)\(X1∪bX∪Y ∪π(Q1))], λ).

SinceX1 is feasible forw1 ands1, and|Y|+|π(Q1)|+|V(p1)| ≤ |Y|+|V(p)| ≤ |V(H)|, we have that there exists a p1-subgraphπ1 in (Gb1\(Y ∪π(Q1)), λ). As no vertex ofY∪π(Q1) belongs to the image ofπ1, and vertices ofQ1

are not adjacent to the vertices of intp1 inH, a direct check shows thatπ := π1 ∪π|V(p)\V(p1) is ap-subgraph of ((Gb1⊕G[γ(w2)\(X2∪bX)])\Y, λ).

We now perform the same operation forw2 andπ. That is, letP2−1 (γ(w2)). Letp2be the core slice ofP2, and letQ2be the peelings ofP2. Again, we haveπ(∂P2)⊆β(w)\(bX∪Y) and we defineλ2:= Λ|∂P2, turningp2into a t-slice. The mappingπ|V(p2)is ap2-subgraph of (G[γ(w2)\(X2∪Xb∪Y∪π(Q2))], λ). SinceX2is feasible forw2and s2, and|Y|+|π(Q2)|+|V(p2)| ≤ |Y|+|V(p)| ≤ |V(H)|, we have that there exists ap2-subgraphπ2in (Gb2\(Y∪π(Q2)), λ).

Similarly as before, a direct check shows thatπ2∪π|V(p)\V(p2)is ap-subgraph of ((Gb1⊕Gb2)\Y, λ).

Recall that we require that (Gb1⊕Gb2, λ) is a witness-subgraph of (G, λ). Consequently, there exists ab p-subgraph in (Gb\Y, λ). Since the choice ofY andpwas arbitrary,Xis feasible forwands.

For Property 2, letXbe a feasible set forwands. Fori=1,2, recall thatXi=X∩α(wi) and letGbibe the witness graph whose existence is guaranteed by Lemma 7 for the graph (G[γ(wi)\(Xi∪bX)], λ). Observe thatsi:=(bX,Gbi) is a valid state for the nodewi. Moreover, by definition,Xiis feasible forwiandsi. To finish the proof of Property 2, it suffices to show that (s1,s2)∈S, that is, (Gb1⊕Gb2, λ) is a witness-subgraph of (G, λ).b

To this end, consider a setY ⊆ β(w)\bX and at-slicepsuch that|Y|+|V(p)| ≤ |V(H)|. Letπbe ap-subgraph in (bG1 ⊕Gb2, λ). LetP1 = π−1(V(bG1)), let p1 be the core slice ofP1, and let Q1 be the peelings of P1. Observe that for everya ∈ ∂P1 = Q1∪∂p1 we haveπ(a) ∈ β(w)\(bX∪Y), and we may defineλ1(a) := Λ(π(a)). Note

(11)

that with the labelingλ1|∂p1, the slicep1 becomes at-slice, andπ|V(p1) is ap1-subgraph of (Gb1\(Y∪π(Q1)), λ). As

|Y|+|π(Q1)|+|V(p1)| ≤ |Y|+|V(p)| ≤ |V(H)|, by the properties of the witness graph of Lemma 7, there exists a p1-subgraphπ01of (G[γ(w1)\(X1∪bX∪Y∪π(Q1))], λ). As no vertex ofY∪π(Q1) belongs to the image ofπ01, and vertices ofQ1 are not adjacent to the vertices of intp1 inH, a direct check shows thatπ := π01 ∪π|V(p)\V(p1) is a p-subgraph of ((G[γ(w1)\(X1∪bX)]⊕Gb2)\Y, λ).

We now perform a similar operation forw2andπ. LetP2−1 (V(Gb2)), letp2be the core slice ofP2, and letQ2

be the peelings ofP2. Sinceπ(∂P2)⊆β(w)\(bX∪Y), we defineλ2:= Λ|∂P2, turningp2into at-slice. The mapping π|V(p2)is ap2-subgraph of (Gb2\(Y∪π(Q2)), λ). As|Y|+|π(Q2)|+|V(p2)| ≤ |Y|+|V(p)| ≤ |V(H)|, by the properties of the witness graph of Lemma 7, there exists ap2-subgraphπ02of (G[γ(w2)\(X2∪bX∪Y∪π(Q2))], λ). Similarly as before, a direct check shows thatπ02∪π|V(p)\V(p2)is ap-subgraph of (G[γ(w)\(X∪Xb∪Y)], λ).

Since X is feasible forwand s, there exists a p-subgraph of (G, λ). As the choice ofb Y and pwas arbitrary, (Gb1⊕Gb2, λ) is a witness-subgraph of (G, λ) and (sb 1,s2)∈S.

This finishes the proof of the correctness of computations at a join node.

This finishes the description of the dynamic programming algorithm for Theorem 3, and concludes its proof.

4. Discussion on special cases ofH-SubgraphHitting

As announced in the introduction, we now discuss a few special cases ofH-SubgraphHitting. 4.1. Hitting a path

First, let us considerHbeing a path,H=Ph for someh ≥3. Note thatµ(Ph)=1, whileµ?(Ph)=2 forh≥5.

Observe that in the dynamic programming algorithm of the previous section we have thatG[γ(w)\(X∪Xw)] does not contain anH-subgraph and, hence, the witness graph obtained through Lemma 7 does not contain anH-subgraph as well. However, graphs exludingPhas a subgraph have treedepth (and hence treewidth as well) bounded byh(since any their depth-first search tree has depth bounded byh). Using this insight, we can derive the following improvement of Lemma 7, that improves the running time of Theorem 3 to 2O(tlogt)|V(G)|forHbeing a path.

Lemma 9. Assume H is a path. Then, for any t-boundaried graph(G, λ)that does not contain an H-subgraph, there exists a witness graph as in Lemma 7 withO(t)vertices and edges.

Proof. In this proof, bywitness graphwe mean any graph (G, λ) that satisfies the requirements of Lemma 7, for fixedb input (G, λ) and a graphHbeing a path.

A witness graph (G, λ) isb minimalif, for everyv∈ V(G)b \∂Gbthe graph (Gb\ {v}, λ) is not a witness graph. We claim that, in the caseH=Ph, every minimal witness graphGbhas onlyO(t) vertices and edges, assumingGdoes not contain anyH-subgraph. Clearly, this claim will prove Lemma 9.

Fix a minimal witness graph (G, λ). Sinceb H=Phis connected, observe the following: any connected component CofGbneeds to contain at least one vertex of∂bG, as otherwise (Gb\C, λ) is a witness graph as well, a contradiction.

For each connected componentCofG, we fix some depth-first search spanning treeb TCofG[C], rooted in some vertexb rC ∈∂bG∩C. SinceG(and thusG) does not contain anb H-subgraph, the depth ofTCis less thanh=O(1). SinceTC

is a depth-first search tree, all the edges ofCconnect vertices that are in ancestor-descendant relation inTC; in other words,Cis a subgraph of the ancestor-descendant closure ofTC.

Consider anyv∈C. Letv1,v2, . . . ,vsbe the children ofvin the treeTCand letTibe the subtree ofTCrooted at vi. Without loss of generality, assume that there exists 0≤r≤ssuch that a treeTicontains a vertex of∂bGif and only ifi>r. We claim thatr≤h4=O(1).

Let us first verify that this claim proves that|C| =O(|∂bG∩C|), and hence summing up through the components C will conclude the proof of Lemma 9. SinceTC has depth less thath, and there are|∂Gb∩C|vertices inC that belong to∂bG, we infer that in TC there are at mosth|∂bG∩C|verticesusuch that the subtree rooted atucontains some vertex of∂G. However, if we consider any vertexb usuch that subtree rooted atudoes not contain any vertex of∂G, then this subtree must be of sizeb O(h4h): its depth is less thanh, and every vertex has at mosth4 children.

Therefore, the treeTCcontains at mosth|∂bG∩C|verticesuwhose subtrees contain vertices of∂G, and each of theseb

(12)

vertices has at mosth4subtrees rooted at its children that are free from∂G, and thus have sizeb O(h4h). We infer that

|V(C)|=|V(TC)| ≤h|∂Gb∩C| ·(1+h4· O(h4h))=O(|∂bG∩C|), becausehis considered a constant.

In order to prove thatr≤h4, let us mark some of the treesTi, 1≤i≤r. LetrC =w0,w1, . . . ,wp=vbe the path betweenrCandvin the treeTC; note that we havep<h. For any 0≤a<b≤ p, and for any 3≤l<h, mark anyh treesTi, 1≤i≤r, such thatG[{wa,wb} ∪Ti] contains a path betweenwa andwb with exactlylvertices. (If there is less thanhsuch trees, we mark all of them.) For any 0≤a≤p, and for any 2≤l<h, mark anyhtreesTi, 1≤i≤r, such thatG[{wa} ∪Ti] contains a path with endpointwaand with exactlylvertices. (Again, if there is less thanhsuch trees, we mark all of them.) We claim that all treesTi, 1≤i ≤rare marked; as we have marked less thanh4trees, this would conclude the proof of the lemma.

By contradiction, without loss of generality assume thatT1is not marked. We claim that (Gb\T1, λ) is a witness graph as well. Consider anyY ⊆ V(G) andt-slicepsuch that|Y|+|V(p)| ≤ |V(H)| and assume there exists ap- subgraph in (G\Y, λ). By the definition of a witness graph, there exists ap-subgraph in (Gb\Y, λ). Letπbe such a subgraph that contains a minimum possible number of vertices ofT1in its image. We claim that there are none, and πis ap-subgraph in (bG\(Y∪T1), λ) as well. Assume the contrary. SinceT1does not contain any vertex of∂G, thereb exists a subpathH0ofp, with|V(H0)|=lfor somel<h, such that either (a) both endpoints ofH0are mapped byπto somewa,wb, 0≤a<b≤p, and the internal vertices ofH0are mapped toT1; or (b) one endpoint ofH0is mapped by πto somewa, 0≤a≤p, and all other vertices ofH0are mapped toT1. SinceT1was not marked, we infer that in both cases there exist at leasthmarked treesTithat also contain such a subpathH0. Since the union ofY and the image ofπhas cardinality at mosth, we infer that there exists a treeTithat was marked for the same choice ofa,bandlin case (a), oraandlin case (b), and, furthermore, no vertex ofTiis contained neither inYnor in the image ofπ. We modifyπby remapping all vertices ofV(H0)∩π−1(T1) to the corresponding vertices ofTi. In this manner we obtain a p-subgraph of (Gb\Y, λ) with strictly less vertices inT1in its image, a contradiction to the choice ofπ. Hence,πdoes not use any vertex ofT1, and is ap-subgraph of (Gb\(Y∪T1), λ). This concludes the proof.

Corollary 10. For every positive integer h, the Ph-SubgraphHittingproblem can be solved in time2O(tlogt)|V(G)|on a graph G of treewidth t.

4.2. Hitting pumpkins

Now let us considerH = K2,h for someh ≥ 2 (such a graph is sometimes called apumpkinin the literature).

Observe thatµ?(K2,h)=µ(K2,h)=h. On the other hand, we note the following.

Lemma 11. Assume H=K2,hfor some h≥2. If the witness graph given by Lemma 7 does not admit an H-subgraph, then it hasO(t2)vertices and edges.

Proof. Since the constructed witness graph Gbdoes not admit an H-subgraph, each two verticesv1,v2 ∈ ∂bGhave less thanhcommon neighbours inG, as otherwise there is ab H-subgraph inGbon verticesv1,v2andhvertices of NGb(v1)∩N

Gb(v2). Hence

X

v∈V(G)\∂b Gb

|NGb(v)∩∂bG|

2

!

≤(h−1) |∂bG| 2

!

≤(h−1) t 2

!

. (1)

LetV(H)={a1,a2,b1,b2, . . . ,bh}whereA:={a1,a2}andB:={b1,b2, . . . ,bh}are bipartition classes ofH. Note that there are only two types of proper chunks inH: NH[ai],i=1,2 andNH[bj], 1≤ j ≤h. Hence, one can easily verify that in the construction of the witness graphGbof Lemma 7 every vertexv∈Gb\∂Gbhas at least two neighbours in∂bG, andGb\∂bGis edgeless. Then we have|N

Gb(v)∩∂G| ≤b 2|N

Gb(v)∩∂G|b 2

for eachv∈V(G)b \∂G. Consequently, by (1)b there are at most 2(h−1)t

2

edges ofGbwith exactly one endpoint in∂G, whereas there are at mostb t

2

edges inG[∂bb G].

The lemma follows.

Lemma 11 together with the dynamic programming of Section 3.2 imply thatK2,h-SubgraphHittingcan be solved in time 2O(t2logt)|V(G)|, in spite of the fact thatµ?(K2,h)=µ(K2,h)=h.

Corollary 12. For every positive integer h, the K2,h-SubgraphHittingproblem can be solved in time2O(t2logt)|V(G)|

on a graph G of treewidth t.

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

In this article, I discuss the need for curriculum changes in Finnish art education and how the new national cur- riculum for visual art education has tried to respond to

By examining the factors, features, and elements associated with effective teacher professional develop- ment, this paper seeks to enhance understanding the concepts of

Together with standard dynamic programming techniques on graphs of bounded treewidth, this statement gives subexponential parameterized algorithms for a number of subgraph

We obtain a number of lower bounds on the running time of algorithms solving problems on graphs of bounded treewidth.. We prove the results under the Strong Exponential Time

If G is a regular multicolored graph property that is closed under edge addition, and if the edge-deletion minimal graphs in G have bounded treewidth, then the movement problem can

Let G be a minor-closed class of graphs having bounded local

We give the first polynomial-time approximation scheme (PTAS) for the Steiner forest problem on planar graphs and, more generally, on graphs of bounded genus.. As a first step, we

The claim follows because we can de- termine the parity of the number of hitting sets of size at most t in the set system F ϕ,p by running the best algorithm for the