Abstract
The two-terminal shortest-path problem asks for the shortest directed path from a specified nodes to a specified noded in a complete directed graphG onn nodes, where each edge has a nonnegative length. We show that if the length of each edge is chosen independently from the exponential distribution, and adjacency lists at each node are sorted by length, then a priority-queue implementation of Dijkstra's unidirectional search algorithm has the expected running time Θ(n logn). We present a bidirectional search algorithm that has expected running time Θ(√n logn). These results are generalized to apply to a wide class of edge-length distributions, and to sparse graphs. If adjacency lists are not sorted, bidirectional search has the expected running time Θ(a√n) on graphs of average degreea, as compared with Θ(an) for unidirectional search.
Similar content being viewed by others
References
Aho, A. A., Hopcroft, J. E., and Ullman, J. D.The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, 1974.
Balas, E., and Toth, P. Branch and Bound Methods for the Traveling Salesman Problem, MSRR 488, Carnegie-Mellon University, March 1983.
Bollobás, B.Random Graphs. Academic Press, New York, 1985.
Dijkstra, E. W. A Note on Two Problems in Connection with Graphs,Numerische Mathematik,l (1959), 260–271.
Edmonds, J., and Karp, R. M. Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems,Journal of the ACM,19 (1972), 248–264.
Lawler, E. L.Combinatorial Optimization: Networks and Matroids. Holt, Rinehart, and Winston, New York, 1976.
Ma, Y. A Shortest Path Algorithm with Expected Running TimeO(√V log V), Master's Project Report, University of California, Berkeley.
Mitrinovic, D. S.Analytic Inequalities. Springer-Verlag, Berlin, 1970.
Perl, Y. Average Analysis of Simple Path Algorithms, Tech. Report UIUCDCS-R-77-905, University of Illinois at Urbana-Champaign, 1977.
Pohl, I. Bidirectional Search,Machine Intelligence,6 (1971), 127–140.
Renyi, A.Probability Theory. North-Holland, Amsterdam, 1970.
Spira, P. M. A New Algorithm for Finding All Shortest Paths in a Graph of Positive Arcs in Average TimeO(n 2log2 n),SIAM Journal of Computing,2 (1973), 28–32.
Author information
Authors and Affiliations
Additional information
Communicated by C. K. Wong.
Rights and permissions
About this article
Cite this article
Luby, M., Ragde, P. A bidirectional shortest-path algorithm with good average-case behavior. Algorithmica 4, 551–567 (1989). https://doi.org/10.1007/BF01553908
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01553908