- t
'
graph
a ( v. E ) win
weight function
w : E →Rt
- n
its
edges
.
graph weight win Rt function its w edges : E on . L Eva - - PowerPoint PPT Presentation
t Minimum Cut - ' a ( v. E ) graph weight win Rt function its w edges : E on . L Eva , Vs } S = Minimums Cut - S T V - = . w CST ) q :* :* . ' i i EV ' ( SF ) bi partition A cut is Cr of of the any empty )
'
graph
a ( v. E ) win
weight function
w : E →Rt
its
edges
.'
i
i
:*:*
.EV
' Acut
any
bi partition( SF )
vertices
.(
s ,T
are both nonempty )
.E (
s , T) =set of
edges
crossing
this
cut
with
the minimumweight
is called a minimumcut
.Problem :
GivenGCV, E. w )
find
a min cutG
.Applications
?
Cst )
cat
weight
9 Wheresand
t
are in medifferent
parts
partition
. ✓7 Isuppose
s =Land
✓ I go 8 t= 8t
= Vg . Vg l OG ✓9 12 r,wcs.TK#gtsS--Es--Vz3S--
vz•
9£ vz b Y{ vi. vz
. . . , Va 3 We canfind
such a catby
finding
the maximumflow
b/w
S andt
( more
next
week) .Minot of G
( also known as theglobal
minced)is
theminimum
all Cst )
cats .If
we use a maximumflow
subroutine
then
theruntime
will
beOCNZMAXFIOW)
(pm
)
.Fastest
MAXFIOWalgorithm
takes
0 (nm )time
.]These
algorithms
arecomplicated
.Can
weavoid
using
flaw
algorithms ?
⑤
⑧
Est}i÷÷÷¥÷
6/2*3
Key
The min cut
Cr
iseither
the minCst )
cut
minuet
G) Est }
7
# The
aboveleads
to aniterative
( proto)
algorithm :
( et C 't be thebest
cat
found
so far .while
IGI
32
i . Find a cat C ina
which
isminimum
for
somepain
,say
Cst )
. 2 .If
w ( c) C w CE )replace
C 't with C . 3 . Contract( s 't)
and LetG← GIES,t3
.8
How do
wefind
such
acat
?
Inca,
For
someA- EV
and
a -4 A
⑤(I
let
, w ( x, A) =E
w ( aid )YEA n
easy ) EE
seis most-Cited if
w ( n , A ) =max {
wCy
, A) I 94A} .arbitrary
vertexAFV
Let neha mosttightly
connected to A .IAI
=IVI -2
s ← seIAI
=IVI
Cc - E ( A , a) A
set ofedges
b/w
nand A
. A- ←Au
la ]
Contract
Cst )
arbitrary
vertexAFV
( is
a min Let neha mosttightly
connected to A . (St )IAI
=IVI -2 last
two vertices Scaddled
to A .IAI
=IVI
( mtnyn )
t c- aE ( A , a) A
set ofedges
b/w
nand A
. A- ← A u { a ]Contract
Cst )
em.vn
v , 8 8 = 4biz weans , ⇒
'its::¥¥
WCA ,
Vg ) = 20vz¥
6 vI
a= 9Vz
9 1)A- { Yo}
2)
w ( { v, } ,and
w ( { Vol , Us ) = 8 A ={
VG , Vg , ] .3)
w ( Evo , Vs } , Vt) =L , w ( Eva , ↳ 3 ,# 1=-22w( Eva, ↳ 3,41=5
"
"
"
"
"
'
contraction
the size ofG
reduces
by 1
.Let
1- (m ,n ) be thecost
incurred
during
a
call
to(G)
.Total time
OC
n)
.contraction
the size ofG
reduces
by 1
.Let
1- (m ,n ) be thecost
incurred
during
a
call
to(G)
.Total time
OC
n -1cm , n ) ) . =0 ( mn
T n' Yn )
.next most
tightly
connected
vertex
canbe
found
using
apriority
queue
.( Extract
Max
,Increase
key )
thusTimon )
=cut
phase
is a minimum r Scurrent
graph
, where s andt
are thetwo
verticesadded
last )
.The
proof
isby
induction
.Suppose
C is
any
arbitrary
Cst )
want to show
wCc*)
E
WCC )
.Gr
current
graph
so , Tc is thepartition
inducedby C
. + aS
.T
added
vertex
V ' wasadded
before
Vactive
if
uand
v ' areindifferent parts
in C .Suppose
Av
be theset of
vertices
added
before u . Sve = to Tvc =(AvVU2) Nc( Ev3UA4nsc
in
. , r , . .sve
U TveSc
Aru Ev }
,let
C:
= ( Src ,Tvc )
.for
every
active vertex u , " ( Au , v )E
w ( Cr) .Suppose
Av
be theset of
vertices
added
before u . ' 8 Sre = Tvc =Avnsc
← Ann Tc
÷
.E Cat
E- (Arm)Sc
I
let
Cr
= ( Src ,Tvc )
.Note
C 't =( At
,)
and
Ct C
. W ( c 't )Edt )
= w ( e ) .Inductive argument
19Base
case !I
°! First
activevertex
utV¥qv3
Wl Av ,
u) = w ( Cr) .Inductive argument
20¥ First
activevertex
✓tv¥qv3
Wl Av ,
u) =wlcv)
.Inductive
step :
suppose
w ( Av , v ) E w ( cu )holds
upto
theactive
vertex
v .Let
u be mefirst
activevertex
to
beadded
after
V÷.
wCA
= w t w (Auu ) .÷ .
'
Aun ScT
S
C C w ( Au , u ) = w ( Av, u ) t w ( Aal Av , n ) .But
w(Ar ,
u )E
w C Av s v) as u was chosen as themost
tightly
connectedvertex
w.me .Au
.÷ .
'
Aunsc
T
Sc
c w ( Au ,u ) = w ( Abu ) t w ( Aal Av , n ) .E
w ( Ar , v) t w ( Aal Av, m ) .But
w (Ar , r ) E W ( cu)(
inductivehypothesis)
a.÷¥÷÷:÷
.
"
W ( Au , u ) = w ( Av, u ) t w ( Aa l Av , u ) .E
w ( Ar , v) t w CA n l Ar, m ) .E
y
yEl Antar ,
u )a:c. ' Aun Sc T
Sc
c w ( Au , u ) = w ( Abu ) t w ( Aal Av , n ) .E
w ( Av , v)t
w ( Aal Av, m ) .light
blue
edges
in
E ( Aa IA
, u) doesnot
contribute
[ ✓
andy
ELA
, .u ) 21an
÷: .
W ( Au , u ) = w ( Av, u ) t w ( Au l Av , n ) .E
u ( Ar , v)t
w CA n l Av, m ) .Ewes ) t
wE weed
.wA of
*Is a (c)