ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 03 Dec 2016 15:44:40 -0600The interval I(u,v) between a pair of vertices u,v in graphhttps://ask.sagemath.org/question/35905/the-interval-iuv-between-a-pair-of-vertices-uv-in-graph/Hello Everyone,
I am really new to the sagemath and I need your help with finding the interval between **all pair of vertices** in a graph.
Def: In graph G, the Interval between a pair of vertices u and v is: I(u,v)={w|d(u,v)=d(u,w)+d(w,v)}
In other words, the interval between a pair of vertices u and v is : all vertices that lies on all shortest paths between them.
I want to find the interval between all pairs of vertices in graph. I do not know if such function already exists in sagemath or I do need to implement my own.
Thanks,
HakeemHakeemSat, 03 Dec 2016 15:44:40 -0600https://ask.sagemath.org/question/35905/Finding all shortest paths between given (specific) pair of verticeshttps://ask.sagemath.org/question/10332/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), and not just a number of those paths.
I am also satisfied with only a list of "optimal" predecessors... as long as the list is complete.
Thank you for answers!MorgothTue, 09 Jul 2013 00:45:53 -0500https://ask.sagemath.org/question/10332/