The built-in FindShortestPath
and GraphDistance
functions find the shortest path between two particular vertices in a graph.
I can't think of a simple way to finding all shortest paths between two vertices. Any ideas?
Motivation: I have a graph of city traffic routes from point A to point B. I'd like to take the union of shortest paths from A to B to get a subgraph that, I posit, contains (many of) the most frequented intersections.