Maximum flow - Ford-Fulkerson: Undirected graph

后端 未结 1 830
予麋鹿
予麋鹿 2021-01-31 20:16

I am trying to solve the maxium flow problem for a graph using Ford–Fulkerson algorithm. The algorithm is only described with a directed graph. What about when the graph is undi

相关标签:
1条回答
  • 2021-01-31 20:35

    Your approach using two antiparallel edges works. If your edge is a->b (capacity 10, we send 7 over it), we introduce a new residual edge (from b to a that has residual capacity 17, the residual edge from a to b has the remaining capacity 3).

    The original back-edge (from b to a) can be left as it is or the new residual edge and the original backedge can be melt into one edge.

    I could imagine that adding the residual capacity to the original back-edge is a bit simpler, but not sure about that.

    0 讨论(0)
提交回复
热议问题