Replacement paths and distance sensitivity oracles via fast matrix multiplication

Research output: Contribution to journalArticlepeer-review


A distance sensitivity oracle of an n-vertex graph G = (V,E) is a data structure that can report shortest paths when edges of the graph fail. A query (u ∈ V, v ∈ V, S ⊆ E) to this oracle returns a shortest u-to-v path in the graph G′ = (V,E \ S). We present randomized (Monte Carlo) algorithms for constructing a distance sensitivity oracle of size Õ(n 3-α) for |S| = O(lg n/lg lg n) and any choice of 0 < α < 1. For real edge-lengths, the oracle is constructed in O(n4-α) time and a query to this oracle takes Õ(n2-2(1-α)/|S|) time. For integral edge-lengths in {-M,.. ,M}, using the current ω < 2.376 matrix multiplication exponent, the oracle is constructed in O(Mn 3.376-α) time with Õ(n2-(1-α)/|S|) query, or alternatively in O(M0.681n3.575-α) time with Õ(n2-2(1-α)/|S|) query. Distance sensitivity oracles generalize the replacement paths problem in which u and v are known in advance and |S| = 1. In other words, if P is a shortest path from u to v in G, then the replacement paths problem asks to compute, for every edge e on P, a shortest u-to-v path that avoids e. Our new technique for constructing distance sensitivity oracles using fast matrix multiplication also yields the first subcubictime algorithm for the replacement paths problem when the edge-lengths are small integers. In particular, it yields a randomized (Monte Carlo) Õ(Mn2.376 + M 2/3 n2.584)-time algorithm for the replacement paths problem assuming M ≤ n0.624. Finally, we mention that both our replacement paths algorithm and our distance sensitivity oracle can be made to work, in the same time and space bounds, for the case of failed vertices rather than edges, that is, when S is a set of vertices and we seek a shortest u-to-v path in the graph obtained from G by removing all vertices in S and their adjacent edges.

Original languageEnglish
Article number14
JournalACM Transactions on Algorithms
Issue number2
StatePublished - 2013


  • Distance oracles
  • Fault tolerance
  • Replacement paths
  • Shortest paths

ASJC Scopus subject areas

  • Mathematics (miscellaneous)


Dive into the research topics of 'Replacement paths and distance sensitivity oracles via fast matrix multiplication'. Together they form a unique fingerprint.

Cite this