FindShortestPath

FindShortestPath[g, s, t]
finds the shortest path from source vertex s to target vertex t in the graph g.

FindShortestPath[g, s, All]
generates a ShortestPathFunction[...] that can be applied repeatedly to different t.

FindShortestPath[g, All, t]
generates a ShortestPathFunction[...] that can be applied repeatedly to different s.

FindShortestPath[g, All, All]
generates a ShortestPathFunction[...] that can be applied to different s and t.

Details and OptionsDetails and Options

New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »