Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

An Output-Sensitive Algorithm for All-Pairs Shortest Paths in Directed Acyclic Graphs

  • Conference paper
  • First Online:
Algorithms and Discrete Applied Mathematics (CALDAM 2022)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 13179))

Included in the following conference series:

Abstract

First, we present a new algorithm for the single-source shortest paths problem (SSSP) in edge-weighted directed graphs, with n vertices, m edges, and both positive and negative real edge weights. Given a positive integer parameter t,  in O(tm) time the algorithm finds for each vertex v a path distance from the source to v not exceeding that yielded by the shortest path from the source to v among the so called \(t+\)light paths. A directed path between two vertices is \(t+\)light if it contains at most t more edges than the minimum edge-cardinality directed path between these vertices. For \(t=O(n)\), our algorithm yields an O(nm)-time solution to SSSP in directed graphs with real edge weights matching that of Bellman and Ford.

Our main contribution is a new, output-sensitive algorithm for the all-pairs shortest paths problem (APSP) in directed acyclic graphs (DAGs) with positive and negative real edge weights. The running time of the algorithm depends on such parameters as the number of leaves in (lexicographically first) shortest-paths trees, and the in-degrees in the input graph. If the trees are sufficiently thin on the average, the algorithm is substantially faster than the best known algorithm.

Finally, we discuss an extension of hypothetical improved upper time-bounds for APSP in non-negatively edge-weighted DAGs to include directed graphs with a polynomial number of large directed cycles.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    \(\omega \) is not greater than 2.3729 [1].

References

  1. Alman, J., Vassilevska Williams, V.: A refined laser method and faster matrix multiplication. In: Proceeding of SODA (2021)

    Google Scholar 

  2. Bannister, M.J., Eppstein, D.: Randomized speedup of the Bellman-Ford algorithm. In: Proceedings of ANALCO (2011)

    Google Scholar 

  3. Bellman, R.: On a routing problem. Quarter. Appl. Math. 16(1), 87–90 (1958)

    Article  Google Scholar 

  4. Chan, T.M., Williams\(\dagger \), R.: Deterministic APSP, orthogonal vectors, and more: quickly derandomizing Razborov-Smolensky. In: Proceedings of 27th ACM-SIAM Symposium on Discrete Algorithms, pp. 1246–1255 (2016)

    Google Scholar 

  5. Cormen, T., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to algorithms, 3rd edn. The MIT Press (2009)

    Google Scholar 

  6. Dijkstra, E.W.: A note on two problems in connexion with graphs. Numerische Mathematik, pp. 269–271 (1959)

    Google Scholar 

  7. Ford, L.R.: Network flow theory. The Rand Corporation, p. 923 (1956)

    Google Scholar 

  8. Karger, D.R., Koller, D., Phillips, S.J.: Finding the hidden path: time bounds for all-pairs shortest paths. SIAM J. Comput. 22, 1199–1217 (1993)

    Google Scholar 

  9. Lingas, A., Persson, M., Sledneu, D.: An output-sensitive algorithm for all-pairs shortest paths in directed acyclic graphs. CoRR abs/2108.03455 (2021)

    Google Scholar 

  10. McGeoch, C.C.: All-pairs shortest paths and the essential subgraph. Algorithmica 13, 426–461 (1995)

    Article  MathSciNet  Google Scholar 

  11. Madkour, A., Aref1, W.G., Rehman, F.U., Rahman, M.A., Basalamah, S.: Shortest-path algorithms. CoRR abs/1705.02044 (2017)

    Google Scholar 

  12. Moore, E.F.: The shortest path through a maze. In: Proceedings of an International Symposium on the Theory of Switching, 1957, Part II, pp. 285–292 (1959)

    Google Scholar 

  13. Munro, I.: Efficient determination of the transitive closure of a directed graph. Inf. Proc. Lett. 1(2), 56–58 (1971)

    Google Scholar 

  14. Pettie, S.: A new approach to all-pairs shortest paths on real-weighted graphs. Theoretical Comput. Sci. 312(1), 47–74 (2004)

    Google Scholar 

  15. Yen, J.Y.: An algorithm for finding shortest routes from all source nodes to a given destination in general networks. Quarter. Appl. Math. 27(4), 526–530 (1970)

    Article  MathSciNet  Google Scholar 

  16. Zwick, U.: All Pairs Shortest Paths using bridging sets and rectangular matrix multiplication. J. ACM 49, 289–317 (2002)

    Google Scholar 

  17. Zwick, U.: Exact and approximate distances in graphs-a survey. In: Proceedings of 9th ESA, pp. 33–48 (2001)

    Google Scholar 

  18. Zwick, U.: All pairs lightest shortest paths. In: Proceedings of the STOC, pp. 61–69 (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mia Persson .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Lingas, A., Persson, M., Sledneu, D. (2022). An Output-Sensitive Algorithm for All-Pairs Shortest Paths in Directed Acyclic Graphs. In: Balachandran, N., Inkulu, R. (eds) Algorithms and Discrete Applied Mathematics. CALDAM 2022. Lecture Notes in Computer Science(), vol 13179. Springer, Cham. https://doi.org/10.1007/978-3-030-95018-7_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-95018-7_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-95017-0

  • Online ISBN: 978-3-030-95018-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics