Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.
-
Upload
jesse-lockhart -
Category
Documents
-
view
218 -
download
0
Transcript of Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.
![Page 1: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/1.jpg)
Lecture 11
Overview
Self-Reducibility
![Page 2: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/2.jpg)
Overview on Greedy Algorithms
strategy.greedy thefrom followsproperty
exchange themeanwhile ty,reducibili-self andproperty
exchangewith together foundoften is algorithmgreedy The
![Page 3: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/3.jpg)
Revisit Minimum Spanning Tree
![Page 4: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/4.jpg)
Exchange Property
tree.spanning minimum a
still is )\(such that in edgean exist
must there, without treespanning minimum a and
graph ain eight smallest w with the edgean For
e e'TTe'
eT
Ge
![Page 5: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/5.jpg)
Self-Reducibility
.' of treespanning minimum a is Then point. a
into shrinkingby ly respective , and from
obtained be and Let . of edgean is and
graph a of treespanning minimum a is Suppose
GT'
eTG
T'G'Te
GT
![Page 6: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/6.jpg)
Max Independent Set in Matroid
![Page 7: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/7.jpg)
Exchange Property
tree.spanning minimum a
still is )\(such that in edgean exist
must there, without set t independen minimum a and
matroid ain eight smallest w with theelement an For
e e'TTe'
eT
Ge
![Page 8: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/8.jpg)
Self-Reducibility
.' of treespanning minimum a is Then point. a
into shrinkingby ly respective , and from
obtained be and Let . of edgean is and
graph a of treespanning minimum a is Suppose
GT'
eTG
T'G'Te
GT
![Page 9: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/9.jpg)
etc.. Ratio, Local as
such ,algorithms of sother type ofdesign in used
also isty reducibili-self The ty.reducibili-self
using algorithms of pespopular ty threeare
Greedy Program, Dynamic Conquer,-and-Divide
![Page 10: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/10.jpg)
Overview on Greedy Algorithms
Exchange Property
Matroid
Self-Reducibility
![Page 11: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/11.jpg)
Local Ratio Method
![Page 12: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/12.jpg)
Basic Idea
*)(*)(*)()()()(
*)()( *),()(
.function objectivefor solution optimalan is *then
,function objectivefor solution optimalan also and
function objectivefor solution optimalan is * If
).()()( Suppose
)(maxor )(minx
problemtion optimimizaan Consider
2121
2211
2
1
21
xcxcxcxcxcxc
xcxcxcxc
cx
c
cx
xcxcxc
xcxcxx
Proof
![Page 13: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/13.jpg)
Basic Idea
).(min toreduced is
problem thesolutions, optimal ofset large a has )(When
.function objectivefor solution optimalan is *then
,function objectivefor solution optimalan also and
function objectivefor solution optimalan is * If
).()()( Suppose
)(maxor )(minx
problemtion optimimizaan Consider
2
1
2
1
21
xc
xc
cx
c
cx
xcxcxc
xcxc
x
xx
![Page 14: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/14.jpg)
Minimum Spanning Tree
1
56
3 4
2
7 5
1
1 1
1 1
1
1 1
0
4 4
1
2 3
5 6
solution! optimalan
is treespanningEvery
1
44
5 6
2
![Page 15: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/15.jpg)
Activity Selection
.),[),[ : pingnonoverlap
y.cardinalit themaximize tointervals
pingnonoverlap ofsubset a find ),,[
),...,,[),,[ intervals ofset aGiven 2211
jjii
nn
fsfs
fs
fsfs
![Page 16: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/16.jpg)
Puzzle
solution? optimalan find way toefficient an findyou can not, If
hold? stillproperty exchange theDoes
intervals.
pingnonoverlap weight totalmaximum thefind want to weandweight
enonnegativ a has intervaleach suppose problem,selection -activityIn
![Page 17: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/17.jpg)
17
Independent Set in Interval Graphs
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
• We must schedule jobs on a single processor with no preemption. • Each job may be scheduled in one interval only.• The problem is to select a maximum weight subset of non-conflicting
jobs.
time
![Page 18: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/18.jpg)
18
Independent Set in Interval Graphs
I
IxIp )( }1,0{Ix
)()(:
1IftIsIIx
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
Maximize s.t. For each instance I
For each time t
time
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 19: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/19.jpg)
19
Maximal Solutions
• We say that a feasible schedule is I-maximal if either it contains instance I, or it does not contain I but adding I to it will render it infeasible.
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
time
I2I1
The schedule above is I1-maximal and also I2-maximal
![Page 20: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/20.jpg)
20
An effective profit function
P1= P(Î)
P1=0
P1=0
P1=0
P1=0
P1=0
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
Let Î be an interval that ends first;
Î
P1= P(Î)
P1= P(Î)
P1= P(Î)
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
negative.) becan )( :(note )()()(
otherwise 0
ˆith conflect win if )ˆ()(
212
1
IpIpIpIp
IIIpIp
![Page 21: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/21.jpg)
21
An effective profit function
P1= P(Î)
P1=0
P1=0
P1=0
P1=0
P1=0
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
Î
P1= P(Î)
P1= P(Î)
P1= P(Î)
For every feasible solution x: p1 ·x p(Î) For every Î-maximal solution x: p1 ·x p(Î)
Every Î-maximal is optimal.
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 22: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/22.jpg)
22
Independent Set in Interval Graphs:An Optimization Algorithm
Algorithm MaxIS( S, p )1. If S = Φ then return Φ ;2. If I S p(I) 0 then return MaxIS( S - {I}, p);3. Let Î S that ends first;4. I S define: p1 (I) = p(Î) (I in conflict with Î) ;5. IS = MaxIS( S, p- p1 ) ;6. If IS is Î-maximal then return IS else return IS {Î};
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 23: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/23.jpg)
23
Running Example
P(I1) = 5 -5
P(I4) = 9 -5 -4
P(I3) = 5 -5
P(I2) = 3 -5
P(I6) = 6 -4 -2
P(I5) = 3 -4
-5 -4 -2
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 24: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/24.jpg)
Minimum Weight Arborescence
![Page 25: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/25.jpg)
Definition
.other every to frompath a is There (b)
tree.spanning a is
then ignored, are edges theof directions theIf (a)
hold. conditions following thesuch that and edges
opposite ofpair acontain not does which ),( of
),(subgraph a is root with An
Vvr
T
EVG
FV T rcearborescen
![Page 26: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/26.jpg)
Problem
cost. totalminimum with earborecenc
an find , node a and :cost edge
enonnegativ with ),(graph directed aGiven
VrREc
EVG
![Page 27: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/27.jpg)
Key Point 1
. nodeat edges-in ofset the)( vvin
. cycle a contains * Otherwise, optimal. is
* then ce,arborescenan is }}{|{* If
).( from edgecheapest a choose ,each For
CF
FrVveF
verv
v
inv
![Page 28: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/28.jpg)
Key Point 2
. nodeat edges-in ofset the)( vvin
. cycle a contains * Otherwise, optimal. is
* then ce,arborescenan is }}{|{* If
).( from edgecheapest a choose ,each For
CF
FrVveF
verv
v
inv
'.' .cost w.r.tminiman isit iff
cost w.r.t minimum is cearborescenan Then,
).,('),(),('' and
)(),(' define ),(),(For
c
cF
vucvucvuc
ecvucvvu vin
![Page 29: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/29.jpg)
Why?
'.function cost for solution
optimalan is cearborescenany that means This
.)()('
, cearborescenany For
}{
c
ecFc
F
rVvv
![Page 30: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/30.jpg)
Key Point 3
once.exactly enters which ),(
cearborescencost -minimum a exists Then there
.0)(''with containingnot cycle a be Let
C FVT
Ccr C
0
![Page 31: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/31.jpg)
A Property of MST
![Page 32: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/32.jpg)
.)(\*)(in edges least
at contains ,*)(\)(subset any for :Claim
. ,in edgeevery fore and edge contains
which cycle a contains * *),(\)(each For
.)(set ,)(*)( edgeevery For
. oflength thedenotes
where,)(),(every for such that *)()( :
mapping onto one-to-one a is Then there ly.respective network, a of
treespanning minimum theand treespanning a be * and Let
TETE|F|
QTETEF
ee'Qe'e
QTeTETEe
eeTETEe
ee
eeTEeTETE
TT
eFe
e
e
![Page 33: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/33.jpg)
.)(\*)(in edges| contains that
obtain we,'back Adding .)(\*)(in edges 1
least at contains ' ,hypothesisinduction By
.'''in contained is 'Each . ' Clearly,
.'by denoted ,'' containing one is ewhich ther
in cycles ofunion a is then , contains If
.'set then ,contain not does If
}.{''Consider .')( = Denote
.))(\*)(( choose and edgean fix 2, For
tree.a is that ingcontradict ,
for cycle contains otherwise, since, trivialisit ,1For
''}{''
''''}{''
''
''''
''''''
TETE|FQ
eTETE|F|-
Q
eTQQQ
Qe
QQe'Q
QQe'Q
eFeeeTT'
TETEQe'Fe|F|
TFe
QT |F|=
eFe
eeFe
eeFeeeFe
e
eee
eee
e
e
![Page 34: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/34.jpg)
.)(e hence and in is )(
,*)(\)(every for such that )(\*)( to*)(\)(
from mapping one-to-one a exists thereTheorem, Marriage sHall'By
eQe
TETEeTETETETE
e
![Page 35: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/35.jpg)
*).()()(
Therefore, .)(
hence ),(such that )( exists theredifferent,
are and * Since .)(such that *)()(:
mapping onto one-to-one a exists Then there . tree
spanninganother Consider tree.spanning minimum a be *Let
tree.
spanning minimum unique has Then weights.enonnegativ
distinct have ),(graph connected of edges all Suppose
)()(
TlengtheeTlength
ee
eeTEe
TTeeTETE
T
T
G
EVG
TEeTEe
![Page 36: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/36.jpg)
*).())(()()(
Therefore, (e)).()(
Then, .most at lengths of piecessmaller into of edges all
partition torequired pointsSteiner ofnumber minimum the
denote )(Let .)(such that *)()(:
mapping onto one-to-one a exists Then there . tree
spanninganother Consider tree.spanning minimum a be *Let
tree.spanning
minimum thefrom obtained is pointsSteiner ofnumber
minimum with spanning dsteinerize that theShow .most
at length ofeach piences into break them toedges itson points
Steiner some puttingby on treespanning a from obtained
treea is on treespanning dsteinerizeA number. positive
fixed a be Let plane.Euclidean in the set point aConsider
)()(
TnenenTn
nen
RT
TneeTETE
T
T
R
P
P
RP
sTEe
sTEe
ss
ss
s
![Page 37: Lecture 11 Overview Self-Reducibility. Overview on Greedy Algorithms.](https://reader034.fdocuments.in/reader034/viewer/2022051412/551628f1550346c6758b4a5e/html5/thumbnails/37.jpg)
*).(cost)()(cost
Therefore, .)(such that *)()(:
mapping onto one-to-one a exists Then there . tree
spanninganother Consider tree.spanning minimum a be *Let
. minimizes
whichone thei.e., tree,spanning minimum theis 0 fixed
anyfor minimizes which treespaning that theShow
.: weight edge with ),(graph aConsider
)()(
)(
)(
TeeT
eeTETE
T
T
e
eT
REwEVG
TEeTEe
TEe
TEe