An output-sensitive algorithm for all-pairs shortest paths in directed acyclic graphs
Abstract
A straightforward dynamic programming method for the single-source shortest paths problem (SSSP) in an edge-weighted directed acyclic graph (DAG) processes the vertices in a topologically sorted order. First, we similarly iterate this method alternatively in a breadth-first search sorted order and the reverse order on an input directed graph with both positive and negative real edge weights, vertices and edges. For a positive integer after iterations in time, we obtain for each vertex a path distance from the source to not exceeding that yielded by the shortest path from the source to among the so called {\emlight paths}. A directed path between two vertices is light if it contains at most more edges than the minimum edge-cardinality directed path between these vertices. After iterations, we obtain an -time solution to SSSP in directed graphs with real edge weights matching that of Bellman and Ford. Our main result is an output-sensitive algorithm for the all-pairs shortest paths problem (APSP) in DAGs with positive and negative real edge weights. It runs in time where is the number of vertices, is the number of edges, is the exponent of fast matrix multiplication, stands for the indegree of is a tree of lexicographically-first shortest directed paths from all ancestors of to , and is the set of leaves in 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.
Cite
@article{arxiv.2108.03455,
title = {An output-sensitive algorithm for all-pairs shortest paths in directed acyclic graphs},
author = {Andrzej Lingas and Mia Persson and Dzmitry Sledneu},
journal= {arXiv preprint arXiv:2108.03455},
year = {2021}
}
Comments
18 pages 5 figures