Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Combinatorica Package >

Dijkstra

Dijkstra[g, v]
gives a shortest-path spanning tree and associated distances from vertex v of graph g. The shortest-path spanning tree is given by a list in which element i is the predecessor of vertex i in the shortest-path spanning tree. Dijkstra does not work correctly when the edge weights are negative; BellmanFord should be used in this case.
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team