An output-sensitive algorithm for all-pairs shortest paths in directed acyclic graphs

08/07/2021
by   Andrzej Lingas, et al.
0

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, n vertices and m edges. For a positive integer t, after O(t) iterations in O(tm) time, we obtain 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. After O(n) iterations, we obtain an O(nm)-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 O(min{n^ω, nm+n^2log n}+∑_v∈ Vindeg(v)|leaf(T_v)|), where n is the number of vertices, m is the number of edges, ω is the exponent of fast matrix multiplication, indeg(v) stands for the indegree of v, T_v is a tree of lexicographically-first shortest directed paths from all ancestors of v to v, and leaf(T_v) is the set of leaves in T_v. 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/05/2019

Semi-dynamic shortest-path tree algorithms for directed graphs with arbitrary weights

Given a directed graph G with arbitrary real-valued weights, the single ...
research
09/15/2022

Algorithms and Lower Bounds for Replacement Paths under Multiple Edge Failures

This paper considers a natural fault-tolerant shortest paths problem: fo...
research
12/26/2018

Removing Sequential Bottleneck of Dijkstra's Algorithm for the Shortest Path Problem

All traditional methods of computing shortest paths depend upon edge-rel...
research
02/14/2018

Efficient Exact Paths For Dyck and semi-Dyck Labeled Path Reachability

The exact path length problem is to determine if there is a path of a gi...
research
04/12/2020

A Fast Algorithm for Source-Wise Round-Trip Spanners

In this paper, we study the problem of efficiently constructing source-w...
research
04/25/2018

On the Structure of Unique Shortest Paths in Graphs

This paper develops a structural theory of unique shortest paths in real...
research
05/28/2022

Towards Distributed 2-Approximation Steiner Minimal Trees in Billion-edge Graphs

Given an edge-weighted graph and a set of known seed vertices, a network...

Please sign up or login with your details

Forgot password? Click here to reset