有向无环图中最短的正路径

我们给出了一个有向无环图,边上有两个特定的节点s和t,其中s的入度和t的出度为0.如何确定从s到t具有正成本的最短路径?


使用修改后的Bellman-Ford,如果得到的最短路径成本<0,直到达到成本(不是<0),则从图中去除边。

链接地址: http://www.djcxy.com/p/35287.html

上一篇: Shortest positive path in a directed acyclic graph

下一篇: Finding shortest sequence of vertices in directed weighted graph