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
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.