Cuts under contractions . Observation . . A cut in G / xy is a valid cut in G . 1 . . There ∃ cuts in G are not in G / xy . 2 . . The cut S = { x } is not in G / xy . 3 . . = ⇒ size mincut in G / xy ≥ mincut in G . 4 . . . Idea: Repeatedly perform edge contractions (benefits: shrink 1 graph)... . . Every vertex in contracted graph is a connected component in 2 the original graph.) Sariel (UIUC) CS573 8 Fall 2013 8 / 36
Cuts under contractions . Observation . . A cut in G / xy is a valid cut in G . 1 . . There ∃ cuts in G are not in G / xy . 2 . . The cut S = { x } is not in G / xy . 3 . . = ⇒ size mincut in G / xy ≥ mincut in G . 4 . . . Idea: Repeatedly perform edge contractions (benefits: shrink 1 graph)... . . Every vertex in contracted graph is a connected component in 2 the original graph.) Sariel (UIUC) CS573 8 Fall 2013 8 / 36
Cuts under contractions . Observation . . A cut in G / xy is a valid cut in G . 1 . . There ∃ cuts in G are not in G / xy . 2 . . The cut S = { x } is not in G / xy . 3 . . = ⇒ size mincut in G / xy ≥ mincut in G . 4 . . . Idea: Repeatedly perform edge contractions (benefits: shrink 1 graph)... . . Every vertex in contracted graph is a connected component in 2 the original graph.) Sariel (UIUC) CS573 8 Fall 2013 8 / 36
Contraction (2) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction y x (2) (3) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction y { x , y } x (2) (3) (4) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction y { x , y } x (3) (4) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction { x , y } (4) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 2 2 { x , y } (4) (5) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 2 2 (5) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 2 2 (7) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 2 2 2 2 2 (7) (8) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 2 2 2 2 2 2 2 2 (8) (9) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 2 2 2 2 2 2 2 3 2 2 2 2 2 (8) (9) (10) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 2 2 2 2 4 4 2 3 3 2 2 2 2 5 2 (9) (10) (11) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 2 2 4 4 4 3 3 2 2 2 5 5 (10) (11) (12) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 4 4 4 9 3 2 5 5 (11) (12) (13) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 4 9 5 (12) (13) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 9 (13) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction 9 (13) (14) Sariel (UIUC) CS573 9 Fall 2013 9 / 36
Contraction - all together now 2 2 2 2 2 y x (a) (b) (c) (d) 2 2 2 2 4 4 4 2 2 2 3 3 2 2 5 2 5 (e) (f) (g) (h) 9 (i) (j) Sariel (UIUC) CS573 10 Fall 2013 10 / 36
But... . Not min cut! 1 . . Contracted wrong edge somewhere... 2 . . If never contract an edge in the cut... 3 . . ...get min cut in the end! 4 . . We might still get min cut even if we contract edge min cut. 5 Why??? Sariel (UIUC) CS573 11 Fall 2013 11 / 36
But... . Not min cut! 1 . . Contracted wrong edge somewhere... 2 . . If never contract an edge in the cut... 3 . . ...get min cut in the end! 4 . . We might still get min cut even if we contract edge min cut. 5 Why??? Sariel (UIUC) CS573 11 Fall 2013 11 / 36
But... . Not min cut! 1 . . Contracted wrong edge somewhere... 2 . . If never contract an edge in the cut... 3 . . ...get min cut in the end! 4 . . We might still get min cut even if we contract edge min cut. 5 Why??? Sariel (UIUC) CS573 11 Fall 2013 11 / 36
But... . Not min cut! 1 . . Contracted wrong edge somewhere... 2 . . If never contract an edge in the cut... 3 . . ...get min cut in the end! 4 . . We might still get min cut even if we contract edge min cut. 5 Why??? Sariel (UIUC) CS573 11 Fall 2013 11 / 36
But... . Not min cut! 1 . . Contracted wrong edge somewhere... 2 . . If never contract an edge in the cut... 3 . . ...get min cut in the end! 4 . . We might still get min cut even if we contract edge min cut. 5 Why??? Sariel (UIUC) CS573 11 Fall 2013 11 / 36
The algorithm... Algorithm MinCut ( G ) G 0 ← G i = 0 while G i has more than two vertices do e i ← random edge from E ( G i ) G i +1 ← G i / e i i ← i + 1 Let ( S , V \ S ) be the cut in the original graph corresponding to the single edge in G i return ( S , V \ S ) . Sariel (UIUC) CS573 12 Fall 2013 12 / 36
How to pick a random edge? . Lemma . X = { x 1 , . . . , x n } : elements, ω ( x i ) : integer positive weight. Pick randomly, in O ( n ) time, an element ∈ X , with prob picking x i being ω ( x i ) / W , where W = ∑ n i =1 ω ( x i ) . . . Proof. . Randomly choose r ∈ [0 , W ] . Precompute β i = ∑ i k =1 ω ( x k ) = β i − 1 + ω ( x i ) . Find first index i , β i − 1 < r ≤ β i . Return x i . . . Edges have weight... 1 . . ...compute total weight of each vertex (adjacent edges). 2 . Pick randomly a vertex by weight. 3 . Pick random edge adjacent to this vertex. 4 Sariel (UIUC) CS573 13 Fall 2013 13 / 36
How to pick a random edge? . Lemma . X = { x 1 , . . . , x n } : elements, ω ( x i ) : integer positive weight. Pick randomly, in O ( n ) time, an element ∈ X , with prob picking x i being ω ( x i ) / W , where W = ∑ n i =1 ω ( x i ) . . . Proof. . Randomly choose r ∈ [0 , W ] . Precompute β i = ∑ i k =1 ω ( x k ) = β i − 1 + ω ( x i ) . Find first index i , β i − 1 < r ≤ β i . Return x i . . . Edges have weight... 1 . . ...compute total weight of each vertex (adjacent edges). 2 . Pick randomly a vertex by weight. 3 . Pick random edge adjacent to this vertex. 4 Sariel (UIUC) CS573 13 Fall 2013 13 / 36
How to pick a random edge? . Lemma . X = { x 1 , . . . , x n } : elements, ω ( x i ) : integer positive weight. Pick randomly, in O ( n ) time, an element ∈ X , with prob picking x i being ω ( x i ) / W , where W = ∑ n i =1 ω ( x i ) . . . Proof. . Randomly choose r ∈ [0 , W ] . Precompute β i = ∑ i k =1 ω ( x k ) = β i − 1 + ω ( x i ) . Find first index i , β i − 1 < r ≤ β i . Return x i . . . Edges have weight... 1 . . ...compute total weight of each vertex (adjacent edges). 2 . Pick randomly a vertex by weight. 3 . Pick random edge adjacent to this vertex. 4 Sariel (UIUC) CS573 13 Fall 2013 13 / 36
How to pick a random edge? . Lemma . X = { x 1 , . . . , x n } : elements, ω ( x i ) : integer positive weight. Pick randomly, in O ( n ) time, an element ∈ X , with prob picking x i being ω ( x i ) / W , where W = ∑ n i =1 ω ( x i ) . . . Proof. . Randomly choose r ∈ [0 , W ] . Precompute β i = ∑ i k =1 ω ( x k ) = β i − 1 + ω ( x i ) . Find first index i , β i − 1 < r ≤ β i . Return x i . . . Edges have weight... 1 . . ...compute total weight of each vertex (adjacent edges). 2 . Pick randomly a vertex by weight. 3 . Pick random edge adjacent to this vertex. 4 Sariel (UIUC) CS573 13 Fall 2013 13 / 36
How to pick a random edge? . Lemma . X = { x 1 , . . . , x n } : elements, ω ( x i ) : integer positive weight. Pick randomly, in O ( n ) time, an element ∈ X , with prob picking x i being ω ( x i ) / W , where W = ∑ n i =1 ω ( x i ) . . . Proof. . Randomly choose r ∈ [0 , W ] . Precompute β i = ∑ i k =1 ω ( x k ) = β i − 1 + ω ( x i ) . Find first index i , β i − 1 < r ≤ β i . Return x i . . . Edges have weight... 1 . . ...compute total weight of each vertex (adjacent edges). 2 . Pick randomly a vertex by weight. 3 . Pick random edge adjacent to this vertex. 4 Sariel (UIUC) CS573 13 Fall 2013 13 / 36
How to pick a random edge? . Lemma . X = { x 1 , . . . , x n } : elements, ω ( x i ) : integer positive weight. Pick randomly, in O ( n ) time, an element ∈ X , with prob picking x i being ω ( x i ) / W , where W = ∑ n i =1 ω ( x i ) . . . Proof. . Randomly choose r ∈ [0 , W ] . Precompute β i = ∑ i k =1 ω ( x k ) = β i − 1 + ω ( x i ) . Find first index i , β i − 1 < r ≤ β i . Return x i . . . Edges have weight... 1 . . ...compute total weight of each vertex (adjacent edges). 2 . Pick randomly a vertex by weight. 3 . Pick random edge adjacent to this vertex. 4 Sariel (UIUC) CS573 13 Fall 2013 13 / 36
How to pick a random edge? . Lemma . X = { x 1 , . . . , x n } : elements, ω ( x i ) : integer positive weight. Pick randomly, in O ( n ) time, an element ∈ X , with prob picking x i being ω ( x i ) / W , where W = ∑ n i =1 ω ( x i ) . . . Proof. . Randomly choose r ∈ [0 , W ] . Precompute β i = ∑ i k =1 ω ( x k ) = β i − 1 + ω ( x i ) . Find first index i , β i − 1 < r ≤ β i . Return x i . . . Edges have weight... 1 . . ...compute total weight of each vertex (adjacent edges). 2 . Pick randomly a vertex by weight. 3 . Pick random edge adjacent to this vertex. 4 Sariel (UIUC) CS573 13 Fall 2013 13 / 36
How to pick a random edge? . Lemma . X = { x 1 , . . . , x n } : elements, ω ( x i ) : integer positive weight. Pick randomly, in O ( n ) time, an element ∈ X , with prob picking x i being ω ( x i ) / W , where W = ∑ n i =1 ω ( x i ) . . . Proof. . Randomly choose r ∈ [0 , W ] . Precompute β i = ∑ i k =1 ω ( x k ) = β i − 1 + ω ( x i ) . Find first index i , β i − 1 < r ≤ β i . Return x i . . . Edges have weight... 1 . . ...compute total weight of each vertex (adjacent edges). 2 . Pick randomly a vertex by weight. 3 . Pick random edge adjacent to this vertex. 4 Sariel (UIUC) CS573 13 Fall 2013 13 / 36
Lemma... . Lemma . G : mincut of size k and n vertices, then | E ( G ) | ≥ kn 2 . . . Proof. . Each vertex degree is at least k , otherwise the vertex itself would form a minimum cut of size smaller than k . As such, there are at least ∑ v ∈ V degree(v) / 2 ≥ nk / 2 edges in the graph. . Sariel (UIUC) CS573 14 Fall 2013 14 / 36
Lemma... . Lemma . If we pick in random an edge e from a graph G , then with probability at most 2 n it belong to the minimum cut. . . Proof. . There are at least nk / 2 edges in the graph and exactly k edges in the minimum cut. Thus, the probability of picking an edge from the minimum cut is smaller then k / ( nk / 2) = 2 / n . . Sariel (UIUC) CS573 15 Fall 2013 15 / 36
Lemma . Lemma . 2 MinCut outputs the mincut with prob. ≥ n ( n − 1) . . . Proof . . E i : event that e i is not in the minimum cut of G i . 1 . . MinCut outputs mincut if all the events E 0 , . . . , E n − 3 happen. 2 2 2 . . [ � ] Pr � E 0 ∩ E 1 ∩ . . . ∩ E i − 1 ≥ 1 − | V ( G i ) | = 1 − n − i . E i 3 � [ � ] = ⇒ ∆ = Pr[ E 0 ∩ . . . ∩ E n − 3 ] = Pr[ E 0 ] · Pr · E 1 � E 0 � [ � ] [ � ] Pr � E 0 ∩ E 1 · . . . · Pr � E 0 ∩ . . . ∩ E n − 4 E 2 E n − 3 � � . Sariel (UIUC) CS573 16 Fall 2013 16 / 36
Lemma . Lemma . 2 MinCut outputs the mincut with prob. ≥ n ( n − 1) . . . Proof . . E i : event that e i is not in the minimum cut of G i . 1 . . MinCut outputs mincut if all the events E 0 , . . . , E n − 3 happen. 2 2 2 . . [ � ] Pr � E 0 ∩ E 1 ∩ . . . ∩ E i − 1 ≥ 1 − | V ( G i ) | = 1 − n − i . E i 3 � [ � ] = ⇒ ∆ = Pr[ E 0 ∩ . . . ∩ E n − 3 ] = Pr[ E 0 ] · Pr · E 1 � E 0 � [ � ] [ � ] Pr � E 0 ∩ E 1 · . . . · Pr � E 0 ∩ . . . ∩ E n − 4 E 2 E n − 3 � � . Sariel (UIUC) CS573 16 Fall 2013 16 / 36
Proof continued... As such, we have n − 3 n − 3 ( 2 ) n − i − 2 ∏ ∏ ∆ ≥ 1 − = n − i n − i i =0 i =0 n − 2 ∗ n − 3 n − 1 ∗ n − 4 n − 2 . . . · 2 4 · 1 = n 3 2 = n · ( n − 1) . Sariel (UIUC) CS573 17 Fall 2013 17 / 36
Running time analysis... . Observation . MinCut runs in O ( n 2 ) time. . . Observation . The algorithm always outputs a cut, and the cut is not smaller than the minimum cut. . . Definition . Amplification : running an experiment again and again till the things we want to happen, with good probability, do happen. . Sariel (UIUC) CS573 18 Fall 2013 18 / 36
Getting a good probability MinCutRep : algorithm runs MinCut n ( n − 1) times and return the minimum cut computed. . Lemma . probability MinCutRep fails to return the minimum cut is < 0 . 14 . . . Proof. . MinCut fails to output the mincut in each execution is at most 2 1 − n ( n − 1) . MinCutRep fails, only if all n ( n − 1) executions of MinCut fail. ) n ( n − 1) ≤ exp ( ( ) 2 2 1 − − n ( n − 1) · n ( n − 1) = exp( − 2) < n ( n − 1) 0 . 14 , since 1 − x ≤ e − x for 0 ≤ x ≤ 1 . . Sariel (UIUC) CS573 19 Fall 2013 19 / 36
Result . Theorem . One can compute mincut in O ( n 4 ) time with constant probability to get a correct result. In O ( n 4 log n ) time the minimum cut is returned with high probability. . Sariel (UIUC) CS573 20 Fall 2013 20 / 36
Faster algorithm Why MinCutRep needs so many executions? Probability of failure in first ν iterations is ν − 1 ν − 1 ( 2 ) n − i − 2 [ ] ∏ ∏ Pr E 0 ∩ . . . ∩ E ν − 1 ≥ 1 − = n − i n − i i =0 i =0 = n − 2 ∗ n − 3 n − 1 ∗ n − 4 n − 2 . . . n = ( n − ν )( n − ν − 1) . n · ( n − 1) = ⇒ ν = n / 2 : Prob of success ≈ 1 / 4 . ⇒ ν = n − √ n : Prob of success ≈ 1 / n . = Sariel (UIUC) CS573 21 Fall 2013 21 / 36
Faster algorithm Why MinCutRep needs so many executions? Probability of failure in first ν iterations is ν − 1 ν − 1 ( 2 ) n − i − 2 [ ] ∏ ∏ Pr E 0 ∩ . . . ∩ E ν − 1 ≥ 1 − = n − i n − i i =0 i =0 = n − 2 ∗ n − 3 n − 1 ∗ n − 4 n − 2 . . . n = ( n − ν )( n − ν − 1) . n · ( n − 1) = ⇒ ν = n / 2 : Prob of success ≈ 1 / 4 . ⇒ ν = n − √ n : Prob of success ≈ 1 / n . = Sariel (UIUC) CS573 21 Fall 2013 21 / 36
Faster algorithm Why MinCutRep needs so many executions? Probability of failure in first ν iterations is ν − 1 ν − 1 ( 2 ) n − i − 2 [ ] ∏ ∏ Pr E 0 ∩ . . . ∩ E ν − 1 ≥ 1 − = n − i n − i i =0 i =0 = n − 2 ∗ n − 3 n − 1 ∗ n − 4 n − 2 . . . n = ( n − ν )( n − ν − 1) . n · ( n − 1) = ⇒ ν = n / 2 : Prob of success ≈ 1 / 4 . ⇒ ν = n − √ n : Prob of success ≈ 1 / n . = Sariel (UIUC) CS573 21 Fall 2013 21 / 36
Faster algorithm Why MinCutRep needs so many executions? Probability of failure in first ν iterations is ν − 1 ν − 1 ( 2 ) n − i − 2 [ ] ∏ ∏ Pr E 0 ∩ . . . ∩ E ν − 1 ≥ 1 − = n − i n − i i =0 i =0 = n − 2 ∗ n − 3 n − 1 ∗ n − 4 n − 2 . . . n = ( n − ν )( n − ν − 1) . n · ( n − 1) = ⇒ ν = n / 2 : Prob of success ≈ 1 / 4 . ⇒ ν = n − √ n : Prob of success ≈ 1 / n . = Sariel (UIUC) CS573 21 Fall 2013 21 / 36
Faster algorithm... . Insight . . As the graph get smaller probability for bad choice increases. 1 . . Currently do the amplification from the outside of the algorithm. 2 . . Put amplification directly into the algorithm. 3 . Sariel (UIUC) CS573 22 Fall 2013 22 / 36
Faster algorithm... . Insight . . As the graph get smaller probability for bad choice increases. 1 . . Currently do the amplification from the outside of the algorithm. 2 . . Put amplification directly into the algorithm. 3 . Sariel (UIUC) CS573 22 Fall 2013 22 / 36
Faster algorithm... . Insight . . As the graph get smaller probability for bad choice increases. 1 . . Currently do the amplification from the outside of the algorithm. 2 . . Put amplification directly into the algorithm. 3 . Sariel (UIUC) CS573 22 Fall 2013 22 / 36
Contract... Contract ( G , t ) shrinks G till it has only t vertices. FastCut computes the minimum cut using Contract . FastCut ( G = ( V , E ) ) G -- multi-graph begin n ← | V ( G ) | if n ≤ 6 then Contract ( G , t ) Compute minimum cut while | ( G ) | > t do of G and return cut. √ Pick a random edge ⌈ ⌉ t ← 1 + n / 2 e in G . H 1 ← Contract ( G , t ) G ← G / e H 2 ← Contract ( G , t ) return G /* Contract is randomized!!! */ X 1 ← FastCut ( H 1 ) , X 2 ← FastCut ( H 2 ) return mincut of X 1 and X 2 . end Sariel (UIUC) CS573 23 Fall 2013 23 / 36
Lemma... . Lemma . The running time of FastCut ( G ) is O ( n 2 log n ) , where n = | V ( G ) | . . . Proof. . Well, we perform two calls to Contract ( G , t ) which takes O ( n 2 ) time. And then we perform two recursive calls on the resulting graphs. We have: ( ) T ( n ) = O ( n 2 ) + 2 T n √ 2 The solution to this recurrence is O ( n 2 log n ) as one can easily (and should) verify. . Sariel (UIUC) CS573 24 Fall 2013 24 / 36
Lemma... . Lemma . The running time of FastCut ( G ) is O ( n 2 log n ) , where n = | V ( G ) | . . . Proof. . Well, we perform two calls to Contract ( G , t ) which takes O ( n 2 ) time. And then we perform two recursive calls on the resulting graphs. We have: ( ) T ( n ) = O ( n 2 ) + 2 T n √ 2 The solution to this recurrence is O ( n 2 log n ) as one can easily (and should) verify. . Sariel (UIUC) CS573 24 Fall 2013 24 / 36
Success at each step . Lemma . Probability that mincut in contracted graph is original mincut is at least 1 / 2 . . . Proof. . √ ⌈ ⌉ Plug in ν = n − t = n − 1 + n / 2 into success probability: [ ] Pr E 0 ∩ . . . ∩ E n − t ≥ . Sariel (UIUC) CS573 25 Fall 2013 25 / 36
Success at each step . Lemma . Probability that mincut in contracted graph is original mincut is at least 1 / 2 . . . Proof. . √ ⌈ ⌉ Plug in ν = n − t = n − 1 + n / 2 into success probability: [ ] t ( t − 1) Pr E 0 ∩ . . . ∩ E n − t ≥ n · ( n − 1) . Sariel (UIUC) CS573 25 Fall 2013 25 / 36
Success at each step . Lemma . Probability that mincut in contracted graph is original mincut is at least 1 / 2 . . . Proof. . √ ⌈ ⌉ Plug in ν = n − t = n − 1 + n / 2 into success probability: [ ] t ( t − 1) Pr E 0 ∩ . . . ∩ E n − t ≥ n · ( n − 1) √ √ ⌈ ⌉(⌈ ⌉ ) 1 + n / 2 1 + n / 2 − 1 ≥ 1 = 2 . n ( n − 1) . Sariel (UIUC) CS573 25 Fall 2013 25 / 36
Probability of success... . Lemma . FastCut finds the minimum cut with probability larger than Ω (1 / log n ) . . See class notes for a formal proof. We provide a more elegant direct argument shortly. Sariel (UIUC) CS573 26 Fall 2013 26 / 36
Amplification . Lemma . Running FastCut repeatedly c · log 2 n times, guarantee that the algorithm outputs mincut with probability ≥ 1 − 1 / n 2 . c is a constant large enough. . . Proof. . FastCut succeeds with prob ≥ c ′ / log n , c ′ is a constant. . 1 . . ...fails with prob. ≤ 1 − c ′ / log n . 2 . . ...fails in m reps with prob. ≤ (1 − c ′ / log n ) m . But then 3 e − c ′ / log n ) m ≤ e − mc ′ / log n ≤ (1 − c ′ / log n ) m ≤ ( 1 n 2 , for m = (2 log n ) / c ′ . . Sariel (UIUC) CS573 27 Fall 2013 27 / 36
Amplification . Lemma . Running FastCut repeatedly c · log 2 n times, guarantee that the algorithm outputs mincut with probability ≥ 1 − 1 / n 2 . c is a constant large enough. . . Proof. . FastCut succeeds with prob ≥ c ′ / log n , c ′ is a constant. . 1 . . ...fails with prob. ≤ 1 − c ′ / log n . 2 . . ...fails in m reps with prob. ≤ (1 − c ′ / log n ) m . But then 3 e − c ′ / log n ) m ≤ e − mc ′ / log n ≤ (1 − c ′ / log n ) m ≤ ( 1 n 2 , for m = (2 log n ) / c ′ . . Sariel (UIUC) CS573 27 Fall 2013 27 / 36
Amplification . Lemma . Running FastCut repeatedly c · log 2 n times, guarantee that the algorithm outputs mincut with probability ≥ 1 − 1 / n 2 . c is a constant large enough. . . Proof. . FastCut succeeds with prob ≥ c ′ / log n , c ′ is a constant. . 1 . . ...fails with prob. ≤ 1 − c ′ / log n . 2 . . ...fails in m reps with prob. ≤ (1 − c ′ / log n ) m . But then 3 e − c ′ / log n ) m ≤ e − mc ′ / log n ≤ (1 − c ′ / log n ) m ≤ ( 1 n 2 , for m = (2 log n ) / c ′ . . Sariel (UIUC) CS573 27 Fall 2013 27 / 36
Theorem . Theorem . One can compute the minimum cut in a graph G with n vertices in O ( n 2 log 3 n ) time. The algorithm succeeds with probability ≥ 1 − 1 / n 2 . . . Proof. . We do amplification on FastCut by running it O (log 2 n ) times. The running time bound follows from lemma... . Sariel (UIUC) CS573 28 Fall 2013 28 / 36
Part II . On coloring trees and min-cut . Sariel (UIUC) CS573 29 Fall 2013 29 / 36
Trees and coloring edges... . . T h be a complete binary tree of height h . 1 . . Randomly color its edges by black and white. 2 . . E h : there exists a black path from root T h to one of its leafs. 3 . . ρ h = Pr[ E h ] . 4 . . ρ 0 = 1 and ρ 1 = 3 / 4 (see below). 5 Sariel (UIUC) CS573 30 Fall 2013 30 / 36
Trees and coloring edges... . . T h be a complete binary tree of height h . 1 . . Randomly color its edges by black and white. 2 . . E h : there exists a black path from root T h to one of its leafs. 3 . . ρ h = Pr[ E h ] . 4 . . ρ 0 = 1 and ρ 1 = 3 / 4 (see below). 5 Sariel (UIUC) CS573 30 Fall 2013 30 / 36
Trees and coloring edges... . . T h be a complete binary tree of height h . 1 . . Randomly color its edges by black and white. 2 . . E h : there exists a black path from root T h to one of its leafs. 3 . . ρ h = Pr[ E h ] . 4 . . ρ 0 = 1 and ρ 1 = 3 / 4 (see below). 5 Sariel (UIUC) CS573 30 Fall 2013 30 / 36
Trees and coloring edges... . . T h be a complete binary tree of height h . 1 . . Randomly color its edges by black and white. 2 . . E h : there exists a black path from root T h to one of its leafs. 3 . . ρ h = Pr[ E h ] . 4 . . ρ 0 = 1 and ρ 1 = 3 / 4 (see below). 5 Sariel (UIUC) CS573 30 Fall 2013 30 / 36
Trees and coloring edges... . . T h be a complete binary tree of height h . 1 . . Randomly color its edges by black and white. 2 . . E h : there exists a black path from root T h to one of its leafs. 3 . . ρ h = Pr[ E h ] . 4 . . ρ 0 = 1 and ρ 1 = 3 / 4 (see below). 5 Sariel (UIUC) CS573 30 Fall 2013 30 / 36
Bounding ρ h . . u root of T h : children u l and u r . 1 . . ρ h − 1 : Probability for black path u l ⇝ children 2 . . Prob of black path from u through u 1 is: 3 [ ] Pr uu l is black · ρ h − 1 = ρ h − 1 / 2 . . Prob. no black path through u l is 1 − ρ h − 1 / 2 . 4 . . Prob no black path is: (1 − ρ h − 1 / 2) 2 5 . . We have 6 = ρ h − 1 − ρ 2 1 − ρ h − 1 ) 2 = ρ h − 1 2 − ρ h − 1 ( ( ) h − 1 ρ h = 1 − . 2 2 2 4 Sariel (UIUC) CS573 31 Fall 2013 31 / 36
Bounding ρ h . . u root of T h : children u l and u r . 1 . . ρ h − 1 : Probability for black path u l ⇝ children 2 . . Prob of black path from u through u 1 is: 3 [ ] Pr uu l is black · ρ h − 1 = ρ h − 1 / 2 . . Prob. no black path through u l is 1 − ρ h − 1 / 2 . 4 . . Prob no black path is: (1 − ρ h − 1 / 2) 2 5 . . We have 6 = ρ h − 1 − ρ 2 1 − ρ h − 1 ) 2 = ρ h − 1 2 − ρ h − 1 ( ( ) h − 1 ρ h = 1 − . 2 2 2 4 Sariel (UIUC) CS573 31 Fall 2013 31 / 36
Bounding ρ h . . u root of T h : children u l and u r . 1 . . ρ h − 1 : Probability for black path u l ⇝ children 2 . . Prob of black path from u through u 1 is: 3 [ ] Pr uu l is black · ρ h − 1 = ρ h − 1 / 2 . . Prob. no black path through u l is 1 − ρ h − 1 / 2 . 4 . . Prob no black path is: (1 − ρ h − 1 / 2) 2 5 . . We have 6 = ρ h − 1 − ρ 2 1 − ρ h − 1 ) 2 = ρ h − 1 2 − ρ h − 1 ( ( ) h − 1 ρ h = 1 − . 2 2 2 4 Sariel (UIUC) CS573 31 Fall 2013 31 / 36
Bounding ρ h . . u root of T h : children u l and u r . 1 . . ρ h − 1 : Probability for black path u l ⇝ children 2 . . Prob of black path from u through u 1 is: 3 [ ] Pr uu l is black · ρ h − 1 = ρ h − 1 / 2 . . Prob. no black path through u l is 1 − ρ h − 1 / 2 . 4 . . Prob no black path is: (1 − ρ h − 1 / 2) 2 5 . . We have 6 = ρ h − 1 − ρ 2 1 − ρ h − 1 ) 2 = ρ h − 1 2 − ρ h − 1 ( ( ) h − 1 ρ h = 1 − . 2 2 2 4 Sariel (UIUC) CS573 31 Fall 2013 31 / 36
Bounding ρ h . . u root of T h : children u l and u r . 1 . . ρ h − 1 : Probability for black path u l ⇝ children 2 . . Prob of black path from u through u 1 is: 3 [ ] Pr uu l is black · ρ h − 1 = ρ h − 1 / 2 . . Prob. no black path through u l is 1 − ρ h − 1 / 2 . 4 . . Prob no black path is: (1 − ρ h − 1 / 2) 2 5 . . We have 6 = ρ h − 1 − ρ 2 1 − ρ h − 1 ) 2 = ρ h − 1 2 − ρ h − 1 ( ( ) h − 1 ρ h = 1 − . 2 2 2 4 Sariel (UIUC) CS573 31 Fall 2013 31 / 36
Lemma... . Lemma . We have that ρ h ≥ 1 / ( h + 1) . . . Proof. . . By induction. For h = 1 : ρ 1 = 3 / 4 ≥ 1 / (1 + 1) . 1 ρ 2 . . = f ( ρ h − 1 ) , for f ( x ) = x − x 2 / 4 . ρ h = ρ h − 1 − h − 1 2 4 . . f ′ ( x ) = 1 − x / 2 . = ⇒ f ′ ( x ) > 0 for x ∈ [0 , 1] . 3 . . f ( x ) is increasing in the range [0 , 1] 4 . . By induction: 5 ( 1 ) = 1 1 ρ h = f ( ρ h − 1 ) ≥ f h − 4 h 2 . ( h − 1) + 1 . . 1 1 1 4 h ( h + 1) − ( h + 1) ≥ 4 h 2 h − 4 h 2 ≥ ⇔ ⇔ 6 h +1 4 h 2 + 4 h − h − 1 ≥ 4 h 2 ⇔ 3 h ≥ 1 , Sariel (UIUC) CS573 32 Fall 2013 32 / 36 .
Lemma... . Lemma . We have that ρ h ≥ 1 / ( h + 1) . . . Proof. . . By induction. For h = 1 : ρ 1 = 3 / 4 ≥ 1 / (1 + 1) . 1 ρ 2 . . = f ( ρ h − 1 ) , for f ( x ) = x − x 2 / 4 . ρ h = ρ h − 1 − h − 1 2 4 . . f ′ ( x ) = 1 − x / 2 . = ⇒ f ′ ( x ) > 0 for x ∈ [0 , 1] . 3 . . f ( x ) is increasing in the range [0 , 1] 4 . . By induction: 5 ( 1 ) = 1 1 ρ h = f ( ρ h − 1 ) ≥ f h − 4 h 2 . ( h − 1) + 1 . . 1 1 1 4 h ( h + 1) − ( h + 1) ≥ 4 h 2 h − 4 h 2 ≥ ⇔ ⇔ 6 h +1 4 h 2 + 4 h − h − 1 ≥ 4 h 2 ⇔ 3 h ≥ 1 , Sariel (UIUC) CS573 32 Fall 2013 32 / 36 .
Lemma... . Lemma . We have that ρ h ≥ 1 / ( h + 1) . . . Proof. . . By induction. For h = 1 : ρ 1 = 3 / 4 ≥ 1 / (1 + 1) . 1 ρ 2 . . = f ( ρ h − 1 ) , for f ( x ) = x − x 2 / 4 . ρ h = ρ h − 1 − h − 1 2 4 . . f ′ ( x ) = 1 − x / 2 . = ⇒ f ′ ( x ) > 0 for x ∈ [0 , 1] . 3 . . f ( x ) is increasing in the range [0 , 1] 4 . . By induction: 5 ( 1 ) = 1 1 ρ h = f ( ρ h − 1 ) ≥ f h − 4 h 2 . ( h − 1) + 1 . . 1 1 1 4 h ( h + 1) − ( h + 1) ≥ 4 h 2 h − 4 h 2 ≥ ⇔ ⇔ 6 h +1 4 h 2 + 4 h − h − 1 ≥ 4 h 2 ⇔ 3 h ≥ 1 , Sariel (UIUC) CS573 32 Fall 2013 32 / 36 .
Recommend
More recommend