继续福特 - 富克尔森

时间:2016-04-28 15:12:36

标签: ford-fulkerson

我正在尝试学习Ford-Fulkerson方法。我已经为练习做了一个例子,在某些时候我不能继续增加流量,但我知道流量可能更高。

enter image description here

首先,我增加了路径s -> 1 -> 2 -> t。而现在我找不到任何增加流量的途径。我知道如果我首先使用路径a -> 1 -> 5 -> 6 -> t,那么我可以增加路径s -> 3 -> 4 -> 2 -> t,但如果我必须实现它,我将不知道该怎么做。

我做错了什么?

1 个答案:

答案 0 :(得分:0)

我明白了。我不知道可以在与箭头相反的方向上使用边缘。

enter image description here

所以我们可以遍历路径s -> 3 -> 4 -> 2 -> 1 -> 5 -> 6 -> t

enter image description here

然后我们得到预期的结果。