shortest paths network
Posted: Sun Apr 05, 2009 7:54 pm
In a network i want to find the number of alternate shortes paths from a start node to all other nodes. Normally Dijkstra can be used.
But because there are no weights BFS should also working.
I can modify BFS algorithm so that pred (n) doesn't only store one predecessor
but a list of possible predecessors. So i have now the PATHs
But is there any way to calculate the Number of shortest paths from a start node to rest of nodes ?
But because there are no weights BFS should also working.
I can modify BFS algorithm so that pred (n) doesn't only store one predecessor
but a list of possible predecessors. So i have now the PATHs
But is there any way to calculate the Number of shortest paths from a start node to rest of nodes ?