How can I find the minimum cut on a graph using a maximum flow algorithm?

后端 未结 7 1612
旧时难觅i
旧时难觅i 2020-12-07 13:27

I need to find the minimum cut on a graph. I\'ve been reading about flow networks, but all I can find are maximum flow algorithms such as Ford-Fulkerson, push-relabel, etc.

7条回答
  •  醉梦人生
    2020-12-07 13:50

    So, to give the exact procedure how to obtain the minimum cut:

    1. Run Ford-Fulkerson algorithm to find the max flow and to get the residual graph1.
    2. Run BFS on the residual graph to find the set of vertices that are reachable from source in the residual graph (respecting that you can't use edges with 0 capacity in the residual graph). IMPORTANT: You have to use reverse edges in the residual graph to find the correct set of reachable vertices!!! (See this algorithm)
    3. All edges in the original graph which are from a reachable vertex to non-reachable vertex are minimum cut edges. Print all such edges.

    1 Graph in which the capacity of an edge is defined like it's original capacity minus its flow (flow from the maximum flow network).

提交回复
热议问题