A Shortest Path Algorithm for Edge-Sparse Graphs

  • Authors:
  • Robert A. Wagner

  • Affiliations:
  • Department of Systems and Information Science, Box 6147, Station B, Vanderbilt University, Nashville, TN

  • Venue:
  • Journal of the ACM (JACM)
  • Year:
  • 1976

Quantified Score

Hi-index 0.00

Visualization

Abstract

An algorithm (FLOW) for finding the shortest distance from a given node S to each node X of a directed graph with nonnegative integer arc lengths less than or equal to WM is presented. FLOW is compared with its best-known competitor, that of Dijkstra and Yen (DFLO). The new algorithm is shown to execute in time of order max (V, E, D), where D is the maximum distance computed in a graph with E edges and V nodes. By counting the number of operands fetched during execution of FLOW and DFLO, an estimate of the running time of each is obtained. This estimate shows that FLOW should execute faster than DFLO when E/V2 = &agr; V ≥ 22 WM/&bgr; + 5/&bgr; + 7.04, where &bgr; = 23 - 80&agr;. FLOW also will solve the all-pairs shortest distance problem, requiring time O(V * max(V, E, D)) for the solution.