Skip to main content
2 of 4
added 4 characters in body
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k

Finding all shortest paths between two vertexes

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.

rjkaplan
  • 1.1k
  • 1
  • 8
  • 15