Shortest-Path Algorithms: A Comparison

In this note we present some computational evidence to suggest that a version of Bellman's shortest-path algorithm outperforms TreesortDijkstra's for a certain class of networks. MANY APPLICATIONS dealing with transportation and communication networks require the calculation of shortest paths. We discuss here the specific problem of finding the shortest paths from one node to all others. Our objective is to present some computational experience to support the claim that a version of Bellman's algorithm outperforms Treesort-Dijkstra's for a certain class of networks. This note complements a recent paper by Pape [8] and indicates that, for the class of networks under consideration, Pape's reluctance to use a variable length list of rmodes to be scanned is unwarranted. (The phrase "variable length list" refers to the fact that no realistic a priori bound on the length of the list is known.) A sequence of distinct arcs (a,, a2, .. , a_,), where at and at+? are adjacent for t = 1, .., p - 1 is called a path; a route is defined as a sequence of adjacent arcs that need not be distinct. We seek the shortest paths from the origin to all other nodes. Dreyfus [3] discusses several such algorithms in his survey paper, primarily from the viewpoint of computational complexity. Dijkstra's algorithm (reference 2) requires on the order of NN2 additions and NN2 comparisons in the worst case where NN is the number of nodes. This algorithm is a "label-setting" method that assigns permanent labels as it proceeds. Initially, the set T consists of the origin alone. T is augmented one node at a time so that at each step T is a set of permanently labeled nodes that corresponds to the shortest-path tree for all nodes in T. Termination occurs when all nodes of the graph are in T. Labeling methods for computing shortest paths can be divided into two general classes, "label-setting" and "label-correcting" (see reference 5). Label-setting methods are valid only for non-negative arc lengths. Bellman's algorithm (reference 1) solves the problem in at most NN3 additions and comparisons or detects the existence of a negative cycle. This algorithm is an example of the label-correcting approach, in which no