Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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. Given the max flow-min cut theorem, is it possible to use one of those algorithms to find the minimum cut on a graph using a maximum flow algorithm? How?

The best information I have found so far is that if I find "saturated" edges i.e. edges where flow equals capacity, those edges correspond to the minimum cut. Is that true? It doesn't sound 100% right to me. It is true that all edges on the minimum cut will be saturated, but I believe there might also be saturated edges which are out of the minimum cut "path".

like image 657
cesarbs Avatar asked Dec 19 '10 12:12

cesarbs


People also ask

How do you find all min cuts on a graph?

To find all minimum cuts in graph G, the algorithm chooses an edge e = (s, t) in G and uses a maximum flow f to find the minimum s-t-cut λ(s, t). If λ(s, t) > λ there is no minimum cut that separates s and t and thus e can be contracted.

Which algorithm is used to solve a minimum cut algorithm?

1. Which algorithm is used to solve a minimum cut algorithm? Explanation: Minimum cut algorithm is solved using Stoer-Wagner algorithm.


2 Answers

From the source vertex, do a depth-first search along edges in the residual network (i.e., non-saturated edges and back edges of edges that have flow), and mark all vertices that can be reached this way. The cut consists of all edges that go from a marked to an unmarked vertex. Clearly, those edges are saturated and thus were not traversed. As you noted, there might be other saturated edges that are not part of the minimum cut.

like image 86
Falk Hüffner Avatar answered Nov 11 '22 21:11

Falk Hüffner


I don't want to be picky, but the suggested solution is not quite right as proposed.

Correct solution: What you actually should be doing is bfs/dfs on the Residual-Network Gf (read it up on wikipedia) and marking vertices. And then you can pick those with marked from-vertex and unmarked to-vertex.

Why 'following unsaturated edges' is not enough: Consider, that the flow algorithm saturates the edges as shown in the picture. I marked the vertices I'm visiting with the approach of "just following unsaturated edges" with green. Clearly the only correct min-cut is the edge from E-F, while the suggested solution would also return A-D (and maybe even D-E).

enter image description here Note that the vertex D would be visited by the dfs/bfs if we considered the Residual network instead, because there'd be an edge from E to D, thereby making the edge E-F the only one with a marked from-vertex and an unmarked to-vertex.

like image 39
dingalapadum Avatar answered Nov 11 '22 21:11

dingalapadum