skip to main content
article

All pairs shortest paths using bridging sets and rectangular matrix multiplication

Published:01 May 2002Publication History
Skip Abstract Section

Abstract

We present two new algorithms for solving the All Pairs Shortest Paths (APSP) problem for weighted directed graphs. Both algorithms use fast matrix multiplication algorithms.The first algorithm solves the APSP problem for weighted directed graphs in which the edge weights are integers of small absolute value in Õ(n2+μ) time, where μ satisfies the equation ω(1, μ, 1) = 1 + 2μ and ω(1, μ, 1) is the exponent of the multiplication of an n × nμ matrix by an nμ × n matrix. Currently, the best available bounds on ω(1, μ, 1), obtained by Coppersmith, imply that μ < 0.575. The running time of our algorithm is therefore O(n2.575). Our algorithm improves on the Õ(n(3c+ω)/2) time algorithm, where ω = ω(1, 1, 1) < 2.376 is the usual exponent of matrix multiplication, obtained by Alon et al., whose running time is only known to be O(n2.688).The second algorithm solves the APSP problem almost exactly for directed graphs with arbitrary nonnegative real weights. The algorithm runs in Õ((nω/ϵ) log(W/ϵ)) time, where ϵ > 0 is an error parameter and W is the largest edge weight in the graph, after the edge weights are scaled so that the smallest non-zero edge weight in the graph is 1. It returns estimates of all the distances in the graph with a stretch of at most 1 + ϵ. Corresponding paths can also be found efficiently.

References

  1. Aho, A. V., Hopcroft, J. E., and Ullman, J. D. 1974. The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, Mass. Google ScholarGoogle Scholar
  2. Aingworth, D., Chekuri, C., Indyk, P., and Motwani, R. 1999. Fast estimation of diameter and shortest paths (without matrix multiplication). SIAM J. Comput. 28, 1167--1181. Google ScholarGoogle Scholar
  3. Alon, N., Galil, Z., and Margalit, O. 1997. On the exponent of the all pairs shortest path problem. J. Comput. Syst. Sci. 54, 255--262. Google ScholarGoogle Scholar
  4. Alon, N., and Naor, M. 1996. Derandomization, witnesses for Boolean matrix multiplication and construction of perfect hash functions. Algorithmica 16, 434--449.Google ScholarGoogle Scholar
  5. Burgisser, P., Clausen, M., and Shokrollahi, M. A. 1997. Algebraic Complexity Theory. Springer-Verlag, New York. Google ScholarGoogle Scholar
  6. Chvátal, V. 1979. A greedy heuristic for the set-covering problem. Math. Oper. Res. 4, 233--235.Google ScholarGoogle Scholar
  7. Cohen, E., and Zwick, U. 2001. All-pairs small-stretch paths. J. Algorithms 38, 335--353. Google ScholarGoogle Scholar
  8. Coppersmith, D. 1997. Rectangular matrix multiplication revisited. J. Complex. 13, 42--49. Google ScholarGoogle Scholar
  9. Coppersmith, D., and Winograd, S. 1990. Matrix multiplication via arithmetic progressions. J. Symb. Comput. 9, 251--280. Google ScholarGoogle Scholar
  10. Cormen, T. H., Leiserson, C. E., Rivest, R. L., and Stein, C. 2001. Introduction to Algorithms, 2nd ed. The MIT Press, Cambridge, Mass. Google ScholarGoogle Scholar
  11. Dijkstra, E. W. 1959. A note on two problems in connexion with graphs. Num. Math. 1, 269--271.Google ScholarGoogle Scholar
  12. Dor, D., Halperin, S., and Zwick, U. 2000. All pairs almost shortest paths. SIAM J. Comput. 29, 1740--1759. Google ScholarGoogle Scholar
  13. Fredman, M. L. 1976. New bounds on the complexity of the shortest path problem. SIAM J. Comput. 5, 49--60.Google ScholarGoogle Scholar
  14. Fredman, M. L., and Tarjan, R. E. 1987. Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34, 596--615. Google ScholarGoogle Scholar
  15. Galil, Z., and Margalit, O. 1993. Witnesses for Boolean matrix multiplication. J. Complex. 9, 201--221. Google ScholarGoogle Scholar
  16. Galil, Z., and Margalit, O. 1997. All pairs shortest distances for graphs with small integer length edges. Inf. Comput. 134, 103--139. Google ScholarGoogle Scholar
  17. Galil, Z., and Margalit, O. 1997b. All pairs shortest paths for graphs with small integer length edges. J. Comput. Syst. Sci. 54, 243--254. Google ScholarGoogle Scholar
  18. Henzinger, M. R., and King, V. 1995. Fully dynamic biconnectivity and transitive closure. In Proceedings of the 36th Annual IEEE Symposium on Foundations of Computer Science (Milwaukee, Wis). IEEE Computer Society Press, Los Alamitos, Calif., pp. 664--672. Google ScholarGoogle Scholar
  19. Huang, X., and Pan, V. Y. 1998. Fast rectangular matrix multiplications and applications. J. Complex. 14, 257--299. Google ScholarGoogle Scholar
  20. Johnson, D. B. 1977. Efficient algorithms for shortest paths in sparse graphs. J. ACM 24, 1--13. Google ScholarGoogle Scholar
  21. Karger, D. R., Koller, D., and Phillips, S. J. 1993. Finding the hidden path: Time bounds for all-pairs shortest paths. SIAM J. Comput. 22, 1199--1217. Google ScholarGoogle Scholar
  22. Lovász, L. 1975. On the ratio of optimal integral and fractional covers. Disc. Math. 13, 383--390.Google ScholarGoogle Scholar
  23. McGeoch, C. C. 1995. All-pairs shortest paths and the essential subgraph. Algorithmica 13, 426--461.Google ScholarGoogle Scholar
  24. Pan, V. 1985. How to Multiply Matrices Faster. Lecture Notes in Computer Science, Vol. 179. Springer-Verlag, New York. Google ScholarGoogle Scholar
  25. Schönhage, A., and Strassen, V. 1971. Schnelle multiplikation grosser zahlen. Computing 7, 281--292.Google ScholarGoogle Scholar
  26. Seidel, R. 1995. On the all-pairs-shortest-path problem in unweighted undirected graphs. J. Comput. Syst. Sci. 51, 400--403. Google ScholarGoogle Scholar
  27. Shoshan, A., and Zwick, U. 1999. All pairs shortest paths in undirected graphs with integer weights. In Proceedings of the 40th Annual IEEE Symposium on Foundations of Computer Science (New York, New York). IEEE Computer Society Press, Los Alamitos, Calif., pp. 605--614. Google ScholarGoogle Scholar
  28. Takaoka, T. 1992. A new upper bound on the complexity of the all pairs shortest path problem. Inf. Proc. Lett. 43, 195--199. Google ScholarGoogle Scholar
  29. Takaoka, T. 1998. Subcubic cost algorithms for the all pairs shortest path problem. Algorithmica 20, 309--318.Google ScholarGoogle Scholar
  30. Thorup, M. 1999. Undirected single-source shortest paths with positive integer weights in linear time. J. ACM 46, 362--394. Google ScholarGoogle Scholar
  31. Thorup, M. 2000. Floats, integers, and single source shortest paths. J. Algorithms 35, 189--201. Google ScholarGoogle Scholar
  32. Ullman, J. D., and Yannakakis, M. 1991. High-probability parallel transitive-closure algorithms. SIAM J. Comput. 20, 100--125. Google ScholarGoogle Scholar
  33. Yuval, G. 1976. An algorithm for finding all shortest paths using N2.81 infinite-precision multiplications. Inf. Proc. Lett. 4, 155--156.Google ScholarGoogle Scholar
  34. Zwick, U. 1998. All pairs shortest paths in weighted directed graphs---Exact and almost exact algorithms. In Proceedings of the 39th Annual IEEE Symposium on Foundations of Computer Science (Palo Alto, Calif.). IEEE Computer Society Press, Los Alamitos, Calif., pp. 310--319. Google ScholarGoogle Scholar
  35. Zwick, U. 1999. All pairs lightest shortest paths. In Proceedings of the 31th Annual ACM Symposium on Theory of Computing (Atlanta, Ga.). ACM, New York, pp. 61--69. Google ScholarGoogle Scholar

Index Terms

  1. All pairs shortest paths using bridging sets and rectangular matrix multiplication

        Recommendations

        Reviews

        Jerzy W. Jaromczyk

        The fundamental problem of finding the shortest paths between all pairs of vertices in a weighted graph, the “all pairs shortest path” (APSP), is studied in this paper. APSP is practically important, and is particularly tantalizing due to the lack of nontrivial lower bounds. The author presents new algorithms that follow a series of recent papers, in which strong upper bounds related to the cost of square matrix multiplications have been found for directed graphs whose edge weights are integers with small absolute values. Thanks to clever use of rectangular instead of square matrices, new, improved upper bounds are derived for the above, and for &egr;-approximation APSP problems. The latter algorithm solves the APSP problem almost exactly (with a stretch of, at most, 1 + &egr;) for directed graphs with arbitrary nonnegative real weights, and has the best known upper bound at this time. These theoretically important results provide new insight into APSP. Online Computing Reviews Service

        Access critical reviews of Computing literature here

        Become a reviewer for Computing Reviews.

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image Journal of the ACM
          Journal of the ACM  Volume 49, Issue 3
          May 2002
          165 pages
          ISSN:0004-5411
          EISSN:1557-735X
          DOI:10.1145/567112
          Issue’s Table of Contents

          Copyright © 2002 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 May 2002
          Published in jacm Volume 49, Issue 3

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader