Improved Shortest Paths on the Word RAM

  • Authors:
  • Torben Hagerup

  • Affiliations:
  • -

  • Venue:
  • ICALP '00 Proceedings of the 27th International Colloquium on Automata, Languages and Programming
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Thorup recently showed that single-source shortest-paths problems in undirected networks with n vertices, m edges, and edge weights drawn from {0, . . . , 2w -1} can be solved in O(n+m) time and space on a unit-cost random-access machine with a word length of w bits. His algorithm works by traversing a so-called component tree. Two new related results are provided here. First, and most importantly, Thorup's approach is generalized from undirected to directed networks. The resulting time bound, O(n + m log w), is the best deterministic linear-space bound known for sparse networks unless w is superpolynomial in log n. As an application, all-pairs shortest-paths problems in directed networks with n vertices, m edges, and edge weights in {-2w, . . . , 2w} can be solved in O(nm + n2 log log n) time and O(n + m) space (not counting the output space). Second, it is shown that the component tree for an undirected network can be constructed in deterministic linear time and space with a simple algorithm, to be contrasted with a complicated and impractical solution suggested by Thorup. Another contribution of the present paper is a greatly simplified view of the principles underlying algorithms based on component trees.