finding the total number of distinct shortest paths between 2 nodes in undirected weighted graph in linear time?

Posted by logan on Stack Overflow See other posts from Stack Overflow or by logan
Published on 2012-10-27T16:57:28Z Indexed on 2012/10/27 17:00 UTC
Read the original article Hit count: 200

Filed under:
|

I was wondering, that if there is a weighted graph G(V,E), and I need to find a single shortest path between any two vertices S and T in it then I could have used the Dijkstras algorithm. but I am not sure how this can be done when we need to find all the distinct shortest paths from S to T. Is it solvable on O(n) time? I had one more question like if we assume that the weights of the edges in the graph can assume values only in certain range lets say 1 <=w(e)<=2 will this effect the time complexity?

© Stack Overflow or respective owner

Related posts about graph

Related posts about shortest-path