Finding the flow of a maximum flow

Revision en2, by e2298, 2020-03-12 08:37:23

How do I find the actual flow (on each edge) that generates the maximum flow? i.e. the flow function. I'd prefer a solution using the Edmonds-Karp algorithm, but any other is fine too.

I think it should be simple and I'm feeling pretty stupid for not finding it. Can I get the flow from the residual graph? do I need to keep track of it in a separate data structure?

I thought the answer might be the difference between the initial capacity of the edge in the flow network and the value in the residual graph after running the algorithm, but I have a feeling that doesn't work.


  Rev. Lang. By When Δ Comment
en2 English e2298 2020-03-12 08:37:23 4
en1 English e2298 2020-03-12 08:36:47 614 Initial revision (published)