The Only SSSP Algorithm
Explore the foundations of Ford's generic single source shortest path algorithm, including initialization, edge relaxation, and correctness conditions. Understand how tentative distances and predecessors form shortest-path trees and how the algorithm handles negative cycles in weighted graphs.
We'll cover the following...
Lester Ford algorithm for SSSP
Just like graph traversal and minimum spanning trees, many different SSSP algorithms can be described as special cases of a single generic algorithm, first proposed by Lester Ford in 1956 and independently described by George Dantzig in 1957 and again by George Minty in 1958. Each vertex in the graph stores two values, which (inductively) describe a tentative shortest path from to .
- is the length of the tentative shortest path or ∞ if there is no such path.
- is the predecessor of in the tentative shortest path or if there is no such vertex.
Initialization and predecessors
The predecessor pointers automatically define a tentative shortest-path tree rooted at ; these pointers are exactly the same as the parent pointers in our generic graph traversal algorithm. At the beginning of the algorithm, we initialize the distances and predecessors as follows:
Algorithm
...