next up previous
Next: Bellman-Ford Algorithm Up: No Title Previous: Compressed Find

One-to-all Shortest Paths

tex2html_wrap_inline620
= length of the shortest path from x to y.
tex2html_wrap_inline626 = 0; tex2html_wrap_inline628 if y is unreachable from x.

BFS generalized:
BFS would work if w(e) = 1.

Optimal Substructure:
Subpaths of shortest paths are shortest paths.

Triangle Inequality:
tex2html_wrap_inline636 .

Negatively-weighted Cycles:
Some shortest paths may be undefined.





Sushil Prasad
Thu Nov 4 14:09:59 EST 1999