How does this algorithm to find the edges of the min cut of a graph work?
-
http://stackoverflow.com/questions/4482986/how-can-i-find-the-minimum-cut-on-a-graph-using-a-maximum-flow-algorithm/21219223#21219223 The answer says that the min cut consists of the edges with reachable from vertex and unreachable to vertex. (reachability is from the source vertex) Also, do any other algorithms exist to find the min-cut?
-
Answer:
Thanks for the A2A. First set the weight of the graph GGedges to 1, use ford-fulkerson or edmond-karps algoirthm to compute the maximum flow. Both these algorithms work on adding flow along augmenting paths. So when you attain the maximum flow, there is surely no more augmenting path along which you can add more flow. Now do a dfs from the source to get all the vertices in the same cut as the source (say XX) and V(G)âXV(G) \setminus X will give you the other part of the cut. The only problem with these algorithms are that these are slow, even edmond-karp algorithm has a runtime of O(VE2)O(VE^2). So a faster way to get a min cut is to use the following randomized algorithm. Let GG be the graph on nn vertices and a mincut of size kk. 1. Pick an edge randomly (say (v1,v2)(v_1,v_2))and merge the two endpoints into a supervertex (say v12v_{12}). Merging involves removal of the edge (v1,v2)(v_1,v_2), forming the supervertex v12v_{12}), adding the rest of the edges initially connected to either v1v_1 or v2v_2 to v12v_{12}. Continue this process untill you are left with only two vertices. Let the cut between them is of size k1k_1. Repeat the above procedure n22\frac{n^2}{2} times to get cuts of different sizes. Return the minimum of them as the mincut. With high probability this procedure returns a min cut. For the entire analysis, refer to Motwani-Raghwan textbook. http://dl.acm.org/citation.cfm?id=211390.
Tapas Kumar Mishra at Quora Visit the source
Related Q & A:
- How to calculate max/min scales on a scatter plot?Best solution by Cross Validated
- How to create a graph using python?Best solution by Stack Overflow
- How much can you cut of a pine tree?Best solution by gardenguides.com
- How hard is it to find a job with a marketing degree?Best solution by Yahoo! Answers
- How to wrap tight a cut finger a child is picking on?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.