Minimum Cut in a Graph-Data Structures-Project, Study Guides, Projects, Research of Data Structures and Algorithms

This is project report for Data Structures course. It was submitted to Gulfaam Hasan at Aliah University. It includes: Minimum, Cut, Graph, Edges, Vertices, Conditional, Probability, Independent, Algorithm, Randmoized

Typology: Study Guides, Projects, Research

2011/2012

Uploaded on 07/11/2012

dharamnishth
dharamnishth 🇮🇳

2.5

(2)

50 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Minimum Cut in a Graph
497 - Randomized Algorithms
1 Min Cut
Compute the cut with minimum number of edges in the graph. Namely, find SVsuch that
(S×(VS)) Eis as small as possible, and Sis neither empty nor all the vertices of the graph
G= (V,E).
1
Docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Minimum Cut in a Graph-Data Structures-Project and more Study Guides, Projects, Research Data Structures and Algorithms in PDF only on Docsity!

Minimum Cut in a Graph

497 - Randomized Algorithms

1 Min Cut

Compute the cut with minimum number of edges in the graph. Namely, find SV such that

( S × ( VS )) ∩ E is as small as possible, and S is neither empty nor all the vertices of the graph

G = ( V , E ).

1.1 Some Definitions

Definition 1.1 The conditional probability of X given Y is

Pr

[

X = x

Y = y

]

Pr

[

( X = x ) ∩ ( Y = y )

]

Pr

[

Y = y

] .

An equivalent, useful statement of this is that:

Pr

[

( X = x ) ∩ ( Y = y )

]

= Pr

[

X = x | Y = y

]

∗ Pr

[

Y = y

]

Two events X and Y are independent, if P

[

X = xY = y

]

= P

[

X = x

]

∗ P

[

Y = y

]

. In partic-

ular, if X and Y are independent, then

Pr

[

X = x

Y^ =^ y

]

= Pr

[

X = x

]

Let η 1 ,... , η n be n events which are not necessarily independent. Then,

Pr

[

n i = 1 η i

]

= Pr

[

η 1

]

∗ Pr

[

η 2

∣ η 1

]

∗ Pr

[

η 3

∣ η 1 ∩ η 2

]

∗... ∗ Pr

[

η n

∣ η 1 ∩... ∩ η n − 1

]

2 Algorithm

The basic operation, is edge contraction:

X Y

Z

The new graph is denoted by G / xy. Operation can be implemented in O ( n ) time for a graph with n vertices (how?).

Observation 2.1 The size of the in G / xy is at least as large as the cut in G (as long as G / xy as at

least one edge). Since any cut in G / xy has a corresponding cut of the same cardinality in G.

Observation 2.2 Let e 1 ,... , en − 2 be a sequence of edges in G, such that none of them is in the min-

cut, and such that G ′^ = G / { e 1 ,... , en − 2 } is a single multi-edge. Then, this multi-edge correspond

to the min-cut in G.

Thus,

Pr

[

η 0 ∩... ∩ η n − 2

]

n − 3 ∏ i = 0

ni

n − 3 ∏ i = 0

ni − 2

ni

n − 2

n

n − 3

n − 1

n − 4

n − 2

n · ( n − 1 )

Definition 2.8 (informal) Amplification is the process of running an experiment again and again

till the things we want to happed with good probability.

Let MinCut be the algorithm that runs MinCutInner n ( n − 1 ) times and return the minimum cut

computed.

Lemma 2.9 The probability that MinCut fails to return the min-cut is < 0. 14.

Proof: The probability of failure is at most

(

1 −

n ( n − 1 )

) n ( n − 1 )

≤ exp

n ( n − 1 )

· n ( n − 1 )

= exp(− 2 ) < 0. 14 ,

since 1 − xex for 0 ≤ x ≤ 1, as you can ( and should ) verify.

Theorem 2.10 One can compute the min-cut in O ( n^4 ) time with constant probability to get a

correct result. In O

n 4 log n

time the min-cut is returned with high probability.

Note: that the algorithm is extremely simple, can we push the basic idea further and get faster

algorithm? (or alternatively, can we complicate things, and get a faster algorithm?)

So, why is the algorithm needs so many executions? Because the probability deteriorates very

quickly once the graph becomes small. The probability for success in contracting the graph till it

has t vertices is:

Pr

[

η 0 ∩... ∩ η nt − 1

]

nt − 1 ∏ i = 0

ni

nt − 1 ∏ i = 0

ni − 2

ni

n − 2

n

n − 3

n − 1

n − 4

n − 2

t ( t − 1 )

n · ( n − 1 )

Thus, as long as t is large (that is tn / c , where c is a constant), the probability of hitting the cut

is pretty small.

Observation 2.11 As the graph get smaller, the probability to make a bad choice increases.

Observation 2.12 Intuitive idea: Run the algorithm more times when the graph get small.

Contract( G , t ) while | V ( G )| > t do Pick a random edge e in G. GG / e

return G

Namely, Contract( G , t ) shrinks G till it has only t vertices. FastCut( G = ( V , E )) INPUT: G multigraph begin n ← | V ( G )| if n ≤ 6 then compute min-cut of G using brute force and return cut. tn /

H 1 ← Contract( G , t ) H 2 ← Contract( G , t ) /* Contract is randomized!!! */ X 1 ← FastCut ( H 1 ) X 2 ← FastCut ( H 2 )

return the smaller cut out of X 1 and X 2. end

Lemma 2.13 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.

Exercise 2.14 Show that one can modify FastCut so that it uses only O ( n 2 ) space.

Lemma 2.15 The probability that Contract ( G , t ) had not contracted the min-cut is at least 1 / 2.

Theorem 2.16 FastCut finds the min-cut with probability larger than Ω ( 1 / log n ).

Proof: Let P ( t ) be the probability that the algorithm succeeds on a graph with t vertices.

The probability to succeed in the first call on H 1 is the probability that Contract did not hit

the min cut (this probability is larger than 1/2 by the above lemma), times the probability that the

algorithm succeeded on H 1 (those two events are independent. Thus, the probability to succeed on

the call on H 1 is at least ( 1 / 2 ) ∗ P ( t /

2 ), Thus, the probability to fail on H 1 is ≤ 1 − 1 2 P

t 2

The probability to fail on both H 1 and H 2 is smaller than

(

1 −

P

t √ 2

And thus, the probability for the algorithm to succeed is

P ( t ) ≥ 1 −

P

t √ 2

= P

t √ 2

P

t √ 2