Improved Shortest Paths on the Word RAM

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.

[1]  Mikkel Thorup,et al.  Faster deterministic sorting and priority queues in linear space , 1998, SODA '98.

[2]  Peter van Emde Boas,et al.  Preserving Order in a Forest in Less Than Logarithmic Time and Linear Space , 1977, Inf. Process. Lett..

[3]  Mikkel Thorup,et al.  On RAM priority queues , 1996, SODA '96.

[4]  Robert E. Tarjan,et al.  Fibonacci heaps and their uses in improved network optimization algorithms , 1984, JACM.

[5]  Ravindra K. Ahuja,et al.  Network Flows: Theory, Algorithms, and Applications , 1993 .

[6]  Robert E. Tarjan,et al.  Efficiency of a Good But Not Linear Set Union Algorithm , 1972, JACM.

[7]  Kurt Mehlhorn,et al.  Faster algorithms for the shortest path problem , 1990, JACM.

[8]  J. A. Hillier,et al.  A Method for Finding the Shortest Route Through a Road Network , 1960 .

[9]  Andrew V. Goldberg,et al.  Buckets, heaps, lists, and monotone priority queues , 1997, SODA '97.

[10]  Rajeev Raman,et al.  Recent results on the single-source shortest paths problem , 1997, SIGA.

[11]  Donald B. Johnson,et al.  Efficient Algorithms for Shortest Paths in Sparse Networks , 1977, J. ACM.

[12]  Rajeev Raman,et al.  Priority Queues: Small, Monotone and Trans-dichotomous , 1996, ESA.

[13]  D. R. Fulkerson,et al.  Flows in Networks. , 1964 .

[14]  Harold N. Gabow,et al.  A scaling algorithm for weighted matching on general graphs , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).

[15]  Michael L. Fredman,et al.  Trans-Dichotomous Algorithms for Minimum Spanning Trees and Shortest Paths , 1994, J. Comput. Syst. Sci..

[16]  G. Dantzig On the Shortest Route Through a Network , 1960 .

[17]  Mikkel Thorup,et al.  Undirected single-source shortest paths with positive integer weights in linear time , 1999, JACM.

[18]  Torben Hagerup,et al.  Sorting and Searching on the Word RAM , 1998, STACS.

[19]  Mikkel Thorup Randomized sorting in O(n log log n) time and linear space using addition, shift, and bit-wise boolean operations , 1997, SODA '97.

[20]  Richard Bellman,et al.  ON A ROUTING PROBLEM , 1958 .

[21]  Edsger W. Dijkstra,et al.  A note on two problems in connexion with graphs , 1959, Numerische Mathematik.

[22]  R. Prim Shortest connection networks and some generalizations , 1957 .