I have a particular shortest path problem in which the nodes are partitioned into sets S_i.  The path should contain at most one node for each S_i, in other words the nodes of each set are mutually exclusive.

Obviously, I could formulate it as an ILP but the complexity would be not polynomial. Is there a way to adapt some of the classical shortest path algorithms (Dijkstra, Bellman-Ford, etc.), so that the complexity stays polynomial?

Thanks!

Similar questions and discussions