Stochastic greedy local search Chapter 7 ICS-275 Spring 2007.
Chapter 2. Greedy Strategy
description
Transcript of Chapter 2. Greedy Strategy
What is a submodular function?
Consider a function f on all subsets of a set E.f is submodular if
( ) ( ) ( ) ( )f A f B f A B f A B
Set-Cover
Given a collection C of subsets of a set E, find a minimum subcollection C’ of C such that every element of E appears in a subset in C’ .
Example of Submodular Function
For a subcollection of , define( ) | S|.
Then( ) ( ) ( ) ( )
s A
A Cf A
f A f B f A B f A B
Greedy Algorithm
' ;while | | ( ') do choose to maximize ( ' { }) and ' ' { };
CE f CS C f C S
C C S
Analysis
1 2
1
1
Suppose , , ..., are selected by GreedyAlgorithm. Denote { , ..., }. Then
( ) ( ) (| | ( )) /
k
i i
i i i
S S SC S S
f C f C E f C opt
i
i
i
i
ii
ii
optEopt
optikCfEopt
ioptE
optCfE
optCfECfECfEoptCfE
)/11(||
Then ).(|| satisfying onelargest thebe to Choose)/11(||
)/11))((|(|
)/11))((|(| )(||)(|| )/11))((|(|
1
21
1
1
Analysis
1 2
1
1
Suppose , , ..., are selected by GreedyAlgorithm. Denote { , ..., }. Then
( ) ( ) (| | ( )) /
k
i i
i i i
S S SC S S
f C f C E f C opt
optCfEoptCfCCf
optCCf
optCfCf
optjCfCf
XXCXXXC
AfXAfAf
i
ii
optjjiX
optjiXiS
iXiS
jj
opt
X
j
ji
ji
/))(||( /))(*)((
/*))((
/))(()( Thus,
10 allfor )()( rule,greedy By
}.,...,{* Denotesolution. optimalan be },...,,{*Let
).(}){()( Denote
10
10
1
21
1
11
11
Actually, this inequality holds if and only if Actually, this inequality holds if and only if ff is is submodular and submodular and
(monotone increasing)(monotone increasing)
)()( BfAfBA
BxBfAfBAf
BxBfAfBAf
xx
xx
for )()( implies )increasing monotone is (
for )()( implies )submodular is (
)( )()()(
))(( ))(()()(
}.,...,{denote and },...,{Let . and
allfor holds inequality above suppose ,Conversely).()(
hence and ,},{\Then . and }{set
, and For .submodular is Suppose
1
1
1
1
1
1
21
21
ky
yyC
ky
yyC
ii
k
xx
CBfCBfBfBf
CBAfCBAfBAfBAf
yyCyyCVxVU
VfUfUBAxBAVBxUA
VxVUf
k
k
Theorem
Greedy Algorithm produces an approximation within ln n +1 from optimal.
The same result holds for weighted set-cover.
Weighted Set Cover
Given a collection C of subsets of a set E and a weight function w on C, find a minimum total-weight subcollection C’ of C such that every element of E appears in a subset in C’ .
A General ProblemA General Problem
)( s.t.
)()( min
}.0)(,|{)( Define.set a of subsets allon defined function
submodular ,increasing monotone aConsider
fA
xcAc
AfExAfEf
Ax
x
Greedy Algorithm
))(any for )()(max*(.output
};{and )(/)( maximize to choose
do )(* while;
fAAfAffAxAA
xcAfExAff
A
x
A General TheoremA General Theorem
}).({max whereionapproximat-)ln1( a givesGreedy then ,for
0)( and function,integer an is ,0)( If
xfEx
xcff
Ex
)).(})({(max Therefore ).()()(consider may we,0)( If
fxffAfAg
f
Ex
Remark:
Proof
eii
ik
i i
ie
k
i k
kek
i
iieeie
iiiyeie
h
ixi
ii
k
zrc
rcz
rc
rcz
rczzyw
xccAfzAyyyA
AfrxxA
xxx
e
i
)(
)()(
and )( ,)( denote ,*eachFor solution. optimalan is } ..., ,{* Suppose
).( and} ..., ,{ Denote .appearance their oforder the
in AlgorithmGreedy by selected are ..., , , Suppose
1
1
2
11
1
1
1
1,
1
1
1
1
21
submodular is since )(
whererule,Greedy by )(**************************
, ofproperty submodular and ruleGreedy By
2
2
2
1
02
0
1
1
2
2
1
1
2
2
fcr
cAf
AcAf
cr
cr
cr
cr
f
x
x
k
k
h
j
ji
h
j
iy
h
j
jiy
k
ij
iiikj
k
ij Ay
eij
z
f
Af
AAf
AfAAfAfAfr
kizr
j
j
e
1
1
1
1
11
111
*
of properties increasing
monotone and submodularby )(
)*(
)(*)()()(
..., ,1for
*
)(
)(
)(
)(
)(
*1
1
2*
11
1
1
1
211
1
1
1
1
1
Ae
ee
y
e
Ay
eii
ik
i i
i
Ay
e
k
ij
ji
ik
i i
ik
j
j
k
kj
j
k
ij
k
ij k
kjj
k
i i
i
i
k
i i
ik
yw
zrc
rcz
rc
rrc
rcr
rc
rrcrr
rc
crrAc
integers. are since 1)(
)()()(
)()(
Therefore,.
, ofproperty increasing monotone and submodular By the
.)( rule,greedy By
1
1
1
1
1,
1
1
1,
1,
ei
z
i
e
ek
eek
k
i ei
eieei
k
kek
k
i i
iieeie
ieei
ei
e
i
i
zi
yc
zycz
zyczz
rcz
rczzyw
zzf
zyc
rc
e
Subset Interconnection Design
• Given m subsets X1, …, Xm of set X, find a graph G with vertex set X and minimum number of edges such that for every i=1, …, m, the subgraph G[Xi] induced by Xi is connected.
fi
For any edge set E, define fi(E) to be the number of connected components of the subgraph of (X,E), induced by Xi.
• Function -fi is submodular.
Rank
• All acyclic subgraphs form a matroid. • The rank of a subgraph is the cardinality of a
maximum independent subset of edges in the subgraph.
• Let Ei = {(u,v) in E | u, v in Xi}.• Rank ri(E)=ri(Ei)=|Xi|-fi(E).• Rank ri is sumodular.
Potential Function r1+ ּּּּּּּּּ+rm
Theorem Subset Interconnection Design has a (1+ln m)-approximation.
r1(Φ)+ ּּּּּּּּּ+rm(Φ)=0 r1(e)+ ּּּּּּּּּ+rm(e)<m for any edge
Connected Vertex-Cover
• Given a connected graph, find a minimum vertex-cover which induces a connected subgraph.
• For any vertex subset A, p(A) is the number of edges not covered by A.
• For any vertex subset A, q(A) is the number of connected component of the subgraph induced by A.
• -p is submodular.• -q is not submodular.
|E|-p(A)
• p(A)=|E|-p(A) is # of edges covered by A.• p(A)+p(B)-p(A U B) = # of edges covered by both A and B > p(A ∩ B)
Theorem
• Connected Vertex-Cover has a (1+ln Δ)-approximation.
• -p(Φ)=-|E|, -q(Φ)=0.• |E|-p(x)-q(x) < Δ-1• Δ is the maximum degree.
Weighted Connected Vertex-Cover
Given a vertex-weighted connected graph,find a connected vertex-cover with minimumtotal weight.
Theorem Weighted Connected Vertex-Coverhas a (1+ln Δ)-approximation.
This is the best-possible!!!