Disjoint Shortest Paths with Congestion on DAGs
aa r X i v : . [ c s . D S ] A ug Disjoint Shortest Paths with Congestion on DAGs
Saeed Akhoondian Amiri ∗ In the k -Disjoint Shortest Paths problem, a set of terminal pairs of vertices { ( s i , t i ) | ≤ i ≤ k } is given and we are asked to find paths P , . . . , P k suchthat each path P i is a shortest path from s i to t i and every vertex of thegraph routes at most one of such paths.We introduce a relaxation of the problem, namely, k -Disjoint ShortestPaths with Congestion- c where every vertex is allowed to route up to c paths.In this work we provide a simple algorithm to solve the k -Disjoint ShortestPaths with Congestion- c problem in time f ( k ) n O ( k − c ) on DAGs. Along thisway, we significantly simplify the argument that is used in the previous workfor k -Disjoint Paths with Congestion- c [3]. We also discuss the hardness ofproblem and open problems in this area. ∗ Department of Computer Science, University of Cologne, Germany, [email protected]
Introduction
The k -Disjoint Paths Problem is one of the fundamental connectivity problems in graphtheory. The input is a graph G and a set of source and terminal pairs { ( s i , t i ) : 1 ≤ i ≤ k } ;the question is to connect every source s i to t i by internally vertex disjoint paths. Theproblem plays a central role in proving the graph minor theorem algorithmically [21].A relaxation of the problem allows congestion on nodes and edges of the graph. Sucha generalization is relevant in practice: for instance, in communication networks we cantolerate a certain amount of congestion. Routing disjoint paths with congestion havebeen extensively studied in the literature e.g., see [1, 8, 9, 16, 20].Another practical variation of the problem is to find disjoint paths that are shortestwith respect to certain measures: every path is a shortest path connecting the terminalpairs, or the total length is minimized, or the maximum path length is minimized, etc.,see [7, 11, 17, 18] for some of such cases.Most of the aforementioned variations add a criteria that makes the problem moredifficult than the classical disjoint paths problem. However, one variation might makethe problem easier: when every path connecting a source to a terminal should also be ashortest such path. This is known as the k -Disjoint Shortest Paths problem ( k -DSP ).Not much was known about k -DSP since it had been raised as an open problem over20 years ago [12]. The only known results were for the restricted case of two pathsfor undirected graphs [12, 14] and digraphs [17]. Only recently, two separate groupsprovided algorithms with running time of n f ( k ) [5, 19] for k -DSP on undirected graphs.The problem is wide open for general digraphs, even for the special case of 3-DSP.In this paper we consider a generalized version of the k -DSP, namely the k -DisjointShortest Paths with Congestion- c problem. This is similar to the k -DSP except thatevery vertex can tolerate a congestion c , that is, it can route up to c paths.We study the computational complexity of the problem on directed acyclic graphs(DAGs). DAGs are valuable in simulating scheduling problems. In such simulations,finding disjoint paths, and in particular disjoint paths of short length is quite important.For a nice example of such simulations we refer the reader to the introduction of [23].Besides their practical applications, DAGs are basic building blocks to study thetheoretical aspects of general digraphs. Several digraph width measures are designed tomeasure similarity of the input graph to DAGs [4, 6, 15, 22].It is possible to devise an n O ( k ) algorithm for our problem on DAGs (e.g. see Lemma 3).However, we investigate the possibility of performing better when the congestion is closeto k . The intuition is that if the congestion is k we only have to route shortest paths.Let us define d = k − c , then we seek for an algorithm with running time f ( k ) n g ( d ) , forsome computable functions f and g .In undirected graphs nothing is known about the problem. One might be able toconvert the existing works on k -DSP to k -Disjoint Shortest Paths with Congestion- c toobtain desired solution. However, there are two issues with this approach: First, therecently developed algorithms for k -DSP are only relevant from a theoretical perspectivesince their running times are doubly and triply exponential [5, 19]. Second, a directtransformation (e.g. an extension of our Lemma 3) would result in k appearing in the1xponent of n while we prefer to see d in the exponent instead of k .We show that the problem is solvable in polynomial time on DAGs for constant valuesof k, d by providing a f ( k ) n O ( d ) algorithm. Our algorithm matches the running time ofthe best known algorithm for k -Disjoint Paths with Congestion- c on DAGs [3].The algorithm is based on the previous work [3] for k -Disjoint Paths with Congestion- c . However, we significantly simplify the analysis of the most challenging part of theprevious work while making it applicable on both variations of the problem.We then show that it is not possible to find a significantly faster algorithm than ours,assuming Exponential Time Hypothesis (ETH) is correct. At the end existing openproblems are discussed.In this work, we assume basic familiarity with graph theory, and parameterized com-plexity, for both concepts we refer the reader to the book [10].An instance I of the problem is composed of the input graph G = ( V, E ) and an integer c as congestion and a subset of size k of source terminal pairs { ( s , t ) , . . . , ( s k , t k ) } ⊆ V × V . When it is clear from context, we may only refer to source terminal pairs of I .In addition we may further abbreviate it and write terminal pairs . Every edge may havea positive integer as its weight (or 1 by default); n denotes the number of vertices of G . First, let us recall the approach of [3] for disjoint paths with congestion, then we introduceour intuitive analysis for disjoint shortest paths with congestion. The general idea of [3]was inspired by kernelization techniques: reduce the instance to smaller instances withcongestion 1. In particular, sub-instances with at most O ( d ) pairs (recall that d = k − c ).Since we know how to solve the d -Vertex Disjoint Paths problem in time n O ( d ) we cansolve the k -Disjoint Paths with Congestion- c in almost the same running time.The main challenge in the previous work was the reduction to a smaller instance. Weprovide such a reduction in the following lemma, which is analogous to Lemma 8 of [3].Our argument is simpler and intuitive, in addition directly applies to both problems. Inthe following everything goes the same way even if we have edge weights. Lemma 1.
Let k > d , then there is a solution S to an instance I of k -Disjoint ShortestPaths with Congestion- c in a DAG G if and only if the following two conditions hold: • there is a path in G between each source terminal pair of I , • there is a set C of d terminal pairs of I such that d -Disjoint Shortest Paths withCongestion- d has a solution for the terminal pairs of C .Proof. We assume the first condition is fulfilled, otherwise we are done.If a solution to C with congestion 2 d is given then we can route the rest of k − d pathsarbitrarily by their shortest paths and the congestion does not exceed k − d + 2 d = c .We may assume S has a vertex of congestion c otherwise drop a pair from I and thecorresponding path from S to work on a smaller instance (update c = c − , k = k − k > d and S has no vertex of congestion c we repeat the above process. Thefollowing claim is our main contribution to show the reverse implication of lemma.2 a i a b a j gs x t x s a t a f a i a b a j gs x t x s a t a Figure 1: Swapping operation: P a is in blue and P x is in red. High congested vertices are coloredorange (only 2 paths are depicted). The top pair, shows the initial state of the twopaths, the bottom pair shows them after swapping the middle subpaths. Since a i , a j were the closest possible high congestion vertices of P a to/from a b , the updated P a ( P a ) has more high congestion vertices than the old one. Claim. If S has a vertex of congestion c then I has a solution S ′ such that: • congestion of every vertex is the same in S and S ′ and, • there is a path P ∈ S ′ that contains all vertices of congestion c .Let us first show how the lemma follows from the claim. If the claim is correct thenremove the endpoints of P from I to obtain I ′ . Then S ′′ = S ′ − P is a solution for I ′ .Afterwards update k = k − , c = c − , S = S ′′ , I = I ′ and as long as k > d repeat thesame process. Once we have an instance with 3 d pairs, the lemma follows. Proof of Claim.
Order vertices of congestion c in S w.r.t. their topological order in G to obtain a strictly increasing ordered set of them A = ( a , . . . , a ℓ ). If there is apath P i ∈ S that visits all vertices of A we are done; otherwise, we need the followingobservation J from the proof of Lemma 8 in [3]: Observation J For every (at most) 3 vertices a i , a j , a h ∈ A there is a path of S thatcontains all of them: since k > d , a i , a j share at least d + 1 common paths and sincecongestion of a h is k − d it routes at least one of these d + 1 paths.Note that if ℓ ≤ A and we aredone, hence in the rest we assume ℓ >
3. There is a path P a ∈ S ( P a connects the a ’thterminal pair) that contains a , a ℓ but not a vertex a b ∈ A . We reroute paths of S sothat the updated P a , we call it P a , contains a b .Choose a i , a j ∈ A∩ P a such that a i < a b < a j (w.r.t. their order in A ) and additionallythey are closest such high congestion pair of vertices in P a surrendering a b ; i.e., for everyother pair of vertices a f , a h ∈ A ∩ P a if a f < a b < a h then a f ≤ a i and a j ≤ a h .By J there is a path P x ∈ S such that a i , a b , a j ∈ V ( P x ). Replace a subpath of P x that starts and ends at a i , a j with a subpath of P a that starts and ends at a i , a j resp.,to obtain paths P ′ x , P a . Let define S = ( S − { P a , P x } ) ∪ { P a , P ′ x } . By choice of a i , a j ,we have A ∩ V ( P a ) ⊆ V ( P a ). Additionally, P a contains at least a new high congestionvertex a b / ∈ V ( P a ). The congestion of all vertices and the path lengths in S are thesame as in S . Thus, S is a solution to I . See Figure 1 for an illustration of rerouting.We repeat the same process to construct paths P a , P a , . . . ; since each P ia has more highcongestion vertices than P i − a , eventually we construct a path P ta (for some t ≤ ℓ −
2) ina solution S ′ = S t that contains all vertices of congestion c as claimed.3o find a feasible routing for a small set of terminal pairs in [3], the algorithm ofFortune et al. [13] was employed. For disjoint shortest paths, we are not aware of anysuch algorithm, thus we provide one. In the following our focus is the simlicity notoptimality. Later in Section 3 we discuss a faster approach. The following might beknown as folklore, however, our presentation is independent of any prior work.For a directed edge e = ( u, v ) ( u → v ), its tail is u and v is its head; we write u = Tail( e ) , v = Head( e ). Lemma 2.
The k -DSP problem on DAGs can be solved in time n O ( k ) .Proof. We solve a more general version of k -DSP problem: For every h tuple H of sourceand terminal pairs, 0 < h ≤ k , we solve h -DSP between them. If there is a solution S for H , store it in a dictionary D ; i.e. D [ H ] = S . otherwise set D [ H ] = ∅ .To solve the above problem, first topological sort vertices of the graph as v , . . . , v n .Afterward, recursively solve the problem in subsets of vertices V = { v , . . . , v ⌈ n/ ⌉ } and V = { v ⌈ n/ ⌉ +1 , . . . , v n } for every h -tuple in these subsets (1 ≤ h ≤ k ). Then any h -tuple H for the union of two sets falls in one of the following two categories ( h ≤ k ): • H can be partitioned into two tuples H , H where H ⊆ V × V and H ⊆ V × V . • There is a source terminal pair ( s i , t i ) ∈ H such that s i ∈ V , t i ∈ V .For the first case if H i ( i ∈ { , } ) is not empty but there is no solution for it, i.e., D [ H i ] = ∅ , then set D [ H ] = ∅ otherwise set D [ H ] = D [ H ] ∪ D [ H ].It remains to solve the second case. Suppose t ≥ H have one endin V and the other end in V , let us call the set of them H ′ .If there is a solution S for H then there are t paths in S going along an ordered setof t edges E = ( e , . . . , e t ) where Tail( e i ) ∈ V , Head( e i ) ∈ V . We do not know theendpoints of these edges but we can guess them.Afterwards create two new sub-instances H , H : H contains all source and terminalpairs that are entirely in V , in addition it has t additional source terminal pairs wheretheir source vertices are the sources in H ′ and the terminal vertices are the tail ofcorresponding edges (according to their order) in E . Similarly H has all source andterminal pairs of H that are entirely in V and a new set of t source terminal pairs wheretheir sources are the heads of edges in E and their terminals are the terminals of H ′ . Foran illustration of H , H and the edge set E see Figure 2.In time O ( k ) we can check if D [ H ] , D [ H ] are non-empty and their concatenationwith edges of E yields a valid solution S for H . If it is so, we set D [ H ] = S . If no suchset of edges E provides a desired solution for H , we set D [ H ] = ∅ .Since we considered all possibilities of h -tuples of the terminals, at the end of thealgorithm, for a given tuple of source terminal pairs, we pick its value from D .The running time of each recursive step is dominated by the merge operation, whichcan be done in O ( kn k ): there are O ( n k ) h -tuples, for each of them we guess O ( n k )ordered sets of at most k -edges, and in O ( k ) we compare each path length (summationof 3 values) with the corresponding value of the shortest path matrix. Since the inputset of vertices in each call is partitioned, the total number of merge steps is O ( n ), hencethe running time is as claimed. 4 s s s ′ s ′ s ′ t ′ t ′ t ′ t t t u Figure 2: An illustration of the merge operation described in Lemma 2. The instance H has3 source and terminal pairs. The set of 3 (boundary) edges that are in the shortestpaths connecting the sources to the terminals are colored red. The two intermediateinstances H , H are depicted in the left and right respectively. The following is similar to Lemma 6 of [3], except that we use Lemma 2 instead ofalgorithm of Fortune et al.
Lemma 3.
There is an algorithm that solves the k -Disjoint Shortest Paths with Congestion- c in time n O ( k ) on DAGs.Proof. From the input graph G construct a graph G ′ as follows: for every v ∈ V ( G ) add c vertices v , . . . , v c to G ′ ; if ( u, v ) ∈ E ( G ) then add edges ( u i , v i ) to G ′ (with the sameweight as ( u, v )). A solution to the k -Disjoint Shortest Paths with Congestion- c in G isequivalent to k -DSP in G ′ with terminal pairs { ( s i , t i ) : 1 ≤ i ≤ k } . Since the size of G ′ is at most c times bigger than G , by Lemma 2 we can solve the latter in time n O ( k ) .Now our main theorem is a consequence of previous lemmas. Theorem 4.
The k -Disjoint Shortest Paths with Congestion- c problem in acyclic graphscan be solved in time f ( k ) n O ( d ) .Proof. If k ≤ d then we directly apply Lemma 3, otherwise, by Lemma 1 we only needto guess 3 d source terminal pairs (there are (cid:0) k d (cid:1) such choices) then route them in time n O ( d ) using Lemma 3. Afterwards connect the remaining pairs via their shortest paths.If the algorithm fails in any phase, there is no solution to the given instance5 After Math
We would like to discuss several topics here.
Comparison to the earlier work
Our main goal was to provide a simple algorithm for the problem. The main algo-rithmic contribution of both papers are their reduction steps. The one in the previouswork [3] has a short and elegant proof, however, it is dense. Our new proof in Lemma 1is much shorter and in addition, we elaborated on missing details of the prior work.Our main observation is simple to explain and prove: given any solution, it is possibleto transfer it to one that includes a path going through all high congestion vertices. Theearlier work does not benefit from such an intuitive proof, instead, several levels of nestedassumptions on parameters have been made to prove the theorem by contradiction.
The Disjoint Shortest Paths algorithm
Employing the technique of Fortune et al. (they call it pebbling game ) we could improvethe running time of Lemma 2: for instance, construct a similar DAG as Fortune et al.,where its vertices are all possible ≤ k -tuples of vertices and there is a directed edgebetween a pair of tuples if they meet certain criteria (to enable the transition from oneto another), or in their wording, if it is a legal move . For k -DSP, we have to add onemore condition to their legal move to ensure the paths are shortest path.The rest goes similar to Fortune et al.: find a path in the DAG of tuples that connectsthe k -tuple of sources to the k -tuple of terminals (if such a path exists). Such a path,by a naive approach, can be found in time O ( n k +2 ).We believe that formalizing the above idea, makes it less intuitive, therefore we pre-sented Lemma 2 with a divide and conquer algorithm which enjoys a simple merge step.Similarly, in our algorithm, we could have processed vertex by vertex according totheir topological order to find a solution for each h -tuple. With a careful analysis, thisleads to a faster algorithm than the one of Lemma 2. Hardness
The recent hardness construction of Bentert et al. [5] for k -DSP on undirected graphsextends to DAGs. They have sets of horizontal and vertical paths; we direct them fromleft to right and top to bottom resp., to obtain a DAG. This keeps the length of thesource terminal shortest paths as before, thus, we get the following corollary. Corollary 5.
The k -DSP problem has no n o ( k ) algorithm on DAGs unless ETH fails. For the k -DSP with congestion, to provide a lower bound with dependency on d , onecan show that every path in the hardness reduction of [2] , is either a shortest pathor it can be replaced with a shortest path without increasing congestion of any vertex.However, for technical reasons, we have to first modify the original construction thenargue that it works for the shortest path variation. We excluded that discussion fromthis paper since it adds non-algorithmic technical details that are beyond the originalgoal of this work. We cited the conference version since it is public and this part is the same as the journal version. Open Problems
There are several related open problems on this topic. The major open problem isto verify if the k -Disjoint Shortest Paths with Congestion- c problem in general graphsadmits an algorithm with running time f ( k ) n g ( d ) for computable functions f and g .However, approaching this problem might be a bit ambitious, since the complexity ofthe simpler problem of k -Disjoint Shortest Paths is wide open in digraphs, even for arestricted case of k = 3. We believe such an algorithm does exist.Since there are algorithms for k -DSP in undirected graphs, a more accessible openproblem is to solve k -Disjoint Shortest Paths with Congestion- c in undirected graphs intime f ( k ) n g ( d ) . Another direction is to improve the running time of the existing k -DSPalgorithms to make them practical.The running time of our algorithm is close to the lower-bound. We route 3 d sourceterminal pairs in the worst case, thus we have a barrier of n d in the running time (unlessalgorithm of Fortune et al., can be improved). Is it possible to change our reduction stepso that it requires routing fewer paths? More generally is there an algorithm for DAGswith run time O ( f ( k ) n d + c ), for some constant c ?In the running time of our algorithm (similarly the algorithm of [3]), k does notappear in the exponent of n but an exponential function f ( k ) appears as a multiplicativefactor. Is this exponential dependency on k inevitable under reasonable computationalassumptions?Another direction is to study the problem when the underlying graph has certain struc-tural properties. For instance, if it is planar or if it has a constant directed treewidth.Note that here we wish to see running time of form n f ( d + tw ) not n f ( k + tw ) , where tw denotes the directed treewidth of the graph.7 eferences [1] Saeed Akhoondian Amiri, Szymon Dudycz, Stefan Schmid, and Sebastian Wieder-recht. Congestion-free rerouting of flows on dags. In ICALP , volume 107 of
LIPIcs ,pages 143:1–143:13, 2018.[2] Saeed Akhoondian Amiri, Stephan Kreutzer, D´aniel Marx, and Roman Rabinovich.Routing with congestion in acyclic digraphs. In
MFCS , volume 58 of
LIPIcs , pages7:1–7:11, 2016.[3] Saeed Akhoondian Amiri, Stephan Kreutzer, D´aniel Marx, and Roman Rabinovich.Routing with congestion in acyclic digraphs.
Inf. Process. Lett. , 151, 2019.[4] Saeed Akhoondian Amiri, Stephan Kreutzer, and Roman Rabinovich. Dag-widthis pspace-complete.
Theor. Comput. Sci. , 655:78–89, 2016.[5] Matthias Bentert, Andr´e Nichterlein, Malte Renken, and Philipp Zschoche. Usinga geometric lens to find k disjoint shortest paths.
CoRR , abs/2007.12502, 2020.[6] Dietmar Berwanger, Anuj Dawar, Paul Hunter, Stephan Kreutzer, and Jan Ob-drz´alek. The dag-width of directed graphs.
J. Comb. Theory, Ser. B , 102(4):900–923, 2012.[7] Andreas Bj¨orklund and Thore Husfeldt. Shortest two disjoint paths in polynomialtime. In
Automata, Languages, and Programming , pages 211–222, Berlin, Heidel-berg, 2014. Springer Berlin Heidelberg.[8] Chandra Chekuri and Alina Ene. Poly-logarithmic approximation for maximumnode disjoint paths with constant congestion. In
SODA , pages 326–341, 2013.[9] Chandra Chekuri, Sanjeev Khanna, and F. Bruce Shepherd. Edge-disjoint paths inplanar graphs with constant congestion.
SIAM J. Comput. , 39(1):281–301, 2009.[10] Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, D´aniel Marx,Marcin Pilipczuk, Michal Pilipczuk, and Saket Saurabh.
Parameterized Algorithms .Springer, 2015.[11] ´Eric Colin de Verdi`ere and Alexander Schrijver. Shortest vertex-disjoint two-facepaths in planar graphs.
ACM Trans. Algorithms , 7(2):19:1–19:12, 2011.[12] Tali Eilam-Tzoreff. The disjoint shortest paths problem.
Discrete Applied Mathe-matics , 85(2):113 – 138, 1998.[13] Steven Fortune, John Hopcroft, and James Wyllie. The directed subgraph homeo-morphism problem.
Theoretical Computer Science , 10(2):111 – 121, 1980.[14] Marinus Gottschau, Marcus Kaiser, and Clara Waldmann. The undirected twodisjoint shortest paths problem.
Oper. Res. Lett. , 47(1):70–75, 2019.815] Thor Johnson, Neil Robertson, Paul D. Seymour, and Robin Thomas. Directedtree-width.
J. Comb. Theory, Ser. B , 82(1):138–154, 2001.[16] Ken-ichi Kawarabayashi, Yusuke Kobayashi, and Stephan Kreutzer. An excludedhalf-integral grid theorem for digraphs and the directed disjoint paths problem. In
STOC 2014 , pages 70–78. ACM, 2014.[17] Yusuke Kobayashi and Ryo Sako. Two disjoint shortest paths problem with non-negative edge length.
Oper. Res. Lett. , 47(1):66–69, 2019.[18] Yusuke Kobayashi and Christian Sommer. On shortest disjoint paths in planargraphs.
Discret. Optim. , 7(4):234–245, 2010.[19] William Lochet. The shortest disjoint paths problem.
CoRR , abs/1912.10486, 2019.[20] Raul Lopes and Ignasi Sau. A Relaxation of the Directed Disjoint Paths Problem: AGlobal Congestion Metric Helps. In
MFCS , volume 170 of
LIPIcs , pages 68:1–68:15,2020.[21] N. Robertson and P.D. Seymour. Graph minors .xiii. the disjoint paths problem.
Journal of Combinatorial Theory, Series B , 63(1):65 – 110, 1995.[22] Mohammad Ali Safari. D-width: A more natural measure for directed tree width. In
MFCS , volume 3618 of
Lecture Notes in Computer Science , pages 745–756. Springer,2005.[23] Torsten Tholey. Linear time algorithms for two disjoint paths problems on directedacyclic graphs.