Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Finding all shortest paths between given (specific) pair of vertices

I am working with graphs in sage and need a method of finding all shortest paths between some pair (or all pairs) of vertices.

Note that it is important to have all shortest paths registred, not just one, as seen in many Bellman-Ford/Dijkstra implementations (for instance Graph.shortest_path_all_pairs or networkx.algorithms.shortest_paths.all_pairs_shortest_path). I am satisfied also with only a list of "optimal" predecessors... as long as the list is complete.

Thank you for answers!

Finding all shortest paths between given (specific) pair of vertices

I am working with graphs in sage and need a method of finding all shortest paths between some pair (or all pairs) of vertices.

Note that it is important to have all shortest paths registred, not just one, as seen in many Bellman-Ford/Dijkstra implementations (for instance Graph.shortest_path_all_pairs or networkx.algorithms.shortest_paths.all_pairs_shortest_path). networkx.algorithms.shortest_paths.all_pairs_shortest_path), and not just a number of those paths.

I am also satisfied also with only a list of "optimal" predecessors... as long as the list is complete.

Thank you for answers!