Блог пользователя e2298

Автор e2298, история, 4 года назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится