Maximum Reachability Orientation of Mixed Graphs
Abstract
We aim to find orientations of mixed graphs optimizing the total reachability, a problem that has applications in causality and biology. For given a digraph , we use for the set of ordered pairs of distinct vertices in and we define by if is reachable from in , and , otherwise. We use .
Now, given a mixed graph , we aim to find an orientation of that maximizes . Hakimi, Schmeichel, and Young proved that the problem can be solved in polynomial time when restricted to undirected inputs. They inquired about the complexity in mixed graphs.
We answer this question by showing that this problem is NP-hard, and, moreover, APX-hard.
We then develop a finer understanding of how quickly the problem becomes difficult when going from undirected to mixed graphs. To this end, we consider the parameterized complexity of the problem with respect to the number of preoriented arcs of , a poorly studied form of parameterization.
We show that the problem can be solved in time and that a -approximation can be computed in time for any .
Keywords and phrases:
orientations, mixed graphs, reachability, parameterized complexity, approximation2012 ACM Subject Classification:
Mathematics of computing Combinatorial algorithms ; Theory of computation Fixed parameter tractability ; Mathematics of computing Network optimization ; Theory of computation Approximation algorithms analysisAcknowledgements:
I want to thank Charupriya Sharma for making me aware of the connection to causality.Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim ThắngSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
This article deals with the problem of finding an orientation of a mixed graph such that the total number of ordered pairs of vertices in such that is reachable from in is maximized.
This problem has numerous applications in various sciences. For example, in the context of causality, the vertices of the mixed graph may represent random variables and the edges and the arcs of the mixed graph may represent correlations between these random variables. An arc means that the random variable associated to the tail of the arc is causal for the random variable associated to the head of the arc while an edge means that a correlation between the two random variables can be observed, but it is not known which of them is causal for the other one. Hence a solution of the orientation problem helps to better understand the possible correlations between these random variables. A survey of Vowels, Camgoz, and Bowden [23] contains more details on the connection of causal relationships and mixed graphs.
One more concrete, very similar application for this problem comes from biology, namely so-called protein-protein interaction. This application has been a driving force for the research on the problem setting considered in the present article. It has fostered significant interaction between the communities of theoretical computer science and biology, see [4, 9, 19]. Concretely, in this application, an interaction between certain pairs of proteins can be observed, but it is often technically more difficult to determine which of the two proteins causes this interaction. It is not difficult to see that the collection of protein interactions can be modelled by a mixed graph again. In Life Sciences, it is important to understand which local interactions of proteins lead to most global interaction, which corresponds to our orientation problem. A better understanding of the current problem may hence help to better understand protein-protein interaction, which may be of interest for example in medicine.
Problem definition
We now introduce our problem more formally. Basic notation can be found in Section 2. In a mixed graph graph , we say that is reachable from for some if can be reached from by traversing arcs in the given direction and traversing edges in an arbitrary direction. We define to be the set of ordered pairs of distinct vertices of . We further define the function by if is reachable from in and , otherwise, for every . Given a set , we use for . Observe that digraphs are in particular mixed graphs, so the above definitions carry over to digraphs. An orientation of a mixed graph is obtained by replacing every edge by an arc with the same two endvertices. In the problem Fixed Pairs Mixed Maximum Reachability Orientation (FPMMRO), the input consists of a mixed graph and a set , and the objective is to find an orientation of that maximizes . We further use Fixed Pairs Undirected Maximum Reachability Orientation (FPUMRO) for the restriction of FPMMRO to undirected inputs. In the following, when speaking about complexity, we need to carefully distinguish between the version where we are searching for a complete solution of the instance and the maximization version. In the complete solution version, we want to decide whether there exists an orientation of with , while in the maximization version, we assume that the instance comes with an integer and we want to decide whether there exists an orientation of with . Clearly, in all settings, the maximization version is at least as hard as the complete solution version.
Previous work
For FPUMRO, a simple argument, which was given by Hassin and Meggido [17], shows that the complete solution version can be handled in polynomial time. However, it turns out that the maximization version of FPUMRO is significantly harder. More concretely, it was proved by Elberfeld et al. [10] that the problem is NP-hard. One important paradigm when encountering NP-hard problems is approximation algorithms. In [10], it was proved that FPUMRO on -vertex graphs can be approximated within a factor of in polynomial time, improving on an earlier result of Medevedovsky et al. [19]. On the other hand, the authors of [10] show that, unless P=NP, no polynomial-time approximation within a factor of less than is available. Another variation of FPUMRO taking into account the lengths of the created directed paths was studied by Blokh, Segev, and Sharan [4]. The study of FPUMRO in the context of parameterized complexity was initialized by Dorn et al.[9]. They studied several problem-specific parameters describing how much the desired paths connecting input pairs interact. Following up on their work, Cygan, Kortsarz, and Nutov [8] proved that the maximization version of FPUMRO is FPT with respect to the objective function, that is, the number of pairs that are supposed to be satisfied. Interestingly, the existence of a polynomial-time constant-factor approximation algorithm still seems to be open for FPUMRO.
We now turn our attention to FPMMRO, the version which is more general and hence also more powerful for modelling the applications. FPMMRO was first considered by Arkin and Hassin [1]. They show that, in contrast to FPUMRO, the complete solution version of FPMMRO is already NP-hard in general, but can be solved in polynomial time if . There exists a rich literature for FPMMRO regarding approximation algorithms and parameterized complexity.
For the approximation side, in [11], Elberfeld et al. showed that, unless , FPMMRO cannot be approximated in polynomial time within a factor better than , and, on the other hand, gave a first polynomial-time sublinear approximation algorithm. The approximation ratio was later improved by Gamzu and Medina in [13]. However, a constant-factor approximation algorithm for FPMMRO was proven to be unlikely by Włodarczyk [24], even when allowing algorithms that run in FPT time with respect to the number of pairs. An APX-hardness result in planar mixed graph has been provided by Chitnis, Feldmann, and Suchý [6].
For parameterized complexity, the most studied parameter is the number of pairs. It was proved by Cygan, Kortsarz and Nutov in [8] that the complete solution version of FPMMRO is XP with respect to the number of pairs, improving on the result of Arkin and Hassin. On the other hand, it was proved by Pilipczuk and Wahlström [21] that the problem is -hard, which is also implied by the above mentioned result of Włodarczyk. The result of Pilipczuk and Wahlström has been extended to the planar setting by Chitnis, Feldmann, and Suchý [6]. In a recent work, Hanaka et al. [16] dealt with the parameterized complexity of FPMMRO when considering other parameters, for example the number of arcs of or the treewidth of its underlying graph.
We now come to the concrete special case of FPMMRO that is dealt with in the present article. A lot of research on FPMMRO so far focused on the case that the set of pairs in the instance is small. For example, the above mentioned parameterized complexity results all fall into this category. Here, we deal with a specific, but very natural restriction of FPMMRO, which is in some way the other extreme, where is as large as possible. Namely, we consider the case that the set of pairs in consideration is the set of all possible pairs, i.e. . For simplicity, we use MMRO to denote this restriction and, given a mixed graph , we use for . For the complete solution version of MMRO, which corresponds to the question of whether a given mixed graph has a strongly connected orientation, a full characterization directly yielding a polynomial-time algorithm was given by Boesch and Tindell [5]. We hence focus on the maximization version.
In [15], Hakimi, Schmeichel, and Young considered a setting which is in some way the intersection of MMRO and FPUMRO, namely the special case of MMRO that the input graph is undirected. They gave a complete characterization of the optimal orientations in this case. A polynomial-time algorithm for the maximization version of this restriction of MMRO follows directly from this characterization.
Our contributions
In [15], the authors also inquired about the complexity of MMRO in general. Surprisingly, despite this question being almost 30 years old, little progress seems to have been made. The first contribution of the present article is to give a negative answer to this question by providing an NP-hardness result. Moreover, the following result is slightly stronger and also shows that the approximability of MMRO has certain limits.
Theorem 1.1.
Unless P=NP, there exists no polynomial-time -approximation algorithm for MMRO.
While this inapproximability result may appear marginal, it rules out a polynomial-time approximation scheme, which distinguishes MMRO from a large collection of combinatorial problems. With Theorem 1.1 at hand, it appears interesting to understand special cases and restrictions of MMRO that are tractable. Parameterized complexity is a powerful paradigm to obtain a better understanding of the complexity of NP-hard problems. In the current case, we wish to consider a parameterization which is natural in the light of the concrete input. Namely, we consider the parameterization with respect to the number of arcs of . On a high level, we wish to understand the complexity of the problem in the case that the number of arcs is small. It is worth noting that the consideration of this parameter is a relatively new concept. In [14], Gutin et al. studied this parameter for a version of the Chinese Postman Problem in mixed graphs, answering a question of van Bevern et al., see [7]. We are not aware of any previous consideration of this parameter for orientation problems, except for the work of Hanaka et al. [16], which was recently submitted independently of the present article. Before describing our results, we wish to remark that for the natural analogous parameterization by the number of edges of , a trivial FPT algorithm exists. Namely, we can compute all possible orientations of and compare their respective objective values.
In the following, given an instance of MMRO, we use for . We further say that an orientation of is optimal if is maximum among all orientations of . Our first result is that, for fixed , we can indeed compute an optimal orientation for an instance of MMRO in polynomial time. More precisely, we show the following result.
Theorem 1.2.
Given an instance of MMRO, we can compute an optimal orientation of in time .
Theorem 1.2 raises the question whether a further improvement in the running time of this algorithm is possible. Namely, it would be desirable to determine whether the problem is in FPT, that is, if there exists an algorithm computing an optimal orientation that runs in time . While this question remains open, we make some progress in this direction by combining the paradigms of parameterized complexity and approximation. To this end, we say that, for some , an orientation of a given mixed graph is -optimal if holds for every orientation of . The following result roughly speaking shows that the problem is ’almost’ FPT, that is, it can be arbitrarily well approximated in FPT time.
Theorem 1.3.
Given a constant and an instance of MMRO, in time , we can compute a -optimal orientation of .
Due to Theorems 1.1 and 1.3, it becomes evident that for MMRO, algorithms running in FPT time with respect to can yield solutions of a higher quality than polynomial time algorithms. Indeed, FPT approximations can yield arbitrarily good approximations by Theorem 1.3, which polynomial time algorithms cannot by Theorem 1.1.
The remainder of this article is structured as follows: in Section 2, we give some more formal definitions, introduce an auxiliary problem and show that MMRO can be reduced to mixed graphs that are acyclic. In Section 3, we prove Theorem 1.1. In Section 4, we prove our algorithmic results, that is, Theorem 1.2 and Theorem 1.3. Finally, in Section 5, we conclude our work.
2 Preliminaries
In this section, we give some preliminaries we need for our main proofs. In Section 2.1, we collect the notation we need. In Section 2.2, we introduce a satisfiability problem we need for our reduction in Section 3. Finally, in Section 2.3, we prove the equivalence of MMRO and a closely related problem in acyclic mixed graphs.
2.1 Notation
We here give a collection of problem-specific and non-standard definitions. Standard definitions are omitted. If a mixed graph can be obtained from by orienting some edges, then we say that is a partial orientation of . If is a digraph, we speak of an orientation. A mixed cycle is a mixed graph that can be oriented as a directed cycle. A mixed graph is called acyclic if it does not contain a mixed cycle as a mixed subgraph. Given a mixed graph , its underlying graph is obtained by replacing every arc in by an edge with the same two endvertices. For some , we use for all the vertices in which are reachable from in and for all the vertices in from which is reachable in . Moreover, given a mixed graph and a weight function , we use for for some , and we use for for some mixed subgraph of . Further, we use for . Next, we say that an orientation of is -optimal for if holds for every orientation of . We use optimal for 1-optimal.
Given two mixed graphs and , we say that is a mixed supergraph of if and is a partial orientation of . Moreover, for a nonnegative integer , we say that is a mixed -supergraph of if is a mixed supergraph of and .
Two digraphs and are called compatible if is isomorphic to . Given two compatible digraphs and , we use for the unique orientation of in which an edge has its orientation in if and has its orientation in , otherwise.
2.2 A satisfiability problem
An instance of 3-Bounded Max 2-SAT (3BMax2Sat) consists of a set of binary variables and a set of clauses each of which contains exactly two literals over such that for every , there exist at most 3 clauses in that contain a literal of . We use the result of Berman and Karpinski [2] that it is NP-hard to approximate the number of clauses that can be satisfied by an assignment within a factor of .
2.3 An adapted version of MMRO
Intuitively, it should be possible to restrict MMRO to acyclic instances by contracting vertex sets admitting a strongly connected orientation. However, due to the specific character of the problem, we have to associate a polynomial weight function to the newly created mixed graph. This weight function displays how many vertices of the original mixed graph were contained in the vertex set of the original mixed graph which was contracted into that vertex. Formally, an instance of Weighted Acyclic Mixed Maximum Reachability Orientation (WAMMRO) consists of an acyclic mixed graph and a weight function . The objective is to find an orientation of that maximizes . Recall that . The first term in this expression reflects the contributions to the objective function made by vertices in the same strongly connected component of the original mixed graph. While this term is clearly the same for all orientations, it may not be neglected when considering approximation algorithms. The second term in the expression reflects the contributions to the objective function made by vertices in distinct strongly connected component of the original mixed graph. We say that an instance of WAMMRO is connected if is connected. Given two instances and of WAMMRO, we say that extends if and . Most results in Sections 3 and 4 will be proved for WAMMRO, which then implies the corresponding results for MMRO. The remainder of Section 2.3 is dedicated to givving the two statements below showing the equivalence of these problems. Their proofs are omitted. Here, we need to specify that when speaking about an instance of WAMMRO, we suppose that is given in unitary encoding. Further, we generally use for . When we say that an algorithm runs in polynomial time, we refer to . As a side remark, we wish to point out that this specification is crucial. Indeed, as pointed out in [15], the Subset Sum problem can easily be reduced to the one of finding an orientation maximizing when given an undirected graph and a function given in binary encoding.
Proposition 2.1.
Let be an instance of MMRO and . Then, in polynomial time, we can compute an instance of WAMMRO with , and such that for every positive integer , there exists an orientation of with if and only if there exists an orientation of with . Moreover, given an orientation of , we can compute an orientation of with in polynomial time.
Proposition 2.2.
Let be an instance of WAMMRO. Then, in polynomial time, we can compute an instance of MMRO and an integer such that for every positive integer , there exists an orientation of with if and only if there exists an orientation of with .
3 Hardness result
This section is dedicated to the proof of Theorem 1.1. First, in Lemma 3.1, we prove the APX-hardness of WAMMRO. This part is a reduction from 3BMax2Sat and the more challenging part. Our reduction is similar to the one proving the NP-hardness of the complete solution version of FPMMRO in [1], but more care is needed. Roughly speaking, in both reductions, we actually want to only consider the reachabilities among certain pairs corresponding to clauses being satisfied. While in the reduction in [1] the restriction to these pairs can be obtained from the problem definition, for the hardness of WAMMRO, we need to make sure by some additional connections that we can control the contribution of the remaining pairs to the objective function. Further, the restricted number of variable occurences allows us to make sure that these additional reachabilities do not dominate those obtained by the pairs of vertices we actually want to consider, which is crucial for the APX-hardness.
Lemma 3.1.
Unless , there is no polynomial-time algorithm whose input is an instance of WAMMRO and a positive integer , that outputs ’yes’ if admits an orientation with , and that outputs ’no’ if holds for every orientation of .
Proof sketch.
Suppose that an algorithm with the properties described in Lemma 3.1 exists. In the following, we describe an algorithm based on whose input is an instance of 3BMax2Sat and a positive integer . We will show that the algorithm has a behavior such that follows by the hardness of 3BMax2Sat.
Let be an instance of 3BMax2Sat and a positive integer. By easy arguments, we may suppose that and .
In the following, we let denote the set of subsets of that consist of exactly two distinct clauses that share at least one variable. We now construct an instance of WAMMRO. First, we let contain a set that contains two vertices and for every . For every , we let contain the arcs and . Next, we let contain a set that contains two vertices and for every . For every , we let contain an edge linking and . Further, for every and every such that , we let contain the arcs and and for every and every such that , we let contain the arcs and . Finally, we set for all and for all . This finishes the description of . Further, we set . For an illustration, see Figure 1.
We now apply to and and output the output of . This finishes the description of our algorithm.
The crucial connection between the original instance of 3BMax2Sat and the newly created instance of WAMMRO is a correspondence between the truth assignments for and the orientations of . Namely, for every , orienting the edge linking and from to corresponds to assigning to True and orienting the edge linking and from to corresponds to assigning to False. We then obtain that a clause is satisfied by a certain truth assignment if and only if is reachable from in the corresponding orientation of . Moreover, for all pairs which are not of the form for some , we either have or is the same for all orientations of . The details are omitted.
We then conclude Theorem 1.1 from Lemma 3.1 and Proposition 2.2. The proof does not contain any conceptual difficulties and is omitted.
4 Algorithmic results
The objective of this section is to prove Theorems 1.2 and 1.3. We now give an overview of these proofs. We mainly explain the proof strategy for Theorem 1.2 and later point out how to adapt it for the algorithm of Theorem 1.3.
Roughly speaking, the main strategy of the algorithm is to cut a given instance into small parts which are highly structured, then compute optimal solutions for these parts and merge them. We mainly deal with a certain substructure we call undirected components. Namely, given an instance of WAMMRO, an undirected component of is a component of .
Consider an undirected component of . Observe that is a tree as is acyclic. Our objective is to find a set of orientations of such that for any orientation of , there exists some with the property that when reorienting all edges in according to , we obtain an orientation that is at least as good as . Formally, given an instance of WAMMRO and an undirected component of , we say that a set of orientations of is an optimal replacement set for if for every orientation of , there exists some such that . Here, recall that is the unique orientation of in which all edges in have the orientation they have in and all other edges in have the orientation they have in .
The importance of optimal replacement sets can be summarized in the following result.
Lemma 4.1.
Let be an instance of WAMMRO, let be the undirected components of and for , let be an optimal replacement set for . Then there exists an optimal orientation for such that for .
The proof of Lemma 4.1 is not difficult. Observe that Lemma 4.1 suggests an algorithm for WAMMRO: given an instance of WAMMRO, find an optimal replacement set of of appropriate size for all undirected components of and then try all possible orientations of such that the inherited orientations of the undirected components come from the optimal replacement sets. Keep the best orientation found during this procedure. It is easy to prove that this yields an optimal orientation for indeed.
The difficulty now is to prove that optimal replacement sets of appropriate size exist for all undirected components of and can be computed sufficiently fast. We first restrict the structure of the instances in consideration by a preprocessing step.
Roughly speaking, we consider instances in which the interaction of every undirected component with the remaining part of the mixed graph is limited. Formally, we say that an instance of WAMMRO is dismembred if every undirected component of either contains at most one vertex of or contains exactly two vertices of and each of them is incident to exactly one arc of . We show that it suffices to prove Theorem 1.2 for dismembered instances. Moreover, we make the simple observation that we can restrict ourselves to connected instances, where an instance is connected if is connected. In order to be able to reuse the result later for the proof of Theorem 1.3, the following strong version is given. It also handles approximate solutions.
Lemma 4.2.
Let be a fixed function and suppose that there exists an algorithm that computes a -optimal orientation for every connected, dismembered instance of WAMMRO and every in time . Then, for every , a -optimal orientation for every instance of WAMMRO can be computed in time for some .
It turns out that for dismembered instances, the situation is much brighter and we can indeed efficiently compute optimal replacement sets of polynomial size. The following is the main lemma for the proof of Theorem 1.2.
Lemma 4.3.
Let be a connected, dismembered instance of WAMMRO and let be an undirected component of . Then, in polynomial time, we can compute an optimal replacement set for of size .
Lemma 4.3, Lemma 4.1, and Lemma 4.2 will imply Theorem 1.2 with Proposition 2.1.
We now give an overview of the proof of Lemma 4.3. Consider an undirected component of a dismembered, connected instance of WAMMRO. Our strategy is to compute a collection of instances of WAMMRO extending such that a collection of orientations of consisting of the one inherited from an optimal solution to each of these instances forms an optimal replacement set for . Informally, the idea is that it suffices to consider all orientations of and find the best way to extend these orientations to . However, of course, we cannot afford to enumerate all orientations of . Therefore, we aim to find a small set of instances that, roughly speaking, simulates all possible orientations of . Formally, a simulation set for is a set of mixed supergraphs of which are compatible with such that for every orientation of , there exists some and a weight function with that is consistent with and with the property that for every orientation of , we have that is an orientation of , is an orientation of and holds.
Once we have a good simulation set for , we want to compute an optimal replacement set in the following way. For every and every appropriate weight function on consistent with , we compute an optimal orientation for and add the inherited orientation of to . It is not difficult to see that is an optimal replacement set indeed.
However, in order to obtain an efficient algorithm from this observation, we need to take care of several things. First, we need to make sure that the number of mixed graphs in is small enough. Next, we need to make sure that the mixed graphs in contain only slightly more vertices than in order to be able to enumerate all weight functions extending . Finally, we need to make sure that for every and for every weight function on , we can compute an optimal orientation for sufficiently fast. To this end, we need some more technical definitions. First, for some positive integer , an -simulation set for is a simulation set for such that every is a mixed -supergraph of . We further need to define a class of tree-like mixed graphs. Namely, we say that a mixed graph is arboresque if contains an arc such that the underlying graph of is a tree and one of and holds. We say that a collection of mixed graphs is arboresque if every element of is arboresesque.
We are now ready to formulate our main result on simulation sets.
Lemma 4.4.
Let be a dismembered instance of WAMMRO and an undirected component of with . Then, in polynomial time, we can compute an arboresque 3-simulation set of size at most 2 for .
In order to make use of Lemma 4.4, we need to handle arboresque mixed graphs, which are a rather minor extension of mixed graphs whose underlying graphs are trees. We use this fact to show that an optimal orientation for an instance of WAMMRO such that is arboresque can be computed in polynomial time, using a dynamic programming approach.
Lemma 4.5.
Let be an arboresque instance of WAMMRO. Then an optimal orientation for can be computed in polynomial time.
We wish to remark that Lemma 4.5 is a strengthening of the main result of [15]. Lemma 4.5 and Lemma 4.4 imply Lemma 4.3. This completes the overview of the proof Theorem 1.2.
We now give an overview of how to adapt these results to prove Theorem 1.3. We prove approximation analogues of Lemma 4.1 and Lemma 4.3. The analogue of Lemma 4.1 is rather straight forward and can be proved in a similar way. For the analogue of Lemma 4.3, instead of an optimal replacement set for whose size is polynomial in , we obtain a set of orientations of such that replacing with an orientation from this set may yield an orientation that is by a small additive constant worse than the first orientation in consideration. On the other hand, we have that is bounded by . This result is obtained from Lemmas 4.4 and 4.5 in a similar way as Lemma 4.3. The only difference is that instead of trying all possible weight functions for the mixed graphs in the simulation sets, we restrict to a smaller set of functions, avoiding similar ones. We then conclude that an orientation that is only a certain additive amount away from an optimal solution can be computed in the desired running time.
However, we need to prove a small multiplicative loss rather than an additive one. To this end, we prove a result showing that for every connected, dismembered instance of WAMMRO, there exists an orientation of such that is above a certain minimum threshold. In order to so, we focus on a largest undirected component of and analyze the objective value of an optimal solution as described in [15]. Together with the additive approximation result described above, Theorem 1.3 follows readily.
The rest of Section 4 is structured as follows. First, in Section 4.1, we overview the proof of Lemma 4.2. Next, in Section 4.2, we give the main ideas for the proof of Lemma 4.4. In Section 4.3, we overview the proof of Lemma 4.5. After, in Section 4.4, we deal with our main lemmas, that is, we conclude Lemma 4.3 and give an overview for its approximate analogue we need for Theorem 1.3. In Section 4.5, we prove Lemma 4.1 and conclude Theorem 1.2. Finally, in Section 4.6, we describe the necessary adaptations to prove Theorem 1.3.
4.1 Restriction to dismembered instances
This section is dedicated to justifying that it suffices to prove our main results for connected, dismembered instances of WAMMRO. More concretely, we prove Lemma 4.2.
The strategy for the proof of Lemma 4.2 can be described as follows. Given a connected instance of WAMMRO, we wish to find a sufficiently small collection of edges in whose orientation we guess and that has the property that each of the thus obtained partial orientations of together with forms a dismembered instance of WAMMRO. Formally, given an undirected graph and some , we say that a set is dismembering for if every component of either contains at most one vertex of or it contains no vertex of and exactly two vertices of each of which is incident to exactly one edge in . The following result is the main lemma for our proof.
Lemma 4.6.
Let be an undirected graph and let be an edge set such that every component of is a tree. Then there exists a dismembering set for with . Moreover, we can compute in polynomial time.
We now give an overview of the proof of Lemma 4.6. We deal separately with the components of . Let be a component of and let . Further, let be obtained from by recursively deleting leaves which are not contained in . We now add all edges in to that are incident to a vertex in or a vertex that is of degree at least 3 in . We do this for all components of and let be the finally obtained set. It turns out that is a dismembering set for of appropriate size. The details are omitted.
With Lemma 4.6 at hand, it is not difficult to prove Lemma 4.2. Given a connected instance , we use Lemma 4.6 to compute a dismembering set for , where is the set of edges in that correspond to arcs in . We then obtain a collection of dismembered instances of WAMMRO by trying all possible orientations of the edges in . We solve all obtained instances by the algorithm whose existence we suppose. We output the best orientation of we find. It turns out that is an optimal orientation for . Finally, we show that the condition of being connected can also be omitted. This completes the proof of Lemma 4.2. The details are omitted.
4.2 Simulation sets
We here prove Lemma 4.4, omitting some technical parts. We do this by distinguishing two cases depending on the exact interaction of the undirected component with . In either case, we explicitly construct the simulation set and prove that it has the desired properties.
Proof sketch of Lemma 4.4.
We use for . Recall that is a tree as is an undirected graph by definition and a mixed subgraph of , which is acyclic. We now distinguish two cases depending on the exact interaction of with . It follows from the fact that is a dismembered instance of WAMMRO that one of the following cases occurs.
Case 1.
and for some .
We first construct a mixed graph from by adding two vertices and and the arcs , and . We further obtain from by orienting all edges on the unique -path in so that we obtain a directed -path and we set . An illustration of can be found in Figure 2.
Clearly, we have that can be computed in polynomial time and both and are compatible with . We will show that is an arboresque 3-simulation set for . We clearly have that and are mixed 3-supergraphs of . Next observe that and is a tree. Hence is arboresque. A similar argument shows that is also arboresque. For the last property, let be an orientation of . We define the weight function by for all , and . Observe that is consistent with and . We now choose if and if .
Now let be an orientation for . It follows directly by construction that is an orientation of and by the definition of that is an orientation of . The details of the proof that are omitted.
Roughly speaking, represents all the vertices in from which is reachable and represents all the vertices in which are reachable from . Moreover, the choice of reflects whether there may be directed paths linking distinct vertices in that contain vertices in .
Case 2.
One of and is empty and .
By symmetry, we may suppose that . Let be the two unique vertices in incident to an arc of .
We now construct a mixed graph from by adding three vertices , and and the arcs , and . We clearly have that is a mixed 3-supergraph of and that is compatible with . Next observe that and is a tree. Hence is arboresque. We set . An illustration of can be found in Figure 3. Clearly, we have that can be computed in polynomial time.
For the last property of simulation sets, let be an orientation of . Before defining , we need some further definitions. We let () consist of all that satisfy and ( and , and ). We now define by for and for all .
Now let be an orientation of . It follows directly by construction that is an orientation of and that is an orientation of . The details of the proof that are omitted.
Roughly speaking, represents which can reach the vertices in through , but not through , represents which can reach through , but not through , and represents the vertices in which can reach the vertices in through either of and . The addition of is important to avoid double counting certain reachabilities.
4.3 Arboresque mixed graphs
We here give an overview of the proof of Lemma 4.5.
For instances of WAMMRO containing a mixed graph whose underlying graph is a tree, a rather simple dynamic programming algorithm is available. We root the tree at an arbitrary vertex and use a bottom-up approach, where for every vertex , we store whether there exists an orientation of the mixed graph corresponding to the subtree rooted at meeting three conditions: the objective value inside the orientation of is above a certain threshold, the weight of the vertices reachable from is above a certain threshold, and the weight of the vertices from which is reachable is above a certain threshold.
For an arboresque mixed graph , there exists the additional arc , which forces us to be a bit more careful about the dynamic program. We now give a sketch of the proof of Lemma 4.5.
Proof sketch of Lemma 4.5.
As is arboresque and by symmetry, we may suppose that contains an arc such that and the underlying graph of is a tree. Observe that is a leaf of . In the following, we consider to be rooted at . For every , we let be the unique mixed subgraph of whose underlying graph is the subtree of rooted at . We now start by running a dynamic program. In the following, for the sake of simplicity, we use for . For , we use for the set of all whose first entry is .
For every , we wish to compute a boolean value such that if and only if there exists an orientation of that satisfies the following conditions:
-
if and only if is reachable from in ,
-
,
-
,
-
,
-
.
We now compute for all by dynamic programming. First, for some that is a leaf of , it is straight forward to decide the value of for all . If is not a leaf, for every , we run a second dynamic program to compute . Here, we start with and consider the mixed subgraphs of constructed by continuously adding for more and more children of .
Now suppose that, we have computed for all . We now compute the largest for which there exists some with and . This value is the maximum of over all orientations of , as, due to the choice of and , for any orientation of , we have
4.4 Main lemmas
This section deals with Lemma 4.3 and its analogue for approximate solutions. We start by giving the proof of Lemma 4.3.
Proof of Lemma 4.3.
We initialize . By Lemma 4.4, in polynomial time, we can compute an arboresque 3-simulation set for of size at most 2. Now consider some and let be a weight function with that is consistent with . As is arboresque, by Lemma 4.5, in polynomial time, we can compute an orientation of that maximizes . Let be the inherited orientation of . We now add to . We do this for every and every weight function with that is consistent with . The final assignment of is obtained after the last one of these operations.
Observe that after the last of these operations, we have that as and there are choices for as needs to be consistent with and needs to be satisfied. Moreover, as can be computed in polynomial time for every and every considered function , , and there are only choices for , we obtain that can be computed in polynomial time.
We now show that is an optimal replacement set. Consider an orientation of . As is a simulation set for , there exists some and a function that is consistent with with such that for every orientation for , we have that is an orientation of , is an orientation of and . By the optimality of , we obtain . As by construction, the statement follows.
In order to state an analogue of Lemma 4.3 for approximate solutions, we need some more definitions. Given some , an instance of WAMMRO and an undirected component of , we say that a set of orientations of is an -optimal replacement set for if for every orientation of , there exists some such that . We are now ready to state this result.
Lemma 4.7.
Let , let be a dismembered instance of WAMMRO and let be an undirected component of . Then, in polynomial time, we can compute an -optimal replacement set for of size .
4.5 XP Algorithm
This section is dedicated to concluding Theorem 1.2. We first prove Lemma 4.1.
Proof of Lemma 4.1.
Let be an optimal orientation for . We now define a sequence of orientations of . First, we set . We now recursively define for . Let and suppose that has already been defined. As is an optimal replacement set for , there exists some such that . Let . This finishes the definition of . Observe that by the definition of and as is an optimal orientation for , we have that is an optimal orientation for . Further observe that for . It follows that has the desired properties.
With Lemma 4.1 at hand, it is easy to conclude a version of Theorem 1.2 for WAMMRO and connected, dismembered instances. Namely, given an instance , we first use Lemma 4.3 to compute optimal replacement sets of polynomial size for all undirected components of . Then, we try all orientations of such that the inherited orientations of the undirected components come from these optimal replacement sets. By Lemma 4.1, we find an optimal orientation for during this procedure. Next, as the optimal replacement sets are of polynomial size and there are only undirected components of , the number of orientations we consider is . As the objective value of every orientation can be computed in polynomial time, the statement follows. Afterwards, Theorem 1.2 follows from Lemma 4.2 and Proposition 2.1. The details are omitted.
4.6 FPT approximation scheme
This section is dedicated to giving an overview of the proof of Theorem 1.3. While the remaining parts of the proof are similar to the proof of Theorem 1.2, the main additional difficulty is that applying these techniques, first a solution is obtained whose objective value is an additive amount away from an optimal solution rather than a multiplicative one. This problem is taken care of by the following result.
Lemma 4.8.
Let , let be a connected instance of WAMMRO with and let be an orientation of such that holds for all orientations of . Then is a -optimal orientation for .
In order to prove Lemma 4.8, we show that optimal solutions for any dismembered instance of WAMMRO attain a certain minimum value. In order to do so, we first prove a result for undirected graphs, relying on the methods provided in [15]. More precisely, we prove the following result.
Lemma 4.9.
Let be a connected instance of WAMMRO such that is undirected with . Then there exists an orientation of such that .
The proof of Lemma 4.9 consists of finding a so-called centroid of the tree , which, roughly speaking, is a vertex such that for a maximum number of pairs in , their unique path in goes through that vertex. Then, we can orient such that a large number of vertices is reachable from and is reachable from a large number of vertices. This orientation turns out to have the desired bound, thus proving Lemma 4.9.
It is now not difficult to prove a weaker version of Lemma 4.9 for arbitrary instances of WAMMRO. Namely, we focus on an undirected component of of largest weight and apply Lemma 4.9. We then extend the obtained orientation to in an arbitrary way. As the connectivities inside the undirected component are clearly maintained, we obtain the same lower bound for the orientation of . As there are at most undirected components of , we obtain a lower bound, which is sufficient to prove Lemma 4.8.
With Lemma 4.8 at hand, we can conclude Theorem 1.3 from Lemma 4.8, Lemma 4.7, Lemma 4.2, and Proposition 2.1. The details are omitted.
5 Conclusion
We hope for the results in this article to be the starting point for more research on the complexity of MMRO. There are several interesting follow-up questions that seem worthwhile studying. The perhaps most interesting one, in particular in the light of Theorem 1.1, is whether a constant-factor approximation algorithm is available.
Question 1.
Is there a constant such that there exists a polynomial-time -approximation algorithm for MMRO?
Interestingly, the corresponding question for FPUMRO also seems to be open.
One approach for Question 1 is to determine whether for any instance of WAMMRO, there exists an orientation of that maintains a constant fraction of the reachabilities in with respect to the given weight function.
Question 2.
Does there exist a constant such that for any instance of WAMMRO, there exists an orientation for such that ?
It is easy to see that an affirmative answer to Question 2 implies an affirmative answer to Question 1. Moreover, it is natural to ask about a common strengthening of Theorem 1.2 and Theorem 1.3, namely if MMRO is actually FPT when parameterized by .
Question 3.
Is there an algorithm that computes an optimal orientation for any instance of MMRO and runs in time ?
One way to achieve this would be to improve Lemma 4.3 in the sense that an optimal replacement set of size only dependent on is found rather than one of size . However, this is not possible as the following result shows. Its proof is omitted.
Proposition 5.1.
For any positive integer , there exists a connected, dismembered instance of WAMMRO with and an undirected component of such that every optimal replacement set for is of size at least .
A further interesting question is how structural parameters influence the difficulty of MMRO. In particular, it would be good to understand how, given an instance of WAMMRO, the treewidth of influences the difficulty of the problem. As every undirected component of is a tree, we obtain that . It follows that an XP algorithm for would imply a qualitative version of Theorem 1.2. While it seems plausible that such an algorithm can be obtained by a dynamic programming approach, we believe that it would need to be significantly more technical than the algorithm presented in Section 4.3. Similarly, an FPT algorithm for would yield an affirmative answer for Question 3.
On a higher level, except for [16], to our best knowledge, this is the first time that the number of arcs has been considered as a parameter for orientation problems of mixed graphs. It would be interesting to consider this parameterization for other problems on mixed graphs. For this question to be meaningful, the problem needs to be solvable in undirected graphs, but hard in mixed graphs.
One candidate is the problem of finding a 2-vertex-connected orientation of a mixed graph . This problem can be solved in polynomial time if is an undirected graph [22] and is NP-hard in general mixed graphs [18]. It would hence be interesting to see whether this problem is XP or even FPT with respect to the number of arcs of .
Another candidate is finding an orientation of a mixed graph that is a well-balanced orientation of its underlying graph. For the definition of a well-balanced orientation, see [12]. The strong orientation theorem of Nash-Williams states that every undirected graph has a well-balanced orientation [20]. However, the above described orientation problem in mixed graphs is NP-hard [3]. Again, the parameterization by the number of arcs could be considered.
References
- [1] Esther M. Arkin and Refael Hassin. A note on orientations of mixed graphs. Discrete Applied Mathematics, 116(3):271–278, 2002. doi:10.1016/S0166-218X(01)00228-1.
- [2] Piotr Berman and Marek Karpinski. On some tighter inapproximability results (extended abstract). In Jirí Wiedermann, Peter van Emde Boas, and Mogens Nielsen, editors, Automata, Languages and Programming, pages 200–209, Berlin, Heidelberg, 1999. Springer Berlin Heidelberg. doi:10.1007/3-540-48523-6_17.
- [3] Attila Bernáth and Gwenaël Joret. Well-balanced orientations of mixed graphs. Information Processing Letters, 106:149–151, 2008. doi:10.1016/j.ipl.2007.10.014.
- [4] Dima Blokh, Danny Segev, and Roded Sharan. The Approximability of Shortest Path-Based Graph Orientations of Protein–Protein Interaction Networks. Journal of Computational Biology, 20(12):945–957, 2013. doi:10.1089/cmb.2013.0064.
- [5] Frank Boesch and Ralph Tindell. Robbins’s Theorem for Mixed Multigraphs. The American Mathematical Monthly, 87(9):716–719, 1980. doi:10.1080/00029890.1980.11995131.
- [6] Rajesh Chitnis, Andreas Emil Feldmann, and Ondřej Suchý. A Tight Lower Bound for Planar Steiner Orientation. Algorithmica, 81(8):3200–3216, 2019. doi:10.1007/s00453-019-00580-x.
- [7] Ángel Corberán and Gilbert Laporte. Arc Routing: Problems, Methods, and Applications. Society for Industrial and Applied Mathematics, USA, 2015.
- [8] Cygan, Kortsarz, and Nutov. Steiner forest orientation problems. SIAM Journal Discrete on Mathematics, 27(3), 2013. doi:10.1137/120883931.
- [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. In Alberto Marchetti-Spaccamela and Michael Segal, editors, Theory and Practice of Algorithms in (Computer) Systems, pages 104–115, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg. doi:10.1186/1748-7188-6-21.
- [10] Michael Elberfeld, Vineet Bafna, Iftah Gamzu, Alexander Medvedovsky, Danny Segev, Dana Silverbush, Uri Zwick, and Roded Sharan and. On the Approximability of Reachability-Preserving Network Orientations. Internet Mathematics, 7(4):209–232, 2011. doi:10.1080/15427951.2011.604554.
- [11] Michael Elberfeld, Danny Segev, Colin R. Davidson, Dana Silverbush, and Roded Sharan. Approximation algorithms for orienting mixed graphs. Theoretical Computer Science, 483:96–103, 2013. doi:10.1016/j.tcs.2012.03.044.
- [12] András Frank. Connections in Combinatorial Optimization, volume 38. Oxford University Press, NLD, 2012. doi:10.1016/j.dam.2011.09.003.
- [13] Iftah Gamzu and Moti Medina. Improved Approximation for Orienting Mixed Graphs. Algorithmica, 74(1):49–64, 2016. doi:10.1007/s00453-014-9932-2.
- [14] Gregory Gutin, Mark Jones, and Bin Sheng. Parameterized complexity of the k-arc Chinese Postman Problem. Journal of Computer and System Sciences, 84:107–119, 2017. doi:10.1016/j.jcss.2016.07.006.
- [15] S. Louis Hakimi, Edward F. Schmeichel, and Neal E. Young. Orienting Graphs to Optimize Reachability. Information Processing Letters, 63:229–235, 1997. doi:10.1016/S0020-0190(97)00129-4.
- [16] Tesshu Hanaka, Michael Lampis, Nikolaos Melissinos, Edouard Nemery, Hirotaka Ono, and Manolis Vasilakis. Structural Parameters for Steiner Orientation. In Ho-Lin Chen, Wing-Kai Hon, and Meng-Tsung Tsai, editors, 36th International Symposium on Algorithms and Computation (ISAAC 2025), volume 359 of Leibniz International Proceedings in Informatics (LIPIcs), pages 38:1–38:14, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ISAAC.2025.38.
- [17] Rafael Hassin and Nimrod Megiddo. On orientations and shortest paths. Linear Algebra and its Applications, 114-115:589–602, 1989. Special Issue Dedicated to Alan J. Hoffman. doi:10.1016/0024-3795(89)90481-3.
- [18] Florian Hörsch and Zoltán Szigeti. The complexity of 2-vertex-connected orientation in mixed graphs. Discrete Optimization, 48:100774, 2023. doi:10.1016/j.disopt.2023.100774.
- [19] 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 Keith A. Crandall and Jens Lagergren, editors, Algorithms in Bioinformatics, pages 222–232, Berlin, Heidelberg, 2008. Springer Berlin Heidelberg. doi:10.1007/978-3-540-87361-7_19.
- [20] Crispin St. John Alvah Nash-Williams. On Orientations, Connectivity and Odd-Vertex-Pairings in Finite Graphs. Canadian Journal of Mathematics, 12:555–567, 1960. URL: https://www.cambridge.org/core/journals/canadian-journal-of-mathematics/article/on-orientations-connectivity-and-oddvertexpairings-in-finite-graphs/2B39912D1666161E4200E61E8F65DE2B.
- [21] Marcin Pilipczuk and Magnus Wahlström. Directed Multicut is W[1]-hard, Even for Four Terminal Pairs. ACM Trans. Comput. Theory, 10(3), 2018. doi:10.1145/3201775.
- [22] Carsten Thomassen. Strongly 2-connected orientations of graphs. Journal of Combinatorial Theory, Series B, 110:67–78, 2015. doi:10.1016/j.jctb.2014.07.004.
- [23] Matthew J. Vowels, Necati Cihan Camgoz, and Richard Bowden. D’ya Like DAGs? A Survey on Structure Learning and Causal Discovery. ACM Computing Surveys, 55(4), 2022. doi:10.1145/3527154.
- [24] Michał Włodarczyk. Parameterized Inapproximability for Steiner Orientation by Gap Amplification. In Artur Czumaj, Anuj Dawar, and Emanuela Merelli, editors, 47th International Colloquium on Automata, Languages, and Programming (ICALP 2020), volume 168 of Leibniz International Proceedings in Informatics (LIPIcs), pages 104:1–104:19, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2020.104.
