next up previous
Next: Up: Previous:

Negative Weights

We encounter problems when the graphs include negative cycles.



\psfig{figure=figures/f18-1.ps}

Shortest Path from s to d can become arbitrarily short (there is no shortest path).

Dijkstra's Algorithm:
nonnegative weights
Bellman-Ford:
negative weights are okay; detects negative cycles


next up previous
Next: Up: Previous: