# Experimental Evaluation of a New Shortest Path Algorithm

## Abstract

We evaluate the practical efficiency of a new shortest path algorithm for undirected graphs which was developed by the first two authors. This algorithm works on the fundamental *comparison-addition model*.

Theoretically, this new algorithm out-performs Dijkstra’s algorithm on sparse graphs for the all-pairs shortest path problem, and more generally, for the problem of computing single-source shortest paths from *ω*(1) different sources. Our extensive experimental analysis demonstrates that this is also the case in practice. We present results which show the new algorithm to run faster than Dijkstra’s on a variety of sparse graphs when the number of vertices ranges from a few thousand to a few million, and when computing single-source shortest paths from as few as three different sources.

## Keywords

Short Path Minimum Span Tree Short Path Problem Graph Class Short Path Algorithm## Preview

Unable to display preview. Download preview PDF.

## References

- [AHU74]A. V. Aho, J. E. Hopcroft, J. D. Ullman.
*The Design and Analysis of Computer Algorithms*. Addison-Wesley, 1974.Google Scholar - [Bo85]B. Bollobás.
*Random Graphs*. Academic Press, London, 1985.zbMATHGoogle Scholar - [CGR96]B. V. Cherkassky, A. V. Goldberg, T. Radzik. Shortest paths algorithms: Theory and experimental evaluation. In
*Math. Prog.*73 (1996), 129–174.MathSciNetGoogle Scholar - [CLR90]T. Cormen, C. Leiserson, R. Rivest.
*Intro. to Algorithms*. MIT Press, 1990.Google Scholar - [Dij59]E. W. Dijkstra. A note on two problems in connexion with graphs. In
*Numer. Math.*, 1 (1959), 269–271.zbMATHCrossRefMathSciNetGoogle Scholar - [ER61]P. Erdös, A. Rényi On the evolution of random graphs.
*Bull. Inst. Internat. Statist*. 38, pp. 343–347, 1961.zbMATHMathSciNetGoogle Scholar - [F76]M. Fredman. New bounds on the complexity of the shortest path problem.
*SIAM J. Comput.*5 (1976), no. 1, 83–89.zbMATHCrossRefMathSciNetGoogle Scholar - [F+86]M. L. Fredman, R. Sedgewick, D. D. Sleator, R. E. Tarjan. The pairing heap: A new form of self-adjusting heap. In
*Algorithmica*1 (1986) pp. 111–129.zbMATHCrossRefMathSciNetGoogle Scholar - [FT87]M. L. Fredman, R. E. Tarjan. Fibonacci heaps and their uses in improved network optimization algorithms. In
*JACM*34 (1987), 596–615.CrossRefMathSciNetGoogle Scholar - [G85]H. N. Gabow. A scaling algorithm for weighted matching on general graphs. In
*Proc. FOCS 1985*, 90–99.Google Scholar - [G01]A. Goldberg. A simple shortest path algorithm with linear average time. InterTrust Technical Report STAR-TR-01-03, March 2001.Google Scholar
- [G01b]A. Goldberg. Shortest path algorithms: engineering aspects.
*ISSAC 2001*.Google Scholar - [GS97]A. Goldberg, C. Silverstein. Implementations of Dijkstra’s algorithm based on multi-level buckets.
*Network optimization*(1997), Lec. Not. Econ. Math. Syst. 450, 292–327.Google Scholar - [Hag00]T. Hagerup. Improved shortest paths on the word RAM. In
*Proc. ICALP 2000*, LNCS volume 1853, 61–72.Google Scholar - [Iac00]J. Iacono. Improved upper bounds for pairing heaps. Algorithm theory—SWAT 2000 (Bergen), LNCS vol. 1851, 32–45CrossRefGoogle Scholar
- [Jak91]H. Jakobsson, Mixed-approach algorithms for transitive closure. In
*Proc. ACM PODS*, 1991, pp. 199–205.Google Scholar - [Jar30]V. Jarník, O jistém problému minimálním.
*Práca Moravské Prírodovedecké Spolecnosti*6 (1930), 57–63, in Czech.Google Scholar - [KKP93]D. R. Karger, D. Koller, S. J. Phillips. Finding the hidden path: time bounds for all-pairs shortest paths.
*SIAM J. on Comput.*22 (1993), no. 6, 1199–1217.zbMATHCrossRefMathSciNetGoogle Scholar - [KS98]S. Kolliopoulos, C. Stein. Finding real-valued single-source shortest paths in
*o*(*n*^{3}) expected time.*J. Algorithms*28 (1998), no. 1, 125–141.zbMATHCrossRefMathSciNetGoogle Scholar - [McG91]C. C. McGeoch. A new all-pairs shortest-path algorithm. Tech. Report 91-30 DIMACS, 1991. Also appears in
*Algorithmica*, 13(5): 426–461, 1995.Google Scholar - [MN99]K. Mehlhorn, S. Näher.
*The LEDA Platform of Combinatorial and Geometric Computing*. Cambridge Univ. Press, 1999.Google Scholar - [Mey01]U. Meyer. Single source shortest paths on arbitrary directed graphs in linear average-case time. In
*Proc. SODA 2001*, 797–806.Google Scholar - [MT87]A. Moffat, T. Takaoka. An all pairs shortest path algorithm with expected time
*O*(*n*^{2}log*n*).*SIAM J. Comput.*16 (1987), no. 6, 1023–1031.zbMATHCrossRefMathSciNetGoogle Scholar - [MS94]B. M. E. Moret, H. D. Shapiro. An empirical assessment of algorithms for constructing a minimum spanning tree. In
*DIMACS Series on Discrete Math. and Theor. CS*, 1994.Google Scholar - [PR00]S. Pettie, V. Ramachandran. An optimal minimum spanning tree algorithm. In
*Proc. ICALP 2000*, LNCS volume 1853, 49–60.*JACM*, to appear.Google Scholar - [PR02]S. Pettie, V. Ramachandran. Computing shortest paths with comparisons and additions. In
*Proc. SODA’ 02*, January 2002, to appear.Google Scholar - [S00]P. Sanders. Fast priority queues for cached memory.
*J. Experimental Algorithms*5, article 7, 2000.Google Scholar - [Tak92]T. Takaoka. A new upper bound on the complexity of the all pairs shortest path problem.
*Inform. Process. Lett.*43 (1992), no. 4, 195–199.zbMATHCrossRefMathSciNetGoogle Scholar - [Tho99]M. Thorup. Undirected single source shortest paths with positive integer weights in linear time.
*J. Assoc. Comput. Mach.*46 (1999), no. 3, 362–394.zbMATHMathSciNetGoogle Scholar - [Tho01]M. Thorup. Quick
*k*-median,*k*-center, and facility location for sparse graphs. In*Proc. ICALP 2001*, LNCS Vol. 2076, 249–260.Google Scholar - [Z01]U. Zwick. Exact and approximate distances in graphs — a survey. In
*Proc. 9th ESA*(2001), 33–48. Updated copy at http://www.cs.tau.ac.il/~zwick