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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
\(\omega \) is not greater than 2.3729 [1].
References
Alman, J., Vassilevska Williams, V.: A refined laser method and faster matrix multiplication. In: Proceeding of SODA (2021)
Bannister, M.J., Eppstein, D.: Randomized speedup of the Bellman-Ford algorithm. In: Proceedings of ANALCO (2011)
Bellman, R.: On a routing problem. Quarter. Appl. Math. 16(1), 87–90 (1958)
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)
Cormen, T., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to algorithms, 3rd edn. The MIT Press (2009)
Dijkstra, E.W.: A note on two problems in connexion with graphs. Numerische Mathematik, pp. 269–271 (1959)
Ford, L.R.: Network flow theory. The Rand Corporation, p. 923 (1956)
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)
Lingas, A., Persson, M., Sledneu, D.: An output-sensitive algorithm for all-pairs shortest paths in directed acyclic graphs. CoRR abs/2108.03455 (2021)
McGeoch, C.C.: All-pairs shortest paths and the essential subgraph. Algorithmica 13, 426–461 (1995)
Madkour, A., Aref1, W.G., Rehman, F.U., Rahman, M.A., Basalamah, S.: Shortest-path algorithms. CoRR abs/1705.02044 (2017)
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)
Munro, I.: Efficient determination of the transitive closure of a directed graph. Inf. Proc. Lett. 1(2), 56–58 (1971)
Pettie, S.: A new approach to all-pairs shortest paths on real-weighted graphs. Theoretical Comput. Sci. 312(1), 47–74 (2004)
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)
Zwick, U.: All Pairs Shortest Paths using bridging sets and rectangular matrix multiplication. J. ACM 49, 289–317 (2002)
Zwick, U.: Exact and approximate distances in graphs-a survey. In: Proceedings of 9th ESA, pp. 33–48 (2001)
Zwick, U.: All pairs lightest shortest paths. In: Proceedings of the STOC, pp. 61–69 (1999)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
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)