A Polynomial Kernel for Funnel Arc Deletion Set

In Directed Feedback Arc Set (DFAS) we search for a set of at most k arcs which intersect every cycle in the input digraph. It is a well-known open problem in parameterized complexity to decide if DFAS admits a kernel of polynomial size. We consider C\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {C}$$\end{document}-Arc Deletion Set (C\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {C}$$\end{document}-ADS), a variant of DFAS where we want to remove at most k arcs from the input digraph in order to turn it into a digraph of a class C\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {C}$$\end{document}. In this work, we choose C\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {C}$$\end{document} to be the class of funnels. Funnel-ADS is NP-hard even if the input is a DAG, but is fixed-parameter tractable with respect to k. So far no polynomial kernels for this problem were known. Our main result is a kernel for Funnel-ADS with O(k6)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(k^6)$$\end{document} many vertices and O(k7)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(k^7)$$\end{document} many arcs, computable in O(nm)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal {O}(nm)$$\end{document} time, where n is the number of vertices and m the number of arcs in the input digraph.


Introduction
In graph editing problems, we are given a (directed or undirected) graph G and a number k, and we search for a set of at most k vertices, edges or arcs whose removal or addition produces a graph with a desired property. There are several variants of these problems, and in this paper we consider the problem of removing arcs from a digraph in order to obtain a digraph in a given class C. When C is the class of all directed acyclic graphs (DAGs), the problem is called Directed Feedback Arc Set (DFAS). If we remove vertices instead of arcs, the problem is called Directed Feedback Vertex Set (DFVS).
There are simple reductions between DFAS and DFVS. We can reduce DFAS to DFVS by taking the line digraph of the input. Removing a vertex from the reduced instance corresponds to removing an arc from the input instance and vice versa. For a reduction in the other direction, we split each vertex v into two vertices, say, v o and v i , connect them with an arc (v i , v o ) and shift all outgoing arcs of v to v o and all incoming arcs to v i . In the context of parameterized complexity, such reductions are called parameterized as the parameter k is preserved. Hence, parameterized results are often stated for DFVS (refer to [1,2] for an introduction to parameterized complexity).
In a breakthrough paper it was proven that there is an algorithm for DFVS with running time 4 k k! · n O (1) [3], showing that the problem is fixed-parameter tractable (FPT) with respect to k. After obtaining an FPT result, it is natural to ask if the problem also admits a polynomial kernel, that is, if there is a polynomial-time algorithm which reduces the input instance to an instance of size at most O(k c ) for some constant c. Such an algorithm is called a kernelization algorithm.
The existence of a polynomial kernel for DFVS is a fundamental open question in the field of parameterized complexity. One approach towards solving this question is to consider different parametrizations or restrictions of the input digraph. By considering progressively smaller parameters or more general digraph classes, one can hope to eventually close the gap between the restricted cases and the general case of DFVS.
On tournaments, DFVS admits a polynomial kernel [4]; this was extended to generalizations of tournaments as well [5]. When parameterized by solution size k and the size of a treewidth η-modulator, DFVS admits a kernel of size (k · ) O(η 2 ) [6].
One can also restrict the output instead, that is, we can consider C-Vertex Deletion Set (C-VDS) or C-Arc Deletion Set (C-ADS), where, for a fixed digraph class C, we search for a set of at most k vertices (arcs) whose removal turns the input into a digraph in C. Unlike DFVS and DFAS, C-VDS and C-ADS can belong to different complexity classes depending on C: While Out-Forest-ADS can be solved in polynomial time, Out-Forest-VDS is NP-hard [7]. Further, note that even if C ⊆ C, a polynomial kernel for C-ADS does not immediately imply a polynomial kernel for C -ADS, and the implication also does not work in the other direction. Indeed, while the problem is trivial when C is the class of all independent sets or the class of all digraphs, it is NP-hard if C is the class of DAGs, which contains all independent sets and is a subclass of all digraphs. In a sense, the complexity landscapes of C-ADS and C-VDS are much more fine-grained than the landscape of DFVS, and may allow for smaller steps towards more general results.
Out-Forest-ADS and Pumpkin-ADS can be solved in polynomial time [7], while Out-Forest-VDS and Pumpkin-VDS are NP-hard and admit polynomial kernels [7,8] of size O(k 2 ) and O(k 3 ), respectively [8]. F η -VDS admits a polynomial kernel for constant η, where F η is the class of all digraphs with (undirected) treewidth at most η [6].
In this work we consider Funnel-ADS and provide a polynomial kernel with O(k 6 ) vertices and O(k 7 ) arcs. A digraph is a funnel if it is a DAG and every source to sink path has an arc which is not in any other source to sink path. Funnel-ADS is NP-hard even if the input is DAG, but it can be solved in O(3 k · (n + m)) time [9], where k is the solution size. Out-forests and pumpkins are also funnels, but there are also dense funnels like complete bipartite digraphs (where all arcs go from the first partition to the second but not back).
Our results rely on characterizations for funnels based on forbidden subgraphs and on a "labeling" of the vertices [9]. We believe the techniques used here can be generalized to other digraph classes which are also similarly characterized, and hope they provide further insight about the classes C for which C-ADS admits a polynomial kernel.

Preliminaries
A (partial) function f : A → B is a set of tuples (a, f (a)) ∈ A × B where for every a ∈ A there is at most one A parameterized language L is fixed-parameter tractable with respect to the parameter k if there is some algorithm with running time f (k) · n O(1) deciding whether (x, k) ∈ L, where f is some computable function, n = x and k is the parameter (refer to [1,2] for an introduction to parameterized complexity). We say that L admits a problem kernel if there is a polynomial-time algorithm which transforms an for some computable function f . If f is a polynomial, we say that L admits a polynomial kernel with respect to k.
When describing a kernelization algorithm, it is common to define reduction rules. These rules have a condition and an effect, and we say that a reduction rule is applicable if the condition is true. The effect of the reduction rule produces a new instance (x , k ) of the problem, and a rule is said to be safe if (x , k ) ∈ L if and only if the original instance is in L. We refer the reader to [10,11] for surveys on kernelization and to [12] for a book on the topic.
We only consider directed graphs (digraphs) without loops or parallel arcs (but we allow arcs in opposite directions) in this paper. Let D be a digraph. The set of arcs of D is denoted by A(D), and its set of vertices is V (D). The set of outneighbors . We write D − X for the operation of deleting a set of vertices or arcs X from D. Similarly, we add a set of arcs or vertices to D with D + X .
A directed acyclic graph (DAG) is a digraph which does not contain any directed cycle. A digraph D is a funnel if D is a DAG and for every path P from a source to a sink of D of length at least one there is some arc a ∈ A(P) such that for any different path Q from a (possibly different) source to a sink we have a / ∈ A(Q). We repeat below several known characterizations for funnels, as they are particularly useful for our results.  Fig. 1 for an example)

D does not contain D 0 as a butterfly minor.
The digraphs in F are called forbidden subgraphs for funnels. For a digraph D we define a labeling as a function : In the feedback arc set problem, we are given a digraph D and a k ∈ N as an input, and we search for a set S ⊆ A(D) such that D − S is a DAG and S ≤ k. We consider a variant of this problem where we want D − S to be a funnel instead, which is formally defined below. Funnel Arc Deletion Set (FADS) Input A digraph D and a number k ∈ N. Question Is there a set S ⊆ A(D) with S ≤ k such that D − S is a funnel?
To make better use of theorem 2.1 (2.), we consider a more general problem in which some vertices might already be labeled with F or M, and the funnel we obtain in the end must respect this labeling. Formally, the problem is defined as follows.

Funnel Arc Deletion Labeling (FADL)
Input A digraph D, a labeling : V (D) → {F, M} and a number k ∈ N. Question Are there a set S ⊆ A(D) and a labelingˆ ⊇ such thatˆ is a funnel labeling for D − S and S ≤ k?
We say that (D, , k) is the input instance and (S,ˆ ) is a solution for the input instance. This more general version of the problem allows us to decide which label a vertex will take and encode this in the instance itself. While technically not necessary, using FADL instead of FADS simplifies the kernelization algorithm and also the proofs.

Basic Reduction Rules
We construct our kernelization algorithm by defining a series of reduction rules and then showing that, if no reduction rule is applicable, the input size is bounded in a polynomial of k. Our strategy is to partition the vertex set into labeled and unlabeled vertices, then bound the number of unlabeled vertices (Sect. 3.1) and use this to bound the number of labeled vertices (Sect. 3.2) as well. In this section we define some reduction rules which are useful both in Sect. 3.1 as well as in Sect. 3.2. For brevity, we assume that a reduction rule is no longer applicable to the input instance after it has been defined. Further, we refer to the instance after application of a reduction rule as the reduced instance. Similarly, the reduced digraph is the digraph obtained after applying a reduction rule.
Let (D, , k) be the input instance. From theorem 2.1(3.) we can see that every vertex v in a funnel has indeg(v) Hence, by simply counting the number of vertices disrespecting each case, we can obtain a lower bound for the number of arcs that need to be removed from D in order to obtain a funnel. As removing one arc changes the degree of two vertices, we obtain a bound of at most 2k such vertices. The safety of the following reduction rule follows easily from theorem 2.1.

Reduction Rule 3.1 (Lower Bound) Let V I ⊆ V (D) be the set of vertices with indegree greater than one, let V O be the set of vertices with outdegree greater than one and let
The following reduction rule is based on [9], with some modifications since the original reduction rule is applied as an intermediate step in an FPT algorithm and is not safe for kernelization. For certain vertices it is possible to optimally decide which label they should receive in an optimal solution. For example, vertices with outdegree greater than k +1 can always be labeled with F, as otherwise we would need to remove at least k + 1 of its outgoing arcs, which is not possible.

Proof of safety of Set Label (RR 3.2)
Clearly, a solution for the reduced instance is also a solution for the original instance. For the other direction, we consider only the case If indeg(v) = 0, or indeg(v) = 1 and there is some u ∈ in(v) with (u) = F, thenˆ r is clearly also a funnel labeling for D − S.
we construct an S r from S as follows. We add all incoming arcs of v to S r and remove from S r all outgoing arcs outgoing arcs of v are in S. Hence, we remove at least indeg(v) arcs from S and add at most indeg(v). Thus, S r ≤ S .
The digraph D − S r does not contain cycles, as all incoming arcs of v were removed, so any cycle in D − S r is also in D − S, which is a funnel. To see thatˆ r is a funnel labeling of D−S r , first note that we can always keep arcs (v, u) in D−S r where (u) = M. We can also keep arcs (v, u) in D − S r where (u) = F and indeg(u) = 1. As v has no incoming arcs in D − S r , it lies in an out-forest. Hence,ˆ r is a funnel labeling of D − S r .
Replacing an arc in a funnel by a directed path cannot create any cycles nor any forbidden subgraph for funnels. The next reduction rule reverses this operation: We can contract certain paths where all vertices have in-and outdegree one to a single arc. However, we cannot replace any such path: In the example in Fig. 2, if we remove u and add the arc (v, w), then the size of an optimal solution set decreases by one. Some cases where contracting an arc is safe are identified below.

Reduction Rule 3.3 (Dissolve Vertex)
Let u, v, w be a path such that the following is true: , delete the vertex v and add the arc (u, w).

Proof of safety of Dissolve Vertex (RR 3.3)
Let D be the reduced digraph. It is easy to see that we can obtain a solution for the reduced instance from a solution for the original instance: If we remove (u, v) or (v, w) from D, we can instead remove (u, w) from D . As this is equivalent to removing v from D, the result is also a funnel and we can keep the same labeling (up to v, which is not in D ). If neither (u, v) nor (v, w) were removed, we simply keep the same arc-deletion set and labeling. Now let (S r ,ˆ r ) be a solution for the reduced instance. We start by settingˆ :=ˆ r . If (u, w) / ∈ S r , we setˆ (v):=ˆ r (u). It is easy to see thatˆ is a funnel labeling for D − S r . If (u, w) ∈ S r , we distinguish two cases. If outdeg D (u) = 1, we setˆ (v):=ˆ (u) and S: do not need to remove (u, v). Since the neighborhood of w did not change and any cycle in D − S is also a cycle in D − S r , we have thatˆ is a funnel labeling for D − S.

Bounding the Number of Unlabeled Vertices
From Lower Bound (RR 3.1) we know there are few vertices with both in-and outdegree greater than one. In this section we bound the number of unlabeled vertices by considering the remaining unlabeled vertices, that is, vertices v with indeg(v) ≤ 1 or outdeg(v) ≤ 1. Our strategy is to group such vertices into subgraphs of D with specific properties which we define later, and then develop reduction rules to both bound the maximum number of such subgraphs and also their size in any "yes"-instance of FADL.
Even if the previous reduction rules are not applicable, there can still exist some "large" subgraph H ⊆ D for which there is a "small" set S ⊆ A(D) such that the weakly-connected component of H is a funnel in D − S. Our goal is to bound the size of such subgraphs H .
We first define a specific type of subgraph of D which behaves like a funnel in the sense that the degrees of the vertices match theorem 2.1(2.). We call such subgraphs local funnels and formally define them below.
Unlike local funnels, we might still have to remove many arcs from an induced funnel in D, as it can have, for example, several vertices v with indeg D (v) > 1 and outdeg D (v) > 1. Our goal is to bound the size of each unlabeled local funnel (that is, each local funnel where none of the vertices have a label) and the number of unlabeled local funnels in D. We start by "pushing" as many vertices as we can to the neighborhood of the roots of the in-and out-forests of a local funnel. Consider for example a path u, v, w as in Fig. 3, whose vertices have indegree one but can have higher outdegree. Intuitively, a cycle containing v and x must also contain u. To destroy this cycle, we can remove the unique incoming arc of u, as this will potentially destroy further cycles that contain u but not v. Hence, replacing the arc (v, x) with (u, x) in this case does not change the size of the solution.
By moving vertices in an out-tree towards its root s, we increase the outdegree of s. If the outdegree of s increases beyond k + 1, we can apply Set Label (RR 3.2) to s, giving it a label. By further applying Set Label (RR 3.2) to the neighbors of s which are in its out-tree, we can label the entire tree. As we are only considering unlabeled local funnels in this section, we can use the idea above to limit the branching of any in-or out-tree of an unlabeled local funnel. we provide here a somewhat more general reduction rule which can also be applied if some vertices are labeled. Later, this reduction rule will again be useful to bound the number of labeled vertices. However, we need to carefully consider the possible labels of the vertices, as in some cases the rule would not be safe.

Reduction Rule 3.4 (Shift Neighbors)
Let u, v, w be a path.

then remove the arc (x, v) and add the arc (x, w).
Before proving that Shift Neighbors (RR 3.4) is safe, we need two simple observations about certain cases where we can safely exchange two arcs or add an arc.

Observation 3.2 Let H be a funnel with funnel labeling and let
and at least one of the following is true:

Then is also a funnel labeling for H if H is a DAG.
Proof Assume H is a DAG.
Case 1: If (x) = F, then H is the result of switching the unique inneighbour of x in the out-forest induced by vertices labeled with F. This is clearly an out-forest, and hence is a funnel labeling for H .
Since outdeg H (u) = 0, is a funnel labeling for H + (u, x) and, hence, also for H .

Observation 3.3 Let H be a DAG and x
If H + (u, x) contains a cycle C, then we can replace (u, x) by the path from u to x in H + (v, x) going through v. This constructs a cycle in H + (v, x), as desired.

Proof of safety of Shift Neighbors (RR 3.4) Consider the case where
The other case follows analogously. Let (D , , k) be the reduced instance and (S r ,ˆ r ) be a solution for it. We construct a solution (S,ˆ ) for the input instance (D, , k).
First observe that, if (u, x) ∈ S r , we can replace it with (v, x) in S, which means that D − S r and D − S are isomorphic. By settingˆ :=ˆ r , we obtain the desired solution. If (u, x) / ∈ S r , we consider the following cases.
As u is the only inneighbor of v, from Observation 3.3 we know D is a DAG. From Observation 3.2, we know thatˆ =ˆ r is a funnel labeling for D .
is not a DAG, then it contains a cycle with v and u, implying Clearly,ˆ is a funnel labeling for D − S r . From Observation 3.2 we have thatˆ is a funnel labeling for D − S r as well.
Hence, from Observation 3.2 we obtain that (S r ,ˆ ) is a solution for the input instance. In all cases a solution for the reduced instance implies a solution for the original instance.
Now assume there is a solution (S,ˆ ) for the original instance. We show that there is solution (S r ,ˆ r ) for the reduced instance. As in the previous direction, if (v, x) ∈ S, we can replace it with (u, x) and obtain the desired solution. So assume Clearly,ˆ is a funnel labeling for D − S 1 . We setˆ r :=ˆ andˆ r (u):=F. As indeg D−S 1 (u) = 0,ˆ r is also a funnel labeling for D − S 1 . From Observation 3.2 we know thatˆ r is a funnel labeling for In the following we consider the remaining cases where {(u, v), (v, x)} ∩ S = ∅. Note that the caseˆ (u) = M andˆ (v) = F does not happen under this assumption.
Case 1:ˆ (v) = F =ˆ (u). We setˆ r :=ˆ and S r :=S. Clearly, Clearly,ˆ is a funnel labeling for D − S 1 , and D − S 1 is also a DAG. From Observation 3.2 we have thatˆ is a funnel labeling for D − S 1 .
We In all cases we found a solution (S r ,ˆ r ) for the reduced instance, concluding the proof.
It is not always possible to exhaustively apply Shift Neighbors (RR 3.4): If u, v, w forms a cycle, we would shift x indefinitely through this cycle. To prevent this from happening, we need the following reduction rule: Reduction Rule 3.5 (Break Cycle) Let C be a cycle in D. If every vertex in C has indegree (outdegree) one and either every vertex in C is unlabeled or every vertex in C is labeled with F (M), then delete one arc of C and decrease k by one. Let (v, u) be the arc removed by the reduction rule. Clearly, a solution for the reduced instance together with the arc (v, u) is a solution for the original instance. Let (S,ˆ ) be a solution for the original instance, and assume that (v, u) / ∈ S. Let (w, x) be an arc of C contained in S. Without loss of generality, we assume that (w, x) is the only incoming arc of x. The case where it is the only outgoing arc of w follows analogously.

Proof of safety of Break Cycle (RR 3.5)
We can assume thatˆ (v) = F for all v ∈ V (C): If they were not labeled by when the rule was applied, then by repeatedly applying Set Label (RR 3.2) (starting with x) we can label them with F. Because indeg D (v) = 1 for every v ∈ C, it follows that C is the only cycle in D using the arc (w, x).
If Shift Neighbors (RR 3.4) is not applicable, then many vertices in a long path P in a local funnel must share a common out-or inneighbor w. However, from Set Label (RR 3.2) we know that w receives a label if it has too many neighbors. The next and final reduction rule needed for bounding the number of unlabeled vertices exploits this property and allows us to label some vertex u in P if its predecessor v in P is adjacent to a labeled vertex w.

Proof of safety of Labeled Neighbor (RR 3.6)
Assume, without loss of generality, that the first case of the rule was applied. The proof for the second case follows analogously (note that it is not possible for both cases to be applied simultaneously). Let (D, r , k) be the reduced instance. First note that r ⊇ , which means that a solution for the reduced instance is already a solution for the original instance. Hence, it suffices to show that a solution (S,ˆ ) for the original instance implies a solution (S r ,ˆ r ) for the reduced instance.
Ifˆ  The digraph D − S r is a DAG: if it has a cycle, the cycle would have to use the arc (v, w), yet indeg D−S r (v) = 0, a contradiction. We now argue thatˆ r is a funnel labeling for D − S r . Since indeg D−S r (v) = 0, indeg D−S r (u) = 1 andˆ r (u) = F, the vertex v is the unique inneighbor of u in the out-forest of the funnel D − S r . Finally, asˆ r (w) = M, the arc (v, w) is allowed in the funnel. Hence,ˆ r is a funnel labeling for D − S r .
In all cases we find a solution (ˆ r , S r ) for the reduced instance, concluding the proof.
Proof We consider the case where s is a source of H . The other case follows analogously.
Let u be some inner vertex of some P i and w the unique outneighbor of u in P i . By assumption on P i , we have indeg D (w) = 1. As Dissolve Vertex (RR 3.3) is not applicable, we have that outdeg(u) > 1 (proving (1.)). In particular, u has some outneighbor x not in P i .
Let v be the inneighbor of u in P i . Since indeg D (v) = indeg D (u) = indeg D (w) = 1 and Shift Neighbors (RR 3.4) is not applicable, we have x ∈ out D (v). By repeating this argument to the predecessors of u in P i , we prove (2.) (and also that a ≤ k + 1, as outdeg D (s) ≤ k + 1 due to Set Label (RR 3.2)).
Assume there are two paths P i and P j intersecting at more than one vertex. Let u be the last vertex of the intersection. Note that, if u is the last vertex of P i or P j , then one path has to contain the other. Hence, u has two outneighbors w i and w j lying on P i and P j , respectively, and w i = w j . But due to (2.), we have w i , w j ∈ out D (s), implying indeg D (w i ) > 1 and indeg D (w j ) > 1, a contradiction to our assumptions on P i and P j (proving (3.)).
Let v 1 , v 2 , . . . , v m be the sequence of vertices of a path P i . From (1.) we know that there is some w ∈ out D (v m−1 ) outside of P i . We also have w and Labeled Neighbor (RR 3.6) is not applicable, we have (v m−1 ) = F, a contradiction to the assumption that H is unlabeled. Hence, m − 1 ≤ k + 1, implying V (P i ) ≤ k + 2 (proving (4.)).

Lemma 3.5 Let H be an unlabeled local funnel in D. Then V (H ) ∈ O(k 3 ).
Proof Let s be the source of H . Consider a partitioning of the vertices of H into an out-tree (since H has only one source) and an in-forest where the out-tree is maximal. Let P 1 , P 2 , . . . , P a be a sequence of paths such that the out-tree is the union of all P i . From lemma 3.4 we know that a ≤ k + 1 and that V (P i ) ∩ V (P j ) = {s} for all i = j.
Let v i be the endpoint of P i which is not s and let X = a i=1 out(v i ). As Set Label (RR 3.2) is not applicable, we have X ≤ a · k ≤ k 2 + k. Further, as V (P i ) ≤ k + 1, the out-tree of H has at most (k + 1) 2 vertices.
Let Y be the set of sinks of H lying on its in-forest. Since H has only one source s, for every sink t ∈ Y there is a path Q from s to t. Let Q 1 , Q 2 , . . . , Q b be the set of all paths from s to each sink in Y , and let R i be the subpath of Q i contained in the in-forest of H .
Let Q i be one of such paths, and let u be the first vertex of R i (which is not in any P j ). Note that this implies indeg(u) > 1, otherwise the out-tree would not be maximal. Due to lemma 3.4 we have that no other R contains u and if u / ∈ X , then u ∈ out(s). Since Set Label (RR 3.2) is not applicable and each distinct R implies the existence of a distinct outneighbor of s, there are at most k paths R not ending in a vertex in X . By definition, all inneighbors of any vertex of X lie in some P i . This implies that there are at most k paths Q not containing any vertex of X .
If Q i contains a vertex of X , then R i ends on a vertex u ∈ X . Due to lemma 3.4, no other R contains u. As X ≤ k 2 + k, we have that there are at most k 2 + k paths R which contain some vertex of X . Adding both cases, we obtain that there are at most k 2 + 2k paths Q .
Due to lemma 3.4, the subpath R i of Q i has at most k +1 vertices. Since the in-forest of H is the union over all R i , we have that this in-forest has at most (k + 1)(k 2 + k) = k 3 + 2k 2 + k vertices. Thus, V (H ) ≤ (k + 1) 2 + (k + 1)(k 2 + 2k) ∈ O(k 3 ), concluding the proof.
We conclude by bounding the number of maximal vertex-disjoint unlabeled local funnels in D. Since we can always partition unlabeled vertices with in-or outdegree at most one into local funnels, by bounding the number of local funnels in such a partitioning, together with the bound on the size of each local funnel, we obtain a bound for the number of unlabeled vertices with in-or outdegree at most one.
Let H = {H 1 , H 2 , . . . , H a } be a set of maximal vertex-disjoint unlabeled local funnels in D (in this context, maximal means that H i ∪ H j is not a local funnel for any two distinct H i , H j ∈ H). Let s i be the unique source of H i for each i. We now show that, if there is a solution removing at most k arcs, then H is "small". By contraposition this means that, if H is "large", then we have a "no"-instance and can stop the kernelization process.
We start with the simple observation that cycles intersecting inside a local funnel must also intersect outside it.

Observation 3.6 Let C i and C j be two distinct cycles in D such that V
such that the predecessor of v in C i is different from the predecessor of v in C j . Then indeg(v) > 1. As H is a local funnel, v can only reach one sink t of H , implying that t is in both C i and C j . The unique out-neighbor of t is however not in H , but it has to be in both C i and C j , a contradiction to the assumption that We partition the set of maximal unlabeled local funnels H into three sets there is a solution (S,ˆ ) for (D, , k), then X ≤ 2k 2 .
Proof Let H i ∈ X and u be the unique inneighbor of s i . Note that outdeg D (s i ) = 1. As Dissolve Vertex (RR 3.3) is not applicable, we have that outdeg D (u) > 1 and indeg D (w) > 1, where w is the unique outneighbor of s i .
Case 1: u ∈ Dom( ). Then (u) = M since Set Label (RR 3.2) is not applicable. As outdeg(u) > 1, each H j ∈ X with s j ∈ out D (u) requires one more arc of u to be in S.
, otherwise H i would not be maximal. Hence, there is a cycle C i containing u, s i and v i . If there is any other H j ∈ X with s j ∈ out D (u) and with some v j ∈ V (H j ) such that (v j , u) ∈ A(D), then the cycle C j containing u, s j and v j is arc-disjoint to the cycle C i due to Observation 3.6. Thus, S must contain at least one arc of each such C j , implying there are at most k local funnels H j that fall into this case.
If indeg D (u) > 1, one arc of u is in S as outdeg D (u) > 1. Further, outdeg D (u) ≤ k. This means that there are at most k local funnels H j ∈ X with s j ∈ out D (u). As there can be at most 2k such vertices u, we have that there are at most 2k 2 local funnels H j ∈ X which fall into this case.
Proof Let H i ∈ F and let u be the unique inneighbor of s i in D. Assume u is in some local funnel H j ∈ H and let and there is a path P from w j to w i . If this were not the case, H i and H j would not be maximal, as D i would be an unlabeled local funel containing H i and H j . Let G i ⊆ D be a subgraph containing P, two incoming neighbors of w j and two outgoing neighbors of w i . Clearly, S contains some arc of G i . Since H j and H i are local funnels, w j can only reach one sink of H j , namely u, and w i can be reached by only one source of H i , namely s i . This means in particular that P is the only path from w j to w i . Hence, if there is any other H ∈ F that falls into this case, then the corresponding G constructed is arc-disjoint to G i . As there can be at most k arc-disjoint forbidden subgraphs for funnels in D, there are at most k local funnels in F that fall into this case.
Case 2: D i is not a DAG. Then there is some cycle C i containing some w i ∈ V (H i ) and some w j ∈ V (H j ). Clearly, S contains some arc of C i . Assume there is some is not a DAG. Let C be a cycle in D . From Observation 3.6 we know C i and C are arc disjoint. As we need one arc in S for each such cycle, we get that there are at most k local funnels falling into this case. Now assume u is not in any local funnel in H. We have two cases. Case : u ∈ Dom( ). Then (u) = M, as Set Label (RR 3.2) is not applicable to s i . Since there is some v i ∈ V (H i ) with outdeg(v i ) > 1 and s i can reach v i , we have that u can also reach v i and so (u, s i ) ∈ S or some arc of H i is in S. Hence, there are at most k local funnels H j ∈ F with s j ∈ out(u).
Case 2: u / ∈ Dom( ). As u is not in a local funnel, we have indeg(u) > 1 and outdeg(u) > 1. Since Set Label (RR 3.2) is not applicable, outdeg(u) ≤ k. Hence, there can be at most k local funnels H j ∈ F with u ∈ in(s j ). Because Lower Bound (RR 3.1) is not applicable, we know there are at most 2k vertices u with indeg(u ) > 1 and outdeg(u ) > 1. Thus, there can be at most 2k 2 local funnels H j ∈ F that fall into this case.
By adding the bounds obtained in each case, we get F ≤ k + k + k + 2k 2 ∈ O(k 2 ).
Proof Let H i ∈ M. Case 1: ∀u ∈ in(s i ) : u ∈ Dom( ). As Set Label (RR 3.2) is not applicable, there is some u ∈ in(s i ) with (u) = M and outdeg(u) > 1. Hence, S contains some outgoing arc of u. Any additional H j ∈ M that falls into this case increases the outdegree of some u with (u ) = M and outdeg(u ) > 1. Thus, if there are more than k local funnels H j ∈ M that fall into this case, then S > k.
Case 2: There is some u ∈ in(s i ) and some H j ∈ H such that u ∈ V (H j ). As indeg(s i ) > 1 and H i is maximal, we have that is not a DAG. Let C i be the cycle in D i . If there is some other H ∈ M that falls into this case, we know from Observation 3.6 that the corresponding cycle C and C i are arc disjoint. As S must contain one arc of each C , if there are more than k local funnels H falling into this case, then S > k.
Case 3: There is some u ∈ in(s i ) such that u is not in any local funnel and u / ∈ Dom . Then indeg(u) > 1 and outdeg(u) > 1. As Lower Bound (RR 3.1) is not applicable, there can be at most 2k such vertices u in D. Further, outdeg(u) ≤ k as Set Label (RR 3.2) is not applicable. Hence, there can be at most 2k 2 local funnels H j ∈ M that fall into this case.
By adding all cases together we obtain M ≤ +k + k + 2k 2 ∈ O(k 2 ), as desired.
From lemmas 3.7 to 3.9, we easily obtain a bound for the number of vertices in unlabeled local funnels. Together with the fact that Lower Bound (RR 3.1) is not applicable, we obtain a bound for the number of unlabeled vertices in D. Proof Let H be a maximal set of maximal vertex-disjoint local funnels in D. Clearly, every vertex v ∈ V (D) with v / ∈ Dom( ) and indeg(v) = 1 ∨ outdeg(v) = 1 is in some local funnel. From lemmas 3.7 to 3.9 we know that H ≤ F + M + X ∈ O(k 2 ). Due to lemma 3.5, each local funnel has at most k 3 + 3k 2 + 2k ∈ O(k 3 ) vertices. Hence, there are at most (5k 2 + 5k)(k 3 + 3k 2 + 2k) ∈ O(k 5 ) vertices v lying in some unlabeled local funnel.

Bounding the Number of Labeled Vertices
In Sect. 3.1 we exploited the property that unlabeled vertices have bounded degree, and that we can label them if their neighborhood has some special structure captured by the reduction rules. For the labeled vertices, however, we can apply neither of those strategies. Instead, we first exploit the fact that we know the label of a vertex and use this to decide if an arc is never in an optimal solution or if it is always in an optimal solution.
Arcs from M to F vertices clearly need to be removed. We show that we can also ignore arcs from F to M vertices, that is, we can remove them without changing k. u) and decrease k by 1. Clearly, a solution for (D, , k) is also a solution for the reduced instance (D , r , k ). So let (ˆ r , S r ) be a solution for the reduced instance.

Proof of safety of Remove Arcs (RR 3.7)
If If (v) = F and (u) = M, then we claimˆ r is a funnel labeling for D − S r . If D − S r is a DAG, then the claim trivially holds. Now assume towards a contradiction that D − S r is not a DAG. Then there is a cycle C using the arc (v, u). This implies that there is a path P from u to v in D − S r . In particular, this path also exists in D − S r since it does not use the arc (v, u). However, as (u) = M and (v) = F, we know there is some arc (v , u ) in P withˆ r (v ) = M andˆ r (u ) = F. But thenˆ r is not a funnel labeling for D − S r , a contradiction. Hence, a solution for the reduced instance implies a solution for the input instance, proving the rule is safe.
We now identify certain vertices that can be removed safely. Clearly, sources and sinks cannot be in any cycle in D. By carefully considering the neighborhood of a source or sink v, we can also prove that v is not "relevant" for any forbidden subgraph for funnels in D.

Reduction Rule 3.8 (Sources and Sinks
Remove v if one of the following holds. 1. indeg(v) = 0 and no u ∈ out(v) exists with (u) = F and indeg(u) > 1, or 2. outdeg(v) = 0 and no u ∈ in(v) exists with (u) = M and outdeg(u) > 1. Let (D , r , k) be the reduced instance. Clearly, if (S,ˆ ) is a solution for (D, , k), then, after restricting (S,ˆ ) to the vertices in D , we also have a solution for (D , r , k). Now let (S r ,ˆ r ) be a solution for the reduced instance. We consider the case where indeg D (v) = 0 and there is no u ∈ out(v) such that (u) = F and indeg(u) > 1. The other case follows analogously. We claim that the labelingˆ ⊇ˆ r withˆ (v) = (v) is a funnel labeling for D − S r . Since indeg D−S r (v) = 0, there can be no cycle containing v. There can be no vertex u ∈ V (D) withˆ r (u) = M and outdeg D−S r (u) > 1 as this would imply outdeg D −S r (u) > 1 because indeg D−S r (v) = 0, a contradiction. There can also be no vertex u ∈ V (D) withˆ r (u) = F and indeg D−S r (u) > 1 as all

Proof of safety of Sources and Sinks (RR 3.8)
To bound L , we exploit the bound on the number of unlabeled vertices from lemma 3.10 and also the fact that such vertices have small degree as Set Label (RR 3.2) is not applicable. We first partition L into two subsets L 1 = {v ∈ L | in(v) ∪ out(v) Dom( )} and L 2 = L\L 1 .
Proof Let U be the set of unlabeled vertices. Clearly L 1 ⊆ in(U ) ∪ out(U ). As Set Label (RR 3.2) is not applicable, we have indeg(v) ≤ k + 1 and outdeg(v) ≤ k + 1 for every v ∈ U . From lemma 3.10 we know U ∈ O(k 5 ). Hence, The case for the vertices labeled with M follows analogously.
Since Remove Arcs (RR 3.7) is not applicable, we have A solution set S ⊆ A(D) must contain at least indeg(v) − 1 incoming arcs of v for every v ∈ R 1 . As each u ∈ R 2 has some v ∈ R 1 as outneighbor, we have R 2 ≤ 2k.
Let v ∈ R 3 . We claim that v can reach some vertex of R 2 . Since Sources and Sinks (RR 3.8) is not applicable and out(v) ∩ R 1 = ∅, we have indeg(v) = 1 and outdeg(v) ≥ 1. This means that, if we successively follow the outneighbors of v, we reach a vertex of R 2 or find a cycle C using only vertices of R 3 . However, as Break Cycle (RR 3.5) is not applicable, such a cycle C cannot exist: every vertex v ∈ R 3 has indeg(v) = 1 and (v) = F, implying we could apply Break Cycle (RR 3.5) to C. Hence, every vertex of R 3 can reach some u ∈ R 2 .
We greedily construct vertex-disjoint paths P 1 , P 2 , . . . , P a ending in R 2 whose inner vertices lie in R 3 . For a vertex v ∈ R 3 take an arbitrary u ∈ R 2 such that v can reach u. Consider a path P from v to u. If none of its vertices lie in any already constructed P i , we just take the path P into our set of paths. Otherwise, assume that P intersects some P i at w and let w be the first such vertex in P. Since the indegree of any vertex in R 3 ∪ R 2 is at most one, we know that w is the starting point of P i . Hence, we can obtain a path P j by taking the path from v to w in P and then concatenating P i . As w is the first vertex of P intersecting any other path, we get that P j only intersects P i . By replacing P i with P j , we obtain a path that also contains v. We repeat this process until we covered all v ∈ R 3 .
Since R 2 ≤ 2k, we have a ≤ 2k. We now prove that V (P i ) ≤ 4 for any P i in our set of vertex-disjoint paths. Note that indeg(u) ≤ 1 for any vertex u ∈ V (P i ).
Since Dissolve Vertex (RR 3.3) is not applicable, any inner vertex u of P i has outdeg(u) > 1. Let w be the successor of u in P i . As Shift Neighbors (RR 3.4) is not applicable, we have that indeg(w) > 1 or v ∈ out(u) where v is the unique inneighbor of u. If indeg(w) > 1, then u ∈ R 2 and is the endpoint of P i , a contradiction to the assumption that u is an inner vertex of P i . Otherwise, we know that u / ∈ out(w) as indeg(u) = 1. If u is the only inner vertex of P i , then V (P i ) ≤ 3. Otherwise, its successor w in P i is an inner vertex of P i (since v is the starting point of P i , and so v / ∈ out(u)). Hence, we can apply the same argumentation to w and conclude that it has some outneighbor x with indeg(x) > 1, implying x ∈ R 2 and V (P i ) ≤ 4.
As any vertex in D falls into one of these groups, we have V (D) ∈ O(k 6 ).
As Remove Arcs (RR 3.7) is not applicable, there is no arc (v, u) where v, u ∈ Dom( ) and (v) = (u). Since there are O(k 5 ) unlabeled vertices and every unlabeled vertex has in-and outdegree at most k + 1, there are O(k 6 Case 2: v, u / ∈ L. As Lower Bound (RR 3.1) is not applicable, there can be at most 2k such vertices. Thus, there are at most 4k 2 arcs between labeled vertices not in L.
Then indeg(u) = 1 or outdeg(v) = 1. Hence, there can be at most L ∈ O(k 6 ) such arcs. Case If v / ∈ L, then at least half of its outgoing arcs need to be in a solution set. Similarly, if u / ∈ L, at least half of its incoming arcs need to be in a solution set. Hence, there can be at most 2k arcs falling into this case. By adding all cases together, we obtain that A(D) ∈ O(k 6 ), concluding the proof.

Computing the Kernel
In Sects. 3.1 and 3.2 we defined the reduction rules for the kernelization process and showed that, if none of the reduction rules are applicable to a digraph D, then the size of D is polynomially bounded on k. To conclude the proof that FADS admits a polynomial problem kernel, we show that it is possible to apply all reduction rules in O(nm) time and also reduce the FADL instance back into an FADS instance. Proof We apply the reduction rules exhaustively in the order they are defined. In order to do so efficiently, we use a constant number of counters for each vertex v in order to check if a reduction rule is applicable to v.
To apply Lower Bound (RR 3.1), Set Label (RR 3.2) and Dissolve Vertex (RR 3.3) we only need to check the labels and degrees of a vertex and its neighbors. Whenever the label of a vertex changes, we need to recheck if we can apply the reduction rules to its neighbors. It is therefore sufficient to store the degree of v and the number of its neighbors which have the a certain type (for example, the number of u ∈ out(v) with (u) = F and indeg(u) = 1). Whenever the label of a vertex changes, we only need to increment the counters its neighbors. As we set the label of a vertex at most once, we need to visit each arc constantly many times.
For Shift Neighbors (RR 3.4), we consider the first case of the rule where the indegrees are one (the other case is applied analogously). We search for a vertex w with indeg(w) = 1. We then take the unique inneighbor v ∈ in(w), tracking in a counter the number of w ∈ out(v) with indeg(w) = 1. If indeg(v) = 1, we construct a path P ending in v by following its unique inneighbor until we obtain a vertex y with indeg(y) > 1 or (y) = M, which we do not include in P. We denote the starting point of P by u.
If u = w, we can apply Break Cycle (RR 3.5) by deleting the arc (v, w) and labeling every vertex in P with F (if they are not already labeled). Now assume P is indeed a path. For each x ∈ out(P) we count the number c = indeg(x) ∩ V (P) and then shift all arcs (v, x) with v ∈ V (P) by arcs coming from the first c vertices in P. The cost of applying this operation is linear on the number of arcs leaving P. If a vertex v is in another such path Q, then after applying Shift Neighbors (RR 3.4) once to v we shift Q in such a way that only the startpoint u is in more than one path to which the rule is applicable.
We only need to recheck if Shift Neighbors (RR 3.4) is applicable to v when an arc is removed from it by Remove Arcs (RR 3.7) or by Break Cycle (RR 3.5) (arcs removed from Sources and Sinks (RR 3.8) never trigger Shift Neighbors (RR 3.4) due to the degrees of the affected vertices). In this case, we apply depth-first search on v, following its outgoing arcs, in order to find all paths to which Shift Neighbors (RR 3.4) is applicable. As observed above, the computational cost of shifting the arcs of a path P is linear in the number of arcs leaving P. Since no reduction rule adds arcs to D, we only need to recheck if Shift Neighbors (RR 3.4) is applicable to v once. Hence, each arc gets shifted O(n) times, and this rule can be exhaustively applied in O(nm) time.
Remove Arcs (RR 3.7) is applied whenever we set the label of a vertex v. In order to apply it, it suffices to iterate through in(v) or out(v) and check the labels of those vertices. Since we set the label of a vertex at most once, we need O(n +m) time in total for this rule. Finally, we apply Sources and Sinks (RR 3.8) by applying breadth-first search on the sources and sinks of D. Note that, although Sources and Sinks (RR 3.8) remove vertices (and arcs) from D, it cannot cause Break Cycle (RR 3.5), Shift Neighbors (RR 3.4) or other reduction rules to become applicable if they were not applicable before. Hence, by applying Sources and Sinks (RR 3.8) only after no other rule is applicable, we can exhaustively apply this rule in O(n + m) time, giving us a total running time of O(nm) for the kernelization process, concluding the proof. Proof We start by reducing the FADS instance into an FADL instance (D, , k) by adding an empty labeling . Using lemma 4.1, we can exhaustively apply all reduction rules to (D, , k) in O(nm) time.
From lemma 3.13 we know V (D) ∈ O(k 6 ) and A(D) ∈ O(k 6 ). We now reduce the FADL instance back into an FADS instance (D , k) in order to obtain a kernel for the original problem. We first set D :=D and add k + 2 vertices f 1 , f 2 , . . . , f k+2 and k + 2 vertices m 1 , m 2 , . . . , m k+2 to D . Let v ∈ Dom( ). If (v) = F, we add the arc (v, f i ) for each 1 ≤ i ≤ k + 2. If (v) = M, we add the arc (m i , v) for each 1 ≤ i ≤ k + 2.
Trivially, a solution for the FADL instance is also a solution for the FADS instance. It is also easy to see that, if there is some arc set S r ⊆ A(D ) and some funnel labelingˆ r for D − S r such that (v) =ˆ r (v) for some v ∈ Dom( ), then S r > k. Hence, a solution for (D , k) implies a solution for (D, , k).
We added 2k + 4 vertices and O(k 7 ) arcs to D , and so V (D ) ∈ O(k 6 ) and A(D ) ∈ O(k 7 ), thus concluding the proof.

Conclusion
The kernelization algorithm provided in this paper heavily relies on the characterizations of theorem 2.1 for funnels. Both the characterization by forbidden subgraphs as well as the labeling characterization allowed us to derive reduction rules based only on "local" substructures as the degree or neighborhood of a vertex. In a sense, this "locality" property saved us from computing any set of vertex-disjoint local funnels, despite the fact that the results and reduction rules from Sect. 3.1 heavily rely on local funnels.
The polynomial kernels for Out-Forest-VDS and Pumpkin-VDS due to [7] also rely on "localized" forbidden substructures. We consider that generalizing these results to larger digraph classes of unbounded treewidth, but which are characterized by forbidden substructures, to be a very interesting direction for future research.
Further, it would also be interesting to decide if Funnel-VDS admits a polynomial kernel or not (it is in FPT with respect to the solution size [9]), especially since a kernel for this problem would require considerably different ideas from the ones presented in this paper, as it is no longer clear how to exploit the vertex labeling in the vertexdeletion setting.
Funding Open Access funding enabled and organized by Projekt DEAL.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.