Skip to main content

All Pairs Shortest Paths via Matrix Multiplication

  • Reference work entry
  • First Online:
  • 338 Accesses

Years and Authors of Summarized Original Work

  • 2002; Zwick

Problem Definition

The all pairs shortest path (APSP) problem is to compute shortest paths between all pairs of vertices of a directed graph with nonnegative real numbers as edge costs. Focus is given on shortest distances between vertices, as shortest paths can be obtained with a slight increase of cost. Classically, the APSP problem can be solved in cubic time of O(n3). The problem here is to achieve a sub-cubic time for a graph with small integer costs.

A directed graph is given by G = (V, E), where V = { 1, , n}, the set of vertices, and E is the set of edges. The cost of edge (i, j) ∈ E is denoted by d ij . The (n, n)-matrix D is one whose (i, j) element is d ij . It is assumed for simplicity that d ij  > 0 and d ii  = 0 for all ij. If there is no edge from i to j, let \(d_{ij} = \infty \). The cost, or distance, of a path is the sum of costs of the edges in the path. The length of a path is the number of edges in the...

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   1,599.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD   1,999.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Recommended Reading

  1. Alon N, Galil Z, Margalit O (1991) On the exponent of the all pairs shortest path problem. In: Proceedings of the 32th IEEE FOCS, San Juan, pp 569–575. Also JCSS 54 (1997), pp 255–262

    MathSciNet  Google Scholar 

  2. Alon N, Galil Z, Margalit O, Naor M (1992) Witnesses for Boolean matrix multiplication and for shortest paths. In: Proceedings of the 33th IEEE FOCS, Pittsburgh, pp 417–426

    Google Scholar 

  3. Coppersmith D (1997) Rectangular matrix multiplication revisited. J Complex 13:42–49

    Article  MathSciNet  MATH  Google Scholar 

  4. Coppersmith D, Winograd S (1990) Matrix multiplication via arithmetic progressions. J Symb Comput 9:251–280

    Article  MathSciNet  MATH  Google Scholar 

  5. Huang X, Pan VY (1998) Fast rectangular matrix multiplications and applications. J Complex 14:257–299

    Article  MathSciNet  MATH  Google Scholar 

  6. Le Gall F (2012) Faster algorithms for rectangular matrix multiplication. In: Proceedings of the 53rd FOCS, New Brunswick, pp 514–523

    Google Scholar 

  7. Romani F (1980) Shortest-path problem is not harder than matrix multiplications. Inf Proc Lett 11:134–136

    Article  MathSciNet  MATH  Google Scholar 

  8. Schönhage A, Strassen V (1971) Schnelle Multiplikation Großer Zahlen. Computing 7:281–292

    Article  MathSciNet  MATH  Google Scholar 

  9. Seidel R (1992) On the all-pairs-shortest-path problem. In: Proceedings of the 24th ACM STOC, Victoria, pp 745–749. Also JCSS 51 (1995), pp 400–403

    Google Scholar 

  10. Takaoka T (1998) Sub-cubic time algorithms for the all pairs shortest path problem. Algorithmica 20:309–318

    Article  MathSciNet  MATH  Google Scholar 

  11. Williams VV (2012) Multiplying matrices faster than Coppersmith-Winograd. In: Proceedings of the 44th symposium on theory of computing, ACM STOC, New York, pp 887–898

    Google Scholar 

  12. Zwick U (2002) All pairs shortest paths using bridging sets and rectangular matrix multiplication. J ACM 49(3):289–317

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tadao Takaoka .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer Science+Business Media New York

About this entry

Cite this entry

Takaoka, T. (2016). All Pairs Shortest Paths via Matrix Multiplication. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, New York, NY. https://doi.org/10.1007/978-1-4939-2864-4_12

Download citation

Publish with us

Policies and ethics