Table of Contents
Fetching ...

Efficient Algorithms for Disjoint Shortest Paths Problem and its Extensions

Keerti Choudhary, Amit Kumar, Lakshay Saggi

TL;DR

The paper presents polynomial-time algorithms for the 2-Disjoint Shortest Paths problem in directed weighted graphs without negative or zero cycles, achieving a near-optimal $O(mn\log n)$ time and enabling explicit path reporting in $O(mn^2\log n)$. It introduces an algebraic framework built on path-enumerating polynomials evaluated over a field of characteristic two, leveraging cancellations to isolate disjoint shortest path pairs. The work extends these tools to the Minimum 2-Disjoint Shortest Paths (Min-2-DSP) problem, giving an $O(m^2n^3)$-time algorithm for general directed graphs with positive weights and linear-time solutions for DAGs and undirected graphs, including efficient reporting whenever disjoint solutions exist or when the minimum overlap is one. These results close significant gaps in the directed setting, generalize prior DAG/undirected insights, and provide practical, structure-aware approaches for both existence and optimization of shortest-path disjointness. Overall, the paper advances the computational understanding of disjoint shortest-path structures and offers broadly applicable techniques for network design and routing problems.

Abstract

We study the 2-Disjoint Shortest Paths (2-DSP) problem: given a directed weighted graph and two terminal pairs $(s_1,t_1)$ and $(s_2,t_2)$, decide whether there exist vertex-disjoint shortest paths between each pair. Building on recent advances in disjoint shortest paths for DAGs and undirected graphs (Akmal et al. 2024), we present an $O(mn \log n)$ time algorithm for this problem in weighted directed graphs that do not contain negative or zero weight cycles. This algorithm presents a significant improvement over the previously known $O(m^5n)$ time bound (Berczi et al. 2017). Our approach exploits the algebraic structure of polynomials that enumerate shortest paths between terminal pairs. A key insight is that these polynomials admit a recursive decomposition, enabling efficient evaluation via dynamic programming over fields of characteristic two. Furthermore, we demonstrate how to report the corresponding paths in $O(mn^2 \log n)$ time. In addition, we extend our techniques to a more general setting: given two terminal pairs $(s_1, t_1)$ and $(s_2, t_2)$ in a directed graph, find the minimum possible number of vertex intersections between any shortest path from $s_1$ to $t_1$ and $s_2$ to $t_2$. We call this the Minimum 2-Disjoint Shortest Paths (Min-2-DSP) problem. We provide in this paper the first efficient algorithm for this problem, including an $O(m^2 n^3)$ time algorithm for directed graphs with positive edge weights, and an $O(m+n)$ time algorithm for DAGs and undirected graphs. Moreover, if the number of intersecting vertices is at least one, we show that it is possible to report the paths in the same $O(m+n)$ time. This is somewhat surprising, as there is no known $o(mn)$ time algorithm for explicitly reporting the paths if they are vertex-disjoint, and is left as an open problem in (Akmal et al. 2024).

Efficient Algorithms for Disjoint Shortest Paths Problem and its Extensions

TL;DR

The paper presents polynomial-time algorithms for the 2-Disjoint Shortest Paths problem in directed weighted graphs without negative or zero cycles, achieving a near-optimal time and enabling explicit path reporting in . It introduces an algebraic framework built on path-enumerating polynomials evaluated over a field of characteristic two, leveraging cancellations to isolate disjoint shortest path pairs. The work extends these tools to the Minimum 2-Disjoint Shortest Paths (Min-2-DSP) problem, giving an -time algorithm for general directed graphs with positive weights and linear-time solutions for DAGs and undirected graphs, including efficient reporting whenever disjoint solutions exist or when the minimum overlap is one. These results close significant gaps in the directed setting, generalize prior DAG/undirected insights, and provide practical, structure-aware approaches for both existence and optimization of shortest-path disjointness. Overall, the paper advances the computational understanding of disjoint shortest-path structures and offers broadly applicable techniques for network design and routing problems.

Abstract

We study the 2-Disjoint Shortest Paths (2-DSP) problem: given a directed weighted graph and two terminal pairs and , decide whether there exist vertex-disjoint shortest paths between each pair. Building on recent advances in disjoint shortest paths for DAGs and undirected graphs (Akmal et al. 2024), we present an time algorithm for this problem in weighted directed graphs that do not contain negative or zero weight cycles. This algorithm presents a significant improvement over the previously known time bound (Berczi et al. 2017). Our approach exploits the algebraic structure of polynomials that enumerate shortest paths between terminal pairs. A key insight is that these polynomials admit a recursive decomposition, enabling efficient evaluation via dynamic programming over fields of characteristic two. Furthermore, we demonstrate how to report the corresponding paths in time. In addition, we extend our techniques to a more general setting: given two terminal pairs and in a directed graph, find the minimum possible number of vertex intersections between any shortest path from to and to . We call this the Minimum 2-Disjoint Shortest Paths (Min-2-DSP) problem. We provide in this paper the first efficient algorithm for this problem, including an time algorithm for directed graphs with positive edge weights, and an time algorithm for DAGs and undirected graphs. Moreover, if the number of intersecting vertices is at least one, we show that it is possible to report the paths in the same time. This is somewhat surprising, as there is no known time algorithm for explicitly reporting the paths if they are vertex-disjoint, and is left as an open problem in (Akmal et al. 2024).

Paper Structure

This paper contains 37 sections, 43 theorems, 58 equations, 8 figures, 5 algorithms.

Key Result

Theorem 1.1

The 2-DSP problem in directed weighted graphs having no cycles of negative or zero weight is solvable in $O(mn\log n)$ time. Moreover, we can report the explicit paths, if they exist, in $O(mn^2\log n)$ time.

Figures (8)

  • Figure 1: Illustration of interaction of shortest-paths in (a) DAGs, and (b) directed graphs having no cycles of negative or zero weight.
  • Figure 2: Illustration of paths $P_1,P_2$ with two concordant pairs. Observe that $\mathcal{C}(P_1,P_2)=\mathcal{C}(P_1',P_2)$.
  • Figure 3: Illustration of the swap operation on pair $(P_1,P_2)\in \mathcal{A}\setminus \mathcal{B}$.
  • Figure 4: Illustration of interaction between shortest paths contributing to the polynomials (i) $H_{av}(s_1,t_1,s_2,t_2)$, and (ii) its building block $H_{bu}(s_1, a, v, t_2)$. (Note that only the shaded prefix/suffix segments need to be vertex-disjoint.)
  • Figure 5: The directed graph above shows multiple shortest paths between $(x_1, y_1)$ (eg. dashed edges $c_1,\ldots,c_{11}$) and $(x_2, y_2)$ (eg. solid edges $a_1,\ldots,a_{11}$); For any choice of $(x_1,y_1)$ and $(x_2,y_2)$ shortest paths $(P_1, P_2)$, we have $\mathcal{C}(P_1,P_2)=\{(u,w),(u',w')\}$, thereby implying $F_{\mathop{\mathrm{disj}}\nolimits,6}(x_1, y_1, x_2, y_2)/(F(u,w)^2\cdot F(u',w')^2) = z_{a_1}z_{a_6}z_{a_{11}}\,z_{c_1}z_{c_6}z_{c_{11}}$.
  • ...and 3 more figures

Theorems & Definitions (69)

  • Theorem 1.1
  • Theorem 1.2
  • Theorem 1.3
  • Theorem 1.4
  • Definition 2.1: Internally vertex-disjoint paths
  • Lemma 2.1
  • Definition 2.2: Twin-crossing paths
  • Lemma 2.3: Schwartz-Zippel lemma
  • Definition 2.4: Enumerating polynomial
  • Lemma 2.4
  • ...and 59 more