Algorithms to obtain all highest weight paths in directed acyclic graph

245 Views Asked by At

I want to identify all of the highest-weight paths between all of the start and end nodes of a directed acyclic graph with positive weights. Calculating the scores of all possible paths is computationally prohibitive for my dataset. I know that Dijkstra's algorithm can find the optimal path between two nodes but it seems like I would have to run it as many times as I have combinations of start and end nodes.

I may have missed something about Dijkstra's algorithm, or I may have been unable to find another, more appropriate one. So my question is what are the different algorithms that can find the highest-weight paths between all start and end nodes, simultaneously if such a thing exists.

1

There are 1 best solutions below

2
On

It is surely not be the best option but you could always reverse you weight ($w=-w$), and use Bellman-Ford algorithm to determine the minimum-weight path. You have no cycles therefore the algorithm should work.