Abstract

We describe a new forward-backward method for an all-pairs shortest-paths (APSP) algorithm. While most APSP algorithms only scan edges forward, the algorithm proposed here also scans all edges backward because it assumes that edges in the outgoing and incoming adjacency lists of the vertices appear with the same importance. The running time of the algorithm on a directed graph with n vertices, and m edges and positive real-valued edge weights in a deterministic way is O(nδ2⌈2logδ(n−1)−1⌉), and the space complexity is O(nδ⌈2logδ(n−1)−1⌉), where δ = m∕n is the density of the graph. Simulations on graphs with up to 10000 vertices with real, positive weights show that our FB-APSP algorithm, using additional working space less than 75% of space used by Speed-Up Floyd-Warshall algorithm, is faster on large sparse graphs, particularly planar graphs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call