Professional Documents
Culture Documents
Introduction
2
1
Algorithm
def MinCut ( G ) :
while len ( V ) > 2:
randomly select remaining (u , v ) edge
merge / contract into single vertex
remove self loops
return cut represented by remaining 2 vertices .
Analysis
To analyze the success rate and runtime of the randomized contraction algorithm, we need to start with three givens. First, fix a graph G = (V, E)
with n vertices and m edges, with a min-cut (A, B), and let k be the number of crossing edges forming the set F . Two important observations arise
immediately:
1. If we contract an edge in F , the algorithm will not return the correct
result.
2. If we only contract edges contained within A and B, we will get the
min-cut of the graph.
Let Si represent the event that an edge in F is contracted in iteration i.
Observing that the degree of each vertex is at least k,
X
degree(v) = 2m
(1)
v
X
degree(v) kn
(2)
kn
2
(3)
2
n
(4)
m
P r[S1 ] =
1
Randomized Contraction
For the second iteration:
P r[S1 S2 ] = P r[S1 |S2 ] P r[S1 ]
k
2
P r[S1 S2 ] 1
(1 )
remaining edges
n
Remember that m
(5)
(6)
kn
2 .
P r[S1 |S2 ] = 1
2
n1
(7)
n2 n3 n4
2 1
n
n1 n2
4 3
1
2
2
n(n 1)
n
(9)
(10)
Thus, the chance of success on a single attempt with randomized selection is very unlikely.
3.1
Repeated Trials
Due to the significant failure rate, finding the minimum cut actually involves
running the algorithm many times and remembering the smallest cut. Let
Ti be the event that (A, B) is found on the ith try and N be the number of
times the algorithm is run.
P r[f ail] = P r[T1 T2 . . . TN ]
N
Y
i=1
1 N
P r[Ti ] 1 2
n
2
1 n
1
For N = n2 , P r[f ail] e e n2 = 30%
e
1
n
2
Runtime is therefore (n m) with slow constants.
(11)
(12)