A relaxation of the Directed Disjoint Paths problem: a global congestion metric helps

In the Directed Disjoint Paths problem, we are given a digraph $D$ and a set of requests $\{(s_1, t_1), \ldots, (s_k, t_k)\}$, and the task is to find a collection of pairwise vertex-disjoint paths $\{P_1, \ldots, P_k\}$ such that each $P_i$ is a path from $s_i$ to $t_i$ in $D$. This problem is NP-complete for fixed $k=2$ and W[1]-hard with parameter $k$ in DAGs. A few positive results are known under restrictions on the input digraph, such as being planar or having bounded directed tree-width, or under relaxations of the problem, such as allowing for vertex congestion. Positive results are scarce, however, for general digraphs. In this article we propose a novel global congestion metric for the problem: we only require the paths to be"disjoint enough", in the sense that they must behave properly not in the whole graph, but in an unspecified part of size prescribed by a parameter. Namely, in the Disjoint Enough Directed Paths problem, given an $n$-vertex digraph $D$, a set of $k$ requests, and non-negative integers $d$ and $s$, the task is to find a collection of paths connecting the requests such that at least $d$ vertices of $D$ occur in at most $s$ paths of the collection. We study the parameterized complexity of this problem for a number of choices of the parameter, including the directed tree-width of $D$. Among other results, we show that the problem is W[1]-hard in DAGs with parameter $d$ and, on the positive side, we give an algorithm in time $\mathcal{O}(n^{d+2} \cdot k^{d\cdot s})$ and a kernel of size $d \cdot 2^{k-s}\cdot \binom{k}{s} + 2k$ in general digraphs. This latter result has consequences for the Steiner Network problem: we show that it is FPT parameterized by the number $k$ of terminals and $p$, where $p = n - q$ and $q$ is the size of the solution.


Introduction
In the Disjoint Paths problem, we are given a graph G and a set of pairs of vertices {(s 1 , t 1 ), . . . , (s k , t k )}, the requests, and the task is to find a collection of pairwise vertexdisjoint paths {P 1 , . . . , P k } such that each P i is a path from s i to t i in G. Since this problem is NP-complete in the directed and undirected cases, even if the input graph is planar [19,26], algorithmic approaches usually involve approximations, parameterizations, and relaxations. In this article, we focus on the latter two approaches and the directed case.
to its destination t i such that a large part of the graph remains unused by any of the pairs chosen so far (we prove that such a request always exists) and consider only the remaining requests for the next iteration. We repeat this procedure until we arrive at an instance where the number of requests is exactly s + 1, and use the base case to output a solution for it. From this solution, we extract in polynomial time a solution for the original instance, yielding a kernel of the claimed size.
Since positive results for the Directed Disjoint Paths problem are not common in the literature, especially in general digraphs, we consider our algorithmic results to be of particular interest. Furthermore, the kernelization algorithm also brings good news for the Steiner Network problem: when s = 0 Feldmann and Marx in [18] showed that the tractability of the Steiner Network problem when parameterized by the number of requests depends on how the requests are structured. Our result adds to the latter by showing that the problem remains FPT if we drop this structural condition on the request set but add d, the number of vertices occurring in at most s paths of the solution, as a parameter. More details can be found in Section 2. Table 1 shows a summary of our algorithmic and complexity results, which altogether provide an accurate picture of the parameterized complexity of the DEDP problem for distinct choices of the parameters.  Table 1 Summary of hardness and algorithmic results for distinct choices of the parameters. A horizontal line in a cell means no restrictions for that case, and here we denote by w the directed tree-width of the input digraph. In all cases, we have that c = n − d.
Organization. In Section 2 we present some preliminaries relevant to all parts of this article and formally define the Disjoint Enough Directed Paths problem. We provide the hardness results in Section 3 and the algorithms in Section 4. The corresponding notations and definitions related to directed tree-width are presented in Section 4.1, where they are used. We conclude the article in Section 5 with some open questions for further research.

Preliminaries and definitions
For a graph G = (V, E), directed or not, and a set X ⊆ V (G), we write G − X for the graph resulting from the deletion of X from G and G[X] for the graph induced by X. We also write G ⊆ G to say that G is a subgraph of G. If e is an edge of a directed or undirected graph with endpoints u and v, we may refer to e as (u, v). If e is an edge of a digraph, we say that e has tail u, head v and is oriented from u to v. The in-degree deg − D (v) (resp. out-degree deg + D (v)) of a vertex v in a digraph D is the number of edges with head (resp. tail) v. A walk in a digraph D is an alternating sequence W of vertices and edges that starts and ends with a vertex, and such that for every edge (u, v) in the walk, vertex u (resp. vertex v) is the element right before (resp. right after) edge (u, v) in W . A walk is a path if all the vertices in it are distinct. All paths mentioned henceforth, unless stated otherwise, are considered to be directed.
An orientation of an undirected graph G is a digraph D obtained from G by choosing an orientation for each edge e ∈ E(G). The undirected graph G formed by ignoring the orientation of the edges of a digraph D is the underlying graph of D.
A digraph D is strongly connected if, for every pair of vertices u, v ∈ V (D), there is a walk from u to v and a walk from v to u in D. We say that D is weakly connected if the underlying graph of D is connected. A separator of D is a set S V (D) such that D \ S is not strongly connected. If |V (D)| ≥ k + 1 and k is the minimum size of a separator of D, we say that D is k-strongly connected. A strong component of D is a maximal induced subdigraph of D that is strongly connected, and a weak component of D is a maximal induced subdigraph of D that is weakly connected.
Unless stated otherwise, n will always denote the number of vertices of the input graph. For an integer ≥ 1, we denote by [ ] the set {1, 2, . . . , }. We make use of Menger's Theorem [27] for digraphs. Here a (u, v)-separator is a set of vertices X such that there is no path from u to v in D − X.
. Then the minimum size of a (u, v)-separator equals the maximum number of pairwise internally vertex-disjoint paths from u to v.

Parameterized complexity
We refer the reader to [12,15] for basic background on parameterized complexity, and we recall here only some basic definitions. A parameterized problem is a language L ⊆ Σ * × N. For an instance I = (x, k) ∈ Σ * × N, k is called the parameter.
A parameterized problem is fixed-parameter tractable (FPT) if there exists an algorithm A, a computable function f , and a constant c such that given an instance I = (x, k), A (called an FPT algorithm) correctly decides whether I ∈ L in time bounded by f (k) · |I| c . For instance, the Vertex Cover problem parameterized by the size of the solution is FPT.
A parameterized problem is XP if there exists an algorithm A and two computable functions f and g such that given an instance I = (x, k), A (called an XP algorithm) correctly decides whether I ∈ L in time bounded by f (k) · |I| g(k) . For instance, the Clique problem parameterized by the size of the solution is in XP.
Within parameterized problems, the W-hierarchy may be seen as the parameterized equivalent to the class NP of classical decision problems. Without entering into details (see [12,15] for the formal definitions), a parameterized problem being W[1]-hard can be seen as a strong evidence that this problem is not FPT. The canonical example of W[1]-hard problem is Clique parameterized by the size of the solution.
For an instance (x, k) of a parameterized problem Q, a kernelization algorithm is an algorithm A that, in polynomial time, generates from (x, k) an equivalent instance (x , k ) of Q such that |x | + k ≤ f (k), for some computable function f : N → N. If f (k) is bounded from above by a polynomial of the parameter, we say that Q admits a polynomial kernel.
A polynomial time and parameter reduction is an algorithm that, given an instance (x, k) of a parameterized problem A, runs in time f (k) · |x| O(1) and outputs an instance (x , k ) of a parameterized problem B such that k is bounded from above by a polynomial on k and (x, k) is positive if and only if (x , k ) is positive.

The Disjoint Enough Directed Paths problem
Before defining the problem, we define requests and satisfying collections. Definition 2 (Requests and satisfying collections). Let D be a digraph and P be a collection of paths of D. A request in D is an ordered pair of vertices of D. For a request (multi)set R = {(s 1 , t 1 ), (s 2 , t 2 ), . . . , (s k , t k )}, we say that the vertices {s 1 , s 2 , . . . , s k } are source vertices and that {t 1 , t 2 , . . . , t k } are target vertices, and we refer to them as S(R) and T (R), respectively. We say that P satisfies We remark that a request multiset may contain many copies of the same pair, and that when considering the union of two or more of those multisets, we keep all such copies in the resulting request multiset. For instance, if , (u 2 , v 2 )}, and this indicates that a collection of paths satisfying this request set must contain two paths from u 1 to v 1 . To simplify the notation, we simply refer to request multisets as request sets. The DEDP problem is defined as follows.

Input:
A digraph D, a request set R of size k, and two non-negative integers c and s.
Output: A collection of paths P satisfying R such that at most c vertices of D occur in at least s + 1 paths of P and all other vertices of D occur in at most s paths of P.
Unless stated otherwise, we consider d = n − c for the remaining of this article. Intuitively, c imposes an upper bound on the size of the "congested" part of the solution, while d imposes a lower bound on the size of the "disjoint" part. For a parameterized version of DEDP, we sometimes include the parameters before the name. For instance, we denote by (k, d)-DEDP the Disjoint Enough Directed Paths problem with parameters k and d. We refer to instances of DEDP as (D, R, k, c, s).
Notice that if c ≥ n or s ≥ k, the problem is trivial since every vertex of the graph is allowed to be in all paths of a collection satisfying the requests, and thus we only need to check for connectivity between the given pairs of vertices. Furthermore, if there is a pair (s i , t i ) in the request set such that there is no path from s i to t i in the input digraph D, the instance is negative. Thus we henceforth assume that c < n, that s < k, and that there is a path from s i to t i in D for every pair (s i , t i ) in the set of requests.
Choosing the values of k, d, and s appropriately, we show in Table 2 that the DEDP problem generalizes some problems in the literature.  Table 2 Summary of related problems.
The last line of Table 2 is of particular interest, and we focus on it in the next two paragraphs. In the Steiner Network problem, we are given a digraph D and a request set R and we are asked to find an induced subgraph D of D with minimum number of vertices such that D admits a collection of paths satisfying R. For a request set R in a digraph D, let D(R) be the digraph with vertex set S(R) ∪ T (R) and edge set {(s, t) | (s, t) ∈ R}. The complexity landscape of the Steiner Network problem when parameterized by the size of the request set was given by Feldmann and Marx [18]. They showed that the tractability of the problem depends on D(R). Namely, they proved that if D(R) is close to being a caterpillar, then the Steiner network problem is FPT when parameterized by |R|, and W[1]-hard otherwise. When parameterized by the size of the solution, Jones et al. [22] showed that the Steiner Network problem is FPT when D(R) is a star whose edges are all oriented from the unique source and the underlying graph of the input digraph excludes a topological minor, and W[2]-hard on graphs of degeneracy two [22].
Our algorithmic results for DEDP for the particular case s = 0 yield an FPT algorithm for another parameterized variant of the Steiner Network problem. In this case, we want to decide whether D admits a large set of vertices whose removal does not disconnect any pair of requests. That is, we want to find a set X ⊆ V (D) with |X| ≥ d such that D − X contains a collection of paths satisfying R. In Theorem 27 we give an FPT algorithm (in fact, a kernel) for this problem with parameters |R| and d. We remark that this tractability does not depend on D(R).

Hardness results for DEDP
In this section we provide hardness results for the DEDP problem. Namely, we first provide in Theorem 3 a simple reduction from Disjoint Paths with Congestion, implying NP-completeness for fixed values of k, c, d when s = 1 and W[1]-hardness in DAGs with parameter k when s ≥ 1 and s < k. We then prove in Theorem 4 that DEDP is W[1]-hard in DAGs with parameter d.
As mentioned in [22], the Steiner Network problem is W[2]-hard when parameterized by the size of the solution (as a consequence of the results of [28]). Hence (c)-DEDP is W[2]-hard for fixed s = 0. As discussed in the introduction, the Directed Disjoint Paths problem is NP-complete for fixed k = 2 [19] and W[1]-hard with parameter k in DAGs [34]. In addition, Directed Disjoint Paths with Congestion parameterized by the number of requests is also W[1]-hard in DAGs for every fixed congestion s ≥ 1, as observed in [2]. When c = 0 and s ≥ 1, DEDP is equivalent to the Directed Disjoint Paths with Congestion problem and thus the aforementioned bounds apply to it as well. In the following theorem we complete this picture by showing that DEDP is NP-complete for fixed k ≥ 3 and s = 1, even if c is quite large with respect to n (note that if c = n all instances are trivially positive), namely for c as large as n − n α with α being any fixed real number such that 0 < α ≤ 1. The same reduction also allows to prove W[1]-hardness in DAGs with parameter k. The idea is, given the instance of DDPC with input digraph D, build an instance of DEDP where the "disjoint" part corresponds to the original instance, and the "congested" part consists of c new vertices that are necessarily used by s + 1 paths of any solution. In this process, we generate an instance of DEDP in a digraph D with |V (D )| = n = d + c and d = |V (D)|. This is why we restrict the value of d to be of the form n α , but not smaller: if we ask d to be "too small", for example d = log n, our procedure would generate an instance of DEDP such that the size of the "disjoint part" d satisfies d = log(d + c) which in turn implies that the size of this instance would be exponential on the size of the original instance of DDPC.
Following, we refer to instances of DDPC with input graph D, request set R, k = |R|, and congestion s as (D, R, k, s). We remind the reader that we can assume that s < k, since otherwise the problem reduces to a simple connectivity check between every pair of vertices in the request set. Since DDP, which is exactly the DDPC problem with congestion s = 1, is NP-complete for fixed k ≥ 2 [19] and k-DDPC is W[1]-hard in DAGs [2], our reduction implies that DEDP with c = n − d(n) is NP-complete for every fixed k ≥ 3 and s = 1, and W[1]-hard in DAGs with parameter k and any fixed s ≥ 1. We can assume that c ≥ 1 since DEDP is exactly DDPC when c = 0 and s ≥ 1 (as discussed previously).
arbitrarily. We construct an instance of DEDP as follows. Let D be a digraph constructed by adding to D a path with vertex set {v 1 , . . . , v c } and an edge from t i to v 1 . Then, add to R all pairs in (R \ {s i , t i }), the pair (s i , v c ), and s copies of the pair (v 1 , v c ). Figure 1 illustrates this construction. It is easy to verify that (D, R, k, s) is positive In Theorem 3 we only prove NP-completeness for s = 1 since, as we discuss in Section 5, it is not known if DDPC is NP-complete for some fixed k when the congestion is at least two. Nevertheless, a positive answer to this question would also imply the NP-completeness of DEDP for some fixed k and fixed s ≥ 1 as the reduction used in the proof of Theorem 3 implies that DEDP is as hard as DDPC. Dealing with the local congestion metric s, however, is not the main objective of this article, which is to focus on the global congestion metric c and its dual d = n − c.
Next, we show that (d)-DEDP is W[1]-hard, even when the input graph is acyclic and all source vertices of the request set are the same. The reduction is from the Independent Set problem parameterized by the size of the solution, which is W[1]-hard [12,15]. Proof. Let (G, d) be an instance of the Independent Set problem, in which we want to decide whether the (undirected) graph G contains an independent set of size at least d, and s be a non-negative integer. Let V E be the set {v e | e ∈ E(G)} and D a directed graph with vertex set V (G) ∪ {r} ∪ V E . Add to D the following edges: • for every v ∈ V (G), add the edge (r, v); and • for every edge e ∈ E(G) with endpoints u and w, add the edges (u, v e ) and (w, v e ).
Finally, for every v e ∈ V E , add 2s + 1 copies of the pair (r, v e ) to R. Notice that each vertex v e of D associated with an edge E of D has out-degree zero in D and r has in-degree zero. Moreover, every edge of D has as extremity either r or a vertex of the form v e . Thus D is a acyclic, as desired. Furthermore |S(R)| = 1 since all of its elements are of the form (r, v e ), for e ∈ E(G). We now show that (G, d) is positive if and only if (D, R, k, c, s) is positive, where k = |R| = m · (2s + 1).
For the necessity, let X be an independent set of size d in G. Start with a collection P = ∅. We classify the edges of G into two sets: the set E 1 containing all edges with both endpoints in V (G) − X, and the set E 2 containing all edges with exactly one endpoint in X. Now, for each e ∈ E 1 , choose arbitrarily one endpoint u of e and add to P 2s + 1 copies of the path in D from r to v e using u. For each e ∈ E 2 with e = (u, w) and w ∈ X, add to P 2s + 1 copies of the path in D from r to v e using w. Since X is an independent set, no vertex in X occurs in any path of P, and since E(G) = E 1 ∪ E 2 , P satisfies R and the necessity follows as c = n − d.
Let P be a solution for (D, R, k, c, s) and X ⊆ V (D) be a set of vertices with |X| = d and such that each vertex of X occurs in at most s paths of P. Such choice is possible since d = n − c. For contradiction, assume that X is not an independent set in G. Then there is an edge e ∈ E(G) with e = (u, w) and u, w ∈ X, and 2s + 1 copies of the request (r, v e ) in R. Thus each path satisfying one of those requests uses u or w, but not both, and therefore either u or w occurs in at least s + 1 paths of P, a contradiction. We conclude that X is an independent set in G and the sufficiency follows.

Algorithms for DEDP
In this section we focus on algorithmic results for DEDP. In Theorem 3 we showed that DEDP is NP-complete for every fixed k ≥ 3 and a large range of values of c, and showed that considering only d as a parameter is still not enough to improve the tractability of the problem: Theorem 4 states that (d)-DEDP is W[1]-hard in DAGs even if all requests share the same source. Thus DEDP is as hard as the Directed Disjoint Paths problem when k is not a parameter. Here we show that, similarly to the latter, DEDP admits an XP algorithm when parameterized by the number of requests and the directed tree-width of the input digraph. Then, we show how the tractability of DEDP improves when we consider stronger parameterizations including d. Namely, we show that DEDP is XP with parameters d and s (cf. Theorem 18), and FPT with parameters k and d (hence s as well, since we may assume that k > s as discussed in Section 2.2; cf. Theorem 27). It is worth mentioning that this kind of dual parameterization (remember that d = n − c) has proved useful in order to improve the tractability of several notoriously hard problems (cf. for instance [2,3,5,9,16]). In Section 4.1 we formally define directed tree-width and arboreal decompositions, as provided by Johnson et al. [21], and apply the ideas and results they used to show an XP algorithm for the Directed Disjoint Paths problem parameterized by the number of requests in digraphs of bounded directed tree-width to show that a similar result holds for DEDP. In Section 4.2 we show our algorithms for parameterizations of DEDP including d as a parameter.

An XP algorithm with parameters k and dtw(D)
Given the success obtained in the design of efficient algorithms in undirected graphs of bounded tree-width (cf. [10,11], for example), and the enormous success achieved by the Grid Theorem [31] and by the Bidimensionality framework [14], it is no surprise that there was interest in finding an analogous definition for digraphs. As the tree-width of an undirected graph measures, informally, its distance to being a tree, the directed tree-width of a digraph, as defined by Johnson et al. [21], measures its distance to being a DAG, and an arboreal decomposition of a digraph exposes a (strong) connectivity measure of the original graph. The authors conjectured the existence of a grid-like theorem for their width measure [21]. In a recent breakthrough, Kawarabayashi and Kreutzer [24] proved this conjecture to be true: they showed that there is a computable function g such that every digraph of directed tree-width at least g(k) has a cylindrical grid as a butterfly minor 1 . Recently Campos et al. [7] improved the running time of the algorithm that follows from the proof of Kawarabayashi and Kreutzer [24], by locally modifying some steps of the original proof.
The technical contents of this section are mostly taken from [21]. By an arborescence T , we mean an orientation of a tree with root r 0 in such a way that all edges are pointing away from r 0 . If a vertex v of T has out-degree zero, we say that v is a leaf of T . We now define guarded sets and arboreal decompositions of directed graphs. From here on, we refer to oriented edges only, unless stated otherwise, and D will always stand for a directed graph. All the considered directed graphs mentioned may contain directed cycles of length two.
See Figure 3 for an illustration of a Z-guarded set. If a set S is Z-guarded, we may also say that Z is a guard for S. We remark that in [21,24], the authors use the terminology Z-normal sets instead of Z-guarded sets. In this article, we adopt the terminology used, for instance, in [4].
Let T be an arborescence, r ∈ V (T ), e ∈ E(T ), and r be the head of e. We say that r > e if there is a path from r to r in T (notice that this definition implies that r > e). We say that e ∼ r if r is the head or the tail of e. To define the directed tree-width of directed graphs, we first need to introduce arboreal decompositions. We say that r is a leaf of (T, X , W) if r has out-degree zero in T .
For a vertex r ∈ V (T ), we denote by width(r) the size of the set W r ∪ ( e∼r X e ). The width of (T, X , W) is the least integer k such that, for all r ∈ V (T ), width(r) ≤ k + 1. The directed tree-width of D, denoted by dtw(D), is the least integer k such that D has an arboreal decomposition of width k.
The left hand side of Figure 4 contains an example of a digraph D, while the right hand side shows an arboreal decomposition for it. In the illustration of the arboreal decomposition, squares are guards X e and circles are bags of vertices W r . For example, consider the edge e ∈ E(T ) with X e = {b, c} from the bag W 1 to the bag W 2 . Then {W r : r ∈ V (T ) and r > e} = V (D) \ {a} and, by item (ii) described above, this set must be {b, c}-guarded since X e = {b, c}. In other words, there cannot be a walk in D \ {b, c} starting in V (D) \ {a} going to {a} and then back. This is true in D since every path reaching {a} from the remaining of the graph must do so through vertices b or c. The reader is encouraged to verify the same properties for the other guards in the decomposition.
We remark that DAGs have directed tree-width zero. As shown in [21], it is not hard to see that, if D is a digraph constructed by replacing every edge of an undirected graph G by two edges in opposite directions, then the directed tree-width of D is equal to the tree-width of G. This observation also implies that dtw(D) is at most the tree-width of its underlying graph. Further intuitions of the similarities between the undirected and the directed cases are given by Reed [30]. It is worth noting that, in contrast to the undirected case, the class of digraphs of bounded directed tree-width is not closed under butterfly contractions [1].
The algorithm we present in this section consists of dynamic programming along an arboreal decomposition of the input digraph. Following the notation used by Johnson et al. [21], we refer to the information we want to compute at every step of the algorithm as an itinerary. We provide a formal definition for an itinerary for DEDP later. We recall that a set of vertices S is w-guarded if S is Z-guarded for some Z with |Z| ≤ w (cf. Definition 5).
Johnson et al. [21] provided two conditions that, if satisfied by a given problem, are sufficient to provide an XP algorithm for it in digraphs with bounded directed tree-width. More precisely, for a digraph D with dtw(D) = w, they ask that there is a real number α depending on w (and possibly some parameters of the problem, if any) and two algorithms satisfying the following conditions.  Using this notation, the following theorem says how to compute an itinerary for V (D). Theorem 9 (Johnson et al. [21]). Provided that Conditions 7 and 8 hold, there is an algorithm running in time O(n α+1 ) that receives as input a digraph D and an arboreal decomposition for D with width at most w and outputs an itinerary for V (D).
In [21] an XP algorithm for the Directed Disjoint Paths problem in digraphs of bounded directed tree-width is given as an example of application of the aforementioned tools, and a similar approach is claimed to work for the Hamilton Path, Hamilton Path With Prescribed Ends, Even Cycle Through a Specified Vertex problems, and others. We follow their ideas to provide an XP algorithm for (k, w)-DEDP, where w is the directed tree-width of the input digraph. The main idea, formalized by the following definition and lemma, is that the number of weak components in the digraph formed by the union of the paths in a collection P satisfying the request set is bounded by a function depending on k and w only. Thus we can guess how the paths in P cross a set of vertices A that is w-guarded and use an arboreal decomposition of the input digraph to propagate this information in a dynamic programming scheme. We use the following definition.

Definition 10. Let D be a digraph and P be a collection of paths in D. We denote by D(P) the digraph formed by the union of all paths in P.
Definition 11 (Limited collections). Let R be a request set in a digraph D with |R| = k and P be a collection of paths satisfying R. We say that P is (k, w, S)-limited, for some S ⊆ V (D), if D(P) ⊆ D[S] and for every w-guarded set S ⊆ S, the digraph induced by V (D(P)) ∩ S has at most (w + 1) · k weak components.
The following lemma is inspired by [21,Lemma 4.5] and is key to the algorithm.

Lemma 12.
Let R be a request set of size k in a digraph D and w be an integer. Then every collection of paths P satisfying R is (k, w, S)-limited for every S ⊆ V (D) containing all paths in P.
Proof. Let k = |R| and S be as in the statement of the lemma and S be a w-guarded subset of S. By the definition of w-guarded sets, there is a set Z ⊆ V (D) with |Z| ≤ w such that S is Z-guarded. For i ∈ [k], let Q i be the collection of paths formed by the subpaths of P i intersecting S . Thus, D(Q i ) consists of the union of subpaths of P i . Let q i be the number of weak components of D(Q i ). Since S is Z-guarded, each subpath of P i linking two distinct weak components of D(Q i ) must intersect Z. Thus, |V (P i ) ∩ Z| ≥ q i − 1 and q i ≤ w + 1 since a vertex of Z can be in all paths of P. We conclude that i∈[k] q i ≤ (w + 1) · k, as desired.
We now formally define an itinerary for DEDP. From this point forward, we say that a request set R in a digraph D is contained in A if every vertex occurring in R is contained in A. for some c ≤ c. We now provide algorithms satisfying Conditions 7 and 8 for the given definition of an itinerary for DEDP. By Lemma 12, we need to consider only request sets of size at most (w + 1) · k whenever the input digraph has directed tree-width at most w in the following lemmas. We follow the proofs given by Johnson et al. [21], adapting them to our case. For every t ∈ [n], the authors show how to compute a solution containing at most t vertices for a given instance of the Directed Disjoint Paths problem, if one exists, or to decide that no such solution exists. We drop this demand in our algorithm, and instead include the restriction on the congestion c. If there is a pair (s, t) ∈ L such that s ∈ B and t ∈ A, we set f A∪B (L, c ) = 0. Assume now that no such pairs exist in L and that L is not contained in A nor in B.

Definition 13 (Itinerary). Let Γ be an instance of
Define L A = L B = ∅. For i ∈ [ ], do the following:  Suppose that P is a path from s to t in a solution P for Γ c . Let P A be the set of subpaths of P which are contained in A, with P A = {P A 1 , . . . , P A a }, and, for i ∈ [a], let u i and v i be the first and last vertices occurring in P A i , respectively. Furthermore, let P B be the collection (v a , t) if t ∈ B, such that each path of P B has its extremities in B ∪ {u 1 , v 1 , . . . , u a , v a } and all internal vertices in B. Figure 6 illustrates this case.
The number of such collections is a function depending on a and w only and, by Lemma 12 and our assumption that A is w-guarded, we can assume that a ≤ (w + 1) · k. We show how we can test whether there is a solution for Γ c using an itinerary for A and, for each (s, t) ∈ L, searching for a collection P B as described above. Intuitively, we want to guess how the paths in a solution for Γ c intersect A and how those pieces can be connected through B.
For By Lemma 12, we only need to consider request sets of size at most (w + 1) · k in A ∪ B since every solution for Γ has at most (w + 1) · k weak components in A. Let B + be the set formed by the union of B with all vertices occurring in L A and in That is, for each pair (u i j , v i j ) ∈ L A that we want to satisfy in A, we want to link this subpath in a (possible) solution for Γ c to the next one through a path in B + satisfying the pair For the necessity, we can choose L A and L B as described above in this proof. For the sufficiency, let A = i∈[ ] i and P A be a solution for the instance (D[A], L A , A , c 1 , s) of DEDP, with P A = {P 1 , . . . , P A }. Now, since the paths in this collection are not necessarily disjoint, we are guaranteed to find only a directed walk from s i to t i for each pair (s i , t i ) ∈ L by linking (through the paths in B + ) the endpoints of the paths in the collection satisfying L i , with i ∈ [ ]. However, every such directed walk contains a path from s i to t i whose set of vertices is contained in the set of vertices of the walk. Thus by following those directed walks and choosing the paths appropriately, we can construct a solution for Γ c , since shortening the walks can only decrease the number of vertices occurring in s + 1 or more paths of the collection.
The number of collections P B for which (a) and (b) hold is O(2 w· ) and thus depending on k and w only, since ≤ (w + 1) · k. Since |A| ≤ n, c ≤ n, and the number of itineraries contained in A ∪ B is at most n 4(w+1)·k , the bound on the running time follows.
Finally, we obtain the XP algorithm combining Lemmas 14 and 15 together with Theorem 9.

Algorithms for the dual parameterization
We now show our algorithmic results for stronger parameterizations of DEDP including d as a parameter. The following definition is used in the description of the algorithms of this section.

Definition 17.
Let D be a digraph, R be a request set with R = {(s 1 , t 1 ), . . . , (s k , t k )}, and s be an integer. We say that a set X ⊆ V (D) is s-viable for R if there is a collection of paths P satisfying R such that each vertex of X occurs in at most s paths of P. We also say that P is certifying X.
Thus an instance (D, R, k, c, s) of DEDP is positive if and only if D contains an s-viable set X with |X| ≥ d. In other words, we want to find a set of vertices X of size at least d such that there is a collection of paths P satisfying R that is "well-behaved" inside of X; that is, the paths of P may intersect freely outside of X, but each vertex of X must be in at most s paths of P. When s = 1, for instance, instead of asking for the paths to intersect only inside a small set of vertices (size at most c), we ask for them to be disjoint inside a large set of vertices (size at least d). Since we now consider d as a parameter instead of c, from this point onwards we may refer to instances of DEDP as (D, R, k, d, s).
The following definition is needed in the next proof. For two positive integers a and b with a ≥ b, the Stirling number of the second kind [6], denoted by Stirling(a, b), counts the number of ways to partition a set of a objects into b non-empty subsets, and is bounded from above by 1 Proof. Let D be a graph on n vertices and (D, R, k, d, s) be an instance of DEDP. Notice that if X is s-viable for R, then any proper subset of X is s-viable for R as well. Therefore, we can restrict our attention to sets of size exactly d.
If s = 0, it is sufficient to test whether there is a d-sized set X ⊆ V (D) such that there is a collection of paths satisfying R in D − X, and this can be done in time O(n d · k · n 2 ).
Let now s = 1, and R = {(s 1 , t 1 ), . . . , (s k , t k )}. We claim that a set X ⊆ V (D) is 1-viable for R if and only if there is a partition X of X into sets X 1 , . . . , X k such that X \ X i is not an (s i , t i )-separator, for i ∈ [k].
Let X be as stated in the claim. For each i ∈ [k], let P i be a path from s i to t i in D − (X \ X i ). Now, {P 1 , . . . , P k } is a collection satisfying R and no pair of paths in it intersect inside X. Thus X is 1-viable for R as desired. For the necessity, since X is 1-viable for R, there is a collection of paths P 1 , . . . , . . . , X k−1 ) and the claim follows.
Assume now that X ⊆ V (D) with |X| = d. By the previous claim, we can check whether X is 1-viable for R by testing whether X admits a partition into (possibly empty) sets For there is a collection of paths P satisfying R in D such that each vertex in X is in at most s paths of P if and only if there is a collection of paths P in D such that no vertex in X occurs in more than one path of P . To test whether a given X is s-viable for R with s ≥ 2, we can just test whether X is 1-viable for R in D . Since |X | = d · s, this yields an algorithm in time O(n d+2 · k d·s ) for DEDP.
We now proceed to show that (k, d, s)-DEDP is FPT, by providing a kernel with at most d · 2 k−s · k s + 2k vertices. We start with some definitions and technical lemmas. Notice that any vertex in D whose deletion disconnects more than s pairs in the request set R cannot be contained in any set X that is s-viable for R. Hence we make use of an operation to eliminate all such vertices from the input digraph while maintaining connectivity. We remind the reader that, for a request set R, we denote by S(R) the set of source vertices in R and by T (R) the set of target vertices in R (cf. Definition 2). That is, V * (D) is the set of non-terminal (i.e., neither source nor target) vertices of D.

Definition 20 (Congested vertex and blocking collection). Let
We say that D is clean for R and that (D, R, k, d, s) is a clean instance if there are no congested vertices in V * (D). When R and s are clear from the context, we drop them from the notation.
We use the following operation to eliminate congested vertices of D while maintaining connectivity. It is used, for instance, in [8] (as the torso operation) and in [25].   Lemma 25 is used as the base case for our iterative algorithm. We start with the first instance, say (D, R, k, d, s), and proceed through k − s + 1 iterations. At each iteration, we will choose one path from some s i to its destination t i such that a large part of the graph remains unused by any of the pairs chosen so far (by Lemma 24) and consider the request set containing only the remaining pairs for the next iteration. We repeat this procedure until we arrive at an instance where the number of requests is exactly s + 1, and show that if n is large enough, then we can use Lemma 25 to output a solution for the last instance. From this solution, we extract a solution for (D, R, k, d, s) in polynomial time.
Now, if |B i | > n * ·s/k for every i ∈ [k], then there must be a vertex in v such that |R v | ≥ s+1, as in this case i∈[k] |B i | > n * · s, contradicting our assumption that D is clean. We conclude that there is an i ∈ [k] such that |B i | ≤ n * ·s/k and thus V * (D/B i ) = n * −|B i | ≥ n * (k −s)/k, as desired.
The result trivially follows if there is a path P from s i to t i in D/B i with V * (P ) = ∅. Thus we can assume that every path from s i to t i in D/B i intersects V * (D/B i ) (see Figure 8). intersects every path from s i to t i , there are two internally disjoint paths P 1 and P 2 from s i to t i in (D/B i )/X. Without loss of generality, assume that P 1 is the shortest of those two paths, breaking ties arbitrarily. Then |V * (P 1 )| ≤ |V * (D/B i )|/2 since P 1 and P 2 are disjoint, and the result follows. Figure 9 illustrates the procedure described in Lemma 24. We find a set B i containing at most n * · s/k vertices, and bypass all of its vertices in any order. Then we argue that a shortest path from s i to t i in D/B i avoids a large set of vertices in D.  If D is clean, n * ≥ 2d(s + 1), and k = s + 1, then (D, R, k, d, s) is positive and a solution can be found in time O(k · n(n + m)).
Proof. Let {B 1 , . . . , B k } be the blocking collection of R and D i = D/B i , for i ∈ [k]. By Lemma 24, there is an i ∈ [k] such that |V * (D i )| ≥ n * /(s + 1) and a path P from s i to t i such that V * (P ) ≤ |V * (D i )|/2. Let D i = D i /V * (P ). Now, and since |R \ {(s i , t i )}| = s, we are free to choose arbitrarily any collection of paths satisfying R \ {(s i , t i )} in D i . Reversing the bypasses done in D, this collection together with P i yields a collection of paths satisfying R in D such that all vertices in V * (D i ) are contained in at most s of those paths. Since n * ≥ 2d(s + 1) by hypothesis, we have that |V * (D i )| ≥ d as required. We can generate the sets B i in time O(n(n + m)) by deleting a vertex of D and testing for connectivity between s i and t i . Thus a solution can be found in time O(k · n(n + m)), as desired.
We are now ready to show the main ingredient of the algorithm: we provide a polynomial-time algorithm to solve large clean instances of the Disjoint Enough Directed Paths problem. . . , B k } be the blocking collection of R. We consider B 0 to be sorted in non-decreasing order by the size of its elements and, by rearranging R if needed, we assume that this order agrees with R. For i ∈ [k − (s + 1)], we construct a sequence of sets (ii) P i is a collection of paths {P 1 , P 2 , . . . , P i } such that P j is a path from s j to t j in D j , for j ∈ [i]; and (iii) n * i−1 is large enough to guarantee that we can find a path from s i to t i avoiding a large part of D i−1 . Formally, we want that We begin with D 0 = D, n * 0 = n * , and P 0 = ∅. Let D 1 = D 0 /B 1 . By applying Lemma 24 with input (D 0 , R, k, d, s), we conclude that |V * (D 1 )| ≥ n * (k − s)/k and there is a path P 1 from s 1 to t 1 in D 1 with |V * (P 1 )| ≤ |V * (D 1 )|/2. Let D 1 = D 1 /V * (P 1 ) and P 1 = {P 1 }. Now, n * 1 ≥ |V * (D 1 )| 2 ≥ n * 0 (k − s) 2k and conditions (i), (ii), and (iii) above hold for (D 1 , B 1 , P 1 ). Assume that i − 1 triples have been chosen in this way.
As before, we assume that B i−1 is sorted in non-increasing order by the size of its elements, and that this order agrees with R \ R i−1 . Furthermore, as D 0 is clean, so is D i−1 .
Let D i = D i−1 /B i . Applying Lemma 24 with input (D i−1 , R \ R i−1 , k − i + 1, d, s), we conclude that |V * (D i )| ≥ n * i (k − i + 1 − s)/(k − i + 1) and there is a path P i from s i to t i in D i with |V * (P i )| ≤ |V * (D i )|/2. Let P i = P i−1 ∪ {P i } and D i = D i /B i . Then

Theorem 27.
There is a kernelization algorithm running in time O(k · n 2 (n + m)) that, given an instance (D, R, k, d, s) of DEDP, outputs either a solution for the instance or an equivalent instance (D , R, k, d, s) with |V (D )| ≤ d · 2 k−s · k s + 2k.

Concluding remarks
We introduced the Disjoint Enough Directed Paths problem and provided a number of hardness and algorithmic results, summarized in Table 1. Several questions remain open. We showed that DEDP is NP-complete for every fixed k ≥ 3 and s = 1 and we leave open the question of whether DEDP is NP-complete for every fixed k ≥ 3 and fixed s ≥ 2 such that s < k. The reduction used in the proof of Theorem 3 also shows that DEDP is as hard as Directed Disjoint Paths with Congestion. Although it is not known whether the latter is NP-complete for some fixed value of k when the congestion is at least two, a positive answer to this question would also imply the NP-completeness of DEDP for some fixed k and s ≥ 1 with s < k. Giannopoulou et al. [20,Conjecture 1.3] conjectured that DDPC is solvable in polynomial time for every fixed k ≥ 2 and fixed congestion s = 2.
We provided an algorithm running in time O(n d+2 · k d·s ) to solve the problem. This algorithm tests all partitions of a given X ⊆ V (D) in search for one that respects some properties. Since there are at most n d subsets of V (D) of size d, this yields an XP algorithm. The second term on the time complexity comes from the number of partitions of X we need to test. The problem may become easier if X is already given or, similarly, if d is a constant. In other words, is the (s)-DEDP problem FPT for fixed d?
Our main result is a kernel with at most d · 2 k−s · k s + 2k vertices. The natural question is whether the problem admits a polynomial kernel with parameters k, d, and s, or even for fixed s. Notice that if there is a constant such that k − s = , then the size of the kernel is d · 2 · k , which is polynomial on d and k. The case s = 0 is also particularly interesting, as DEDP with s = 0 is equivalent to the Steiner Network problem. In this case, we get a kernel of size at most d · 2 k + 2k.
While we do not know whether (k, d, s)-DEDP admits a polynomial kernel, at least we are able to prove that a negative answer for s = 0 is enough to show that (k, d, s)-DEDP is unlikely to admit a polynomial kernel for any value of s ≥ 1 when k is "far" from s, via the following polynomial time and parameter reduction.
Remark 28. For any instance (D, R, k, d, 0) of DEDP and integer s > 0, one can construct in polynomial time an equivalent instance (D, R , k , d, s) of DEDP with k = k · (d · s + 1).
Proof. For a request set R in D, let R be the request set in D formed by d · s + 1 copies of each pair in R and let k = k · (d · s + 1). We claim that an instance (D, R, k, d, 0) of DEDP is positive if and only if the associated instance (D, R , k , d, s), also of DEDP, is positive.
From any solution P for the first instance, we can construct a solution for the second by taking d · s + 1 copies of each path in P and thus the necessity holds. For the sufficiency, let X be an s-viable set for (D, R , k , d, s) with certifying collection P . By the construction of R and since at most d · s paths in P can intersect X, we conclude that there is path P ∈ P from s to t in D − X for each pair (s, t) ∈ R. Choosing all such paths we construct a collection P satisfying R in D − X, and the remark follows.
In the undirected case, the Steiner Tree problem is unlikely to admit a polynomial kernel parameterized by k and c, with c = n − d (in other words, the size of the solution); a simple proof for this result can be found in [12,Chapter 15]. Even if we consider a stronger parameter (that is, d instead of c), dealing with directed graphs may turn the problem much harder. We also remark that the problem admits a polynomial kernel in the undirected case if the input graph is planar [29]. It may also be the case for directed graphs.