Parameterized Approximation Algorithms for Bidirected Steiner Network Problems

The Directed Steiner Network (DSN) problem takes as input a directed edge-weighted graph $G=(V,E)$ and a set $\mathcal{D}\subseteq V\times V$ of $k$ demand pairs. The aim is to compute the cheapest network $N\subseteq G$ for which there is an $s\to t$ path for each $(s,t)\in\mathcal{D}$. It is known that this problem is notoriously hard as there is no $k^{1/4-o(1)}$-approximation algorithm under Gap-ETH, even when parametrizing the runtime by $k$ [Dinur&Manurangsi, ITCS 2018]. In light of this, we systematically study several special cases of DSN and determine their parameterized approximability for the parameter $k$. For the bi-DSN$_\text{Planar}$ problem, the aim is to compute a solution $N\subseteq G$ whose cost is at most that of an optimum planar solution in a bidirected graph $G$, i.e., for every edge $uv$ of $G$ the reverse edge $vu$ exists and has the same weight. This problem is a generalization of several well-studied special cases. Our main result is that this problem admits a parameterized approximation scheme (PAS) for $k$. We also prove that our result is tight in the sense that (a) the runtime of our PAS cannot be significantly improved, and (b) it is unlikely that a PAS exists for any generalization of bi-DSN$_\text{Planar}$, unless FPT=W[1]. One important special case of DSN is the Strongly Connected Steiner Subgraph (SCSS) problem, for which the solution network $N\subseteq G$ needs to strongly connect a given set of $k$ terminals. It has been observed before that for SCSS a parameterized $2$-approximation exists when parameterized by $k$ [Chitnis et al., IPEC 2013]. We give a tight inapproximability result by showing that for $k$ no parameterized $(2-\varepsilon)$-approximation algorithm exists under Gap-ETH. Additionally we show that when restricting the input of SCSS to bidirected graphs, the problem remains NP-hard but becomes FPT for $k$.


Introduction
which is the well-known Directed Steiner Tree (DST) problem. In fact, an optimum solution to the DST problem is an arborescence (hence the name), i.e., it is planar. Thus if an algorithm is able to compute (an approximation to) the cheapest planar DSN solution in an otherwise unrestricted graph, it can be used for both the above types of restrictions: it can of course be used if the input graph is planar as well, and it can also be used if the demand pattern implies that the optimum must be planar. Taking the structure of the optimum solution into account has been a fruitful approach leading to several results on related problems, both for approximation and fixed-parameter tractability, from which we also draw some of the inspiration for our results (cf. Section 1. 2). A main focus of our work is to systematically explore the influence of the structure of optimum solutions on the complexity of the DSN problem. Formally, fixing a class K of graphs, we define the DSN K problem, which asks for an optimum solution network N ⊆ G for k given demands such that N ∈ K. The DSN K problem has been implicitly studied in several results before for various classes K, in particular when K contains either planar graphs, or graphs of bounded treewidth 5 (cf. Table 1).
Another special case we consider is when the input graph G is bidirected, i.e., for every edge uv of G the reverse edge vu exists in G as well and has the same weight as uv. This models the realistic setting [15,53,71,76] when the cost of transmitting from a node u to a node v in a wireless network is the same in both directions, which for instance happens if the nodes all have the same transmitter model.
We systematically study several special cases of DSN resulting from the above restrictions, and prove several matching upper and lower bounds on runtimes parameterized by k. We now give a brief overview of the studied problems, and refer to Section 1.1 for a detailed exposition of our results.
bi-DSN Planar , i.e., the DSN K problem on bidirected inputs, where K is the class of planar graphs: For this problem we present our main result, which is that bi-DSN Planar admits a parameterized approximation scheme (PAS), i.e., an algorithm that for any ε > 0 computes a (1 + ε)-approximation in f (ε, k) · n g(ε) time for some functions f and g. We also prove that, unless FPT=W [1], no efficient parameterized approximation scheme (EPAS) exists, i.e., there is no algorithm computing a (1 + ε)-approximation in f (ε, k) · n O(1) time for any function f . Thus the runtime of our algorithm cannot be significantly improved.
bi-DSN, i.e., the DSN problem on bidirected inputs: The above PAS for the very restricted bi-DSN Planar problem begs the question of whether a PAS also exists for any more general problems, such as bi-DSN. In particular, one may at first think that bi-DSN closely resembles the undirected variant of DSN, i.e., the well-known Steiner Forest (SF) problem, which is FPT [26,35] for parameter k. Surprisingly however, we can show that bi-DSN is almost as hard as DSN (with almost-matching runtime lower bound under ETH), and moreover, no PAS exists under Gap-ETH.
Apart from the DST problem, another well-studied special case of DSN with restricted demands is when the demand pairs form a cycle, i.e., we are given a set R = {t 1 , . . . , t k } of k terminals and the set of demands is where t k+1 = t 1 . Since this implies that any optimum solution is strongly connected, this problem is accordingly known as the Strongly Connected Steiner Subgraph (SCSS) problem. In contrast to DST, it is implicit from [40] (by a reduction from the Clique problem) that optimum solutions to SCSS do not belong to any minor-closed graph class. Thus SCSS is not easily captured by some DSN K problem for a restricted class K. Nevertheless it is still possible to exploit the structure of the optimum solution to SCSS, which results in the following findings.
SCSS: It is known that a 2-approximation is obtainable [17] when parametrizing by k. We prove that the factor of 2 is best possible under Gap-ETH. To the best of our knowledge, this is the first example of a W[1]-hard problem having a parameterized approximation with non-trivial approximation factor (in this case 2), which is also known to be tight! bi-SCSS, i.e., the SCSS problem on bidirected inputs: As for bi-DSN, one might think that bi-SCSS is easily solvable via its undirected version, i.e., the well-known Steiner Tree (ST) problem. In particular, the ST problem is FPT [26] for parameter k. However, it is not the case that simply taking an optimum undirected solution twice in a bidirected graph will produce a (near-)optimum solution to bi-SCSS (see Figure 1). Nevertheless we prove that bi-SCSS is FPT for parameter k as well, while also being NP-hard. Our algorithm is non-trivial and does not apply any methods used for undirected graphs. To the best of our knowledge, bidirected inputs are the first example where SCSS remains NP-hard but turns out to be FPT parameterized by k!

Our results
Bidirected inputs with planar solutions. Our main theorem implies the existence of a PAS for bi-DSN Planar , where the parameter is the number k of demands.
This result begs the question of whether the considered special is not too restrictive. Should it not be possible to obtain better runtimes and/or should it not be possible to even compute the optimum solution when parametrizing by k for this very restricted problem? And could it not be that a similar result is true in more general settings, when for instance the input is bidirected but the optimum is not restricted to a planar graph? We prove that both questions can be answered in the negative.
First off, it is not hard to prove that a polynomial time approximation scheme (PTAS) is not possible for bi-DSN Planar , i.e., it is necessary to parametrize by k in Theorem 1. This is implied by the following result, since (as mentioned before) a PTAS for bi-DSN Planar would also imply a PTAS for bi-DST, i.e., the DST problem on bidirected input graphs.
Theorem 2. The bi-DST problem is APX-hard.
One may wonder however, whether parametrizing by k doesn't make the bi-DSN Planar problem FPT, so that approximating the planar optimum as in Theorem 1 would in fact be unnecessary. Furthermore, even if it is necessary to approximate, one may ask whether the runtime given in Theorem 1 can be improved. In particular, note that the runtime we obtain in Theorem 1 is similar to that of a PTAS, i.e., the exponent of n in the running time depends on ε. Ideally we would like an EPAS, which has a runtime of the form f (k, ε) · n O(1) , i.e., we would like to treat ε as a parameter as well. The following theorem shows that both approximating and runtime dependence on ε are in fact necessary in Theorem 1.
Theorem 3. The bi-DSN Planar problem is W[1]-hard parameterized by k. Moreover, under ETH, for any computable functions f (k) and f (k, ε), and parameters k and ε > 0, the bi-DSN Planar problem • has no f (k) · n o( √ k) time algorithm to compute the optimum solution, and • has no f (k, ε) · n o( √ k) time algorithm to compute a (1 + ε)-approximation.
It stands out that to compute optimum solutions, this theorem rules out runtimes for which the dependence of the exponent of n is √ k, while for the general DSN problem, as mentioned above, the both necessary and sufficient dependence of the exponent is linear in k [18,32]. Could it be that bi-DSN Planar is just as hard as DSN when computing optimum solutions? The answer is no, as the next theorem shows. This result is an example of the so-called "square-root phenomenon": planarity often allows runtimes that improve the exponent by a square root factor in terms of the parameter when compared to the general case [37,49,50,56,64,65,66,68,69]. Interestingly though, Chitnis et al. [18] show that under ETH, no f (k) · n o(k) time algorithm can compute the optimum solution to DSN planar . Thus assuming a bidirected input graph in Theorem 4 is necessary (under ETH) to obtain a factor of O( √ k) in the exponent of n.
Bidirected inputs. Since in contrast to bi-DSN Planar , the bi-DSN problem does not restrict the optimum solutions, one may wonder whether a parameterized approximation scheme as in Theorem 1 is possible for this more general case as well. We answer this in the negative by proving the following result, which implies that restricting the optima to planar graphs was necessary for Theorem 1. We leave open whether a similar inapproximability result can be obtained for the other obvious generalization of bi-DSN Planar , in which the input graph is unrestricted but we need to compute the planar optimum, i.e., the DSN planar problem. We conjecture that no approximation scheme exists for this problem either.
What approximation factors can be obtained for bi-DSN when parametrizing by k, given the lower bound of Theorem 5 on one hand, and the before-mentioned result [24] that rules out a k 1/4−o(1) -approximation for DSN in time parameterized by k on the other? It turns out that it is not too hard to obtain a constant approximation for bi-DSN, given the similarity of bidirected graphs to undirected graphs. In particular, relying on the fact that for the undirected version of DSN, i.e. the SF problem, there is a polynomial time 2-approximation algorithm by Agrawal et al. [1], and an FPT algorithm based on Dreyfus and Wagner [26], we obtain the following theorem, which is also in contrast to Theorem 2. Even if Theorem 5 in particular shows that bi-DSN cannot be FPT under Gap-ETH, it does not give a strong lower bound on the runtime dependence in the exponent of n. However using the weaker ETH assumption we can obtain such a lower bound, as the next theorem shows. Interestingly, the obtained lower bound implies that when aiming for optimum solutions, the restriction to bidirected inputs does not make DSN easier than the general case, as also for bi-DSN the n O(k) time algorithm by Feldman and Ruhl [32] is essentially best possible. This is in contrast to the bi-DSN Planar problem where the square-root phenomenon takes effect as shown by Theorem 4. Theorem 7. The bi-DSN problem is W[1]-hard parameterized by k. Moreover, under ETH there is no f (k) · n o(k/ log k) time algorithm for bi-DSN, for any computable function f (k).
Strongly connected solutions. Just like the more general DSN problem, SCSS is W [1]-hard [40] parameterized by k, and is also hard to approximate as no polynomial time O(log 2−ε n)-approximation is possible [41], unless NP ⊆ ZTIME(n polylog(n) ). However it is possible to exploit the structure of the optimum to SCSS to obtain a 2-approximation algorithm parameterized by k, as observed by Chitnis et al. [17]. This is because any strongly connected graph is the union of two arborescences, and these form solutions to DST. The 2-approximation follows, since DST is FPT by the classic result of Dreyfus and Wagner [26]. Thus in contrast to DSN, for SCSS it is possible to beat any approximation factor obtainable in polynomial time when parametrizing by k.
An obvious question now is whether the approximation ratio of this rather simple algorithm can be improved. Interestingly we are able to show that this is not the case. To the best of our knowledge, this is the first example of a W[1]-hard problem having a parameterized approximation with non-trivial approximation factor (in this case 2), which is also known to be tight! Theorem 9. Under Gap-ETH, for any ε > 0 and any computable function f (k), there is no f (k) · n O(1) time algorithm that computes a (2 − ε)-approximation for SCSS.
Bidirected inputs with strongly connected solutions. In light of the above results for restricted cases of DSN, what can be said about restricted cases of SCSS? It is implicit in the work of Chitnis et al. [18] that SCSS Planar , i.e., the problem of computing the optimum strongly connected planar optimum, can be solved in 2 O(k log k) · n O( √ k) time, while under ETH no f (k) · n o( √ k) time algorithm is possible. Hence SCSS Planar is slightly easier than DSN planar where the exponent of n needs to be linear in k, as mentioned before. On the other hand, the bi-SCSS problem turns out to be a lot easier to solve than bi-DSN. This is implied by the next theorem, which stands in contrast to Theorem 5 and Theorem 7. 1) time algorithm for bi-SCSS, i.e., it is FPT for parameter k.
Could it be that bi-SCSS is even solvable in polynomial time? We prove that this is not the case, as it is NP-hard. To the best of our knowledge, the class of bidirected graphs is the first example where SCSS remains NP-hard but turns out to be FPT parameterized by k! Moreover, note that the above algorithm has a doubly exponential runtime in k 2 . We conjecture that a single exponential runtime should suffice, and we also obtain a lower bound result of this form, even if we restrict the optimum solutions to very simple planar graphs, namely cycles.
Remark 12. For ease of notation, throughout this paper we chose to use the number of demands k uniformly as the parameter. Alternatively one might also consider the smaller parameter |R|, where R = k i=1 {s i , t i } is the set of terminals. Note for instance that in case of the SCSS problem, k = |R|, while for DSN, k can be as large as Θ(|R| 2 ). However we always have k ≥ |R|/2, since the demands can form a matching in the worst case. It is interesting to note that all our algorithms for DSN have the same running time for parameter |R| as for parameter k. That is, we may set k = |R| in Theorem 1, 4, and 6. algorithms lower bounds problem aprox. runtime ref.
aprox. runtime ref. [35] bi-DSN Planar 1 + ε max{2 Table 1: Summary of achievable runtimes for DSN and SCSS when parametrizing by k. Some of the previous results are implicit and in the papers are rather stated for the case when the input graphs are restricted to the same class as the optimum solutions. Non-bracketed reference numbers refer to theorems of this paper.

Our techniques
It is already apparent from the above exposition of our results, that understanding the structure of the optimum solution is a powerful tool when studying DSN and its related problems (see Table 1). This is also apparent when reading the literature on these problems, and we draw some of our inspiration from these known results, as described below.
Approximation scheme for bi-DSN Planar . We generalize the insights on the structure of optimum solutions to the classical Steiner Tree (ST) problem for our main result in Theorem 1. For the ST problem, an undirected edge-weighted graph is given together with a terminal set R, and the task is to compute the cheapest tree connecting all k terminals. For the ST problem only polynomial time 2-approximations were known [39,74], until it was taken into account [46,70,72,79] that any optimum Steiner tree can be decomposed into so-called full components, i.e., subtrees for which exactly the leaves are terminals. If a full component contains only a small subset of size k of the terminals, it is the solution to an ST instance, for which the optimum can be computed efficiently in time 3 k · n O(1) using the algorithm of Dreyfus and Wagner [26]. A fundamental observation proved by Borchers and Du [9] is that for any k there exists a solution to ST of cost at most 1 + 1 log 2 k times the optimum, in which every full component contains at most k terminals. Thus setting k = 2 1/ε for some constant ε > 0, all full-components with at most 2 1/ε terminals can be computed in polynomial time, and among them exists a collection forming a (1 + ε)-approximation. The key to obtain approximation ratios smaller than 2 for ST is to cleverly select a good subset of all computed full-components. This is for instance done in [10] via an iterative rounding procedure, resulting in an approximation ratio of ln(4) + ε < 1.39, which currently is the best one known.
Our main technical contribution is to generalize the Borchers and Du [9] Theorem to bi-DSN Planar . In particular, to obtain our approximation scheme of Theorem 1, we employ a similar approach by decomposing a bi-DSN Planar solution into sub-instances, each containing a small number of terminals. As bi-DSN Planar is W[1]-hard by Theorem 3, we cannot hope to compute optimum solutions to each sub-instance as efficiently as for ST. However, we provide an XP-algorithm with runtime 2 O(k 3/2 log k) · n O( √ k) for bi-DSN Planar in Theorem 4. Thus if every sub-instance contains at most 2 1/ε terminals, each can be solved in n 2 O(1/ε) time, and this accounts for the "non-efficient" runtime of our approximation scheme. Since we allow runtimes parameterized by k, we can then exhaustively search for a good subset of precomputed small optimum solutions to obtain a solution to the given demand set D. For the latter solution to be a (1 + ε)-approximation however, we need to generalize the Borchers and Du [9] Theorem for ST to bi-DSN Planar (see Theorem 16 for the formal statement). This constitutes the bulk of the work to prove Theorem 1.
Exact algorithms for bi-DSN Planar and bi-SCSS. Also from a parameterized point of view, understanding the structure of the optimum solution to DSN has lead to useful insights in the past. We will leverage one such recent result by Feldmann and Marx [35]. In [35] the above mentioned standard special case of restricting the patterns of the demands in D is studied in depth. The result is a complete dichotomy over which classes of restricted patterns define special cases of DSN that are FPT and which are W[1]-hard for parameter k. The high-level idea is that whenever the demand patterns imply optimum solutions of constant treewidth, there is an FPT algorithm computing such an optimum. In contrast, the problem is W[1]-hard whenever the demand patterns imply the existence of optimum solutions of arbitrarily large treewidth. The FPT algorithm from [35] lies at the heart of all our positive results, and therefore shows that the techniques developed in [35] to optimally solve special cases of DSN can be extended to find (near-)optimum solutions for other W[1]-hard special cases as well. It is important to note that the algorithm of [35] can also be used to compute the cheapest solution of treewidth at most ω, even if there is an even better solution of treewidth larger than ω (which might be hard to compute). Formally, the result leveraged in this paper is the following.
Theorem 13 (implicit in Theorem 5 of [35]). If K is the class of graphs with treewidth at most ω, then the DSN K problem can be solved in time 2 O(kω log ω) · n O(ω) .
We exploit the algorithm given in Theorem 13 to prove our algorithmic results of Theorem 4 and Theorem 10. In particular, we prove that any bi-DSN Planar solution has treewidth O( √ k), from which Theorem 4 follows immediately. For bi-SCSS however, we give an example of an optimum solution of treewidth Ω(k). Hence we cannot exploit the algorithm of Theorem 13 directly to obtain Theorem 10. In fact on general input graphs, a treewidth of Ω(k) would imply that the problem is W[1]-hard by the hardness results in [35] (which was indeed originally shown by Guo et al. [40]). As this stands in stark contrast to Theorem 10, it is particularly interesting that the problem on bidirected input graphs is FPT. We prove this result by decomposing an optimum solution to bi-SCSS into sub-instances of bi-SCSS K , where K is the class of directed graphs of treewidth 1 (so-called poly-trees). For each such sub-instance we can compute a solution in 2 O(k) · n O(1) time by using Theorem 13 (for ω = 1), and then combine them into an optimum solution to bi-SCSS.
W[1]-hardness and runtime lower bounds. Our hardness proofs for bi-DSN are based on reductions from the Grid Tiling problem [20]. This problem is particularly suited to prove hardness for problems on planar graphs, due to its grid-like structure. We first develop a specific gadget that can be exploited to show hardness for bidirected graphs. This gadget however is not planar. We only exploit the structure of Grid Tiling to show that the optimum solution is planar for Theorem 3. For Theorem 7 we modify this reduction to obtain a stronger runtime lower bound, but in the process we lose the property that the optimum is planar.
Parameterized inapproximability. Our hardness result for SCSS is proved by combining a variant of a known reduction by Guo et al. [40] with a recent parameterized hardness of approximation result for Densest k-Subgraph [11]. Our inapproximability result for bi-DSN is shown by combining our W[1]-hardness reduction with the same hardness of approximation result of Densest k-Subgraph.

Related results
The ST problem is one of the 21 NP-hard problems listed in the seminal paper of Karp [45]. Dreyfus and Wagner [26] showed that the problem is solvable in time 3 k · n O(1) , which was later improved [7] to 2 k · n O(1) for unweighted graphs. An early LP-based 2-approximation algorithm for ST uses the so-called bidirected cut relaxation (BCR) [29,36,78], which formulates the problem by bidirecting the undirected input graph. Thus bidirected instances have implicitly been used even for the classical ST problem since the 1960s. For ST and SF there are PTASs on planar and bounded genus graphs [5,31].
DST has an O(k ε )-approximation in polynomial time [12], and an O(log 2 n)-approximation in quasi-polynomial time [12]. A long standing open problem is whether a polynomial time algorithm with poly-logarithmic approximation guarantee exists for DST. The SCSS problem has also been studied in the special case when R = V . This case is commonly known as Minimum Strongly Connected Spanning Subgraph, and the best approximation factor obtainable is 2 (by Theorem 9), which is also given by computing two spanning arborescences [38], which for R = V can be done in polynomial time. For the unweighted case however, a 3/2-approximation is obtainable [75].
Bidirected input graphs have been studied in the context of radio and ad hoc wireless networks [15,53,71,76]. In the Power Assignment problem, nodes of a given bidirected network need to be activated in order to induce a network satisfying some connectivity condition. For instance in [15], the problem of finding a strongly connected network is considered, but also other settings such as 2-(edge)-connectivity [76] or k-(edge)-connectivity [53] have been studied.

Organization of the paper
We present some basic observations on the structure of optimum solutions to bi-DSN in bidirected input graphs in Section 2. These are used throughout Section 5, where we present our approximation scheme of Theorem 1, and Section 6, where we show how to compute optimum solutions for Theorem 4 and Theorem 10. In Section 4 we present the proofs of Theorem 2, and Theorem 6. The inapproximability results of Theorem 5, and Theorem 9 are given in Section 8, and the remaining runtime lower bounds of Theorem 3, Theorem 7, and Theorem 11 can be found in Section 7. Finally, in Section 10 we list some open questions.

Structural properties of optimum solutions to bi-DSN
In this section we give some definitions relevant to directed and bidirected graphs, and some fundamental observations on solutions to bi-DSN that we will use throughout the paper.
Due to the similarity of bidirected graphs to undirected graphs, we will often exploit the structure of the underlying undirected graph of a given bidirected graph. More generally, for any directed graph G we denote the underlying undirected graph by G. A poly-graph is obtained by directing the edges of an undirected graph, and analogously we obtain poly-cycles, poly-paths, and poly-trees. A strongly connected poly-cycle is a directed cycle, and a poly-tree for which all vertices can reach (or are reachable from) a designated root vertex r is called an out-arborescence (or in-arborescence). Note that a for any edge uv of a poly-graph, the reverse edge vu does not exist, and so a poly-graph is in a sense the opposite of a bidirected graph. In between poly-graphs and bidirected graphs are general directed graphs.
We need the following observation, which has far reaching consequences for bi-DSN algorithms.

Lemma 14.
Let O be a poly-cycle of a subgraph N ⊆ G in a bidirected graph G. Replacing O with a directed cycle on V (O) in N results in a subgraph M of G with cost at most that of N , such that a u → v path exists in M for every vertex pair u, v for which N contained a u → v path.
Proof. Removing all edges of O in N and replacing them with a directed cycle cannot increase the cost, as G is bidirected (the cost may decrease if an edge uv of O is replaced by an edge vu, which is already contained in N ). Any u → v path that leads through O in N can be rerouted through the strongly connected directed cycle in M .
From this we can deduce the following useful observation, which we will exploit for all of our algorithms. The intuitive meaning of it is that any poly-cycle of an optimum bi-DSN solution splits the solution into parts of which each contains at least one terminal. Proof. By Lemma 14 we may exchange O with a directed cycle O without increasing the cost and maintaining all connections for the demands given by the bi-DSN instance. Since N has minimum cost, this means that the resulting network N is also an optimum solution. Assume that N contained some edge e incident to two vertices of O but e / ∈ E(O). The edge e cannot be a reverse edge of some edge f of O, as we could replace O with a cycle directed in the same direction as e. This would decrease the cost as N only contains e, while N contains both e and f . We are left with the case that e is a chord of O, i.e it connects two non-adjacent vertices of O. However in this case, the endpoints of e are strongly connected through O in N even after removing e. Thus we would be able to safely remove e and decrease the cost of N . Now assume that some connected component C of the graph obtained from N by removing O contains no terminal. Note that C also exists in the graph obtained from N by removing O . As C contains no terminals, any s → t path in N for a demand (s, t) that contains a vertex of C must contain a u → v subpath for some vertices u, v ∈ E(O ) with internal vertices from C. However the vertices u, v are strongly connected through O and hence the u → v subpath can be rerouted via O . This means we may safely remove C from N without loosing any connections for the required demands. However this contradicts the optimality of N , and in turn also our assumption that N is an optimum solution.
It will be convenient to assume that the degrees of the vertices in the input graph G and any minimal solution N ⊆ G to bi-DSN are bounded, and that, apart from bidirectedness, the edges have unique edge weights. We can do this w.l.o.g. using a standard procedure, which in particular assures that every terminal has only one neighbour in G and N , and every Steiner vertex of N , i.e. every non-terminal in V (N ) \ R, has exactly three neighbours in N (see Section 3 for the details).

Reducing the vertex degrees in planar graphs
We execute the following steps on a planar graph G in the given order. It is easy to see that these operations preserve bidirectedness and planarity of G.
1. For every terminal t ∈ R that has more than one neighbour in G, we introduce a new Steiner vertex v and add the edges vt and tv with cost 0 each. Thereafter every neighbour w of t different from v is made a neighbour of v instead. That is, the edges wt and tw are replaced by the edges vt and tv of the same cost. After this every terminal in G has one neighbour only. 2. Then for every vertex Steiner v with more than 3 neighbours in G, we split v into two vertices by first introducing a new Steiner vertex u and edges uv and vu with cost 0 each. Let F be the face of the planar graph G containing the new vertex u, and let w 1 and w 2 be the two neighbours of v incident to F . We replace every edge vw j or w j v with edge uw j or w j u, respectively, for each j ∈ {1, 2}. We maintain the edge costs in each of these replacement steps. After this every Steiner vertex of G has at most three neighbours. 3. Next we consider each Steiner vertex v that has exactly two neighbours u and w. We replace the edges between v, u, and w by new edges uw and wu. The edges uw and wu will have the same cost as the uvw and wvu paths. After this all Steiner vertices of G have exactly three neighbours. 4. Finally we slightly perturb the edge weights of G so that any two edges e and e , for which e is not the reverse edge of e , have different costs. That is, the resulting graph G is still bidirected, but every pair of edges uv and vu have unique costs in G. We perturb the edge weights in such a way that the optimum solution is still the same subgraph of G, and all edge weights are strictly positive.

Hardness and algorithms for bi-DSN via undirected graphs
In this section we present two results for problems on bidirected graphs that follow from corresponding results on undirected graphs. We first prove Theorem 2, which we restate below.
In particular, it implies that most likely bi-DSN Planar has no PTAS.
Theorem 2. The bi-DST problem is APX-hard.
Proof. Given an ST instance on an undirected graph G, we simply bidirect each edge to obtain the bidirected graph G. We then choose any of the terminals in G as the root to get an instance of bi-DST. It is easy to see that any solution to ST in G corresponds to a solution to bi-DST in G of the same cost, and vice versa. As the ST problem is APX-hard [19], the hardness carries over to bi-DST.
Note that as the definition of the ST problem does not restrict the feasible solutions to trees, this hardness result does not restrict the approximate solutions to bi-DST to arborescences either. That is, it is also hard to compute an approximation N to the optimum bi-DSN Planar solution, even if we allow N to be a non-planar graph.
Next we turn to the positive result of Theorem 6, which we also restate below. Note that this theorem is in contrast to Theorem 2 and Theorem 5. Proof. Given a bidirected graph G and a demand set D = {(s i , t i ) | 1 ≤ i ≤ k} of an instance to bi-DSN, we reduce it to an instance of the SF problem in the underlying undirected graph G with the corresponding undirected demand set D = {{s i , t i } | (s i , t i ) ∈ D}. The returned bi-DSN solution is the network N ⊆ G that contains both edges (u, v) and (v, u) for any undirected edge u-v of the SF solution computed for G. Thus the cost of N is at most twice the cost of the SF solution.
The theorem now follows, since the SF problem has a polynomial time 2-approximation algorithm given by Agrawal et al. [1], and an FPT algorithm based on Dreyfus and Wagner [26] for parameter k. The latter result only solves the ST problem in 3 p · n O(1) time where p is number of terminals, but it can easily be used for SF as well (cf. [35]). More concretely, the optimum solution to SF is a forest and therefore the terminal set can be partitioned so that each part is a tree in the optimum. Note that since there are k terminal pairs we have at most 2k terminals. We may invoke the Dreyfus and Wagner [26] algorithm for every one of the 2 2k subsets of the 2k terminals, and then consider every one of the 2k 2k partitions of the 2k terminals. The partition that yield the lowest cost solution when taking the union of all solutions computed for its parts, must be an optimum Steiner forest. Thus the running time is as claimed.

An approximation scheme for bi-DSN Planar
In this section we prove Theorem 1. Note that since we have k demand pairs, it follows that the number of terminals |R| is at most 2k, where R = k i=1 {s i , t i }. Henceforth in this section, we use the upper bound 2k on the number of terminals |R| for ease of presentation (when instead we could replace k by |R| in the running time of Theorem 1).
The bulk of the proof is captured by the following result, which generalizes the corresponding theorem by Borchers and Du [9] for the ST problem, and which is our main technical contribution. In order to facilitate the definition of a sub-instance to DSN, we encode the demands of a DSN instance using a pattern graph H, as also done in [35]: the vertex set of H is the terminal set R, and H contains the directed edge st if and only if (s, t) is a demand. Hence the DSN problem asks for a minimum cost network N ⊆ G having an s → t path for each edge st of H. Based on Theorem 16 our (1 + ε)-approximation algorithm proceeds as follows. The first step is to compute an optimum solution for every possible pattern graph on at most g(ε) = 2 O(1/ε) terminals. Since any pattern graph has at most 2 g(ε) 2 < g(ε) 2 edges, and there is a total of 2 2k 2 < 8k 2 possible demands between the 2k terminals, the total number of pattern graphs is O(k 2g(ε) 2  this solution is a (1+ε)-approximation, and the total runtime is Thus we obtain Theorem 1.
Note that even though the output of the algorithm is a (1 + ε)-approximation to the optimum bi-DSN Planar solution, the computed solution may not be planar, as it is the union of several planar graphs. Theorem 16 shows though that the structure of the optimum can be exploited to compute a near-optimum solution. We also note that the Borchers and Du [9] Theorem for the ST problem implies the existence of a polynomial-sized (1 + ε)-approximate kernel for ST, as recently shown by Lokshtanov et al. [57]. By the same arguments this is also true for bi-DSN Planar , due to Theorem 16. We refer to [57] for more details.
It remains to prove Theorem 16. For this we first use a standard transformation (see Section 3) on the optimum planar solution N ⊆ G, so that each terminal has only 1 neighbour, each Steiner vertex has exactly 3 neighbours, and every pair of edges uv and vu have unique costs. Furthermore, let G N be the graph spanned by the edge set {uv, vu ∈ E(G) | uv ∈ E(N )}, i.e. it is the underlying bidirected graph of N after performing the transformations of Section 3 on N . In particular, also in G N each terminal has only 1 neighbour, each Steiner vertex has exactly 3 neighbours, and every pair of edges uv and vu have unique costs. It is not hard to see that proving Theorem 16 for the obtained optimum solution N in G N implies the same result for the original optimum solution in G, by reversing all transformations given in Section 3.
The proof consists of two parts, of which the first exploits the bidirectedness of G N , while the second exploits that the optimum N is planar. The first part will identify paths connecting each Steiner vertex to some terminal in such a way that the paths do not overlap much. This will enable us to select a subset of these paths in the second part, so that the total weight of the selected paths is an ε-fraction of the cost of the optimum solution. This subset of paths will be used to connect terminals to the boundary vertices of small regions into which we divide the optimum. These regions extended by the paths then form solutions to sub-instances to DSN, which together have a cost of 1 + ε times the optimum. The first part is captured by the next lemma, where cost(G ) denotes the total edge weight of a graph G .
For the second part we give each vertex v of N a weight c(v), which is zero for terminals and equal to cost(P v ) for each Steiner vertex v ∈ V (N ) \ R and corresponding path P v given by Lemma 18. We now divide the optimum solution N into regions of small size, such that the boundaries of the regions have small total weight. Formally, a region is a subgraph of N , and an r-division is given by a partition of the edges of N , each spanning a region with at most r vertices. A boundary vertex of an r-division is a vertex that lies in at least two regions. In a weak r-division, as for instance defined in [44], we bound the total number of boundary vertices and the number of regions (it is called "weak" since it does not bound the boundary vertices of each region individually). For unweighted planar graphs it can be shown that there is an r-division with only O(n/ √ r) boundary vertices and O(n/r) regions [38,44]. To prove this, a separator theorem is applied recursively until each resulting region is small enough. The bound on the number of boundary vertices follows from the well-known fact that any planar graph has a small separator of size O( √ n). We however need to bound the total weight of the boundary vertices, i.e. we need a weighted weak r-division. Unfortunately, separator theorems are not helpful here, since they only bound the number of vertices in the separator but cannot bound their weight. Instead we leverage techniques developed for the Klein-Plotkin-Rao (KPR) Theorem [48,55] in order to show that there is an r-division for which the total weight of all boundary vertices is an O(1/ log r)-fraction of the total weight v∈V (N ) c(v), if the graph has constant maximum degree. We later set r = 2 1/ε in order to obtain an ε-fraction of the total weight. Even though the obtained fraction is exponentially worse than the O(1/ √ r)-fraction for unweighted graphs obtained in [38,44], it follows from a lower bound result of Borchers and Du [9] that for weighted graphs this is best possible, even if the graph is a tree. In contrast to the unweighted case, we also do not guarantee any bound on the number of regions, and we do not need such a bound either. Our proof follows the outlines of the proof given by Lee [55] for the KPR Theorem. In the following, c(S) = v∈S c(v) for any set of vertices S. Lemma 19. Let N be a directed planar graph for which each vertex has at most 3 neighbours, and let each vertex v of N have a weight c(v) ∈ R. For any r ∈ N there is a partition E of the edges of N for which every set in E spans at most r vertices, and if B is the set of boundary vertices of the regions spanned by the sets in E, then We fist show how to put Lemma 18 and Lemma 19 together in order to prove Theorem 16, before proving the lemmas.
Proof of Theorem 16. To identify the pattern set H, we first construct a graph N E ⊆ G N from every edge set E ∈ E given by Lemma 19 and the paths given by Lemma 18, after which we extract a pattern from it. Recall that we set the weights c(v) to the path costs cost(P v ) of the paths P v of Lemma 18 if v is a Steiner vertex, and 0 otherwise. We set r = 2 1/ε in Lemma 19, so that each region has at most 2 1/ε vertices and the total weight of the boundary vertices is an O(ε)-fraction of the total weight.
We first include the graph spanned by E in N E . For every Steiner vertex v that is a boundary vertex of the r-division E and is incident to some edge of E we also include the v → t path P v given by Lemma 18 in N E . As G N is bidirected, the reverse t → v path of P v also exists in G N , and we include this path in N E as well. Let H E be the pattern that has the terminal set of N E as its vertices, and an edge st if and only if there is an s → t path in N E . The pattern set H contains all patterns H E constructed in this way for the edge sets E ∈ E. We need to show that each pattern H E contains a bounded number of terminals, the union of the solutions N E to these patterns is feasible for the input pattern H, and the cost of the union is at most Making ε appropriately small, this implies Theorem 16.
The bound on the terminals in a pattern H E follows from the bound on the vertices spanned by the edges of E, as given in Lemma 19: the graph N E contains all terminals spanned by the edges of E, and one terminal for each boundary vertex that is a Steiner vertex spanned by E. Thus the total number of terminals of N E , and therefore also of H E , is at most r = 2 1/ε .
To prove the feasibility of the union of optimum solutions to all patterns of H, we need to show that for any edge st of H there is an s → t path in the union. As N is a feasible solution to H, it contains an s → t path P ⊆ N . Consider the sequence P 1 , P 2 , . . . , P of subpaths of P , such that the edges of each subpath belong to the same edge set of E and the subpaths are of maximal length under this condition. We construct a sequence t 0 , t 1 , . . . , t of terminals from these subpaths as follows. As it has maximal length, the endpoints of each subpath P i is either a Steiner vertex that is also a boundary vertex of E, or a terminal (e.g. s and t). First we set t 0 = s. For any i ≥ 1, let E ∈ E be the set that contains the edges of P i . If the last vertex of P i is a terminal, then t i is that terminal, while if the last vertex is a Steiner vertex v, then t i is the terminal that the path P v included in N E connects to. If the first vertex of P i is a terminal, then clearly it is equal to t i−1 . Moreover, if the first vertex of P i is a Steiner vertex v, then by construction the graph N E contains the reverse t i−1 → v path of P v . Thus N E contains a t i−1 → t i path, and so the pattern H E contains the edge t i−1 t i . Therefore the union E∈E N E contains a t 0 → t path via the intermediate terminals t i where i ∈ {1, . . . , − 1}. As t 0 = s and t = t, this means that the union is feasible for H.
To bound E∈E cost(N E ), note that the cost of each N E is the cost of the edge set E plus the cost of the paths P v and their reversed paths attached to the boundary Steiner vertices v incident to E. The sum of the costs of all edge sets E ∈ E contribute exactly the cost of N to E∈E cost(N E ), since E is a partition of the edges of N . As we assume that each boundary vertex v of E has at most three neighbours, v is incident to a constant number of edge sets of E. Thus E∈E cost(N E ) also contains the cost of path P v only a constant number times: twice for each set E ∈ E incident to boundary vertex v, due to P v and its reverse path, which in a bidirected instance has the same cost as ), where B is the set of boundary vertices of E, and the cost c(v) of a vertex is the cost of the path P v if v is a Steiner vertex, and 0 otherwise. Hence all paths P v and their reverse paths contained in all the We now turn to proving the two remaining lemmas, starting with finding paths for Steiner vertices for Lemma 18.
Proof of Lemma 18. We begin by analysing the structure of optimal DSN solutions in bidirected graphs, based on Lemma 14. Here a condensation graph of a directed graph results from contracting each strongly connected component, which hence is a DAG. Proof. Let C be a component of N , which induces a 2-connected component in N . Consider a vertex pair u, v ∈ V (C) for which no u → v path exists in C. As C induces a 2-connected component in N , by Menger's Theorem [21] there are two internally disjoint poly-paths P and Q between u and v in C, which together form a poly-cycle O. By Lemma 14 we may replace O by a directed cycle without increasing the cost, and so that there is a directed path for every pair of vertices for which such a path existed before. Additionally, this step introduces a u → v path along this new directed cycle in C. Repeating this for any pair of vertices for which no directed path exists in C will eventually result in a strongly connected component. Hence we can make every component of N , which induces a 2-connected component in N , strongly connected without increasing the cost. Note also that N does not change.
After this procedure we obtain the graph M ⊆ G N . The 2-connected components in M induce subgraphs of the strongly connected components of M . Contracting all strongly connected components of M must therefore result in a poly-forest, as any poly-cycle in the condensation graph would also induce a cycle in M .
By Claim 20 we may assume w.l.o.g. that the condensation graph of the optimum solution N is a poly-forest. Consider a weakly connected component C of N , i.e. inducing a connected component of N . We first extend C to a strongly connected graph C as follows. Let F be the edges of C that do not lie in a strongly connected component, i.e. they are the edges of the condensation graph of C. Let F = {uv | vu ∈ F } be the set containing the reverse edges of F , and let C be the strongly connected graph spanned by all edges of C in addition to the edges in F . Note that adding F to C increases the cost by at most a factor of two as G N is bidirected, and the number of neighbours of any vertex does not change. We claim that in fact C is a minimal SCSS solution to the terminal set R C ⊆ R contained in C, that is, removing any edge of C will disconnect some terminal pair of R C .
For this, consider any s → t path of C containing an edge e ∈ F for some terminal pair s, t ∈ R C . As the edges F of the condensation graph of C form a poly-tree, every path from s to t in C must pass through e. In particular there is no s → t path in C, and thus there is no edge st in the pattern graph H. Or conversely, for any terminal pair s, t ∈ R C for which there is a demand st ∈ E(H), no s → t path in C passes through an edge of F . Thus the set of paths from s to t is the same in C and C. Since every edge e of the weakly connected component C is necessary for some such pair s, t ∈ R C with st ∈ E(H), the edge e is still necessary in C . Moreover, for any of the added edges uv ∈ F the reverse edge vu ∈ F was necessary in C to connect some s ∈ R C to some t ∈ R C . As observed above, uv is necessary to connect t to s in C , since the edges F of the condensation graph form a poly-tree.
As C is a minimal SCSS solution to the terminals R C contained within, it is the union of an in-arborescence A in and out-arborescence A out , both with the same root r ∈ R C and leaf set R C \ {r}, since every terminal only has one neighbour in G N . A branching point of an arborescence A is a vertex with at least two children in A. We let W ⊆ V (C ) be the set consisting of all terminals R C and all branching points of A in and A out . We will need that any vertex of C has a vertex of W in its close vicinity. That is, if , we prove the following.
Proof. Assume that v / ∈ W , since otherwise we are done. Such a vertex must be a Steiner vertex, and hence has exactly three neighbours in C . As v is not a branching point of A in or A out , this means that v is incident to two edges of A in and two edges of A out . This can either mean that there are three edges incident to v of which one lies in both A in and A out , or there are four edges incident to v of which two connect to the same neighbour of v but point in opposite directions. Consider the former case first, i.e. there is one of the edges e incident to v that lies in the intersection of the two arborescences, another incident edge f v in that lies in A in but not in A out , and a third incident edge f v out that lies in A out but not in A in . Assume that the neighbour u of v incident to e also does not belong to W . By the same observations as for v, there must be an incident edge f u in to u that lies in A in but not in A out , and an incident edge f u out that lies in A out but not in A in . The in-arborescence A in contains a t → r path from some terminal t ∈ R C to the root r passing through v. We claim that A out must contain an r → t path to the same terminal t passing through v as well. If this were not the case there would be some other r → t path of A out not containing f v out . Together with the t → v subpath of the t → r path in A in , this implies an r → v path not containing f v out , since the latter edge is not contained in A in and therefore cannot be part of the t → v subpath. However this means that every terminal reachable from r via v in C is reachable by a path not containing f v out . As this edge is not contained in A in , it could safely be removed from C without disconnecting any terminal pair. This would contradict the minimality of C , which means there must be an r → t path in A out that passes through v. For Moreover, none of these four paths contains e. Note that the union P v in ∪ P u in ∪ P v out ∪ P u out of the four paths contains a poly-cycle O for which e is a chord, i.e. it connects two non-adjacent vertices of O.
The strongly connected component C was constructed from the component C of the optimum solution N by adding the set F of reverse edges to some existing edge set F of C. Hence, even if O and/or e do not exist in N , there still exists a poly-cycle O in N with the same vertex set and underlying undirected graph as O, and an edge e that is a chord to O , which may be e or its reverse edge. This contradicts the optimality of N by Lemma 15,and thus It remains to consider the case when v has four incident edges. This means that for one neighbour u of v there are two edges uv and vu in C of which one belongs to A in and the other to A out . Assume that uv belongs to A out and let w out and w in be the other two neighbours of v, for which the edge vw out is in A out , while the edge w in v is in A in . For the case when uv belongs to A in instead, an analogous argument to the following exists. If either w in or w out is in W , we are done. Hence assuming that w in , w out / ∈ W , just as v, both w in and w out are Steiner vertices with three neighbours, each incident to two edges of A in and two edges of A out . If either w in or w out has an incident edge that lies in the intersection of A in and A out , by the same argument Hence assume that neither w in nor w out has an incident edge lying in both arborescences. Thus w out has a neighbour x out = v such that w out x out ∈ E(A out ) and x out w out ∈ E(A in ), and w in has a neighbour x in = v such that x in w in ∈ E(A in ) and w in x in ∈ E(A out ). Note that x in = x out as otherwise A in would have a vertex of out-degree more than one. Moreover, by the following argument, we can conclude that in C , all three undirected edges vu, x out w out , and x in w in are bridges. Consider any edge e in the component C of the optimum solution N from which C was constructed. By Lemma 15, the reverse edge of e can only exist in C if e does not lie on any poly-cycle. That is, if e and its reverse edge exist in C then the corresponding edge in C is a bridge. To obtain C from C we added F , which contains all reverse edges of the condensation graph of C. From Claim 20 we concluded that the condensation graph of C is a poly-forest. Thus any edge of C for which the reverse edge exists in C as well, must correspond to a bridge in C , including vu, x out w out , and x in w in , which all lie in A in . Note also that by the same observations, v, w out , and w in lie in the same 2-connected component of C , as the reverse edges of vw out and w in v do not exist in C .
This means that A in contains a path starting in x out w out , which reaches the root of A in by passing through vu, as the latter is a bridge of C while v and w out lie in the same 2-connected , this path of A in contains the subpath given by the sequence x in w in vu. But this means that there is a path from x out w out to x in that does not pass through w in x in ∈ A out . This contradicts the fact that x in w in is a bridge of C , and thus concludes the proof.
As the graph G N is bidirected, for any v-u path P in the underlying undirected graph G N of G N , there exists a corresponding directed v → u path in G N of the same cost. Therefore, we can ignore the directions of the edges in C and the arborescences A out and A in to identify the paths P v for Steiner vertices v of N . Thus we will only consider paths in the graphs C , A out , and A in from now on. In particular, we exploit the following observation found in [27] (and also used by Borchers and Du [9]) on undirected trees. 6 Claim 22 ([27, Lemma 3.2]). For any undirected tree T we can find a path P v ⊆ T for every branching point v, such that P v leads from v to some leaf of T , and all these paths P v are pairwise edge-disjoint.
Note that paths in A in may overlap with paths in A out . However any edge in the union of all the paths P v chosen so far is contained in at most two such paths, one for a branching point of A out and one for a branching point of A in .
It remains to choose a path P v for every Steiner vertex v that is neither a branching point of A out nor of A in , i.e. for every vertex not in W . By Claim 21 for any such vertex If u is not a terminal but a branching point of A out or A in , then we chose a path P u for u above. In this case, P v is the path contained in the walk given by extending the path P u by the edge vu or the path vwu, respectively. Note that, as any vertex of C has at most 3 neighbours, any terminal or branching point u ∈ W can be used in this way for some vertex v / ∈ W at most nine times. Therefore any edge in the union of all chosen paths is contained in O(1) paths. Consequently the total cost v∈V (N )\R cost(P v ) is O(cost(C )), and as cost(C ) ≤ 2 cost(C) we also get v∈V (N )\R cost(P v ) = O(cost(C)).
We may repeat these arguments for every weakly connected component of N to obtain the lemma.
Next we give the proof of Lemma 19, which shows that there are weighted weak r-divisions for planar graphs.
Proof of Lemma 19. We will not be concerned with the edge weights of N and accordingly define the distance function d M (u, v) for any subgraph M of N to be the hop-distance between u and v in M , i.e. the minimum number of edges on any path from u to v in M . The idea (as outlined in [55]) is to iteratively "chop" the vertices of N into disjoint sets that induce annuli of bounded thickness measured in the hop-distance. For this we first choose an initial offset τ 0 ∈ {1, . . . , τ } for a desired thickness τ . Then for any connected graph M , we define a τ -chop of M as the partition of V (M ) into the following sets. Fix an arbitrary vertex v 0 ∈ V (M ) and let We define a τ -chop of a disconnected graph as the partition resulting from performing a τ -chop on each of the connected components. Finally, a τ -chop of a partition P is the refined partition resulting from performing a τ -chop on each subgraph induced by a set in P. Hence we may start with N and iteratively perform τ -chops to obtain smaller and smaller subsets of vertices.
Lee [55] now proves the following claim, where the weak diameter of a subgraph M ⊆ N is the maximum hop-distance of any two vertices of M measured in the underlying graph N , i.e.
Claim 23 (Lemma 2 in [55]). If N excludes K h as a minor, then any sequence of h − 1 iterated τ -chops on N results in a partition P of V (N ), such that each graph induced by a set S ∈ P has weak diameter O(hτ ).
Given the partition P from Claim 23 we define a partition E of the edges of N as follows. In E we have a set E S ⊆ E(N ) for each S ∈ P, and we assign any edge e of N to the set E S for which S contains the lexicographically smaller vertex incident to e. Note that the weak diameter of a region M S spanned by an edge set E S is at most the weak diameter of the graph induced by S plus 2, i.e. also the weak diameter of M S is O(hτ ). Since N is planar with maximum degree 3, the weak diameter bounds the number of vertices in each region by |V (M S )| = 2 O(τ ) for every S ∈ P. As E corresponds to a partition E of the edges of N , we obtain an r-division given by E with the required bound on the sizes of the regions if r = 2 O(τ ) .
It remains to bound the weight of the boundary vertices, for which we take the best option among all offsets τ 0 ∈ {1, . . . , τ }. More concretely, note that when performing a single τ -chop on a connected graph M from a fixed vertex v 0 , two adjacent vertices u, v end up in different sets S for at most one value of τ 0 by the definition of the sets A i , i ≥ 0. We assign the edge of N incident to u and v uniquely to the set E S containing the lexicographically smaller vertex among u and v. Thus any vertex w can be a boundary vertex of a region spanned by some set E S at most once for each edge incident to w. As the maximum degree of N is 3, this means any vertex can be a boundary vertex at most three times among all offset values τ 0 when performing a single τ -chop. As we perform h − 1 iterative τ -chops, any vertex is a boundary vertex less than 3h times among all offsets τ 0 . Thus if B(τ 0 ) denotes the boundary vertices of the r-division resulting from offset τ 0 , we have τ τ 0 =1 c(B(τ 0 )) < 3h · c(V (N )). By the pigeon-hole principle there exists an offset τ 0 for which c(B(τ 0 )) < 3h τ c(V (N )). Hence, since N is planar and by our choice of r, we obtain the desired r-division with only a O(1/ log r)-fraction of the total vertex weight in the boundary vertices.

Computing optimum solutions in bidirected graphs
In this section we show how to compute optimum solutions to bi-SCSS and to bi-DSN Planar , and we start with the latter.

XP algorithm for bi-DSN Planar
In this section we prove Theorem 4, which is restated below Proof. We first show the following about the structure of any planar optimum for bi-DSN.
Proof. Assume that the treewidth of N is at least 6 √ k. It is well-known that this implies that N contains a 6 √ k × 6 √ k grid minor. Consider a planar drawing of N . Since there are only k terminal pairs, we can have at most 2k terminals. By the pigeon-hole principle, the grid minor contains some 3 × 3 grid minor M for which no terminal touches any of the faces in the interior of M in the drawing. We can see M as consisting of a poly-cycle O with all other vertices of M touching faces in the interior of O in the drawing. In particular, removing O from M will leave a non-empty connected component (the interior of O) which contains no terminals. This however contradicts Lemma 15, as replacing O with a directed cycle and removing the interior of O gives a feasible solution of smaller cost. Note that such a solution would also be planar, and thus the treewidth of the optimum planar solution is O( √ k).
Since by Theorem 13 there is an algorithm to compute the optimum among all solution of treewidth at most ω in time 2 O(kω log ω) · n O(ω) , Claim 24 implies Theorem 4.
Note that Theorem 3 shows that the running time obtained in Theorem 4 is asymptotically optimal under ETH.

FPT algorithm for bi-SCSS
We now turn to bi-SCSS (without restricting the optima) and show that this problem is FPT for parameter k. The formal theorem is restated below: An optimum solution to bi-SCSS can have treewidth Ω(k), as the following lemma shows. This is particularly interesting, since the results in [35] show that any problem with optima of unbounded treewidth on general input graphs is W[1]-hard. Note that no solution with larger treewidth can exist, as by [35] any optimum solution to DSN has treewidth O(k).

Lemma 25.
There are instances of bi-SCSS in which the optimum solution has treewidth Ω(k).
Proof. We will describe the underlying undirected graph G of an instance G to bi-SCSS. We begin with a constant degree expander graph with k vertices, for which we subdivide each edge twice. The resulting graph is going to be G, where each edge has unit weight. All vertices of the graph are going to be terminals, which means that the number of terminals is Θ(k), since the number of edges in a constant degree expander is linear in the number of vertices. Also, the treewidth of the expander graph is Θ(k), which is not changed by subdividing edges.
Consider any of the twice subdivided edges, i.e. let P be a path of length 3 in G for which both internal vertices u, v have degree 2 in G. Let e be one of the edges of P . If a strongly connected SCSS solution containing all vertices of the bidirected graph G does not use any of the two edges corresponding to e in G, then it needs to use all four of the other edges of G corresponding to the two edges of P different from e: this is the only way in which all other terminals can reach u and v, and u and v can reach all other terminals. Note also that it is not possible for a strongly connected solution to only use two directed edges corresponding to edges of P .
We can however construct a solution N in which for every edge of P we use exactly one directed edge of G, and this must then be optimal: the solution N initially contains one of the directed edges of G corresponding to an edge of G each. As the underlying undirected graph of N would be exactly G, its treewidth is Ω(k), as claimed. However N might not yet be strongly connected. If there are two vertices u and v, for which no u → v path exists in N , we introduce such a path as follows. An expander cannot contain any bridge, and so G is 2-edge-connected. Thus by Menger's Theorem [21] there are two edge-disjoint paths P and Q between u and v in G. Consider any poly-cycle O formed by edges of the paths in N corresponding to P and Q. By Lemma 14 we may replace O by a directed cycle without losing the connectivity between any pair of vertices of N for which a directed path already existed. Also the underlying undirected graph of the resulting solution N is still G. After replacing every poly-cycle formed by edges corresponding to those of P and Q in this way, there will be a u → v path in N . We may repeat this procedure for any pair of vertices that does not have a path between them, until the solution is strongly connected.
We prove that bi-SCSS is FPT by showing that we can decompose any optimum solution into edge-disjoint poly-trees, each of which has terminals as leaves, in the following sense. As we shall see, this implies that we can compute the poly-trees independently from each other using the algorithm of Theorem 13, in order to compute the overall optimum.
Lemma 26. Let G be a bidirected graph, and N ⊆ G be an optimum solution to bi-SCSS in G for a terminal set R. There exists a set of patterns H such that each H ∈ H has a subset of R as its vertices, there is a solution T H ⊆ G to each H ∈ H that is a poly-tree, all pairs of poly-trees T H and T H for distinct patterns H, H ∈ H are edge-disjoint, and H∈H T H = N . Thus the computed solution must be optimal, and we obtain the runtime bound claimed in Theorem 10.
Proof of Lemma 26. For the proof we will assume w.l.o.g. that in the optimum planar solution N ⊆ G each terminal has only 1 neighbour, each Steiner vertex has exactly 3 neighbours, and every pair of edges uv and vu have unique costs. We may assume this according the transformation given in Section 3, just as for our earlier proof of the approximation scheme. Furthermore, let G N again be the graph spanned by the edge set {uv, vu ∈ E(G) | uv ∈ E(N )}. It is not hard to see that proving Lemma 26 for the obtained optimum solution N in G N implies the same result for the original optimum solution in G.
We will first reduce the claim to solutions that have a 2-connected underlying undirected graph. In particular, consider a 2-connected component C of N , and the set of articulation points W of N contained in C, i.e. w ∈ W if and only if w ∈ V (C) and w is adjacent to some vertex that is not in C. We now claim that the directed subgraph C of N corresponding to C is an optimum strongly connected solution for the terminal set given by W . First off, note that C cannot contain any terminals from R, as we assume that every terminal in R has only one neighbour, while C is 2-connected. Since C is a 2-connected component of N , no path leaving C can return to C. So any u → v path connecting a pair of vertices u, v ∈ W must be entirely contained in C. This means that C strongly connects W , since N is strongly connected. If C were not an optimum strongly connected solution for W , we could replace it by a cheaper one in N . This would result in a feasible solution to R but with smaller cost than N , which would contradict the optimality of N .
Since C is an optimum strongly connected solution for W , we are able to prove the next claim, which essentially follows from our main observation on solutions in bidirected graphs given by Lemma 15.
Claim 27. Every cycle of C contains at least two vertices of W .
Proof. Assume C contains a cycle O with at most one vertex from W . As C is 2-connected and C is a minimum cost solution for W , there are at least two vertices in W , and at least one of these does not lie on O. In particular, on the cycle O there must be vertices that have degree more than 2 in C where paths lead to vertices of C not on O. As C is 2-connected, by Menger's Theorem [21] any such path leading away from O from a vertex u ∈ V (O) must eventually lead back to some vertex v ∈ V (O). We assume that every vertex of N has degree at most 3, and so u = v. This means that there exists a path P ⊆ O of length at least 1 that leads from u to v along O and contains no vertex of W as an internal vertex, since O contains at most one vertex from W .
We will now fix such a pair of vertices u, v ∈ V (O) of degree 3 in C, such that there is a u-v path Q, which contains no edge of O. We choose the pair u, v under the minimality condition that the u-v path P ⊆ O not containing an internal vertex from W is of minimum length. That is, there is no pair u , v of vertices on P , so that at least one of u and v is an internal vertex of P , and so that there is a u -v path in C, which contains no edge of O: otherwise the u -v subpath of P would be a shorter path not containing an internal vertex from W than P for the pair u , v . In particular, this means that any path from an internal vertex of P that leads away from O must lead back to a vertex of O that does not lie on P .
Assume that P has internal vertices of degree 3 in C, and let w be the closest one to u on P . That is, there is a w-w path Q not containing any edge of O, such that w lies on O but not on P , by our choice of u and v. Furthermore, the w-u subpath P of P has no internal vertex of degree 3 in C by our choice of w, but it has length at least 1, as w is an internal vertex of P . Now consider the cycle O formed by the u-v path Q, the v-w subpath of P (with edges not on P ), the w-w path Q , and the w -u path on O not containing v. As P does not lie on O but connects the vertices w and v of O , by Lemma 15 the path P cannot be a single edge, since C is an optimum solution. Thus removing O from C results in a connected component that consists of the subpath of P connecting the non-empty set of internal vertices of P . This is because w is the closest internal vertex of P with degree 3 to u, so that each internal vertex of P has degree 2 in C. However none of the vertices of this connected component is from W , as P , and therefore P , has no internal vertex from W . This contradicts Lemma 15, as C is an optimum SCSS solution for the set W .
Thus we are left with the case when all internal vertices of P have degree 2 in C. In this case we consider the cycle O formed by the u-v path Q and the v-u path Q ⊆ O containing no edge of P . Again, note that P connects the two vertices u and v of the cycle O but P does not lie on O . Thus, as before, P cannot be a single edge by Lemma 15, so that the non-empty set of internal vertices of P induce a connected component after removing O from C. This connected component contains no vertex from W , which once more contradicts Lemma 15 since C is optimum.
This claim implies that we can partition the edges of C into sets spanning edge-disjoint trees with leaves from W and internal vertices not in W , as follows. Take any edge e of C and consider the set of paths P in C that contain e, have two vertices of W as endpoints, and only vertices not in W as internal vertices. Assume the paths in P together span a graph containing a cycle. By Claim 27 there is a vertex w ∈ W on this cycle. This vertex w is the endpoint of two paths in P, each of which contains a different edge incident to w on the cycle. Since both these paths also contain e, they span a cycle O containing w (O may be different from the former cycle). As none of the internal vertices of the two paths is from W while the endpoints are, the cycle O also contains no vertex from W apart from w (otherwise the paths could not share e). Hence we found a cycle O with only one vertex from W , which contradicts Claim 27, and so the set P spans a tree. As we can find such a set of paths for every edge of C, we can also find the desired edge partition for which each set spans a tree with leaves from W and internal vertices not from W . Let T C be the set containing the graphs in C of treewidth 1 corresponding to these trees in C.
We now extend the graphs of T C of all 2-connected components C into edge-disjoint poly-trees of N , for which the leaves are terminals in R, as follows. Each graph T ∈ T C is a poly-tree of C, since every edge of C lies on a cycle, for which by Lemma 15 no reverse edge exists in N . However a leaf w of T is not a terminal from R but an articulation point of N , i.e a vertex of the corresponding set W . The 2-connected components of N are connected through these articulation points by trees, for which the leaves are terminals or articulation points of N . As N is strongly connected, such a tree corresponds to a bidirected graph T of treewidth 1 in N . This means that fixing one of the leaves r of T , the latter graph is the edge-disjoint union of an inand an out-arborescence on the same vertex set both with root r. We denote by A the set of edge-disjoint in-and out-arborescences connecting the components C of N . Note that N is the disjoint union of all poly-trees in the sets T C and the arborescences in A.
Since we assume that every vertex of N has at most 3 neighbours and C is 2-connected, an articulation point w of N in C has two neighbours in C and one neighbour outside of C. Thus w is either the root or a leaf of the two arborescences of A containing w, and it is a leaf of two edge-disjoint poly-trees of T C . In particular there are exactly four edges incident to w. One of the arborescences A ∈ A has an edge for which w is the tail, while the other A ∈ A has an edge for which w is the head. This means that w must be the head of an edge of a poly-tree T ∈ T C , but the tail of an edge of a poly-tree T ∈ T C . Taking the union of T and A, and also the union of T and A , results in two edge-disjoint poly-trees in each of which every directed path of maximal length has two leaves of the resulting poly-tree as endpoints. These endpoints are either terminals or articulation points of N different from w. We can repeat this procedure at every articulation point of N to form two new edge-disjoint poly-trees, each from the union of two smaller poly-trees and/or arborescences. This will result in larger and larger poly-trees, until we obtain a partition of the edges of N into sets, each of which spans a poly-tree in which every maximal length directed path connects two terminals of R that are leaves of the poly-tree. Let T N denote the set of all these poly-trees.
For each poly-tree T ∈ T N , we introduce a pattern graph H to H having the subset of R contained in T as its vertex set, and having an edge st whenever T contains an s → t path. The solution T H to H is exactly the poly-tree T , which concludes the proof. Section 7.4 shows that bi-SCSS is NP-hard, and even has a 2 o(k) · n O(1) lower bound under ETH. Hence, to the best of our knowledge, the class of bidirected graphs is the first example where SCSS remains NP-hard but turns out to be FPT parameterized by the number of terminals k.

Runtime lower bounds
This section is devoted to proving runtime lower bounds. First, in Section 7.1 we describe a general gadget which is used in both Theorem 7 and Theorem 3. Then Section 7.3 and Section 7.

Constructing a "uniqueness" gadget
For every integer n we define the following gadget U n which contains 4n+4 vertices (see Figure 2). Since we need many of these gadgets later on, we will denote vertices of U n by U n (v) etc., in order to be able to distinguish vertices of different gadgets. All edges will have the same weight M , which we will fix later during the reductions. The gadget U n is constructed as follows (we first construct an undirected graph, and then bidirect each edge): • Introduce two source vertices U n (s 1 ), U n (s 2 ), two target vertices U n (t 1 ), U n (t 2 ), and for each i ∈ [n] the four vertices U n (0 i ), U n (1 i ), U n (2 i ), U n (3 i ). • U n has a path of three edges corresponding to each i ∈ [n]. -Let i ∈ [n]. Then we denote the path in U n corresponding to i by P Un (i) : -Each of these edges is called as a "base" edge and has weight M • Finally we add the following edges: -Each of these edges is called a "connector " edge and has weight M . After bidirecting all above undirected edges in the gadgets, we give the following definitions for the directed graph U n . Definition 28. We define the set of boundary vertices of U n to be n i=1 {U n (0 i ), U n (3 i )} Definition 29. A set of edges E of U n satisfies the "in-out" property if each of the following four conditions is satisfied • U n (s 1 ) can reach some boundary vertex • U n (s 2 ) can reach some boundary vertex • U n (t 1 ) can be reached from some boundary vertex • U n (t 2 ) can be reached from some boundary vertex

Definition 30. A set of edges E of U n is represented by i ∈ [n] and right-oriented (resp. left-oriented) if
• the connector edges in E are U n (s 1 ) → U n (1 i ), U n (s 2 ) → U n (2 i ), U n (t 1 ) ← U n (1 i ), and U n (t 2 ) ← U n (2 i ), and • base edges in E are the directed path P right We now show a lower bound on the cost/weight of edges we need to pick from U n to satisfy the "in-out" property.
Lemma 31. Let E be a set of edges of U n which satisfies the "in-out" property. Then we have that either (i) the weight of E is at least 8M OR (ii) the weight of E is exactly 7M and there is an integer i ∈ [n] such that E is represented by i and is either left-oriented or right-oriented.
Proof. We clearly need at least four connector edges in N : • One outgoing edge from U n (s 1 ) so that it can reach some boundary vertex • One outgoing edge from U n (s 2 ) so that it can reach some boundary vertex • One incoming edge into U n (t 1 ) so that it can be reached from some boundary vertex • One incoming edge into U n (t 2 ) so that it can be reached from some boundary vertex This incurs a cost of 4M in E . We now see how many base edges we must have in E . We define the following: • "0-1" edges: This is the set of edges We have the following cases: • E has no "0-1" edges: This implies that E has at least 4 base edges from U n : two rightward edges (one "1-2" and one "2-3") so that U n (s 1 ) can reach some boundary vertex, and two leftward edges (one "1-2" and one "2-3") so that U n (t 1 ) can be reached from some boundary vertex. • E has no "2-3" edges: This implies that E has at least 4 base edges from U n : two leftward edges (one "0-1" and one "1-2") so that U n (s 2 ) can reach some boundary vertex, and two rightward edges (one "0-1" and one "1-2") so that U n (t 2 ) can be reached from some boundary vertex. • E has no "1-2" edges: This implies that E has at least 4 base edges from U n : a leftward "0-1" edge so that U n (s 1 ) can reach some boundary vertex, a rightward "0-1" edge so that U n (t 1 ) can be reached from some boundary vertex, a leftward "2-3" edge so that U n (t 1 ) can be reached from some boundary vertex and a rightward "2-3" edge so that U n (s 2 ) can reach some boundary vertex. Note that E cannot contain less than three base edges, since these would not suffice to connect the boundary vertices to the targets U n (t 1 ), U n (t 2 ) and at the same time connect the sources U n (s 1 ), U n (s 2 ) to the boundary vertices. Using three base edges however, this is possible by for instance choosing one each from "0-1", "1-2" and "2-3". Hence, either E has exactly three base edges or E has at least four base edges from U n . Therefore, the solution E has cost at least 7M . Now, suppose that the solution E has cost exactly 7M , so that E contains exactly 4 connector edges (one incident on each source vertex and one incident on each target vertex) and exactly 3 base edges (one each from "0-1", "1-2" and "2-3"). Let the connector edges in E be given by Suppose that the (only) "1-2" edge of E is rightward and given by U n (1 β ) → U n (2 β ). We will now show that β = β 1 = β 2 = β 3 = β 4 and that the three base edges of E are exactly given by the path P right • The unique "0-1" edge is rightward and given by U n (0 β 3 ) → U n (1 β 3 ): Suppose the (unique) "0-1" edge is leftward: however this implies there is no incoming path to U n (t 1 ) which contradicts the fact that it can be reached from some boundary vertex. Since the unique "1-2" edge is rightward, it follows that path in E which connects some boundary vertex to U n (t 1 ) must use the unique "0-1" rightward edge which is hence forced to be U n (0 β 3 ) → U n (1 β 3 ). • The unique "2-3" edge is rightward and given by U n (2 β 2 ) → U n (3 β 2 ): Suppose the (unique) "2-3" edge is leftward: however this implies there is no outgoing path from U n (s 2 ) (since the unique "1-2" edge is rightward and the unique "2-3" edge is leftward) which contradicts the fact that U n (s 2 ) can reach come boundary vertex. Since both the unique "1-2" edge and the unique "2-3" edge is rightward, it follows that the path in E from U n (s 2 ) to some boundary vertex must use the unique "2-3" rightward edge which is hence forced to be U n (2 β 2 ) → U n (3 β 2 ). Hence, we have that the only base edges in E are given by Now the existence of a path in E from boundary vertex to U n (t 2 ) implies β 3 = β = β 4 . Similarly, the existence of a path in E from U n (s 1 ) to some boundary vertex implies β 1 = β = β 2 . Hence, we have that β = β 1 = β 2 = β 3 = β 4 , i.e., the three base edges in E are exactly given by the path P right If the unique "1-2" edge in E is leftward, then the arguments are symmetric.
The following corollary follows immediately from the second part of proof of the previous lemma.

Corollary 32. For every i ∈ [n] there is a set of edges E right
Un (i) (resp. E left Un (i)) of cost exactly 7M which represents i, is right-oriented (resp. left-oriented) and satisfies the "in-out" property.

W[1]-hardness for bi-DSN Planar
In this section we prove Theorem 3 which is restated below: Theorem 3. The bi-DSN Planar problem is W[1]-hard parameterized by k, and moreover, under ETH, for any computable functions f (k) and f (k, ε) independent of n, and parameters k and ε > 0, • there is no f (k) · n o( We reduce from the Grid Tiling problem:

Grid Tiling
Input : Integers k, n, and k 2 non-empty sets S i,j ⊆ [n]×[n] where 1 ≤ i, j ≤ k Question: For each 1 ≤ i, j ≤ k does there exist a value γ i,j ∈ S i,j such that • If γ i,j = (x, y) and γ i,j+1 = (x , y ) then x = x .
(1,  See Figure 3 for example of an instance of Grid Tiling. The reductions of Chen et al. [14] and Marx [61] together imply that, assuming ETH, the problem of k × k Grid Tiling cannot be solved in time f (k) · n o(k) for any computable function f . To prove Theorem 3, we give a reduction which transforms the problem of k × k Grid Tiling into an instance of bi-DSN which has O(k 2 ) demand pairs and an optimum which is planar. We design two types of gadgets: the main gadget and the secondary gadget. The reduction from Grid Tiling represents each cell of the grid with a copy of the main gadget, and each main gadget is surrounded by four secondary gadgets: on the top, right, bottom and left. Each of these gadgets are actually copies of the "uniqueness gadget" from Section 7.1 with M = k 4 : each secondary gadget is a copy of U n and for each 1 ≤ i, j ≤ k the main gadget M i,j (corresponding to the set S i,j ) is a copy of U |S i,j | . We refer to Figure 4 (bird's-eye view) and Figure 5 (zoomed-in view) for an illustration of the reduction.
Fix some 1 ≤ i, j ≤ k. The main gadget M i,j has four secondary gadgets 7 surrounding it: • Above M i,j is the horizontal secondary gadget HS i,j+1 • On the right of M i,j is the vertical secondary gadget V S i+1,j • Below M i,j is the horizontal secondary gadget HS i,j • On the left of M i,j is the vertical secondary gadget V S i,j Hence, there are k(k + 1) horizontal secondary gadgets and k(k + 1) vertical secondary gadgets. Recall that M i,j is a copy of U |S i,j | and each of the secondary gadgets are copies of U n (with M = k 4 ). With slight abuse of notation, we assume that the rows of M i,j are indexed by the set {(x, y) : (x, y) ∈ S i,j }. We add the following edges (in red color) of weight 1: for each (x, y) ∈ S i,j • Add the edges Introduce the following 4k vertices (which we call border vertices): For each i ∈ [k] add the following edges (shown as dotted in Figure 4) with weight 1:  Figure 4: A bird's-eye view of the instance of G * with k = 3 and n = 4 (see Figure 5 for a zoomed-in view). The connector edges within each main and secondary gadget are not shown. Similarly, the vertices and edges within each main gadget are not shown here either. Additionally we have some red edges between each main gadget and the four secondary gadgets surrounding it which are omitted in this figure for clarity (they are shown in Figure 5 which gives a more zoomed-in view).
We follow the convention that: Finally, the set of demand pairs D is given by: • Type I: Let 1 ≤ i ≤ k + 1, 1 ≤ j ≤ k. Consider the vertical secondary gadget V S i,j . We add the pairs (M i−1,j (s 1 ), V S i,j (t 1 )) and (M i−1,j (s 2 ), V S i,j (t 2 )) in addition to the pairs We add the pairs (M i,j (s 1 ), HS i,j (t 1 )) and (M i,j (s 2 ), HS i,j (t 2 )) in addition to the pairs (HS i,j (s 1 ), M i,j−1 (t 1 )) and (HS i,j (s 2 ), M i,j−1 (t 2 )) We have O(k 2 ) vertical and horizontal secondary gadgets and we add O(1) demand pairs corresponding to each of these gadgets. Hence, the total number of demand pairs is |D| = O(k 2 ). Let the final graph constructed be G * . Note that we bidirect each edge of G * .
Fix the budget B * = 4k + k(k + 1) · B + k(k + 1) · B + k 2 · (B + 4) where B = 7M = 7k 4 . The high-level intuition is the following: we need 4k from the budget just to satisfy demand pairs of Type I and II. We have k(k + 1) horizontal and vertical secondary gadgets each. We argue that any solution for bi-DSN must satisfy the "in-out" property in each of the secondary gadgets, and then invoke Lemma 31. Finally, for each main gadget, we again show that it must satisfy the "in-out" property and hence has cost at least B. However, here we show that we additionally need at least four red edges and hence the cost of any bi-DSN solution restricted to a main gadget is at least B + 4. Since we have k 2 main gadgets, this completely uses up the budget B * .

Grid Tiling answers YES ⇒ bi-DSN has a planar solution of cost at most B *
Suppose that Grid Tiling has a solution, i.e., for each 1 ≤ i, j ≤ k there is a value (x i,j , y i,j ) = γ i,j ∈ S i,j such that • for every i ∈ [k], we have x i,1 = x i,2 = x i,3 = . . . = x i,k = α i , and • for every j ∈ [k], we have y 1,j = y 2,j = y 3,j = . . . = y k,j = β j .
We now build a planar solution E * for the bi-DSN instance (G * , D) and show that it has weight at most B * . In the edge set E * , we take the following edges: . This uses up 2k from the budget since each of these edges has weight 1.

The edges (a i , HS
. This uses up 2k from the budget since each of these edges has weight 1. 3. For each 1 ≤ i, j ≤ k for the main gadget M i,j , use Corollary 32 to pick a set of edges E right M i,j ((α i , β j )) which is right-oriented, represented by (α i , β j ) and has weight exactly B. Additionally we also pick the following four red edges (each of which has weight 1): For each 1 ≤ j ≤ k + 1 and 1 ≤ i ≤ k for the horizontal secondary gadget HS i,j , use Corollary 32 to pick a set of edges E right HS i,j (α i ) which is right-oriented, represented by α i and has weight exactly B.
HSi,j(0x) V Si+1,j(0y) Figure 5: A zoomed-in view of the main gadget M i,j surrounded by four secondary gadgets: horizontal gadget HS i,j+1 on the top, vertical gadget V S i,j on the left, horizontal gadget HS i,j on the bottom and vertical gadget V S i+1,j on the right. Each of the secondary gadgets is a copy of the uniqueness gadget U n (see Section 7.1) and the main gadget M i,j is a copy of the uniqueness gadget U |Si,j | . The only inter-gadget edges are the red edges: they have one end-point in a main gadget and the other end-point in a secondary gadget. We have shown four such red edges which are introduced for every (x, y) ∈ S i,j . 5. For each 1 ≤ j ≤ k and 1 ≤ i ≤ k + 1 for the vertical secondary gadget V S i,j , use Corollary 32 to pick a set of edges E right V S i,j (β j ) which is right-oriented, represented by β j and has weight exactly B.
It is easy to see that E * is planar 8 , and has weight exactly 4k + k(k + 1) · B + k 2 · (B + 4) = B * . We now show that E * is indeed a solution for the bi-DSN instance. Fix i, j such that 1 ≤ i ≤ k + 1, 1 ≤ j ≤ k. Consider the four demand pairs of Type I (the analysis for demand pairs of Type II is similar, and omitted here): • (M i−1,j (s 1 ), V S i,j (t 1 )): This path is obtained by concatenation of the following two paths: ): This path is obtained by concatenation of the following two paths: - ): This path is obtained by concatenation of the following two paths: ): This path is obtained by concatenation of the following two paths:

bi-DSN has a planar solution of cost at most B * ⇒ Grid Tiling answers YES
Suppose that bi-DSN has a planar solution, say E * , of cost at most B * .
Lemma 33. For every 1 ≤ i ≤ k + 1, 1 ≤ j ≤ k the edge set E * restricted to the vertical secondary gadget V S i,j satisfies the "in-out" property. Hence, V S i,j uses up weight of at least B from the budget.
Proof. Looking at the demand pairs in D of Type I, we observe that • V S i,j (s 1 ) is the source of some demand pair whose other end-point lies outside of V S i,j • V S i,j (s 2 ) is the source of some demand pair whose other end-point lies outside of V S i,j • V S i,j (t 1 ) is the target of some demand pair whose other end-point lies outside of V S i,j • V S i,j (t 2 ) is the target of some demand pair whose other end-point lies outside of V S i,j Since E * is a solution of the bi-DSN instance, it follows that there is a path starting at V S i,j (s 1 ) which must leave the gadget V S i,j , i.e., V S i,j (s 1 ) can reach either a 0-vertex or a 3-vertex. The other three conditions of Definition 29 follow by similar reasoning. By Lemma 31, it follows that V S i,j uses up weight of at least B from the budget.
Analogous lemmas hold also for horizontal secondary gadgets and main gadgets: Lemma 34. For every 1 ≤ i ≤ k, 1 ≤ j ≤ k + 1 the edge set E * restricted to the horizontal secondary gadget HS i,j satisfies the "in-out" property. Hence, HS i,j uses up weight of at least B from the budget.
Lemma 35. For every 1 ≤ i, j ≤ k the edge set E * restricted to the main gadget M i,j satisfies the "in-out" property. Hence, M i,j uses up weight of at least B from the budget.
From Lemma 33, Lemma 34 and Lemma 35 we know that each of the gadgets (horizontal secondary, vertical secondary and main) use up at least weight B in E * . We now claim that E * restricted to each vertical secondary gadget, horizontal secondary gadget and main gadget has weight exactly B. Suppose there is at least one gadget where E * has weight more than B. By Lemma 31, the weight of E * in this gadget is at least 8M = B + M . Since M = k 4 and Therefore, we have the following, which follows from Lemma 31: Lemma 36. The weight of E * restricted to each gadget is exactly B = 7M . Moreover, • for each 1 ≤ i ≤ k + 1, 1 ≤ j ≤ k, the vertical secondary gadget V S i,j is represented by some y i,j ∈ [n] and is either right-oriented or left-oriented, • for each 1 ≤ i ≤ k, 1 ≤ j ≤ k + 1, the horizontal secondary gadget HS i,j is represented by some x i,j ∈ [n] and is either right-oriented or left-oriented, and • for each 1 ≤ i, j ≤ k, the main gadget M i,j is represented by some (λ i,j , δ i,j ) ∈ S i,j and is either right-oriented or left-oriented.
We now show that for each 1 ≤ i, j ≤ k, the solution E * must also use some red edges which have one end-point in vertices of M i,j .
Lemma 37. For each 1 ≤ i, j ≤ k, the solution E * must also use at least four red edges which have one end-point in vertices of M i,j .
Proof. We show that E * must use at least one red edge which has one end-point in the set of 3-vertices of M i,j and the other end-point in the set of 0-vertices of HS i,j . Analogous arguments hold for the other three secondary gadgets surrounding the main gadget M i,j and hence we get the lower bound of four red edges as claimed (note that the vertex sets of the secondary gadgets are pairwise disjoint, and hence these edges are distinct).
We know by Lemma 36 that HS i,j is either right-oriented or left-oriented. Suppose HS i,j is right-oriented. Also, by Lemma 31 and Lemma 36, we know that the only base edges of HS i,j picked in E * are HS i,j (0 and the only connector edges of HS i,j picked in E * are HS i,j (s 1 . But there is a Type II demand pair whose target is HS i,j (t 1 ): the path satisfying this demand pair has to enter HS i,j through the vertex HS i,j (0 x i,j ). The only edges (which are not base or connector edges of HS i,j ) incident on the 0-vertices of HS i,j have their other end-point in the set of 3-vertices of M i,j . That is, E * contains a red edge whose start vertex is a 3-vertex of M i,j and end vertex is a 0-vertex of HS i,j .
Lemma 38. For each 1 ≤ i, j ≤ k, the solution E * must contain at least one dotted edge of each of the following types: • Outgoing edge from a i • Incoming edge into b i • Outgoing edge from c j • Incoming edge into d j Proof. Note that a i is the source of two Type II demand pairs, viz. (a i , HS i,k+1 (t 1 )) and (a i , HS i,k+1 (t 2 )). Hence E * must contain at least one outgoing edge from a i . The other three statements follow similarly.
We show now that we have no slack, i.e., weight of E * must be exactly B * .
Lemma 39. The weight of E * is exactly B * , and hence it is minimal (under edge deletions) since no edges have zero weights.
Proof. From Lemma 36, we know that each gadget has weight of B in E * . Lemma 37 says that each main gadget needs at least 4 red edges, and Lemma 38 says that the dotted edges contribute at least 4k to weight of E * . Since all these edges are distinct, we have that the weight of E * is at least k(k + 1) · B + k(k + 1) · B + k 2 · B + 4(k + k 2 ) = B * . Hence, weight of E * is exactly B * and it is minimal (under edge deletions) since no edges have zero weights.
Consider a main gadget M i,j . The main gadget has four secondary gadgets surrounding it: HS i,j below it, HS i,j+1 above it, V S i,j to the left and V S i+1,j to the right. By Lemma 36, these gadgets are represented by x i,j , x i,j+1 , y i,j and y i+1,j respectively. The main gadget M i,j is represented by (λ i,j , δ i,j ).

Lemma 40. (propagation) For every main gadget
Proof. Due to symmetry, it suffices to only argue that x i,j = λ i,j . Let us assume for the sake of contradiction that x i,j = λ i,j . We will now show that there is a vertex such that (1) there is exactly one edge adjacent to it in the solution E * and (2) it does not belong to any demand pair. Observe that removing its only adjacent edge from E * does not effect the validity of the solution. This contradicts Lemma 39 which states that E * is minimal.
From Lemma 37 and Lemma 39, it follows that E * contains exactly one red edge, say e 1 , which has one end-point in the set of 3-vertices of M i,j and other end-point in set of 0-vertices of HS i,j . Also, E * contains exactly one red edge, say e 2 , which has one end-point in the set of 3-vertices of M i,j and other end-point in set of 0-vertices of V S i+1,j .
Observe that if e 1 does not have one endpoint at HS i,j (0 x i,j ), then the vertex HS i,j (0 x i,j ) is the desired vertex. Hence, suppose that one endpoint of the edge e 1 is HS i,j (0 x i,j ). The other endpoint of e 1 must be M i,j (3 x i,j ,y ) for some y ∈ V j . Since x i,j = λ i,j , we have M i,j (3 x i,j ,y ) = M i,j (3 λ i,j ,δ i,j ). Suppose that one of the end-points of e 2 is M i,j (3 x ,y ). Since M i,j (3 x i,j ,y ) = M i,j (3 λ i,j ,δ i,j ), at least one of the following must be true: In all cases, we have found a vertex with desired properties; hence, we have arrived at a contradiction.

Lemma 41. Grid Tiling answers YES
Proof. By Lemma 40, it follows that for each 1 ≤ i, j ≤ k we have x i,j = λ i,j = x i,j+1 and y i,j = δ i,j = y i+1,j in addition to (λ i,j , δ i,j ) ∈ S i,j (by the definition of the main gadget). This implies that Grid Tiling has a solution. Chen et al. [14] showed that, for any function f , the existence of an f (k) · n o(k) algorithm for Clique violates ETH. Marx [61] gave a reduction that transforms the problem of finding a k-clique into a k × k Grid-Tiling instance. Our reduction transforms the problem of k × k Grid Tiling into an instance of bi-DSN Planar with O(k 2 ) demand pairs. Composing the two reductions, we obtain that, under ETH, there is no f (k)·n o(  4 ). Consequently, consider running A with ε set to a value such that (1 + ε) · B * < B * + 1 with ε being a function of the parameter k independent of n. Every edge of our constructed graph G * has weight at least 1, and hence an (1 + )-approximation is in fact forced to find a solution of cost at most B * , i.e., A finds an optimum solution. By the previous paragraph, this is not possible.

W[1]-hardness for bi-DSN
In this section we prove Theorem 7 which is restated below: Theorem 7. The bi-DSN problem is W[1]-hard for parameter k, even on unweighted graphs. Moreover, under ETH there is no f (k) · n o(k/ log k) time algorithm for bi-DSN, for any computable function f (k) independent of n.
We reduce from the Colored Subgraph Isomorphism problem introduced by Marx [63].
Marx [63] showed the following hardness result: Colored Subgraph Isomorphism is W[1]-hard parameterized by r, where r is the number of edges in H. Moreover, under ETH, Colored Subgraph Isomorphism cannot be solved in time f (r) · n o(r/ log r) where f is any computable function and n is the number of vertices in G.
We now give a reduction from Colored Subgraph Isomorphism to bi-DSN where the number of demand pairs is O(r), which would gives us the desired lower bound. Let the input of Colored Subgraph Isomorphism be undirected graphs G = (V G , E G ) and This reduction is a modification of that given in Theorem 3: there we had a reduction from the special case when H is a clique on vertices. We first construct the graph G * (exactly as in Figure 4). We design two types of gadgets: the main gadget and the secondary gadget. Each of these gadgets are actually copies of the "uniqueness gadget" from Section 7.1 with M = k 4 .
Fix some 1 ≤ i, j ≤ . The main gadget M i,j (corresponding to the set E {i,j} ) is a copy of U |E {i,j} | . The main gadget M i,j has four secondary gadgets 9 surrounding it: • Above M i,j is the horizontal secondary gadget HS i,j+1 • On the right of M i,j is the vertical secondary gadget V S i+1,j • Below M i,j is the horizontal secondary gadget HS i,j • On the left of M i,j is the vertical secondary gadget V S i,j Hence, there are ( +1) horizontal secondary gadgets and ( +1) vertical secondary gadgets. For 1 ≤ i ≤ , 1 ≤ j ≤ + 1 the horizontal gadget HS i,j is a copy of U |V i | . For 1 ≤ i ≤ + 1, 1 ≤ j ≤ the vertical gadget V S i,j is a copy of U |V j | .
Introduce the following 4 vertices (which we call as border vertices): • a 1 , a 2 , . . . , a We follow the convention that: For each i ∈ [ ] add the following edges (shown as dotted in Figure 4) with weight 1: If {i, j} / ∈ E * H then we perform the following modifications: • Remove the main gadget M i,j • Identify the vertical secondary gadgets V S i,j and V S i+1,j • Identify the horizontal secondary gadgets HS i,j and HS i,j+1 After this modification, we now have exactly 2k + main gadgets, and 2k + 2 horizontal and vertical secondary gadgets each. For each 1 ≤ i = j ≤ such that i−j ∈ E * H we define the function next j (i) = min{ + 1, {r : r > j, r − i ∈ E * H }} and prev j (i) = max{0, {r : r < j, r − i ∈ E * H }}. The main gadget M i,j is now surrounded by the following four secondary gadgets: • V S i,j on the left • HS i,j on the bottom • V S next i (j),j on the right • HS i,next j (i) on the top Recall that M i,j is a copy of U |E {i,j} | with M = k 4 . With slight abuse of notation, we assume that the rows of M i,j are indexed by the set {{x, y} : {x, y} ∈ E {i,j},x∈V i ,y∈V j }. We add the following edges (in red color) of weight 1: for each {x, y} ∈ E {i,j} • Add the edges HS i,next j (i) ( For each 1 ≤ i ≤ , we define the following quantities: Note that the quantities α i , β i are well-defined since we can assume that H is connected (and hence has no isolated vertices) since otherwise we can solve the Colored Subgraph Isomorphism instance separately on each component of H.
The set of demand pairs D is given by: • Type I: Let j ∈ [ ], i ∈ N H (j). Consider the vertical secondary gadget V S i,j . We add the pairs (M prev i (j),j (s 1 ), V S i,j (t 1 )) and (M prev i (j),j (s 2 ), V S i,j (t 2 )) in addition to the pairs (V S i,j (s 1 ), M i,j (t 1 )) and (V S i,j (s 2 ), M i,j (t 2 )) • Type II: Let i ∈ [ ], j ∈ N H (i). Consider the horizontal secondary gadget HS i,j . We add the pairs (M i,j (s 1 ), HS i,j (t 1 )) and (M i,j (s 2 ), HS i,j (t 2 )) in addition to the pairs (HS i,j (s 1 ), M i,prev j (i) (t 1 )) and (HS i,j (s 2 ), M i,prev j (i) (t 2 )) HSi,j(0x) V S next i (j),j (0y) Figure 6: A zoomed-in view of the main gadget M i,j surrounded by four secondary gadgets: horizontal gadget HS i,nextj (i) on the top, vertical gadget V S i,j on the left, horizontal gadget HS i,j on the bottom and vertical gadget V S nexti(j),j on the right. Each of the secondary gadgets is a copy of the uniqueness gadget U n (see Section 7.1) and the main gadget M i,j is a copy of the uniqueness gadget U |E {i,j} | . The only inter-gadget edges are the red edges: they have one end-point in a main gadget and the other end-point in a secondary gadget. We have shown four such red edges which are introduced for every (x, y) ∈ E {i,j} .
We have 2k + 2 vertical and horizontal secondary gadgets each, and we add O(1) demand pairs corresponding to each of these gadgets. Hence, the total number of demand pairs is |D| = O(2k + 2 ) = O(k), since we can assume that H is connected (otherwise we can solve Colored Subgraph Isomorphism on each connected component of H) which implies k ≥ −1. Let the final graph constructed be G . Note that we bidirect each edge of G . We refer to Figure 4 (bird's-eye view) and Figure 6 (zoomed-in view) for an illustration of the reduction.
Fix the budget B * = 4 + (2k + 2 ) · B + (2k + 2 ) · B + (2k + ) · (B + 4) where B = 7M = 7k 4 . The high-level intuition is the following: we need 4 from the budget just to satisfy demand pairs involving border vertices. We have (2k + 2 ) horizontal and vertical secondary gadgets each. We argue that any solution for bi-DSN must satisfy the "in-out" property in each of the secondary gadgets, and then invoke Lemma 31. Finally, for each main gadget, we again show that it must satisfy the "in-out" property and hence has cost at least B. However, here we show that we additionally need at least four red edges (which have exactly one end-point in a main gadget) and hence the cost of any bi-DSN solution restricted to edges having at least one end-point in each main gadget is at least B + 4. Since we have 2k + main gadgets, this completely uses up the budget B * .
We now prove that the instance of Colored Subgraph Isomorphism answers YES if and only if there is a solution N to the bi-DSN instance (G , D) with cost at most B * = 4 + (2k + 2 ) · B + (2k + 2 ) · B + (2k + ) · (B + 4)

CSI answers YES ⇒ bi-DSN has a solution of cost at most B *
Suppose that CSI answers YES, i.e., there exists a function φ : We now design a solution N for the bi-DSN instance (G , D) of weight B * .
• For each 1 ≤ i ≤ , pick the edges (a i , HS i,next β i (i) (0 φ(i) )) and (HS i,α i (3 φ(i) ), b i ) • For each 1 ≤ j ≤ , pick the edges (c j , HS α j ,j (0 φ(j) )) and (HS next β j (j),j (3 φ(j) ), d j ) • For each 1 ≤ i, j ≤ such that i − j ∈ E * H pick the following edges (guaranteed to exist by Corollary 32) -The set of edges in M i,j which is oriented rightwards, represents {φ(i), φ(j)} (this is guaranteed since M i,j has a row for each edge of E {i,j} and φ(i) − φ(j) ∈ E G ) and has weight M • For each i ∈ [ ], j ∈ N H (i) pick the following edges (guaranteed to exist by Corollary 32) -The set of edges in HS i,j which is oriented rightwards, represents φ(i) (this is guaranteed since HS i,j has a row for each vertex of V i ) and has weight M • For each j ∈ [ ], i ∈ N H (j) pick the following edges (guaranteed to exist by Corollary 32) -The set of edges in V S i,j which is oriented rightwards, represents φ(j) (this is guaranteed since V S i,j has a row for each vertex of V j ) and has weight M • For each 1 ≤ i, j ≤ such that i − j ∈ E * H pick the four red edges (guaranteed to exist i} is just a copy of) connecting main gadgets and secondary gadgets given by )) It is easy to see that the cost of N is exactly 4 +(2k+2 )·B+(2k+2 )·B+(2k+ )·(B+4) = B * . We now show that each demand pair of Type I is satisfied by N .
• The pair (M prev i (j),j (s 1 ), V S i,j (t 1 )) is satisfied by the path M prev i (j),j (s 1 in N The proof of satisfiability for the demand pairs of Type II is analogous. Hence, N is indeed a solution for the bi-DSN instance.  Proof. Looking at the demand pairs in D of Type I, we observe that • V S i,j (s 1 ) is the source of some demand pair whose other end-point lies outside of V S i,j • V S i,j (s 2 ) is the source of some demand pair whose other end-point lies outside of V S i,j • V S i,j (t 1 ) is the target of some demand pair whose other end-point lies outside of is the target of some demand pair whose other end-point lies outside of V S i,j Since N is a solution of the bi-DSN instance, it follows that there is a path starting at V S i,j (s 1 ) which must leave the gadget V S i,j , i.e., V S i,j (s 1 ) can reach either a 0-vertex or a 3-vertex. The other three conditions of Definition 29 follow by similar reasoning. By Lemma 31, it follows that the edges of N which have both endpoints in V S i,j use up weight of at least B from the budget.
Analogous lemmas hold also for horizontal secondary gadgets and main gadgets: Therefore, we have the following, which follows from Lemma 31: Lemma 45. The weight of N restricted to each gadget is exactly B = 7M . Moreover, • For each j ∈ [ ], i ∈ N H (j), the vertical secondary gadget V S i,j is represented by some y i,j ∈ V j and is either right-oriented or left-oriented, • For each i ∈ [ ], j ∈ N H (i), the horizontal secondary gadget HS i,j is represented by some x i,j ∈ V i and is either right-oriented or left-oriented, and • For each i, j such that i − j ∈ E * H , the main gadget M i,j is represented by some (λ i,j , δ i,j ) ∈ E i,j and is either right-oriented or left-oriented.
We now show that for each i, j such that i − j ∈ E * H , the solution N must also use some red edges (each of which have exactly one end-point among vertices of M i,j ).
H , the solution N must also use at least four red edges which have one end-point in vertices of M i,j .
Proof. We show that N must use at least one red edge which has one end-point in the set of 3-vertices of M i,j and the other end-point in the set of 0-vertices of HS i,j . Analogous arguments hold for the other three secondary gadgets surrounding the main gadget M i,j and hence we get the lower bound of four red edges as claimed (note that the vertex sets of the secondary gadgets are pairwise disjoint, and hence these edges are distinct).
We know by Lemma 45 that HS i,j is either right-oriented or left-oriented. Suppose HS i,j is right-oriented. Also, by Lemma 31 and Lemma 45, we know that the only base edges of . But there is a Type II demand pair whose target is HS i,j (t 1 ): the path satisfying this demand pair has to enter HS i,j through the vertex HS i,j (0 x i,j ). The only edges (which are not base or connector edges of HS i,j ) incident on the 0-vertices of HS i,j have their other end-point in the set of 3-vertices of M i,j . That is, N contains a red edge whose start vertex is a 3-vertex of M i,j and end vertex is a 0-vertex of HS i,j .
Lemma 47. For each 1 ≤ i, j ≤ , the solution N must contain at least one dotted edge of each of the following types: • Outgoing edge from a i • Incoming edge into b i • Outgoing edge from c j • Incoming edge into d j Proof. Note that a i is the source of two Type II demand pairs, viz. (a i , HS i,next β i (i) (t 1 )) and (a i , HS i,next β i (i) (t 2 )). Hence N must contain at least one outgoing edge from a i . The other three statements follow similarly.
We show now that we have no slack, i.e., weight of N must be exactly B * .
Lemma 48. The weight of N is exactly B * , and hence it is minimal (under edge deletions) since no edges have zero weights.
Proof. From Lemma 45, we know that each gadget has weight of B in N . Lemma 46 says that each main gadget contributes at least 4 red edges which have exactly one end-point in this main gadget, and Lemma 47 says that the dotted edges (incident on border vertices) contribute at least 4 to weight of N . Since all these edges are distinct, we have that the weight of N is at least (2k + 2 ) · B + (2k + 2 ) · B + (2k + ) · B + 4( + 2k + ) = B * . Hence, weight of N is exactly B * and it is minimal (under edge deletions) since no edges have zero weights.
Consider a main gadget M i,j . The main gadget has four secondary gadgets surrounding it: HS i,j below it, HS i,next j (i) above it, V S i,j to the left and V S next i (j),j to the right. By Lemma 45, these gadgets are represented by x i,j , x i,next j (i) , y i,j and y next i (j),j respectively. The main gadget M i,j is represented by (λ i,j , δ i,j ). optimum solution has cost at most B * = 4 +(2k +2 )·B +(2k +2 )·B +(2k + )·(B +4) = O(k 5 ) since if and only if the Colored Subgraph Isomorphism instance answers YES. Consequently, if an efficient parameterized approximation scheme existed we could set ε to a value such that (1 + ε) · B * < B * + 1 with ε being a function of the parameter k independent of n. Every edge of our constructed graph G * has weight at least 1, and hence an (1 + )-approximation is in fact forced to find a solution of cost at most B * , i.e., A finds an optimum solution. By the previous paragraph, this is not possible. Thus this algorithm would solve the W[1]-hard Colored Subgraph Isomorphism problem [63] in time f (k) · n O(1) , which is impossible unless FPT=W [1].

NP-hardness and 2 o(k) · n O(1) lower bound for bi-SCSS Planar
In this section we prove Theorem 11, which is restated below: Proof. We reduce from the NP-hard Hamiltonian Cycle problem. Given an undirected unweighted graph G on n vertices as an instance to Hamiltonian Cycle, we construct a bidirected weighted complete graph H on the same vertex set as G as follows: • If {u, v} is an edge of G, then we set the weight of uv and vu in H to 1.
• If {u, v} is not an edge of G, then we set the weight of uv and vu in H to 2. Consider the bi-SCSS instance on H where every vertex is a terminal. We now show that G has a Hamiltonian cycle if and only if the bi-SCSS instance has a solution of cost n.
Suppose G has a Hamiltonian cycle. It corresponds to a directed cycle in H of cost n and is a feasible solution for the bi-SCSS instance. On the other hand, note that every bi-SCSS solution in H will have cost at least n, since every vertex has out-degree at least one in the solution. Hence, if there is a solution N ⊆ H for the bi-SCSS instance of cost exactly n, then every vertex has out-degree exactly one in N , and each edge in N will have cost one. As N is strongly connected, this means N is a directed cycle. As this cycle consists of only edges of cost one, it follows that each edge in N is also an edge in G, i.e., the underlying undirected cycle N is a Hamiltonian cycle in G. Note that the optimal solution for bi-SCSS instance is a directed cycle, and is hence planar.
Finally, observe that we have shown above that bi-SCSS with k = |V | terminals can solve the Hamiltonian cycle problem. It is known [20,Theorem 14.6] that under ETH the Hamiltonian Cycle problem has no 2 o(n) · n O(1) algorithm. This immediately implies that bi-SCSS does not have an 2 o(k) · n O(1) algorithm under ETH.

FPT Inapproximability of SCSS and bi-DSN
The starting point of our hardness of approximation results are based on the recent parameterized inapproximability of Densest k-Subgraph from [11] (which in turn builds on a construction from [59]). To state the result precisely, let us first state the underlying assumption, the Gap Exponential Time Hypothesis (Gap-ETH). Note here that the version used here rules out not only deterministic but also randomized algorithms; this is needed for the inapproximability result of [11].
Hypothesis 52 ((Randomized) Gap-ETH [23,60]). There exists a constant δ > 0 such that, given a 3CNF formula Φ on n variables, no (possibly randomized) 2 o(n) -time algorithm can distinguish between the following two cases correctly with probability at least 2/3: • Every assignment to the variables violates at least a δ-fraction of the clauses of Φ.
Here we do not attempt to reason why Gap-ETH is a plausible assumption; for more detailed discussions on the topic, please refer to [23] or [11]. For now, let us move on to state the inapproximability result from [11] that we need. Recall that, in the Densest k-Subgraph (DkS) problem [51], we are given an undirected graph G = (V, E) and an integer k and we are asked to find a subset S ⊆ V of size k that induces as many edges in G as possible. Chalermsook et al. [11] showed that, even when parameterized by k, the problem is hard to approximate to within a k o(1) -factor, as stated more formally below.  (1), there is no f (k) · n O(1) -time algorithm that, given a graph G on n vertices and an integer k, can distinguish between the following two cases: • (YES) G contains at least one k-clique as a subgraph.
• (NO) Every k-subgraph of G contains less than k −h(k) · k 2 edges.
Instead of working with DkS, it will be more convenient for us to work with a closely-related problem called Maximum Colored Subgraph Isomorphism, which can be defined as follows.

Maximum Colored Subgraph Isomorphism (MCSI)
Input : An instance Γ of MCSI consists of three components: • An undirected graph It is worth noting that this problem is referred to as Label Cover in the hardness of approximation literature [4]. However, we choose the name Maximum Colored Subgraph Isomorphism as it is more compatible with the naming conventions earlier in Section 7; our new problem is simply an optimization version of Colored Subgraph Isomorphism defined in that section.
The graph H is sometimes referred to as the supergraph of Γ. Similarly, the vertices and edges of H are called supernodes and superedges of Γ. Moreover, the size of Γ is defined as n = |V G |, the number of vertices of G. Additionally, for each assignment φ, we define its value val(φ) to be the fraction of superedges i − j ∈ E H such that φ(i) − φ(j) ∈ E G ; such superedges are said to be covered by φ. The objective of MCSI is now to find an assignment φ with maximum value. We denote the value of the optimal assignment by val(Γ), i.e., val(Γ) = max φ val(φ).
For this problem, a hardness similar to that of Densest k-Subgraph can be shown: Corollary 54. Assuming randomized Gap-ETH, for any function h( ) = o (1), there is no f ( ) · n O(1) -time algorithm that, given a MCSI instance Γ of size n such that the supergraph H is a complete graph on supernodes, can distinguish between the following two cases: The proof of Corollary 54 is rather simple, and follows the standard technique of using splitters. Nevertheless, for completeness, we give the full proof below.
Definition 55. (splitters) Let n ≥ r ≥ k. An (n, k, r)-splitter is a family Λ of functions [n] → [r] such that for every subset S ⊆ [n] of size k there is a function λ ∈ Λ such that λ is injective on S.
The following constructions of special families of splitters are due to Alon et al. [2] and Naor et al. [67].
Theorem 56. There exists a 2 O(k) · n O(1) -time algorithm that takes in n, k ∈ N such that n ≥ k and outputs an (n, k, k)-splitter family of functions Λ n,k such that |Λ n,k | = 2 O(k) · log n.
Proof of Corollary 54. Suppose for the sake of contradiction that there exists an algorithm B that can solve the distinguishing problem stated in Corollary 54 in f ( ) · n O(1) time for some function f . We will use this to construct another algorithm B that can solve the distinguishing problem stated in Theorem 53 in time f (k) · n O( 1) for some function f , which will thereby violate Gap-ETH.
The algorithm B , on input (G, k), proceeds as follows. We assume w.l.o.g. that V = [n]. First, B runs the algorithm from Theorem 56 on (n, k) to produce an (n, k, k)-splitter family of functions Λ n,k . For each λ ∈ Λ n,k , it creates a MCSI instance Γ λ = (G λ , H λ , V λ 1 ∪ · · · ∪ V λ k ) where • the graph G λ is simply the input graph G,  (1) ). Moreover, if G contains a k-clique, say (v 1 , . . . , v k ), then by the properties of splitters we are guaranteed that there exists λ ∈ Λ n,k such that λ({v 1 , . . . , v k }) = [k]. Hence, the assignment i → v i covers all superedges in E H λ , implying that B indeed outputs YES on such Γ λ . On the other hand, if every k-subgraph of G contains less than k −h(k) · k 2 , then, for any λ ∈ Λ n,k and any assignment φ of Γ λ , (φ(1), . . . , φ(k)) induces less than k −h(k) · k 2 edges in G. This also upper bounds the number of superedges covered by φ, which implies that Γ λ is a NO instance of Corollary 54. Thus, in this case, B outputs NO on all Γ λ 's. In other words, B can correctly distinguish the two cases in Theorem 53 in O(2 O(k) f (k) · n O(1) ) time. This concludes our proof of Corollary 54.

Strongly Connected Steiner Subgraph
With the parameterized hardness of approximating MCSI ready, we can now prove our hardness results for SCSS and bi-DSN, starting with the former.
Our proof of the parameterized inapproximability of SCSS is based on a reduction from Maximum Colored Subgraph Isomorphism whose properties are described below.
Proof. Assume without loss of generality that there is no edge in G between two vertices in the same set of the partition V 1 , . . . , V . We use the reduction of Guo et al. [40] with only a slight modification in that we use different edge weights. Our graph remains unchanged from the Guo et al. [40] reduction; here we copy the graph definition verbatim from [40]. We refer the reader to [40, Figure 3.1] for an illustration of the reduction. The vertex set V of G is B ∪ C ∪ C ∪ D ∪ D ∪ F where B, C, C , D, D , F are defined as follows: As for the weights, we give weight 2γ 1/5 / to β v for every v ∈ V G , and weight 1/ 2 to u,v and v,u for every u − v ∈ E G ; the rest of the edges have weight zero. As noted earlier, this is different from the weights assigned by Guo et al. [40]; they simply assigned the same weight to every edge. Finally, the terminals are B ∪ F . Observe that the number of terminals is + 2 2 = 2 , which means that the number of demands |D | is 2 , as for SCSS the number of terminals is the same as the number of demands. We next move on to prove the completeness and soundness properties of the reduction.
(Completeness) The solution in the completeness case is exactly the same as the solution selected in [40]; we will repeat their argument here.
To see that N satisfies all the demands, observe that it suffices to show that, for every 1 ≤ i = j ≤ , f i,j is reachable from b i and b i is reachable from f j,i . The former holds due to the path consisting of (Soundness) Our soundness proof will require a more subtle analysis than that of Guo et al. [40]. Again, we will prove by contrapositive. Suppose that there exists a network N of cost ρ ≤ 2(2 − 2γ 1/5 ) that satisfies all the demand pairs. For each i ∈ [ ], let S i ⊆ V G denote the set of all vertices v ∈ V i such that β v i is included in N . Moreover, let S = S 1 ∪ · · · ∪ S . Observe that, since each edge in B has weight 2γ 1/5 / , we have For every 1 ≤ i = j ≤ , let H i,j denote all u,v ∈ N such that u ∈ V i and v ∈ V j . First, we claim that, for every 1 ≤ i = j ≤ , H i,j = ∅. To see that this holds, consider the set The only edges from outside T i,j coming into this set are those in H i,j . Since the demands require that f i,j is reachable from b i and b i / ∈ T i,j , we can conclude that at least one edge in H i,j must be selected.
We can now easily prove Theorem 9 by combining Lemma 57 and Corollary 54.
Proof of Theorem 9. We again prove by contrapositive. Suppose that, for some constant ε > 0 and for some function f (k) independent of n, there exists an f (k)·n O(1) -time (2−ε)-approximation algorithm for SCSS. Let us call this algorithm A.
It is easy to see that there exists a sufficiently small γ * = γ * (ε) such that 2−2γ * 1/5 1+γ * 1/5 ≥ (2 − ε). We create an algorithm B that can distinguish between the two cases of Corollary 54 with h( ) = log(1/γ * )/ log . Our new algorithm B works as follows. Given an instance (G, H, V 1 ∪ · · · ∪ V ) of MCSI where H is a complete graph, B uses the reduction from Lemma 57 to create a SCSS instance on the graph G with k = 2 terminals. B then runs A on this instance; if A returns a solution N of cost at most 2(2 − 2γ * 1/5 ), then B returns YES. Otherwise, B returns NO.
To see that algorithm B can indeed distinguish between the YES and NO cases, first observe that, in the YES case, Lemma 57 guarantees that the optimal solution has cost at most 2(1 + γ * 1/5 ). Since A is a (2 − ε)-approximation algorithm, it returns a solution of cost at most 2(1 + γ * 1/5 ) · (2 − ε) ≤ 2(2 − 2γ * 1/5 ) where the inequality comes from our choice of γ * ; this means that B outputs YES. On the other hand, if (G, H, V 1 ∪ · · · ∪ V ) is a NO instance, then the soundness property of Lemma 57 guarantees that the optimal solution in G has cost more than 2(2 − 2γ * 1/5 ), which implies that B outputs NO.

Directed Steiner Network on Bidirected Graphs
We will next prove our inapproximability result for bi-DSN. For this result, we will need a slightly more specific hardness of approximation for Maximum Colored Subgraph Isomorphism where every supernode has bounded degree. This bounded degree version of MCSI is defined below.

t-Bounded Degree Maximum Colored Subgraph Isomorphism (MCSI(t))
Input : An instance Γ of MCSI(t) consists of three components: • An undirected graph G = (V G , E G ), • A partition of vertex set V G into disjoint subsets V 1 , . . . , V , • An undirected graph H = (V H = {1, . . . , }, E H ) such that each vertex of H has degree at most t. Goal : Find an assignment φ : Lokshtanov et al. [58] gave the following reduction from (unbounded degree) MCSI to the bounded degree version of the problem. We remark here that their reduction uses standard technique of sparsification via expanders, and similar reductions have been presented before in literature (see e.g. [22]).
Combined this with the parameterized inapproximability of Corollary 54, we can immediately conclude that the bounded degree version of MCSI is also hard to approximate, even for parameterized algorithms: Corollary 60. Assuming randomized Gap-ETH, for some ε > 0, there is no f ( ) · n O(1) -time algorithm that, given a MCSI(4) instance Γ = (G, H, V 1 ∪ · · · ∪ V ) of size n, can distinguish between the following two cases: • (YES) val(Γ) = 1.
We are now ready to state the main lemma of this subsection, which provides a reduction from bounded degree MCSI to bi-DSN: Before we proceed to prove the above lemma, let us note that Theorem 5 follows immediately from Corollary 60 and Lemma 61.
Proof of Lemma 61. The construction here is exactly the same as that in Section 7.3 with only one exception: each gadget will now be a copy of the uniqueness gadget from Section 7.1 with M = 5 (instead of M = k 4 used before). Again, it is clear that the number of demand pairs is O(k + ) = O( ) where k is the number of superedges, i.e., k = |E H |.
Let B = 7M = 35 and B * = 4 + (2k + 2 ) · B + (2k + 2 ) · B + (2k + ) · (B + 4). It is not hard to see that, in the completeness case, the solution used in Section 7.3 still works, and that it has cost exactly B * as desired. Hence, we are only left to show the soundness of the reduction.
(Soundness) Again, we will prove our soundness by contrapositive. Suppose that there exists a network N of cost ρ < (1 + β)B * where β = ε 10592d that satisfies all the demand pairs. We will also assume without loss of generality that the network N is a minimal solution, i.e., that if we remove any edge from N , then at least one demand pair must be unsatisfied.
Since our underlying graph and the demand pairs are exactly the same as those from Section 7.3, the restriction of N into each gadget must again satisfy the "in-out" property (similar to Lemma 42, Lemma 43 and Lemma 44) as stated below: Lemma 62. For any j ∈ [ ], i ∈ N H (j) the edges of N which have both end-points in the vertical secondary gadget V S i,j satisfies the "in-out" property. Hence, V S i,j uses up weight of at least B from the budget. We say that a gadget is tight if N restricted to the gadget has cost exactly B. Recall that the first step of the proof of the NO case in Theorem 7 was to observe that every gadget must be tight; this was true because the value M over there was set so large that even an excess of B was already more than the total cost of all red edges. However, this is not true in our modified construction anymore as we choose M = 5. Fortunately for us, we will still be able to show that all but a small fraction of the gadgets are tight.
To prove such a bound, first recall that the proof in Theorem 7 uses the fact that, if a main gadget and all its four surrounding secondary gadgets are tight, then the solution must contain at least four red edges with one-end point in the main gadget. This was stated in Lemma 46. It is not hard to see that the proof of Lemma 46 in fact yields a slightly stronger result that, for each of the four secondary gadgets, there must be at least one red edge with an end-point in that gadget and the other end-point in the main gadget. This is formalized below.
Lemma 65. For each 1 ≤ i, j ≤ such that i − j ∈ E * H , the main gadget M i,j has four secondary gadgets surrounding it: HS i,j below it, HS i,next j (i) above it, V S i,j to the left and V S next i (j),j to the right. If M i,j and all its four surrounding gadgets are tight, then the solution N must contain at least one red edge of each of the following types: Recall also the following observation, which is a restatement of Lemma 47 from Section 7.3. We are now ready to prove a bound on the number of non-tight gadgets. The key idea here is that, while having a non-tight gadget may help "save" the number of required red edges from Lemma 65, this saving is still smaller than the excess cost of M . Hence, if there are too many non-tight gadgets, then the cost of N must be much more than the minimum possible cost of B * , which would contradict to our assumption that the cost of N is at most (1 + β)B * .
In addition to the bound on the number of non-tight gadgets, we will be able to give an upper bound on the number of main gadgets with at least five red edges touching them; again, this is just because these edges adds to the minimum possible cost B * .
Claim 67. There are at most β · B * non-tight gadgets. Moreover, there are at most β · B * main gadgets M i,j 's such that there are at least five red edges with at least one endpoint in M i,j .
Proof. Let X be the number of non-tight gadgets and Y be the number of main gadget M i,j such that there are at least five red edges with at least one endpoint in M i,j .
We can lower bound the cost of the solution N as follows.
• From Lemma 65, at least 4 dotted edges must be selected.
• Since there is a total of 6k + 5 gadgets (including both main and secondary gadgets), at least (6k + 5 − X) of these gadgets are tight. These tight gadgets use up weight of (6k + 5 − X)B from the budget. Further, Lemma 31, together with Lemma 62, Lemma 63 and Lemma 64, implies that each of the X non-tight gadgets uses up weight at least 8M . Hence, in total, the weight of edges of N whose both endpoints are from the same gadget is at least (6k + 5 )B + XM .
• Let us divide the main gadgets M i,j into three groups based on the number of red edges touching them: (1) there are at most three such edges, (2) there are at least five such edges and (3) there are exactly four such edges. From Lemma 65, each gadget of type (1) must either be non-tight or be adjacent to at least one non-tight secondary gadgets. Since there are only X non-tight gadgets and each secondary gadget is adjacent to at most two main gadgets, the number of main gadgets of type (1) is at most X + 2X = 3X. Recall also that we assume that the number of main gadgets of type (2) is Y . As a result, the number of red edges is at least 5Y + 4(2k + − 3X − Y ) = Y − 12X + 4(2k + ). We can conclude that in total the cost of N must be at least 4 + (6k + 5 )B + XM + Y − 12X + 4(2k + ) = B * + Y + X.
Since we assume that the total cost of N is at most (1 + β)B * , we have X, Y ≤ β · B * as desired.
We will next use the above bound to help us find a solution φ : V H → V G to the MCSI(d) instance Γ. Unlike in the proof of Theorem 7 where the network N canonically gives φ(i) for every i ∈ [ ], this will only be true for "good" i which is defined below.
Definition 68. A main gadget M i,j is good if the gadget itself and all its surrounding secondary gadgets (HS i,j , HS i,next j (i) , V S i,j and V S next i (j),j ) are tight and there are exactly four red edges with one endpoint in M i,j . We call a main gadget M i,j bad if it is not good.
Furthermore, i ∈ [ ] is said to be good if M i,j and M j,i are good for every i − j ∈ E * H . Similarly, we say that i ∈ [ ] is bad if it is not good.
We will also use the following notion regarding representation of each gadget. Note that, while in Section 7.3 every gadget is tight and hence the notation applies for all gadgets, this notation is only well-defined for tight gadgets in our proof.

Definition 69.
• For each j ∈ [ ], i ∈ N H (j), if the vertical secondary gadget V S i,j is tight, V S i,j is represented by some y i,j ∈ V j , • For each i ∈ [ ], j ∈ N H (i), if the horizontal secondary gadget HS i,j is tight, HS i,j represented by some x i,j ∈ V i , • For each i − j ∈ E * H , if the main gadget M i,j is tight, M i,j is represented by some (λ i,j , δ i,j ) ∈ E i,j .
We can now define the assignment φ : V H → V G as follows. For each good i ∈ [ ], let φ(i) = λ i,i ; for the remaining i ∈ [ ], assign φ(i) arbitrarily from V i . The remaining argument consists of two parts. First, we will show that φ covers every superedge i − j ∈ E H such that both i, j are good. Then, we will argue that only a small fraction of i ∈ [ ] is bad. Combining these two parts completes our proof.
To show that φ satisfies all superedges whose endpoints are both good, we first argue, similar to Lemma 49, that good gadgets allow us to propagate equality of representations, as stated formally below.
Claim 70. For every good main gadget M i,j , we have x i,j = λ i,j = x i,next j (i) and y i,j = δ i,j = y next j (i),j .
Proof. Due to symmetry, it suffices to only argue that x i,j = λ i,j . Let us assume for the sake of contradiction that x i,j = λ i,j . We will argue that there is a vertex such that (1) there is exactly one edge adjacent to it from the network N and (2) it does not belong to any demand pair. Observe that removing its only adjacent edge from N does not effect the validity of the solution. This contradicts with our assumption that N is minimal.
From Lemma 65 and from our assumption that there are exactly four red edges with one endpoint in M i,j , there must be exactly one red edge from each of the following types: For the second part, let us first argue an upper bound on the number of bad main gadgets. Observe that each bad main gadget M i,j must satisfy at least one of the three following conditions: (1) M i,j is not tight, (2) one of its surrounding gadget is not tight, or (3) there are at least five red edges with one endpoint in M i,j . Claim 67 implies that there are at most β · B * , 2β · B * and β · B * main gadgets that satisfy (1), (2) and (3) respectively. Hence, in total, there are at most 4β · B * bad main gadgets. Since, for each bad i ∈ [ ], there must be j ∈ N H (i) such that M i,j or M j,i is a bad gadget, there can be at most 8β · B * bad i ∈ [ ].
Due to our bounded degree assumption on H, there can be at most 8dβ · B * superedges i − j ∈ E H such that at least one of i, j is bad. As a result, φ satisfies all but 8βd · B * superedges. As a result, we have val(Γ) ≥ 1 − 8βd · B * k = 1 − 8βd · (463 + 398k) k ≥ 1 − 8βd(926 + 398) where the second inequality comes from the fact that we can assume without loss of generality that the supergraph H does not contain any isolated vertex. This concludes our proof.

A Reduction from MCSI to DSN
In the previous version of this manuscript, we provide a k o(1) factor inapproximability result for DSN. At the heart of the proof for DSN is the following lemma which provides a gap-preserving FPT reduction from Maximum Colored Subgraph Isomorphism to DSN. Lemma 72. There exists a polynomial time reduction that, given an instance Γ = (G, H, V 1 ∪ · · · ∪ V ) of MCSI where the supergraph H is a complete graph, produces an instance of DSN of a graph G and k demand pairs, such that • (Completeness) If val(Γ) = 1, there is a network N ⊆ G of cost 1 that satisfies all demands.
It is simple to see that k o(1) factor hardness of approximation of DSN follows immediately from Lemma 72 and Corollary 54. In [24], 1−o(1) factor inapproximability result for Maximum Colored Subgraph Isomorphism is proved, which is an improvement over o(1) factor hardness in Corollary 54. The authors of [24] then use this improved hardness together with our reduction in Lemma 72 to arrive at their k 1/4−o(1) factor hardness for DSN. Since Lemma 72 is used even in [24], we decide to keep its proof in our paper.
Proof of Lemma 72. The reduction is similar to that of Dodis and Khanna [25]. In particular, given Γ = (G, H, V 1 ∪ · · · ∪ V ) where H is the complete graph, the DSN instance is generated as follows.
•  1), (v, 2)), ((v, 1), (u, 2)) | u − v ∈ E G }. • The edges of the first two types have weight 1/(2 ), whereas the edges of the last type have weight zero. • Finally, the demands are simply (s i , t j ) for every i, j ∈ [ ] such that i = j. Clearly, the number of demand pairs k is 2 − as desired. We now move on to show the completeness and soundness properties of the reduction.
(Soundness) We will prove this by contrapositive. Suppose that there exists a network N ⊆ G of cost ρ ≤ 1/ √ 4γ. For each i ∈ [ ], let S i ⊆ V G denote the set of all vertices v such that at least one of (s i , (v, 1)) or ((v, 2), t i ) is included in N . Observe that, from how our graph G is constructed, for every i = j ∈ [k], the (s i , t j ) demand implies that there exist u ∈ S i and v ∈ S j such that u − v ∈ E G . Observe also that, since N has cost ρ, |S| ≤ 2 · ρ ≤ / √ γ.
Let φ : V H → V G be a random assignment where each φ(i) is chosen independently uniformly at random from S i . For every i = j ∈ [ ], since there exist u ∈ S i and v ∈ S j such that u − v ∈ E G , the probability that the superedge i − j ∈ E H is covered is at least the probability that φ(i) = u and φ(j) = v, which is equal to 1 |S i ||S j | . As a result, the expected number of superedges covered by φ is at least where the first inequality comes from Hölder's inequality and the second comes from |S| ≤ / √ γ.
Hence, there exists an assignment of Γ with value at least γ, which implies that val(Γ) ≥ γ.

Open Questions
While our work has advanced our understanding of the computational complexity of SCSS and DSN, there are still several interesting open questions left. We list some of them below: • Can we get better approximation algorithms for bi-DSN (without any restriction on the optimum) than simply getting twice the best ratio known for the undirected SF problem? Note that this is an interesting question for both parameterized setting and non-parameterized setting. • Are there parameterized approximation schemes for DSN Planar ? We only ruled out such algorithms for bi-DSN, but for the other generalization of bi-DSN Planar they might still exist. We conjecture however that DSN Planar does not allow parameterized approximation schemes. • Close the gap between upper and lower bounds for the FPT algorithm for bi-SCSS. We gave a double exponential FPT algorithm and a lower bound stating that a sub-exponential algorithm is not possible. Can we obtain a single-exponential FPT algorithm for bi-SCSS? A good starting point may be to consider just the case where the input graph is planar. • What is the status of bi-DSN on planar input graphs parameterized by k: FPT or W[1]hard? Note here that our hardness reduction in Theorem 3 produces graphs that are not planar even though their optima are.