CS3000:&Algorithms&&&Data Jonathan&Ullman
Lecture&18:&
- Greedy&Algorithms:&Proof&Techniques
CS3000:&Algorithms&&&Data Jonathan&Ullman - - PowerPoint PPT Presentation
CS3000:&Algorithms&&&Data Jonathan&Ullman Lecture&18:& Greedy&Algorithms:&Proof&Techniques March&30,&2020 Obligatory& Wall$Street$ Quotation The&movie& Wall$Street
# with&values&&#
#∈1
#
size
3
2 3
OP 1
2
GREEDY
_I
2
C
37
y
s OP 1
4
GREED
L
s c
30
27
2 ≤ % 4 ≤ ⋯ ≤ % 6
f s
Purple
greedy
Red
some other schedule
#> ≤ % ?>
e x
it
0 9214,7
i
3
9 is
5
2
ice
8
g2
4
jig _7
00ns
#> ≤ % ?>
suppose
s r
Ther
greedy wouldalso choose
00ns
s
r
would alsobe chosenby greedy
#> ≤ % ?>
e f
e
itt
#> ≤ % ?>
subtle pairs
i
arguing why this picture is impossible
E fj
I
l
1
Greedy would have considered jet before
andchosen it
# − @#, 0
#
# − @#,0
Csi f
sa fa S3f
I no breaks
schedule
you
This schedhas
0 lateness in
j
job3
1
Jobs
L
4
1
20
Job2
12 10
dz
to
1 2
IMB
Ida
JobI
ti't
di
2
Job 2
ta
lo
lo
O
I
101
11
lateness
9
d's
Jobs
4
1
d
20
1
i
e
Job2
dz
10
Greedy would do
2
then
L
w
lateness
Job 1 C 4 1
di
2
Job 2
tz
lo
would
choose 2 then 2
ul lateness
2
S
S
Inversion
g
consecutivejobs
a schedule has
inversions
schedule
is at
least
as good
inversions
latenessof E
dj
t
titty di
latenessofj
I
l
Litt
titer
di
it
i
ti
t.tt
latenessof es
de 1dg
t
titty di
i
i
l
l
latenessofj
i
i
1
I
1
Litt
titer
di
I
titt
i
ti
e
ti di