Abstract 1 Introduction 2 Preliminaries 3 NP-hardness 4 FPT algorithm by distance to clique 5 Vertex cover number 6 Parameterized by Number of Edges or Arcs 7 Kernelization 8 FPT by Treewidth plus Number of Terminals 9 Conclusion References

Structural Parameters for Steiner Orientation

Tesshu Hanaka ORCID Kyushu University, Fukuoka, Japan Michael Lampis ORCID Université Paris-Dauphine, PSL University, CNRS UMR7243, LAMSADE, Paris, France Nikolaos Melissinos ORCID Computer Science Institute, Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic Edouard Nemery ORCID Université Paris-Dauphine, PSL University, CNRS UMR7243, LAMSADE, Paris, France Hirotaka Ono ORCID Nagoya University, Japan Manolis Vasilakis ORCID Université Paris-Dauphine, PSL University, CNRS UMR7243, LAMSADE, Paris, France
Abstract

We consider the Steiner Orientation problem, where we are given as input a mixed graph G=(V,E,A) and a set of k demand pairs (si,ti), i[k]. The goal is to orient the undirected edges of G in a way that the resulting directed graph has a directed path from si to ti for all i[k]. We adopt the point of view of structural parameterized complexity and investigate the complexity of Steiner Orientation for standard measures, such as treewidth. Our results indicate that Steiner Orientation is a surprisingly hard problem from this point of view. In particular, our main contributions are the following:

  1. 1.

    We show that Steiner Orientation is NP-complete on instances where the underlying graph has feedback vertex number 2, treewidth 2, pathwidth 3, and vertex integrity 6.

  2. 2.

    We present an XP algorithm parameterized by vertex cover number vc of complexity n𝒪(vc2). Furthermore, we show that this running time is essentially optimal by proving that a running time of no(vc2) would refute the ETH.

  3. 3.

    We consider parameterizations by the number of undirected or directed edges (|E| or |A|) and we observe that the trivial 2|E|n𝒪(1)-time algorithm for the former parameter is optimal under the SETH. Complementing this, we show that the problem admits a 2𝒪(|A|)n𝒪(1)-time algorithm.

In addition to the above, we consider the complexity of Steiner Orientation parameterized by tw+k (FPT), distance to clique (FPT), and vc+k (FPT with a polynomial kernel).

Keywords and phrases:
ETH, Steiner Orientation, Treewidth
Funding:
Tesshu Hanaka: Partially supported by JSPS KAKENHI Grant Numbers JP21K17707, JP22H00513, JP23H04388, JP25K03077, and JST, CRONOS, Japan Grant Number JPMJCS24K2.
Michael Lampis: Partially supported by ANR project ANR-21-CE48-0022 (S-EX-AP-PE-AL).
Nikolaos Melissinos: Partially supported by Charles University projects UNCE 24/SCI/008 and PRIMUS 24/SCI/012, and by the project 25-17221S of GAČR.
Hirotaka Ono: Partially supported by JSPS KAKENHI Grant Numbers JP20H05967, JP22H00513, JP24K02898, JP25K03077, and JST, CRONOS, Japan Grant Number JPMJCS24K2.
Manolis Vasilakis: Partially supported by ANR project ANR-21-CE48-0022 (S-EX-AP-PE-AL).
Copyright and License:
[Uncaptioned image] © Tesshu Hanaka, Michael Lampis, Nikolaos Melissinos, Edouard Nemery, Hirotaka Ono, and
Manolis Vasilakis; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithms
Related Version:
Full Version: https://arxiv.org/abs/2507.21445
Editors:
Ho-Lin Chen, Wing-Kai Hon, and Meng-Tsung Tsai

1 Introduction

The Steiner Orientation problem is an NP-hard graph optimization problem, which involves assigning directions to the undirected edges of a mixed graph – a graph containing both directed and undirected edges – to satisfy specific connectivity requirements, given by pairs of terminals. The objective is to orient the undirected edges in such a way that there exists a directed path between each given terminal pair. Formally, the problem is defined as follows.

The Steiner Orientation problem has been well-studied in bioinformatics, motivated by modeling protein–protein or protein–DNA interactions [16, 19, 9, 18]. Another motivation naturally arises from designing transportation networks. For example, in an urban transportation network with a mix of one-way streets (directed arcs) and two-way streets (undirected edges), one can consider the traffic control problem of deciding the direction of some streets to ensure routes from specific origins to destinations. This scenario is naturally modeled as the Steiner Orientation problem.

Regarding its complexity, Arkin and Hassin show that Steiner Orientation is NP-complete in general, but polynomially solvable if k=2 [1]. From the perspective of parameterized complexity, Cygan et al. [7] proposed an n𝒪(k)-time algorithm for the number of terminal pairs k as a parameter, which shows that the problem belongs to the class XP. However, subsequent research has revealed the problem’s intractability for this parameterization; Steiner Orientation is shown to be W[1]-hard when parameterized by k and cannot be solved in time f(k)no(k/logk) under ETH [17]. This lower bound was later improved to a f(k)no(k) ETH-based lower bound even on planar graphs [4]. Surprisingly, Włodarczyk recently proved that the problem is not just W[1]-hard, but W[1]-complete [20]. This series of studies has almost completely characterized the complexity with respect to the parameter k. Despite this literature, to the best of our knowledge, the parameterized complexity of Steiner Orientation is only studied for the number k of terminal pairs. The complexity with respect to graph parameters such as treewidth or vertex cover number has been almost entirely unstudied. This paper aims to provide the first systematic study in this direction.

1.1 Our Contribution

In this paper, we first show the para-NP-completeness of Steiner Orientation for the parameters pathwidth, feedback vertex number, and vertex integrity.111In this paper, graph parameters refer to those of the underlying graph of G, that is, the graph obtained by replacing all arcs with undirected edges. We assume that the reader is familiar with standard parameters, but recall some of the relevant definitions and relations further below. Specifically, the problem is NP-complete on series-parallel graphs (i.e., graphs of treewidth at most 2) of vertex-deletion distance 2 to a forest of stars of size at most 4. By slightly modifying our reduction, we further obtain NP-hardness for grid graphs (which are planar and have maximum degree 4) with bounded pathwidth. Notice that, in a sense, these results clearly delineate the frontier of polynomial-time versus NP-complete cases for most standard graph parameters: On the one hand, when we place no bound on the degree, Steiner Orientation is already NP-hard on graphs which are 2 vertices away from an extremely restricted class. On the other hand, for bounded-degree graphs no such result can be obtained, as any graph that has bounded tree-depth and bounded degree actually has bounded size, so the hardness for bounded pathwidth graphs is essentially best possible.

The results above motivate us to consider more restrictive parameters. In this direction, we present an XP algorithm parameterized by vertex cover number, vc, that runs in time n𝒪(vc2). Even though this improves the situation compared to the paraNP-completeness for treewidth, this complexity is rather disappointing, raising the natural question whether the square in the exponent is necessary. Our main contribution for this parameter is to answer this question by proving that an no(vc2) time algorithm would refute the ETH. Along the way, we also show that Steiner Orientation is fixed-parameter tractable when parameterized by distance to a clique, which can be seen as the dense analogue of vertex cover (a vertex cover of a graph is a clique modulator of its complement).

Moving in another direction, we consider the number of undirected or directed edges as parameters. Here, we show that Steiner Orientation is fixed-parameter tractable (FPT) when parameterized by the number |A| of directed edges. We observe that if |A|=0, the problem is solvable in polynomial time as a consequence of Robbins’ theorem [14]. Thus, our result generalizes this classical polynomial-time case. Here, it is natural to consider the number |E| of undirected edges. Since we have only two directions for each undirected edge, Steiner Orientation is clearly solvable in 2|E|n𝒪(1) time. Indeed, this running time is essentially tight, as a careful observation of the standard NP-hardness reduction for Steiner Orientation [1] yields a (2ε)|E|n𝒪(1) lower bound under the SETH.

Finally, we investigate the parameterized complexity with respect to the combined parameters k+tw and k+vc. We show that Steiner Orientation is FPT when parameterized by k+tw by formulating it as an MSO2 problem, which stands in contrast to the NP-hardness on series-parallel graphs. Furthermore, we give a polynomial kernel when parameterized by k+vc.

Overview of Techniques.

Our NP-completeness proof for Steiner Orientation on graphs of treewidth 2 is based on a direct reduction from a variant of 3-SAT, where we naturally use undirected edges to represent variables of the initial formula, with directions representing truth assignments (this is standard). The key new insight is the following: we can transmit information between copies of such edges, ensuring they must be oriented in a consistent way, by adding demand pairs which must be routed through two main hub vertices. By using appropriately oriented arcs to connect our gadgets to the two hubs we ensure that gadgets don’t interfere with each other. In a sense, the take-home message of this construction is that the structure of G alone is not enough to measure the complexity of an instance, because the way that demand pairs interact with the graph can significantly complicate the structure of the instance.

The XP algorithm parameterized by vertex cover is based on a simple branching procedure: for each pair u,v of vertices of the vertex cover, guess if there is a directed path of length at most 2 from u to v in the solution and, if yes, which is (potentially) the vertex w in the middle of the path. This clearly leads to at most n𝒪(vc2) guesses, and once we have fixed these decisions it is not hard to complete the solution because we can infer exactly which vertices of the cover have directed paths to each other.

Given the simplicity of the algorithm sketched above for vertex cover, it is somewhat surprising that this is essentially optimal (under the ETH). We establish this by giving a reduction from k-Clique producing a Steiner Orientation instance with vertex cover 𝒪(k). The key intuition is again that we can use a small number (𝒪(k)) of hubs, through which information will be routed. In particular, we set up a complete bipartite graph Kk,k and for each edge of this graph we set up a gadget encoding a selection in the original instance: the number of edges of this graph is sufficient to encode all selections, but the vertex cover of the construction is determined by the number of vertices of the complete bipartite graph.

To obtain an algorithm for parameter |A| we face significantly more obstacles than for parameter |E| (which is trivially FPT). Our approach relies on exhaustive applications of some (standard) reduction rules for this problem, which eliminate all cycles and degree 1 vertices. We then focus on a restricted special case of Steiner Orientation, where all undirected components are paths, all internal vertices of the paths are incident on no arcs, and the endpoints of each path are incident on at most one arc. We solve this restricted case using a reduction to 2-SAT. We then show, using arguments which essentially take into account that A is a feedback edge set of the underlying graph, that a simple branching algorithm can reduce any instance into 2𝒪(|A|) instances of the (polynomial-time solvable) restricted case.

The FPT algorithm for distance to clique relies again on exhaustively applying reduction rules that eliminate cycles and then making some simple structural observations: there are few edges incident on the modulator vertices (so we can guess their orientation); and the edges contained in the clique must have a very simple structure (they form a matching). The FPT algorithm for tw+k relies on a formulation of the problem in MSO2 logic and Courcelle’s theorem – we leave it as an interesting open problem to determine the best dependence for this parameterization. Finally, for the more restrictive parameter vc+k we obtain a polynomial kernel via a maximum matching argument. In particular, we show that by calculating a maximum matching between pairs of vertices of the vertex cover and non-terminals in the indpendent set, we can identify a set of 𝒪(vc2) vertices of the independent set which are sufficient to obtain a solution and delete the rest, giving a kernel of order 𝒪(vc2+k).

1.2 Related work

The Steiner Orientation problem has been studied extensively. From a bioinformatics perspective, an optimization version of Steiner Orientation is widely studied [16, 19, 9, 18]. In this optimization version, called Maximum Steiner Orientation, the goal is to find an orientation that maximizes the number of satisfied terminals pairs.

Unfortunately, Maximum Steiner Orientation is significantly more difficult than Steiner Orientation. Medvedovsky et al. [16] show that the problem is inapproximable within a factor of 12/13 even on undirected stars and binary trees. Elberfeld et al. then observe that the NP-hardness reduction for Steiner Orientation in [1] implies the inapproximability within a factor of 7/8 [10]. More recently, Hörsch [15] considered the maximization version of Steiner Orientation but under the restriction that the set of demand pairs includes all possible demands and showed that this case is also APX-hard. Interestingly, for this version of the problem Hörsch supplies an XP algorithm for parameter |A| and leaves it as an open question whether an FPT algorithm can be obtained. In this paper we provide an FPT algorithm for Steiner Orientation parameterized by |A|, but this is somewhat orthogonal to Hörsch’s question, as we are not dealing with the maximization version (which makes our problem easier) but we are also not assuming that all pairs of vertices have a demand (which makes our problem harder).

For the approximability, an 𝒪(logn)-approximation is presented for undirected graphs [16]. This has been improved to a factor 𝒪(logn/loglogn) [11], and later to 𝒪(logk/loglogk) [7]. For bounded feedback vertex number graphs and bounded treewidth graphs, an 𝒪(logn)-approximation algorithm and an 𝒪(log2n)-approximation algorithm are presented [10].

From the viewpoint of parameterized complexity, Dorn et al. [9] and Roayaei [18] propose several FPT algorithms for parameters related to terminal pairs.

Regarding the parameterized approximation, Chitnis, Feldmann, and Suchý [4] show that there is no constant ϵ>0 such that Maximum Steiner Orientation on planar graphs admits an (19/20ϵ)-approximation222Note that in [4] the approximation ratio is defined as the value of the approximate solution divided by the value of the optimal solution, which results in ratios smaller than 1. In most other works, the ratio is instead defined as the optimal solution divided by the approximate solution, which gives values larger than 1. in time f(k)no(1). Włodarczyk [20] shows that there is no (logk)o(1)-approximation algorithm for Maximum Steiner Orientation that runs in FPT time with respect to k assuming FPT W[1].

2 Preliminaries

We use the standard notations in graph theory. Let G=(V,E,A) be a mixed graph where V is a set of vertices, E is a set of undirected edges, and A is a set of directed edges. We denote by {u,v}E an undirected edge between u and v and by (u,v)A a directed edge from u to v.

A mixed graph G is a mixed acyclic graph if it has no cycle. Notice that in the context of mixed graphs a cycle is any sequence of vertices v1,v2,,vp with v1=vp such that between any two consecutive vertices vi,vi+1 the graph contains either the edge {vi,vi+1} or the arc (vi,vi+1). By definition, the subgraph induced by undirected edges in a mixed acyclic graph is a forest. Moreover, the graph obtained from a mixed acyclic graph G by contracting all the undirected edges is a directed acyclic graph. For a vertex subset VV, we denote by G[V]=(V,E(V),A(V)) the subgraph induced by V, where E(V)E and A(V)A. A mixed path of a mixed graph is a path using both edges and arcs respecting the orientation of the arcs. For a mixed graph G=(V,E,A), λ(E) denotes an orientation of E and Gλ denotes the directed graph obtained by the orientation λ(E).

Graph parameters.

Throughout the paper we will use several structural graph parameters which will in general refer to the underlying graph of a given mixed graph G. Recall that the underlying graph is the graph obtained by replacing each arc by an edge with the same endpoints. The parameters we will mention are treewidth (tw), pathwidth (pw), vertex integrity (vi), feedback vertex set (fvs), vertex cover (vc), and distance to clique (dtc). For the definitions of treewidth and pathwidth we refer the reader to [6]; fvs, vc, and dtc denote the size of the smallest set of vertices whose removal leaves the graph a forest, an independent set, or a clique respectively; while a graph has vertex integrity at most k if there exists a set of vertices S whose removal results in a graph where all components have size at most k|S|. It is known that four of these parameters form a hierarchy, in the sense that twpwvivc+1 for all graphs. We note that all these parameters are closed under vertex deletion and edge contraction, meaning that these operations can only decrease the parameter value of a graph.

2.1 Preprocessing

We present two basic polynomial-time reduction rules for Steiner Orientation, which eliminate cycles and degree-1-vertices respectively. Applying these rules will never increase the values of our parameters, as the rules use edge contractions and vertex deletions, so in the rest of the paper we will mostly focus on instances where these rules have been exhaustively applied.

Proposition 1 ([19]).

Let (G,𝒯) be an instance of Steiner Orientation. Let G be a mixed graph obtained from G by contracting all the cycles and 𝒯 be the corresponding set of terminal pairs. Then (G,𝒯) is a yes-instance if and only if (G,𝒯) is a yes-instance. Moreover, G is a mixed acyclic graph and can be computed in polynomial time.

Proposition 2.

Let (G,𝒯) be an instance of Steiner Orientation. If G has a vertex vV of degree 1 in the underlying graph, then we can either correctly conclude that (G,𝒯) is a no-instance or construct a new instance (G,𝒯) such that G=G[V{v}] and (G,𝒯) is a yes-instance if and only if (G,𝒯) is a yes-instance.

3 NP-hardness

Our main result in this section is to show that Steiner Orientation remains NP-hard even on very restricted families of graphs. We focus on restrictions on the structure of the underlying undirected graph and show that even if the underlying graph is series-parallel and has vertex-deletion distance 2 to a forest of stars of size at most 4 the problem is still NP-complete. Note that all series-parallel graphs have treewidth at most 2 [2, Theorem 41] and are planar [3, Chapter 11.2], while the graph constructed by our reduction has feedback vertex number 2, pathwidth 3, and vertex integrity 6. Since Steiner Orientation is polynomial-time solvable when the underlying graph of the input is a tree (as there exists a unique path between every pair of terminals), our result establishes a sharp dichotomy on the polynomial-time solvability of Steiner Orientation with respect to the treewidth of the input graph. Moreover, by slightly modifying our reduction we further obtain NP-hardness for grid graphs of bounded pathwidth.

Theorem 3.

Steiner Orientation is NP-complete on series-parallel graphs of vertex-deletion distance 2 to a forest of stars of size at most 4.

Proof.

It is easy to see that Steiner Orientation belongs to NP, thus in the rest of the proof we argue about its NP-hardness. The starting point of our reduction is the Monotone 3-SAT problem, which is the variation of 3-SAT where every clause contains at most 3 literals and is monotone, that is, it contains only unnegated or only negated variables. This variation is well-known to be NP-hard [8, 12].

Let ϕ be an instance of Monotone 3-SAT, where X={x1,,xn} denotes its variables and C={c1,,cm} its clauses. We say that a clause is positive if it consists of only unnegated variables, and negative if it consists of only negated variables.

We will construct an instance (G,𝒯) of Steiner Orientation that is equivalent to ϕ. For each variable xi, introduce vertices i,ri that are connected via an undirected edge. We further introduce vertices and r, as well as the arcs i and rir, for all i[n]. Now let cj be a positive clause containing 3 variables, that is, cj=xi1xi2xi3 for distinct i1,i2,i3[n]. We construct the corresponding clause gadget as depicted in Figure 1. In particular, we introduce vertices vi1j,vi2j,vi3j, all of which have an incoming arc from , as well as a vertex tj that is connected via undirected edges with vi1j,vi2j,vi3j and has an incoming arc from r. We further introduce the terminal pairs (,tj),(ri1,vi1j),(ri2,vi2j),(ri3,vi3j) into 𝒯. We treat positive clauses that contain 2 variables in an analogous way, while the construction for the negative clauses is entirely symmetric.

(a) Positive clause cj=xi1xi2xi3.
(b) Negative clause cj=¬xi1¬xi2¬xi3.
Figure 1: The terminal pairs added during the construction of the clause gadget are denoted by dashed arcs, apart from (,tj) and (r,tj) respectively for the sake of clarity.

This completes the construction of the instance (G,𝒯) of Steiner Orientation. It is easy to see that G is series-parallel, while G{,r} is a forest whose connected components are either a K2, a K1,2, or a K1,3, thus indeed it holds that fvs(G)=2, pw(G)=3, and vi(G)=6. It remains to argue that the instance is equivalent to ϕ.

For the forward direction, let α:X{𝗍𝗋𝗎𝖾,𝖿𝖺𝗅𝗌𝖾} be a satisfying assignment for ϕ. Consider the following orientation for the undirected edges of G. If α(xi)=𝗍𝗋𝗎𝖾 then we orient the edge {i,ri} as rii, otherwise if α(xi)=𝖿𝖺𝗅𝗌𝖾 then we orient it as iri. As for the clauses cj that contain xi and the edge {vij,tj}, if cj is a positive clause (resp. negative) then if α(xi)=𝗍𝗋𝗎𝖾 we orient it as vijtj (resp. tjvij), otherwise if α(xi)=𝖿𝖺𝗅𝗌𝖾 we orient it as tjvij (resp. vijtj). It suffices to argue that this orientation satisfies all terminal pairs in 𝒯.

Let cj=xi1xi2xi3 be a positive clause involving three variables. We will argue that the described orientation satisfies all terminal pairs introduced due to the clause gadget of cj. Since α is a satisfying assignment for ϕ, it holds that there exists i{i1,i2,i3} such that α(xi)=𝗍𝗋𝗎𝖾. Consequently, the arc vijtj exists in our orientation, thus the terminal pair (,tj) is satisfied by the directed path vijtj. As for the terminal pair (ri,vij), where i{i1,i2,i3}, notice that if α(xi)=𝗍𝗋𝗎𝖾 then it is satisfied by the directed path riivij, while if α(xi)=𝖿𝖺𝗅𝗌𝖾 then it is satisfied by the directed path rirtjvij. The argumentation is similar for positive clauses involving two variables, and symmetric for negative clauses.

For the converse direction, assume there exists an orientation of G such that all terminal pairs in 𝒯 are satisfied. Consider the assignment α:X{𝗍𝗋𝗎𝖾,𝖿𝖺𝗅𝗌𝖾} where α(xi)=𝗍𝗋𝗎𝖾 if and only if the edge {i,ri} has been oriented as rii. We will prove by contradiction that this is a satisfying assignment for ϕ. Let cj=xi1xi2xi3 be a positive clause involving three variables, and assume that α(xi)=𝖿𝖺𝗅𝗌𝖾 for all i{i1,i2,i3}. In that case, for the terminal pair (ri,vij) to be satisfied, it follows that the edge {vij,tj} has been directed as tjvij. Since this holds for all i{i1,i2,i3}, it contradicts the fact that the terminal pair (,tj) is satisfied by the orientation. The argumentation is similar for positive clauses involving two variables, and symmetric for negative clauses.

Corollary 4.

Steiner Orientation is NP-complete on grid graphs of constant pathwidth.

4 FPT algorithm by distance to clique

In this section, we give an FPT algorithm parameterized by distance to clique. More precisely, we consider the case where the underlying undirected graph of the input is at most dtc vertex deletions away from being a clique. In a sense, this parameterization is the dense analogue of the parameterization by vertex cover (because a vertex cover of a graph is a clique modulator of its complement). As usual, we will assume that the set whose removal leaves the underlying graph a clique is given to us in the input. The main result of this section is the following.

Theorem 5.

Steiner Orientation can be solved in time 4dtcn𝒪(1).

We establish Theorem 5 starting via a series of reduction rules given by the lemmas below. Throughout we will assume that we are given a set S of dtc vertices such that removing S from the input graph leaves a mixed graph whose underlying graph is a clique. We will also assume that, using Proposition 1, the input is a mixed acyclic graph.

Lemma 6.

Let G be a mixed acyclic graph and S a set of vertices such that the underlying graph of GS is a clique. Then, each vertex in S has at most one undirected edge to VS.

Lemma 7.

In a mixed acyclic graph G, let C be a clique in the underlying graph of G. Then there is no vertex incident to at least two undirected edges in C. In other words, the set of undirected edges in C forms a matching.

We can now proceed to the proof of Theorem 5. The high-level idea is that by using our previous observations the number of undirected edges incident on S is at most 2dtc; we will therefore enumerate all possible orientations of these edges and check for each orientation if it can be extended to a feasible solution. The challenge will be in establishing that this check can be performed in polynomial time.

5 Vertex cover number

In this section we consider Steiner Orientation parameterized by the vertex cover number vc of the input graph, arguably one of the most restrictive structural parameterizations one could consider. We first show in Theorem 8 that even in this extremely restrictive setting, the problem remains intractable and prove its W[1]-hardness. As a matter of fact, our reduction implies that the problem does not admit any no(vc2)-time algorithm under the ETH, and our next result is in Theorem 10 to present such an optimal algorithm.

5.1 Hardness

Theorem 8.

Steiner Orientation is W[1]-hard parameterized by the vertex cover number vc of the input graph, and for any computable function f it cannot be solved in time f(vc)no(vc2) under the ETH.

Proof.

In k-Multicolored Clique we are given a graph G and a partition of V(G) into k independent sets each of size n, and we are asked to determine whether G contains a k-clique. It is well-known that k-Multicolored Clique parameterized by k is W[1]-hard and does not admit any f(k)no(k)-time algorithm, where f is any computable function, unless the ETH is false [6]. Let (G,k) be an instance of k-Multicolored Clique, where we assume without loss of generality that k (one can do so by adding dummy independent sets connected to all the other vertices of the graph). Recall that we assume that G is given to us partitioned into k independent sets V1,Vk, where Vi={v1i,,vni}. We will construct in polynomial time an equivalent instance (H,𝒯) of Steiner Orientation, with vc(H)=𝒪(k).

Construction.

We first introduce the vertices {α,α,rα,rα:α[k]} and add the arcs αβ and rαrβ for all α,β[k]. For all i[k], we further introduce the independent sets Xi={x1i,,xni} and Yi={y1i,,yni}. We fix a bijective function h:[k][k]2 that maps every independent set Vi to a distinct pair (α,β)[k]2, and for all i[k] with h(i)=(α,β)

  • we add the edge {α,xji} for all xjiXi,

  • we add the arc (xji,rβ) for all xjiXi,

  • we add the arc (α,yji) for all yjiYi,

  • we add the edge {rβ,yji} for all yjiYi.

This completes the construction of the graph H, and we refer to Figure 2 for an illustration of a part of it. As for the terminal pairs, we proceed in three steps:

  1. 1.

    We initially add into 𝒯 the pairs (α,rβ) and (α,rβ), for all α,β[k].

  2. 2.

    Next, for all i[k] and j[n], we add the terminal pair (xji,yji) into 𝒯, for all j[n]{j}. We refer to the terminal pairs added in this step as consistency terminal pairs.

  3. 3.

    Lastly, for distinct i1,i2[k], if {vj1i1,vj2i2}E(G) we add the terminal pairs (xj1i1,yj2i2),(xj2i2,yj1i1) into 𝒯, where j1,j2[n]. We refer to the terminal pairs added in this step as edge-checking terminal pairs.

This completes the construction of the instance (H,𝒯).

Figure 2: Part of the construction of graph H. Rectangles denote independent sets of size n.

It is easy to see that {α,α,rα,rα:α[k]} is a vertex cover of H, thus vc(H)=𝒪(k). To complete the proof, we show the following claim.

Claim 9.

The instance (G,k) of k-Multicolored Clique is a yes-instance if and only if the constructed instance (H,𝒯) of Steiner Orientation is a yes-instance.

5.2 XP algorithm

In this section, we give an XP algorithm parameterized by vc with complexity n𝒪(vc2), matching our lower bound result.

Theorem 10.

There is an algorithm that solves Steiner Orientation in time n𝒪(vc2).

Proof.

First we note that contracting all mixed cycles as in Proposition 1 does not increase the size of a minimal vertex cover, so we can suppose that our graph is mixed acyclic.

Let G be a graph of vertex cover number vc. Let SV be a vertex cover G of size vc. It can be computed in time 2𝒪(vc) [13]. First we guess the orientation of the edges of G[S]. There are 2𝒪(vc2) possibilities. Then, for all pairs (u,v)S2, we guess if there is, in the final solution, an oriented path uwv with wVS; if we guessed there is at least one, we guess one such w, and orient its edges in consequence. There are n𝒪(vc2) possibilities. As we will see in Claim 12, after this guessing phase, as S is a vertex cover, the connectivity of S in any solution respecting the guesses is already decided. This will allow us to check the existence of such a solution in polynomial time.

Claim 11.

Let wVS, u,vS such that at the end of the guessing steps, there are two undirected edges {u,w} and {v,w}. In any feasible solution respecting the guesses, either we orient them both from w to u,v or from u,v to w.

The above claim shows that for any wVS, after the guessing steps, either all of its undirected edges must be oriented from w to S or from S to w.

Claim 12.

Let u,vV; in any solution respecting the guesses, if there is a path from u to v, then there is one that only uses already oriented edges after the guessing steps, except possibly for the first one if uVS, and the last one if vVS.

This claim shows us that after the guessing steps, for any (si,ti) pair of terminals that is not already satisfied, the only way to satisfy them while respecting the guessing steps is to orient the edges of si and ti.

We now argue that there exists a demand pair (si,ti) which should be treated “first”. To see this, consider an auxiliary directed graph which has a vertex for each demand pair, and an arc from (si,ti) to (sj,tj) when sj=ti. If this auxiliary graph contains a directed cycle, this implies that the original instance must be oriented in a way that creates a directed cycle, but since we assumed that G is mixed acyclic, this is impossible. Hence, the interesting case is when the auxiliary graph is a DAG, therefore there exists a demand pair (si,ti) such that for all other demands (sj,tj) we have, tjsi

We can apply the following method: take such a pair (si,ti) (as described in the previous paragraph). If siVS, then orient all undirected edges between si and S from si to S. If the demand (si,ti) is now satisfied, that is, there is a path from si to ti using arcs and oriented edges, we remove this demand.

If (si,ti) is still unsatisfied, if tiVS, then orient all undirected edges between ti and S from S to ti.

We have now handled the demand (si,ti): if it is satisfied after the steps above, we remove it from the instance and continue with the remaining demands; otherwise this demand cannot be satisfied and we reject. We eat this method until there are no unsatisfied terminals.

This method is correct: indeed, from Claim 12, after the guessing steps, the satisfaction of (si,ti) only depends on the orientation of the undirected edges incident on {si,ti}S. Furthermore, from the same claim, if siVS, in any feasible solution, its undirected edges will only be used to satisfy pairs of terminals that contain si. But our choice of terminals ensures that for any such pair (sj,tj), sitj, so si=sj. So in a feasible solution respecting the guessing steps, if an undirected edge of si is used to satisfy such a pair, it will be oriented from si to S, so it was safe to select this orientation. For the second step, if (si,ti) is still not satisfied, then from Claim 12, the only way to satisfy it while respecting the guessing steps is, if tiVS, to direct one undirected edge between ti and S from S to ti. But from Claim 11, they all have the same orientation, so it was safe to orient all of them from S to ti. If (si,ti) is still unsatisfied after these steps, then, from Claim 12, there is no way to satisfy those terminals while respecting the guessing steps.

The above method can be applied in time n𝒪(1), and must be applied at most n2 times. In the end, we have an algorithm of complexity n𝒪(vc2).

6 Parameterized by Number of Edges or Arcs

Arguably one of the most natural ways to structurally parameterize Steiner Orientation is to consider either the number of undirected edges |E| or the number of arcs |A| as a parameter. Our goal in this section is to investigate the complexities of these two parameterizations.

We begin with the parameterization by |E|, which is trivially FPT: one can simply guess the orientation of each edge and then check if this gives a valid solution. The complexity is therefore 2|E|n𝒪(1). Our contribution is to observe that this trivial algorithm is perhaps optimal, as if one could obtain an algorithm of complexity (2ε)|E|n𝒪(1), then the Strong Exponential Time Hypothesis (SETH) would be false. Recall that, informally, the SETH states that there is no algorithm for SAT running faster than the 2n brute-force algorithm enumerating all assignments. We show the lower bound by reusing a simple reduction from SAT which appeared in [1].

Theorem 13.

If there exists an ε>0 such that Steiner Orientation can be solved in time (2ε)|E|n𝒪(1), then the satisfiability of a CNF formula ϕ with n variables can be decided in time (2ε)n|ϕ|𝒪(1), hence the SETH is false.

The main result of this section is then to establish that the parameterization by |A| also gives a fixed-parameter tractable problem, and indeed that we are again able to obtain a single-exponential parameter dependence. This parameterization is significantly more challenging, so we will need to rely on structural properties obtained by any graph where |A| is small after we apply some simple reduction rules. The main result we obtain is stated below.

Theorem 14.

Steiner Orientation admits a 2𝒪(|A|)n𝒪(1) algorithm.

Our high-level strategy will be made up of two parts. First, we define a (very) restricted special case of Steiner Orientation, where, notably, all undirected components are paths (and we have some additional restrictions). With those severe restrictions, this case becomes simpler. In particular, we will show that it admits an polynomial algorithm, via a reduction to 2-SAT. Second, we will show how a branching procedure can reduce any initial instance into a collection of at most 26|A|=64|A| instances of the restricted problem. The result will then follow by composing the two algorithms. In order to ease presentation, we start with the algorithm for the restricted case in Section 6.1 and then give the algorithm for parameter |A| in Section 6.2.

6.1 A Restricted Case

We define a restricted case of Steiner Orientation as follows:

Definition 15.

An instance G=(V,E,A) of Steiner Orientation is called restricted if we have the following: all vertices vV of mixed degree at least 3 are not incident on any unoriented edges, only arcs.

Intuitively, a restricted instance which is also mixed acyclic is an instance where each non-trivial undirected component is a path (because the maximum degree induced by E is 2 and we have no cycles), the internal vertices of each such path have no arcs connecting them to the outside, and furthermore each endpoint of such path has only one arc. In the following, we will show that these restricted instances are polynomial time solvable.

Our strategy to handle restricted instances of Steiner Orientation will be the following: first, we simplify our instance by making several observations allowing us to orient several edges deterministically. Then, we encode the obtained instance as a 2-SAT formula, by defining for each terminal in an undirected path a variable which encodes whether this vertex can reach (or be reached by) one endpoint of its path or the other in the final solution, and verifying that each terminal pair is satisfied.

Lemma 16.

There is an algorithm that takes a restricted Steiner Orientation instance G=(V,E,A) that is mixed acyclic and decides if a solution exists in time n𝒪(1).

6.2 FPT algorithm by Number of Arcs

Proof of Theorem 14.

We begin by applying Proposition 1 and Proposition 2 exhaustively. This does not increase |A|, so we can assume that the input is mixed acyclic and has no vertices of degree at most 1. Our algorithm is now the following: take all vertices of mixed degree 3 or more, and for each possible orientation of their edges, create a new instance. We claim that we obtain at most 26|A| restricted instances, such that at least one of them will have a solution if and only if the original instance did.

First, we argue that if we perform this branching on all vertices of mixed degree 3 or more, we obtain an instance conforming to Definition 15. Indeed, after the orientation, all vertices of mixed degree 3 are not incident on any unoriented edges, only arcs.

In order to bound the number of instances, let us count the number of edges to orient. We will need the following lemma:

Claim 17.

Let T=(V,E) be an undirected forest, V3V be the set of vertices of degree at least 3 in T and V1V the set of vertices of degree 1. Then, vV3d(v)3|V1|.

Armed with this claim, let us continue: take TG[E] composed of the non-trivial connected components of G[E]. As G is mixed acyclic, it is a forest. Furthermore, as G does not contain any leaf, each leaf of T has at least one arc. Let V0 be the set of leaves of T with a unique arc, V1 be the set of leaves of T with two arcs or more, V2 the set of vertices with two edges and at least one arc, and V3 the set of vertices with at least 3 edges. We need to orient the unoriented edges of V1,V2 and V3, which make |V1|+2|V2|+vV3d(v) edges. But, as each arc has only two endpoints, |V0|+2|V1|+|V2|2|A|. And, from the previous claim, vV3d(v)3(|V0|+|V1|). Therefore, |V1|+2|V2|+vV3d(v)3|V0|+4|V1|+2|V2|3(|V0|+2|V1|+|V2|)6|A|:, so we need to orient at most 6|A| edges, thus obtaining at most 26|A| restricted instances.

7 Kernelization

In this section we show that any instance (G,𝒯) of Steiner Orientation admits a polynomial kernel with respect to parameter vc+k, where vc is the size of a minimum vertex cover of G and k is the number of terminal pairs.

In particular we will prove that:

Theorem 18.

Steiner Orientation admits a kernel of order 𝒪(vc2+k), where vc is the size of the minimum vertex cover of G and k is the number of terminal pairs.

The high-level idea is that in the final kernel we will keep (i) the vertices of the vertex cover (which are 𝒪(vc)) (ii) all terminals (which are 𝒪(k)) (iii) 𝒪(vc2) additional vertices from the independent set. Similarly to the XP algorithm for parameter vertex cover, we use the idea that once we have fixed all paths of length at most 2 between vertices of the vertex cover, this is sufficient to fully determine connectivity in the graph. Therefore, at most 𝒪(vc2) vertices from the independent set are needed to form the solution. The challenge is then to identify a set of that size which is always sufficient and we achieve this via a reduction to Maximum Matching.

8 FPT by Treewidth plus Number of Terminals

Our goal in this section is to show that even though Steiner Orientation is NP-hard for graphs of constant treewidth and also W[1]-complete parameterized by the number of terminals k, it is in fact FPT when parameterized by the two parameters together. In order to ease presentation we will avoid giving an argument based on a dynamic programming algorithm and will prefer to instead rely on Courcelle’s theorem [5]. This will of course have the disadvantage that we obtain an algorithm with running time of the form f(tw,k)n𝒪(1), where the function f is not explicitly bounded (and could be a tower of exponentials). This is sufficient for our purpose of classifying the complexity of this case as FPT, but we leave it as an interesting open problem to determine the best parameter dependence f one can achieve. We in fact establish the following slightly stronger claim:

Theorem 19.

Steiner Orientation is FPT parameterized by the treewidth of the augmented underlying graph, that is, the treewidth of the graph obtained by taking the underlying graph of the input and adding for each terminal pair (si,ti) the edge siti to the graph.

We observe that Theorem 19 implies that Steiner Orientation is FPT parameterized by treewidth plus k (the number of terminals), because adding the extra edges to the underlying graph can increase its treewidth by at most k.

9 Conclusion

Even though we have characterized the complexity of Steiner Orientation for all possible values of treewidth (the only polynomial case is when the input is a forest), our NP-completeness only applies for graphs of pathwidth 3: is the problem in P or NP-complete for graphs of pathwidth 2. A similar question can be asked for feedback vertex set, where we show hardness when the feedback vertex set has size at least 2: does the problem become tractable on graphs which are one vertex away from being forests? On the parameterized complexity side, even though we obtain a 2𝒪(|A|)n𝒪(1) algorithm, the base in the exponential is large (64), so improving this is a natural question.

References

  • [1] Esther M. Arkin and Refael Hassin. A note on orientations of mixed graphs. Discret. Appl. Math., 116(3):271–278, 2002. doi:10.1016/S0166-218X(01)00228-1.
  • [2] Hans L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theor. Comput. Sci., 209(1-2):1–45, 1998. doi:10.1016/S0304-3975(97)00228-4.
  • [3] Andreas Brandstädt, Van Bang Le, and Jeremy P. Spinrad. Graph classes: a survey. SIAM, 1999.
  • [4] Rajesh Chitnis, Andreas Emil Feldmann, and Ondrej Suchý. A tight lower bound for planar steiner orientation. Algorithmica, 81(8):3200–3216, 2019. doi:10.1007/S00453-019-00580-X.
  • [5] Bruno Courcelle. The monadic second-order logic of graphs. i. recognizable sets of finite graphs. Inf. Comput., 85(1):12–75, 1990. doi:10.1016/0890-5401(90)90043-H.
  • [6] Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
  • [7] Marek Cygan, Guy Kortsarz, and Zeev Nutov. Steiner forest orientation problems. SIAM J. Discret. Math., 27(3):1503–1513, 2013. doi:10.1137/120883931.
  • [8] Andreas Darmann and Janosch Döcker. On simplified NP-complete variants of Monotone 3-Sat. Discret. Appl. Math., 292:45–58, 2021. doi:10.1016/J.DAM.2020.12.010.
  • [9] Britta Dorn, Falk Hüffner, Dominikus Krüger, Rolf Niedermeier, and Johannes Uhlmann. Exploiting bounded signal flow for graph orientation based on cause-effect pairs. Algorithms Mol. Biol., 6:21, 2011. doi:10.1186/1748-7188-6-21.
  • [10] Michael Elberfeld, Danny Segev, Colin R. Davidson, Dana Silverbush, and Roded Sharan. Approximation algorithms for orienting mixed graphs. Theor. Comput. Sci., 483:96–103, 2013. doi:10.1016/J.TCS.2012.03.044.
  • [11] Iftah Gamzu and Moti Medina. Improved approximation for orienting mixed graphs. Algorithmica, 74(1):49–64, 2016. doi:10.1007/S00453-014-9932-2.
  • [12] E. Mark Gold. Complexity of automaton identification from given data. Inf. Control., 37(3):302–320, 1978. doi:10.1016/S0019-9958(78)90562-4.
  • [13] David G. Harris and N. S. Narayanaswamy. A faster algorithm for vertex cover parameterized by solution size. In Olaf Beyersdorff, Mamadou Moustapha Kanté, Orna Kupferman, and Daniel Lokshtanov, editors, 41st International Symposium on Theoretical Aspects of Computer Science, STACS 2024, March 12-14, 2024, Clermont-Ferrand, France, volume 289 of LIPIcs, pages 40:1–40:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.STACS.2024.40.
  • [14] Rafael Hassin and Nimrod Megiddo. On orientations and shortest paths. Linear Algebra and its Applications, 114-115:589–602, 1989.
  • [15] Florian Hörsch. Maximum reachability orientation of mixed graphs, 2025. doi:10.48550/arXiv.2506.16171.
  • [16] Alexander Medvedovsky, Vineet Bafna, Uri Zwick, and Roded Sharan. An algorithm for orienting graphs based on cause-effect pairs and its applications to orienting protein networks. In Algorithms in Bioinformatics, 8th International Workshop, WABI 2008. Proceedings, volume 5251 of Lecture Notes in Computer Science, pages 222–232. Springer, 2008. doi:10.1007/978-3-540-87361-7_19.
  • [17] Marcin Pilipczuk and Magnus Wahlström. Directed multicut is W[1]-hard, even for four terminal pairs. ACM Trans. Comput. Theory, 10(3):13:1–13:18, 2018. doi:10.1145/3201775.
  • [18] Mehdy Roayaei. On the parameterized complexity of the problem of inferring protein-protein interaction directions based on cause-effect pairs. Netw. Model. Anal. Health Informatics Bioinform., 8(1):11, 2019. doi:10.1007/S13721-019-0194-4.
  • [19] Dana Silverbush, Michael Elberfeld, and Roded Sharan. Optimally orienting physical networks. J. Comput. Biol., 18(11):1437–1448, 2011. doi:10.1089/CMB.2011.0163.
  • [20] Michał Włodarczyk. Parameterized inapproximability for steiner orientation by gap amplification. In 47th International Colloquium on Automata, Languages, and Programming, ICALP 2020, volume 168 of LIPIcs, pages 104:1–104:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.ICALP.2020.104.