find a shortest path between two vertices
ShortestPath(G, u, v)
vertices of the graph
ShortestPath returns a shortest path from u to v in G using a breadth-first search. The output is a list of vertices in the order they appear on the path. If no such a path exists, an error message is displayed.
Edge weights are ignored.
To compute shortest paths with respect to edge weights, use either DijkstrasAlgorithm or BellmanFordAlgorithm.
C6 ≔ CycleGraph⁡6
C6≔Graph 1: an undirected unweighted graph with 6 vertices and 6 edge(s)
Download Help Document
What kind of issue would you like to report? (Optional)