330 likes | 636 Views
Randomized Min-Cut. Meisam Navaki Arefi Computer Science Department Amirkabir University of Technology October 2010. Outline. Contraction Algorithm Faster Randomized Min Cut Algorithm ( Recursive Contraction Algorithm ) Open Problems References. Contraction Algorithm.
E N D
Randomized Min-Cut Meisam Navaki Arefi Computer Science Department Amirkabir University of Technology October 2010
Outline • Contraction Algorithm • Faster Randomized Min Cut Algorithm ( Recursive Contraction Algorithm ) • Open Problems • References Randomized Min Cut
Contraction Algorithm • Start with H=G • Repeat (n-2) times 1.Choose a random edge e in H 2.Contract edge e • Finally, H has only two vertices Return the resulting cut as the min-cut Randomized Min Cut
Example F A contract B E G C D FG FGD A A B E B E C D C contract Randomized Min Cut
Example ABC EFGD Randomized Min Cut
Analysis • The probability of success : • Probability of Error : Randomized Min Cut
Analysis • Repeat k times, the failure probability is • If K= n(n-1)/2 , this is According to : Failure probability ≤ 1/e (Constant probability ) Randomized Min Cut
Running Time Analysis • Theorem 10.10: The Contraction Algorithm can be implemented to run in O(n² ) time. Randomized Min Cut
Running Time Analysis • W : an n*n weighted adjacency matrix Procedure to contract edge (u , v) Let W(u , v) W( v, u) 0 For each vertex w except u and v Let W(u , w) W(u , w) + W(v , w) Let W(w , u) W(w , u) + W(w , v) Let W(v , w) W(w, v) 0 Time : O(n) Randomized Min Cut
Running Time Analysis • Start with H=G • Repeat (n-2) times 1.Choose a random edge e in H 2.Contract edge e • Finally, H has only two vertices Return the resulting cut as the min-cut Time : O(n² ) Randomized Min Cut
Running Time Analysis • Run the algorithm O(n²) times and expect to get C with constant probability. Total time: • No better than Ford-Fulkerson! Can we do better? Randomized Min Cut
Recursive Contraction Algorithm Randomized Min Cut
IDEA! The situation: n² results, one of which is expected to be good. O(n²) time Randomized Min Cut
What if ? Could compute: n² results, one of which is expected to be good. O(log n) time Randomized Min Cut
Contraction Algorithm But note: The probability of not hitting C at stage 1 is (almost 1). It grows as we run more and more stages. What happens if we stop in the middle? The probability that C not touched in the first i steps ≥ Randomized Min Cut
Recursive Contraction Algorithm • When is the probability of not hitting C exactly ½ ? -- When nodes are left. • If we run two times until nodes are left ,we expect that one of them still did not touch C . • So, for each of these runs, when nodes are left, stop running and recurse ! Randomized Min Cut
Recursive Contraction Algorithm Randomized Min Cut
Running Time Analysis The closed form is: Much better! But what is the overall probability? Randomized Min Cut
Probability • Theorem 10.17 The Recursive Contraction Algorithm finds a particular minimum cut with probability . Randomized Min Cut
Probability • Assume we are in level d of the recursion tree, with the leaves being level 1. • Let Pd(x)be the probability that there is a path from node x at level d that does not touch C. • We have: Pd(x) = ½ * ( Probability that at least one of the two recursions does not touch C) Randomized Min Cut
Probability Recall: Pr(A or B)= Pr(A)+Pr(B)-Pr(A and B) We have: Pd(x) = ½(2 Pd-1 –(Pd-1)²) Where Pd-1 is the probability that a child of x does not hit C. = Pd-1 – ½ (Pd-1)² Claim: For d >1, Pd>1/d Proof: Randomized Min Cut
Probability We have: Pd = Pd-1 – ½ (Pd-1)². Inductively: Pd-1 >1/(d-1). So, because of monotonicity , Pd-1 – ½ (Pd-1)² > Randomized Min Cut
Probability Conclude: Plog n(x) > 1/log n Which means:If we run the algorithm log n times, we get constant probability.So… Total time: O(n² log² n) If we run the algorithm log² n times, we get high probability.So… Total time: O(n² log3n) Randomized Min Cut
Best Min Cut • Best known randomized min cut algorithm: [Karger 2000] O(m log3n). • Faster than best known max flow algorithm ordeterministic global min cut algorithm. Randomized Min Cut
Open Problems • Is it easier to find a minimum cut than a maximum flow in directed graphs ? • How close to linear-time can we get in solving the minimum cut problem in theory and in practice? • Design a fast Las Vegas algorithm for min cut . Randomized Min Cut
References • Randomized Algorithms, R.Motwani ,P. Raghavan ,1995. • D.R.Karger , A New Approach To The Minimum Cut Problme,1996. • D.R.Karger,Minimum Cuts in Near-Linear Time,ACM, Vol. 47, No. 1, January 2000, pp. 46 –76. Randomized Min Cut
HAVE A NICE RANDOMIZED LIFE Randomized Min Cut