Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Algortithms for the Min-Cut problem
Hongwei Jin
Department of Applied Mathematics Illinois Insititute of Technology
Algortithms for the Min-Cut problem Hongwei Jin Department of - - PowerPoint PPT Presentation
Introduction Kargers Algorithm Karger-Stein Algorithm Implementation Conclusion Algortithms for the Min-Cut problem Hongwei Jin Department of Applied Mathematics Illinois Insititute of Technology April 30, 2013 Introduction Kargers
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Department of Applied Mathematics Illinois Insititute of Technology
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
1
2
3
4
5
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
1Lester R Ford and Delbert R Fulkerson. “Maximal flow through a
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
2Andrew V Goldberg and Robert E Tarjan. “A new approach to the
3Jianxiu Hao and James B. Orlin. “A faster algorithm for finding the
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
4Harold N Gabow. “A matroid approach to finding edge connectivity and
5Hiroshi Nagamochi and Toshihide Ibaraki. “Computing edge-connectivity
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
2
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
2
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
2
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
2 n(n−1)
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
2
n
2) log n ≤ exp(− log n) = 1
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
log n ,which can be notated as Ω(1/ log n)
2P( n √ 2). Thus, the probability to
2P( n √ 2).
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
1 log n), therefore after running this
2
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
def MinCut ( graph , t ) : while l e n ( graph ) > t : s t a r t = random . c h o i c e ( graph . keys ( ) ) f i n i s h = random . c h o i c e ( graph [ s t a r t ] ) # Adding the edges from the absorbed node : f o r edge i n graph [ f i n i s h ] : i f edge != s t a r t : # t h i s s t o p s us from making a s e l f −loop graph [ s t a r t ] . append ( edge ) # D e l e t i n g the r e f e r e n c e s to the absorbed node # and changing them to the source node : f o r edge1 i n graph [ f i n i s h ] : graph [ edge1 ] . remove ( f i n i s h ) i f edge1 != s t a r t : # t h i s s t o p s us from re−adding a l l the edges i n s t a r t . graph [ edge1 ] . append ( s t a r t ) del graph [ f i n i s h ] # C a l c u l a t i n g and r e c o r d i n g the mincut mincut = l e n ( graph [ graph . keys ( ) [ 0 ] ] ) cuts . append ( mincut ) . . . # Running times count = l e n ( graph ) ∗ l e n ( graph ) ∗ i n t ( math . log ( l e n ( graph ) ) ) while i < count : graph1 = copy . deepcopy ( graph ) g = MinCut ( graph1 , 2 )
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
def FastMinCut ( graph ) : i f l e n ( graph ) < 6 : return MinCut ( graph , 2) e l s e : t = 1 + i n t ( l e n ( graph ) / math . s q r t ( 2 ) ) graph 1 = MinCut ( graph , t ) graph 2 = MinCut ( graph , t ) i f l e n ( graph 1 ) > l e n ( graph 2 ) : return FastMinCut ( graph 2 ) e l s e : return FastMinCut ( graph 1 ) . . . # Running times count = i n t ( math . log ( l e n ( graph ) ) ) ∗ i n t ( math . log ( l e n ( graph ) ) ) while i < count : graph1 = copy . deepcopy ( graph ) g = FastMinCut ( graph1 ) i += 1
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
2
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
6David R Karger and Clifford Stein. “A new approach to the minimum cut
7Timo K¨
8Frank Neumann, Joachim Reichel, and Martin Skutella. “Computing
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
6David R Karger and Clifford Stein. “A new approach to the minimum cut
7Timo K¨
8Frank Neumann, Joachim Reichel, and Martin Skutella. “Computing
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion
9Rajeev Motwani and Prabhakar Raghavan. Randomized algorithms.
10Sariel Har-Peledx. Class notes for Randomized Algorithms. 2005. 11Chandra S Chekuri et al. “Experimental study of minimum cut algorithms”.
Introduction Karger’s Algorithm Karger-Stein Algorithm Implementation Conclusion