Combinatorica Package >

BellmanFord


gives a shortest-path spanning tree and associated distances from vertex of graph . The shortest-path spanning tree is given by a list in which element is the predecessor of vertex in the shortest-path spanning tree. works correctly even when the edge weights are negative, provided there are no negative cycles.
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF