Skip to main content
Log in

A bidirectional shortest-path algorithm with good average-case behavior

  • Published:
Algorithmica Aims and scope Submit manuscript

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 Θ(an) on graphs of average degreea, as compared with Θ(an) for unidirectional search.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aho, A. A., Hopcroft, J. E., and Ullman, J. D.The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, 1974.

    MATH  Google Scholar 

  2. Balas, E., and Toth, P. Branch and Bound Methods for the Traveling Salesman Problem, MSRR 488, Carnegie-Mellon University, March 1983.

  3. Bollobás, B.Random Graphs. Academic Press, New York, 1985.

    MATH  Google Scholar 

  4. Dijkstra, E. W. A Note on Two Problems in Connection with Graphs,Numerische Mathematik,l (1959), 260–271.

    MathSciNet  Google Scholar 

  5. Edmonds, J., and Karp, R. M. Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems,Journal of the ACM,19 (1972), 248–264.

    Article  MATH  Google Scholar 

  6. Lawler, E. L.Combinatorial Optimization: Networks and Matroids. Holt, Rinehart, and Winston, New York, 1976.

    MATH  Google Scholar 

  7. Ma, Y. A Shortest Path Algorithm with Expected Running TimeO(√V log V), Master's Project Report, University of California, Berkeley.

  8. Mitrinovic, D. S.Analytic Inequalities. Springer-Verlag, Berlin, 1970.

    MATH  Google Scholar 

  9. Perl, Y. Average Analysis of Simple Path Algorithms, Tech. Report UIUCDCS-R-77-905, University of Illinois at Urbana-Champaign, 1977.

  10. Pohl, I. Bidirectional Search,Machine Intelligence,6 (1971), 127–140.

    MATH  Google Scholar 

  11. Renyi, A.Probability Theory. North-Holland, Amsterdam, 1970.

    Google Scholar 

  12. 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.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

Communicated by C. K. Wong.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01553908

Key words

Navigation