Replacement paths and k simple shortest paths in unweighted directed graphs

  • Authors:
  • Liam Roditty;Uri Zwick

  • Affiliations:
  • Bar-Ilan University, Israel;Tel-Aviv University, Israel

  • Venue:
  • ACM Transactions on Algorithms (TALG)
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Let G = (V,E) be a directed graph and let P be a shortest path from s to t in G. In the replacement paths problem, we are required to find, for every edge e on P, a shortest path from s to t in G that avoids e. The only known algorithm for solving the problem, even for unweighted directed graphs, is the trivial algorithm in which each edge on the path, in its turn, is excluded from the graph and a shortest paths tree is computed from s. The running time is O(mn + n2 log n). The replacement paths problem is strongly motivated by two different applications: (1) The fastest algorithm to compute the k simple shortest paths between s and t in directed graphs [Yen 1971; Lawler 1972] computes the replacement paths between s and t. Its running time is Õ(mnk). (2) The replacement paths problem is used to compute the Vickrey pricing of edges in a distributed network. It was raised as an open problem by Nisan and Ronen [2001] whether it is possible to compute the Vickrey pricing faster than n computations of a shortest paths tree. In this article we present the first nontrivial algorithm for computing replacement paths in unweighted directed graphs (and in graphs with small integer weights). Our algorithm is Monte-Carlo and its running time is Õ(m√n). This result immediately improves the running time of the two applications mentioned above in a factor of √n. We also show how to reduce the problem of computing k simple shortest paths between s and t to O(k) computations of a second simple shortest path from s to t each time in a different subgraph of G. The importance of this result is that computing a second simple shortest path may turn out to be an easier problem than computing the replacement paths, thus, we can focus our efforts to improve the k simple shortest paths algorithm in obtaining a faster algorithm for the second shortest path problem.