Talk:Bellman–Ford algorithm: Difference between revisions

Content deleted Content added
assembly and C code
 
No edit summary
Line 4:
 
[[User:Rspeer|RSpeer]] 17:46, Apr 21, 2005 (UTC)
 
I changed the problem from weighted graph to weighted *digraph* because Bellman Ford fails spectacularly on undirected graphs: If there is a negative weight edge, say {u, v}, then Bellman-Ford will get stuck updating u and v foreover, even if there is no negative weight cycle. This subtlety may be worth mentioning in the main article. To find shortest paths in undirected graphs with negative edge weights, you can reduce the problem to weighted nonbipartite matching.