Given a directed weighted graph with non-negative weights, how can I find all edges that are a part of any of the shortest paths from vertex X to Y?
In the example below the yellow edges are the solution for finding the shortest path between A and D (note that other examples may have more than one path).
I know how to find all nodes that are a part of a shortest path so I thought that all edges that sit between two nodes which are both on a shortest path means that the edge between them is also a part of the shortest path, but that is not true.
Any ideas would be appreciated.
A,C,E,Dthen get edges