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 / V 2 = α < .2875, and V ≥ 22 WM / β + 5/ β + 7.04, where β = 23 - 80 α . FLOW also will solve the all-pairs shortest distance problem, requiring time O ( V * max( V, E, D )) for the solution.