Table of Contents
Fetching ...

On Constrained and k Shortest Paths

Abderrahim Bendahi, Adrien Fradin

TL;DR

This paper examines two NP-hard variants of the shortest-path problem—the constrained shortest path and the k-shortest paths—alongside a spectrum of SSSP algorithms. It provides both algorithmic implementations (Dijkstra, Bellman-Ford with optimizations, Δ-stepping) and LP/ILP formulations to view these problems from multiple angles. A comprehensive benchmark on a large, real-world graph demonstrates that Dijkstra typically offers the best total performance, while optimized Bellman-Ford variants can be competitive in certain regimes, and highlights trade-offs with preprocessing. The work connects classical graph algorithms to data-science applications like Isomap, emphasizing practical implications for distance-preserving dimensionality reduction and related pipelines.

Abstract

Finding a shortest path in a graph is one of the most classic problems in algorithmic and graph theory. While we dispose of quite efficient algorithms for this ordinary problem (like the Dijkstra or Bellman-Ford algorithms), some slight variations in the problem statement can quickly lead to computationally hard problems. This article focuses specifically on two of these variants, namely the constrained shortest paths problem and the k shortest paths problem. Both problems are NP-hard, and thus it's not sure we can conceive a polynomial time algorithm (unless P = NP), ours aren't for instance. Moreover, across this article, we provide ILP formulations of these problems in order to give a different point of view to the interested reader. Although we did not try to implement these on modern ILP solvers, it can be an interesting path to explore. We also mention how these algorithms constitute essential ingredients in some of the most important modern applications in the field of data science, such as Isomap, whose main objective is the reduction of dimensionality of high-dimensional datasets.

On Constrained and k Shortest Paths

TL;DR

This paper examines two NP-hard variants of the shortest-path problem—the constrained shortest path and the k-shortest paths—alongside a spectrum of SSSP algorithms. It provides both algorithmic implementations (Dijkstra, Bellman-Ford with optimizations, Δ-stepping) and LP/ILP formulations to view these problems from multiple angles. A comprehensive benchmark on a large, real-world graph demonstrates that Dijkstra typically offers the best total performance, while optimized Bellman-Ford variants can be competitive in certain regimes, and highlights trade-offs with preprocessing. The work connects classical graph algorithms to data-science applications like Isomap, emphasizing practical implications for distance-preserving dimensionality reduction and related pipelines.

Abstract

Finding a shortest path in a graph is one of the most classic problems in algorithmic and graph theory. While we dispose of quite efficient algorithms for this ordinary problem (like the Dijkstra or Bellman-Ford algorithms), some slight variations in the problem statement can quickly lead to computationally hard problems. This article focuses specifically on two of these variants, namely the constrained shortest paths problem and the k shortest paths problem. Both problems are NP-hard, and thus it's not sure we can conceive a polynomial time algorithm (unless P = NP), ours aren't for instance. Moreover, across this article, we provide ILP formulations of these problems in order to give a different point of view to the interested reader. Although we did not try to implement these on modern ILP solvers, it can be an interesting path to explore. We also mention how these algorithms constitute essential ingredients in some of the most important modern applications in the field of data science, such as Isomap, whose main objective is the reduction of dimensionality of high-dimensional datasets.
Paper Structure (13 sections, 12 equations, 23 figures, 8 algorithms)

This paper contains 13 sections, 12 equations, 23 figures, 8 algorithms.

Figures (23)

  • Figure 2: A counter-example to the above property, edges are labeled (weight, delay).
  • Figure 3: Two different paths with the same set of edges.
  • Figure 4: Heatmap of the average total running time (in $\mathrm{\mu s}$) of Dijkstra's algorithm.
  • Figure 5: Heatmap of the average total running time (in $\mathrm{\mu s}$) of naive Bellman-Ford algorithm.
  • Figure 6: Heatmap of the average total running time (in $\mathrm{\mu s}$) of optimized Bellman-Ford algorithm.
  • ...and 18 more figures