I have an unweighted consistent graph and some node X(the source) and some nodes A, B, C and more. I need to find the shortest paths: X->A, X->B, X->C
and so on. Note that the number of goal nodes will not be very big.
If I were looking for only one path I would use BFS. But I'm quite sure how I can use BFS to find all paths to goal nodes.
Time is of the essence here so I wanted to use one BFS call to find all paths at once. I basically only need their costs. But I don't really know how to do that.
Does Dijkstra's algorithm do that?
The ultimate goal is that for every source node(because there are more of them) find the shortest paths to goal nodes. All sources want to find paths to the same goal nodes. And based on every path cost I want to create a consistent bipartite graph.