# Width Parameterizations for Knot-free Vertex Deletion on Digraphs

A knot in a directed graph G is a strongly connected subgraph Q of G with at least two vertices, such that no vertex in V(Q) is an in-neighbor of a vertex in V(G)∖ V(Q). Knots are important graph structures, because they characterize the existence of deadlocks in a classical distributed computation model, the so-called OR-model. Deadlock detection is correlated with the recognition of knot-free graphs as well as deadlock resolution is closely related to the Knot-Free Vertex Deletion (KFVD) problem, which consists of determining whether an input graph G has a subset S ⊆ V(G) of size at most k such that G[V∖ S] contains no knot. In this paper we focus on graph width measure parameterizations for KFVD. First, we show that: (i) KFVD parameterized by the size of the solution k is W[1]-hard even when p, the length of a longest directed path of the input graph, as well as κ, its Kenny-width, are bounded by constants, and we remark that KFVD is para-NP-hard even considering many directed width measures as parameters, but in FPT when parameterized by clique-width; (ii) KFVD can be solved in time 2^O(tw)× n, but assuming ETH it cannot be solved in 2^o(tw)× n^O(1), where tw is the treewidth of the underlying undirected graph. Finally, since the size of a minimum directed feedback vertex set (dfv) is an upper bound for the size of a minimum knot-free vertex deletion set, we investigate parameterization by dfv and we show that (iii) KFVD can be solved in FPT-time parameterized by either dfv+κ or dfv+p; and it admits a Turing kernel by the distance to a DAG having an Hamiltonian path.

## Authors

• 9 publications
• 7 publications
• 1 publication
• 1 publication
• 10 publications
06/13/2019

### A Turing Kernelization Dichotomy for Structural Parameterizations of F-Minor-Free Deletion

For a fixed finite family of graphs F, the F-Minor-Free Deletion problem...
05/30/2019

### Parametrised Algorithms for Directed Modular Width

Many well-known NP-hard algorithmic problems on directed graphs resist e...
02/11/2021

### Edge Deletion to Restrict the Size of an Epidemic

Given a graph G=(V,E), a set ℱ of forbidden subgraphs, we study ℱ-Free E...
03/19/2018

### Parameterized complexity of fair deletion problems II

Vertex deletion problems are those where given a graph G and a graph pro...
11/14/2017

### A note on the complexity of Feedback Vertex Set parameterized by mim-width

We complement the recent algorithmic result that Feedback Vertex Set is ...
02/25/2020

### Hedonic Seat Arrangement Problems

In this paper, we study a variant of hedonic games, called Seat Arrangem...
03/17/2021

### Vertex Deletion Parameterized by Elimination Distance and Even Less

We study the parameterized complexity of various classic vertex deletion...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

The study of the Knot-Free Vertex Deletion problem emerges from its application in resolution of deadlocks, where a deadlock is detected in a distributed system and then a minimum cost deadlock-breaking set must be found and removed from the system. More precisely, distributed computations are usually represented by directed graphs called wait-for graphs. In a wait-for graph , the vertex set represents processes, and the set of directed arcs represents wait conditions [barbosa1998]. An arc exists in directed away from towards if is blocked waiting for a signal from . The graph changes dynamically according to a set of prescribed rules (the deadlock model), as the computation progresses. In essence, the deadlock model governs how processes should behave throughout computation, i.e., the deadlock model specifies rules for vertices that are not sinks (vertices with at least one out-neighbor) in to become sinks [barbosa2002] (vertices without out-neighbors). The two main classic deadlock models are the AND model, in which a process can only become a sink when it receives a signal from all the processes in , where stands for the set of out-neighbors of (a conjunction of resources is needed); and the OR model, in which it suffices for a process to become a sink to receive a signal from at least one of the processes in (a disjunction of resources is sufficient). Distributed computations are dynamic, however deadlock is a stable property, in the sense that once it occurs in a consistent global state of a distributed computation, it still holds for all the subsequent states. Therefore, as is typical in deadlock studies, represents a static wait-for graph that corresponds to a snapshot of the distributed computation in the usual sense of a consistent global state [chandy1985]. Thus, the motivation of our work comes from deadlock resolution, where deadlocks are detected into a consistent global state , and must be solved through some external intervention such as aborting one or more processes to break the circular wait condition causing the deadlock.

Deadlock resolution problems differ according to the considered deadlock model, i.e., according to the graph structure that characterizes the deadlock situation. In the AND-model, the occurrence of deadlocks is characterized by the existence of cycles [barbosa2002, barbosa-et-al-16]. Therefore, deadlock resolution by vertex deletion in the AND-model corresponds precisely to the well-known Directed Feedback Vertex Set (DFVS) problem, proved to be NP-hard in the seminal paper of Karp [karp1972], and proved to be FPT in [chen2008fixed]. On the other hand, the occurrence of deadlocks in wait-for graphs working according to the OR-model are characterized by the existence of knots in  [barbosa-et-al-16, holt1972]. A knot in a directed graph is a strongly connected subgraph of with at least two vertices such that there is no arc of with and . Thus, deadlock resolution by vertex deletion in the OR-model can be viewed as the following problem.

Knot-Free Vertex Deletion (KFVD) Instance: A directed graph ; a positive integer . Question: Determine if has a set such that and is knot-free.

Notice that a digraph is knot-free if and only if for any vertex of , has a path to a sink.

In [carneiro2019deadlock], Carneiro, Souza, and Protti proved that KFVD is NP-complete; and, in [cocoon2018], it was shown that KFVD is W[1]-hard when parameterized by .

KFVD is closely related to DFVS not only because of their relation to deadlocks, but also some structural similarities between them: the goal of DFVS is to obtain a direct acyclic graph (DAG) via vertex deletion (in such graphs all maximal directed paths end at a sink); the goal of KFVD is to obtain a knot-free graph, and in such graphs for every vertex there exists at least one maximal path containing that ends at a sink. Finally, every directed feedback vertex set is a knot-free vertex deletion set; thus an optimum for DFVS provides an upper bound for KFVD. Although Directed Feedback Vertex Set is a well-known problem, this is not the case of Knot-Free Vertex Deletion, which we propose to analyze more deeply in this work.

Let be a solution for KFVD, and let be the set of sinks in . One can see that any has a path (that does not use any vertex in ) to a vertex in . Thus, KFVD can be seen as the problem of creating a set of sinks (doing at most vertex removals) such that every remaining vertex has a path (in ) to a vertex in . In this paper, we denote the set of deleted vertices by , and the set of sinks in by .

To get intuition on KFVD, note that the choice of the vertices to be removed must be carefully done, since the removal of a subset of vertices can turn some strongly connected components into new knots that will need to be broken by the removal of some internal vertices. Ideally, it is desirable to solve the current knots by removing as few vertices as possible for each knot, without creating new ones. Unfortunately, the generation of other knots can not always be avoided.

In [cocoon2017, carneiro2019deadlock], Carneiro, Souza, and Protti present a polynomial-time algorithm for KFVD in graphs with maximum degree three. They also show that the problem is NP-complete even restricted to planar bipartite graphs with maximum degree four. Later, in [cocoon2018], a parameterized analysis of KFVD is presented, where it was shown that: KFVD is W[1]-hard when parameterized by the size of the solution; and it can be solved in time, but assuming SETH it cannot be solved in time, where is the size of the largest strongly connected subgraph.

Since the introduction of directed treewidth, much effort has been devoted to identify algorithmically useful digraph width measures [Oliveira2016]. Useful width measures imply polynomial time tractability for many combinatorial problems on digraphs of constant width. Since KFVD is W[1]-hard when parameterized by , in this paper we investigate the ecology of width measures in order to find useful parameters to solve KFVD in FPT time. First, taking as parameter, we show that KFVD remains W[1]-hard even on instances with both longest directed path and K-width bounded by constants. From the same reduction, it follows that KFVD is para-NP-hard even considering many width measures as parameters, such as directed treewidth and DAG-width. Contrasting with the hardness of KFVD on several directed width measure parameterizations, we show that KFVD is FPT when parameterized by the clique-width of the underlying undirected graph; and it can be solved in time, but assuming ETH it cannot be solved in time, where is the treewidth of the underlying undirected graph. After that, we consider the most natural width parameter related to KFVD, the size of a minimum directed feedback vertex set (). Such a parameter is at the same time a measure of the distance from the input graph to a DAG as well as an upper bound for the size of a minimum knot-free vertex deletion set. We show that KFVD can be solved in FPT time either parameterized by and K-width, or and the length of a longest directed path. The complexity of KFVD parameterized only by remains open. Finally, we present a polynomial Turing kernel when we are given a special directed feedback vertex set whose removal gives a DAG having a directed Hamiltonian path.

In the rest of this section we give necessary definitions and concepts used in this work. In Section 2 we present some useful observations and preliminary results. In Section 3 we discuss digraph width measures and show the W[1]-hardness. In Section 4 we discuss the consequences of treewidth parameterization. In Section 5 we explore the directed feedback vertex set number as a parameter. Finally, Section 6 considers the parameterization by distance to a DAG having a Hamiltonian path.

Additional notation. We use standard graph-theoretic and parameterized complexity notations and concepts, and any undefined notation can be found in [bondy1976, cygan2015parameterized]. We consider here directed graphs. Given a vertex and a subset of vertices , we say that there is a path from to iff there exists such that there is a -(directed) path. For , let denote the set of descendants of in , i.e. nodes that are reachable from by a non-empty directed path. Given a set of vertices of , we define . Let denote the set of ancestors of in , i.e., nodes that reach through a non-empty directed path. We also define , and given a set of vertices of , we define . For a vertex of , the out-neighborhood of is denoted by , and given a set of vertices , we define . We refer to a Strongly Connected Component as an SCC. A knot in a directed graph is an SCC of with at least two vertices such that there is no arc of with and . Finally, a sink (resp. a source) of is a vertex with out-degree (resp. in-degree ). Given a subset of vertices , we denote and . Thus, denote the graph obtained by removing .

We denote by the size of a minimum directed feedback vertex set of . We generally use to denote a directed feedback vertex set and by the remaining subset, i.e., . The length of a longest directed path of is denoted by . The Kenny-width [ganian2014] or K-width of is denoted by and is the maximum number of distinct directed -paths in over all pairs of distinct vertices , where two -paths are distinct iff they do not use the exact same set of arcs. For any function (like , , ), will be denoted simply by when the considered graph can be deduced from the context. In what follows we denote by -KFVD the KFVD problem parameterized by ( denotes the parameterization by the solution size).

## 2 Preliminaries

In this section we present some useful remarks and reduction rules. Remind that in the decision version of the problem we are given and a positive integer .

The first observation is immediate, as if we can make the graph acyclic, then it will be knot-free.

###### Observation 1.

If then is a yes-instance.

The two others observations are less obvious but rather natural.

###### Observation 2.

Let be a solution with set of sinks in , and . Let and be the set of sinks of . If there is a path from to in then is also a solution.

###### Proof.

Let . Let us prove that has a path to in . If then it is clear by assumption. Suppose now that . As is a solution, let be a -path in from to a sink . As , still exists in . Thus, if we are done. Otherwise, it implies that there is such that is a -path in . As has a path to in , we obtain the desired result. ∎

Informally, after deleting a vertex , we can add back to the graph when it is certain that has a path to a sink in the current graph. This is detailed by the following lemma and its corollary.

Let be a solution with set of sinks in . If there exists with , then is also a solution.

###### Proof.

Let be the set of sinks of . According to Observation 2, it suffices to prove that there is a path from to in . If is a sink in we are done. Otherwise, there exists an arc in , with . As is a solution, either is a sink and we are done, or, there exists a -path in with . As , still exists in , and , is still a sink in . ∎

The following corollary is immediate.

In any optimal solution with set of sinks in , we have .

###### Observation 3.

Let be a knot-free vertex deletion with set of sinks in . If then for any vertex with it holds that .

To complete the previous observations, we can design two general reduction rules.

###### Reduction Rule 1.

If is an SCC of size one then remove .

###### Proof.

Let be the graph obtained by removing . Let of first show that is a yes-instance implies that is also a yes-instance. Let be a solution of of size at most with set of sinks in . Let , and the set of sinks in . Let us prove that every has a path ot in . Let . As is also in , there is a -path in where . As , and thus, the path still exists in . Moreover, implies that , and thus that , implying that .

Let us now consider the reverse implication, and let be a solution of of size at most with set of sinks in and prove that is a solution of . Let us start with . As is a solution of and , there is -path in where , and this path still exists in . As , is still a sink in and we are done. Consider now a vertex . As , there is -path in . If then is a sink in and we are done. Otherwise, let . As is a SCC of size , , implying that , and thus according to the previous case has a path to a sink in . ∎

The previous reduction rule removes in particular sources and sinks, as they are SCC’s of size one.

###### Reduction Rule 2.

Let be a strongly connected component of with strictly more than out-neighbors in . Then we can safely remove .

###### Proof.

Let be the graph obtained by removing . Let us first show that is a yes-instance implies that is also a yes-instance. Let be a solution of of size at most and the set of sinks in . Let , and the set of sinks in . Using the same argument (replacing by ) as in the first part of proof of Reduction 1, we get that every has a path ot in .

Let us now consider the reverse implication, and let be a solution of of size at most with set of sinks in and prove that is a solution of . Let us start with . As is a solution of there is -path in where , and this path still exists in . As , is still a sink in and we are done. Consider now a vertex . As , there is -path in . As has strictly more than out-neighbors in , there is arc from to and thus according to the previous case has a path to a sink in . ∎

## 3 W[1]-hardness and directed width measures

-KFVD was shown to be W[1]-hard using a reduction from -Multicolored Independent Set (-MIS) [cocoon2018]. However, the gadget used in this reduction to encode each color class has a longest directed path of unbounded length. First, we remark that it is possible to modify the reduction in order to prove that -KFVD is W[1]-hard even if the input graph has longest path length and K-width bounded by constants.

There is a polynomial-time reduction, preserving the size of the parameter, from -MIS to -KFVD such that the resulting graph has longest directed path of length at most and K-width equal to .

###### Proof.

Let be an instance of Multicolored Independent Set, and let be the color classes of . We construct an instance of Knot-Free Vertex Deletion with bounded longest path length and K-width as follows.

1. for each , create a directed cycle of size two with the vertices and in ;

2. for a color class in , create one vertex ;

3. for each vertex in corresponding to a vertex of the color class in , create an arc from to and from to .

4. for each vertex in corresponding to a vertex of the color class in , create an arc from to

5. for each edge in create a set with two artificial vertices and and the arcs and ;

6. for each artificial vertex , create an edge from towards in .

Finally, set , is the set of vertices of corresponding to the vertices of in the same color class . Notice that, the longest path of has at most vertices, and for any pair in there are at most distinct directed -paths in .

Now, suppose that now is a -independent set with exactly one vertex of each set of . By construction, has knots which are . Thus, at least vertex removals are necessary to make free of knots. We set and show that is knot-free. For the vertex is a sink in , and every vertex of still reaches . Now, as is a -independent set of each set in is adjacent to at least one vertex that is not in . Hence, each will still have at least one arc pointing outside , i.e., no new knots are created, and is knot-free.

Conversely, suppose that has a set of vertices of size such that is knot-free. In particular has to contain exactly one vertex of each of the knot , for . Since at least one sink has to be created in order to untie the knot , and since the only vertices of with only one out-neighbor are the ’s ones, has to contain a vertex of each set . Moreover by deleting one vertex in a knot , the vertex is turned into sink and every other vertex of the same knot still has a path to . Since is knot-free, no new knots are created by the deletion of ; thus, every SCC will still have at least one arc pointing outside it. So, we set . Since each SCC corresponds to an edge of , and at least one vertex of each edge of is not in , the set contains no pair of adjacent vertices. Moreover, is composed by one vertex of each knot, which corresponds to a color of . Therefore, is a multicolored independent set of . ∎

Since -MIS is W[1]-hard, the following holds.

-KFVD is W[1]-hard even if the input graph has longest directed path of length at most and K-width equal to .

After the introduction of the notion of directed treewidth (dtw) [jhonson2001], a large number of width measures in digraphs were developed, such as: cycle rank [gruber2012] (cr); directed pathwidth [barat2006] (dpw); zig-zag number [Oliveira2013] (zn); Tree-Zig-Zag number [Oliveira2016] (Tzn); Kelly-width [hunter2008] (Kelw); DAG-width [berwanger2012] (dagw); D-width [safari2005] (Dw); weak separator number [Oliveira2016] (s); entanglement [berwanger2005] (ent); DAG-depth [ganian2014] (ddp). However, if a graph problem is hard when both the longest directed path length and the K-width are bounded, then it is hard for all these measures (see Figure 1).

Therefore, from the reduction presented in Theorem 3 we can observe that KFVD is para-NP-hard with respect to all these width measures, and -KFVD is W[1]-hard even on inputs where such width measures are bounded. Thus, it seems to be extremely hard to identify nice width parameters for which KFVD can be solved in FPT-time or even in XP-time. Fortunately, there remain some parameters for which, at least, XP-time solvability is achieved. One of them is the directed feedback vertex set number (). This invariant is an upper bound on the size of a minimum knot-free vertex deletion set, so XP-time algorithms are trivial. This parameter is discussed in more detail in Section 5.

Another interesting width parameter for directed graphs that is not bounded by a function of the K-width and the length of a longest directed path is the clique-width of . Courcelle et al. [courcelle2000linear] showed that every graph problem definable in LinEMSOL can be solved in time on graphs with clique-width at most , when a -expression is given as input. Using a result of Oum [Oum08], the same follows even if no -expression is given.

[see [courcelle2012graph]] There is a monadic second-order formula expressing the following property of vertices and of a set of vertices of a directed graph :

 “x,y∈X and there is a directed path from x to y in the subgraph induced by X.”

From Proposition 1 one can show that KFVD is LinEMSOL-definable. Thus Theorem 3 holds.

KFVD is FPT when parameterized by clique-width of the underlying undirected graph .

###### Proof.

From Proposition 1, we can construct (using shortcuts) a formula  such that “ is knot-free vertex deletion set of , as follows:

 ∃ Z⊂V [[ ∀ v∈Z( ∀ w∈V(arc(v,w)⟹w∈S)] ∧[ ∀ u∈{V∖S}( ∃ s∈Z( there is a directed {V∖S}-path from u % to s ) ]]

Since is an -formula, the problem of finding is definable in LinEMSOL. Thus we can find satisfying in time . ∎

The fixed-parameter tractability for clique-width parameterization implies fixed-parameter tractability of KFVD for many other popular parameters. For example, it is well-known that the clique-width of a directed graph is at most , where is the treewidth of the underlying undirected graph (see [courcelle2012graph, Proposition 2.114]). However, although Theorem 3 implies the FPT-membership of the problem parameterized by the treewidth of the underlying undirected graph, the dependence on provided by the model checking framework is huge. So, it is still a pertinent question whether such a parameterized problem admits a single exponential algorithm, which is discussed in Section 4.

## 4 The treewidth of the underlying undirected graph as parameter

Given a tree decomposition , we denote by one node of  and by the vertices contained in the bag of . We assume, without loss of generality, that is a nice tree decomposition (see [cygan2015parameterized]), that is, we assume that there is a special root node  such that and all edges of the tree are directed towards and each node  has one of the following four types: Leaf, Introduce vertex, Forget vertex, and Join.

Based on the following results we can assume that we are given a nice tree decomposition of .

[bodlaender2016c] There exists an algorithm that, given an -vertex graph and an integer , runs in time and either outputs that the treewidth of is larger than , or constructs a tree decomposition of of width at most .

[cygan2015parameterized] Given a tree decomposition of of width at most , one can in time compute a nice tree decomposition of of width at most that has at most nodes.

Now we are ready to use a nice tree decomposition in order to obtain an FPT-time algorithm with single exponential dependency on and linear with respect to .

Knot-Free Vertex Deletion can be solved in time, but assuming ETH there is no time algorithm for KFVD, where is the treewith of the underlying undirected graph of the input .

###### Proof.

Let be a nice tree decomposition of the input digraph , with width equal to . First, we consider the following additional notation and definitions: is the index of a bag of ; is the graph induced by all vertices such that either or is a descendant of in ; Given a knot-free vertex deletion set , for any bag there is a partition of into where

• (removed) is the set of vertices of that are going to be removed ();

• (sinks) is the set of vertices of that are going to be turned into sinks after the removal of ;

• (free/released) is the set of vertices of that, after the removal of , are going to reach a sink that belongs to ;

• (blocked) is the set of vertices of that, after the removal of , are going to reach no sink that belongs to ;

Let . We denote by the set of vertices in that reach some vertex of in the graph induced by .

The recurrence relation of our dynamic programming has the signature , representing the minimum number of vertices in that must be removed in order to produce a graph such that for every remaining vertex either reaches a vertex in (meaning that it may still be released in the future) or reaches a vertex that became a sink (possibly the vertex itself), where every vertex in is removed, every vertex in becomes a sink, every vertex in will have a path to a sink in , and form a partition of . Notice that the generated table has size , and when , and therefore contains the size of a minimum knot-free vertex deletion set of .

The recurrence relation for each type of node is described as follows.

First, notice that if and there is an out-neighbor of that is not in , there is an inconsistency, i.e. must be deleted (must belong to ). In addition, if but has an out-neighbor in , there is another inconsistency ( is not blocked), and if but the removal of turns into an isolated vertex, is not released, and it must belong to . For the inconsistent cases, . Such cases can be recognized and treated by simple preprocessing in linear time on the size of the table. Therefore, we consider next only consistent cases.

Leaf Node: If is a leaf node then . Therefore

 C[t,∅,∅,∅,∅]=0.

Insertion Node: Let be a node of with a child such that for some . We have the following:

 C[t,St,Zt,Ft,Bt]=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩1) case v∈St:--   C[t′,St∖{v},Zt,Ft,Bt]+1,2) case v∈Zt:--   minA′⊆At(v){C[t′,St,Zt∖{v},Ft∖A′,Bt∪A′]},3) case v∈Ft:--   minA′⊆At(v){C[t,St,Zt,Ft∖{A′∪{v}},Bt∪A′]},4) case v∈Bt:--   C[t′,St,Zt,Ft,Bt∖{v}].

Recall that is the set of vertices in that reach in the graph induced by , i.e., the set of vertices that can be released by if it was blocked in . Also note that, for simplicity, we consider only consistent cases, thus in case 2 it holds that , in case 3 it holds that , and in case 4 it holds that .

Forget Node: Let be a forget node with a child such that , for some . The forget node selects the best scenario considering all the possibilities for the forgotten vertex, discarding cases that lead to non-feasible solutions. In this problem, unfeasible cases are identified when the forgotten vertex of was blocked and reached no other node in . Hence:

• If then

 C[t,St,Zt,Ft,Bt]=min⎧⎪ ⎪ ⎪⎨⎪ ⎪ ⎪⎩C[t′,St∪{v},Zt,Ft,Bt],C[t′,St,Zt∪{v},Ft,Bt],C[t′,St,Zt,Ft∪{v},Bt],C[t′,St,Zt,Ft,Bt∪{v}].
• If then

 C[t,St,Zt,Ft,Bt]=min⎧⎨⎩C[t′,St∪{v},Zt,Ft,Bt],C[t′,St,Zt∪{v},Ft,Bt],C[t′,St,Zt,Ft∪{v},Bt],.

Join Node: Let be a join node with children and , such that . For any optimal knot-free vertex deletion set of it holds that . Clearly, if then we can assume that . In addition, otherwise we will have an inconsistency. Also note that a vertex is released in if it reaches a vertex (possibly the vertex itself) that is released either in or . Thus:

 C[t,St,Zt,Ft,Bt]=min∀F′,F′′{C[t1,St,Zt,F′,B′]+C[t2,St,Zt,F′′,B′′]}−|St|,\leavevmode\nobreak\ where\leavevmode\nobreak% \ At(F′∪F′′)=Ft.

Note that is the set of vertices that either are released in () or can be released in by vertices of , even if they are blocked in both and ; this can occur, for example, if a blocked vertex reaches another blocked node in , and in vertex is released.

Now, in order to run the algorithm, one can visit the bags of in a bottom-up fashion, performing the queries described for each type of node. Since the reachability between the vertices of a bag can be stored in a bottom-up manner on , one can fill each entry of the table in time, and as the table has size , the dynamic programming can be performed in time .

Regarding correctness, let be a minimum knot-free vertex deletion set of a digraph with a tree decomposition . Let be a partition of the vertices of into removed, sinks, released and blocked, with respect to after the removal of . Note that .

Fact 1. There is no vertex such that reaches a vertex in and . Otherwise, since every vertex in will reach a sink that is not in , by Observation 2 one can remove from every vertex that reaches in , obtaining a subset of which is also a knot-free vertex deletion set, contradicting the fact that S is minimum.

This fact implies that the paths considered to compute ’ can in fact be used to release blocked vertices. Similarly, Fact 2 also holds.

Fact 2. Let be a set for which the minimum is attained in the definition of . Then is also a solution (which is minimum) for KFVD. Otherwise, from we can also obtain a knot-free vertex deletion set smaller than , which is a contradiction.

Fact 2 implies that we have stored enough information. At this point, the correctness of the recursive formulas is straightforward.

Finally, to show a lower bound based on ETH, we can transform an instance of 3-SAT into an instance of KFVD using the polynomial reduction presented in [cocoon2018, Theorem 4], obtaining in polynomial time a graph with , and so . Therefore, if KFVD can be solved in time, then we can solve 3-SAT in time, i.e., ETH fails. ∎

## 5 The size of a minimum directed feedback vertex set as parameter

Recall that -KFVD is -hard (for fixed K-width and longest directed path) and that, as noticed in Observation 1, we can assume . This motivates us to determining the status of -KFVD. In this section, we present two FPT-algorithms. Both with the size of a minimum directed feedback vertex set as parameter but with an aggregate parameter, the K-width, , for the first one and the length of a longest directed path, , for the second one. Since finding a minimum directed feedback vertex set in can be solved in FPT-time (with respect to [chen2008fixed], we consider that , a minimum DFVS, is given. Namely, we show that both -KFVD and -KFVD are FPT.

At this point, we need to define the following variant of KFVD.

Disjoint Knot-Free Vertex Deletion (Disjoint-KFVD) Instance: A directed graph ; a subset ; and a positive integer . Question: Determine if has a set such that , and is knot-free.

We call forbidden vertices the vertices of the set . It is clear that Disjoint-KFVD generalizes KFVD by taking .

Let us now define two more steps that are FPT parameterized by and that will be used for both -KFVD and -KFVD. The next step will allow us to consider that the vertices of are forbidden. We need the following straightforward observation.

###### Observation 4.

Let be an instance of KFVD and .

• if is a yes-instance and there exists a solution with , then is a yes-instance

• if is a yes-instance then is a yes-instance

###### Branching 1 (On the directed feedback vertex set F).

Let be an instance of -KFVD. In time we can build instances of -Disjoint-KFVD as follows. We consider all possible partitions of into three parts: , the set of vertices of that will not be removed (i.e., they become forbidden); , the set of vertices in that will be removed; and , the set of vertices in that will be turned into sinks. For each such a partition (indicated by the index ), we remove the set of vertices and we apply exhaustively Reduction Rules 1 and 2 (see Section 2). We denote by the obtained graph, , and .

According to Observation 4, it is clear that is a yes-instance of -KFVD if and only if one of the instances , , of -Disjoint-KFVD is a yes instance. Since there are at most partitions of , the branching reduction can be performed in FPT time. Although at this point , in the next steps some vertices of may become forbidden and therefore should be added to . Also, from this point forward, we assume that we are given an instance of -Disjoint-KFVD.

Notice that after applying Reduction Rule 1 (Section 2), each strongly connected component of is at least of size two. Thus, each of them must contain at least one cycle; therefore, the number of strongly connected components of is bounded by . Moreover, for any strongly connected component of , Reduction Rule 2 gives an upper bound for the number of vertices in (i.e., vertices that are not in but it is out-neighbour of some vertex in ). This implies that has at most such vertices between its strongly connected components. This observation leads to a branching rule.

###### Branching 2 (On strongly connected components).

Let be the set of vertices that are extremities of arcs between the strongly connected components of . We have and we can branch in FPT-time trying all possible partitions of into two sets: , the set of vertices to be deleted in such that ; and , the set of vertices marked as forbidden, and then added into .

Notice that this step involves a branching. At this point, we may consider that we have an instance where and such that for any arc between two SCC’s and , . We call such an instance as a nice instance.

[After cleaning of Branching 2] If there is an algorithm running in time for -Disjoint-KFVD restricted to nice instances that are strongly connected, then there is an FPT algorithm running in time (where is a constant) to solve -Disjoint-KFVD for any nice instance.

###### Proof.

Let be a nice instance and be a solution. Let be the partition of where each is an SCC, and let . Without loss of generality we can assume that for some . Let . Notice that if is a solution then for any , is a solution of . Moreover, for any solutions