greed is good but gluttony is a deadly sin. what are greedy algorithms? why they are useful dangers...
TRANSCRIPT
![Page 1: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/1.jpg)
Greed is Good
But gluttony is a deadly sin
![Page 2: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/2.jpg)
• What are greedy algorithms?
• Why they are useful
• Dangers of using greedy algorithms
![Page 3: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/3.jpg)
Prim’s Algorithm
![Page 4: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/4.jpg)
1
25
3
a
dc
b
![Page 5: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/5.jpg)
1
2
3
a
dc
b
Minimum Spanning Tree
![Page 6: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/6.jpg)
b c
a df
e
4 43
1
55
862
6
PQ: (a,b,3) ; (a,f,5) ; (a,e,6)
![Page 7: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/7.jpg)
b c
a df
e
4 43
1
55
862
6
PQ: (b,c,1) ; (b,f,4) ; (a,f,5) ; (a,e,6)
![Page 8: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/8.jpg)
b c
a df
e
4 43
1
55
862
6
PQ: (c,f,4) ; (b,f,4) ; (a,f,5) ; (a,e,6) ; (c,d,6)
![Page 9: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/9.jpg)
b c
a df
e
4 43
1
55
862
6
PQ: (f,e,2) ; (b,f,4) ; (a,f,5) ; (f,d,5) ; (a,e,6) ; (c,d,6)
![Page 10: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/10.jpg)
b c
a df
e
4 43
1
55
862
6
PQ: (b,f,4) ; (a,f,5) ; (f,d,5) ; (a,e,6) ; (c,d,6) ; (e,d,8)
![Page 11: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/11.jpg)
b c
a df
e
4 43
1
55
862
6
![Page 12: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/12.jpg)
![Page 13: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/13.jpg)
![Page 14: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/14.jpg)
Kruskal’s Algorithm
![Page 15: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/15.jpg)
b c
a df
e
4 43
1
55
862
6
Sorted list: (b,c,1) ; (e,f,2) ; (a,b,3) ; (c,f,4) ; (b,f,4) ; (a,f,5) ; (d,f,5) ; (a,e,6) ; (c,d,6) ; (d,e,8)
![Page 16: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/16.jpg)
b c
a df
e
4 43
1
55
862
6
Sorted list: (b,c,1) ; (e,f,2) ; (a,b,3) ; (c,f,4) ; (b,f,4) ; (a,f,5) ; (d,f,5) ; (a,e,6) ; (c,d,6) ; (d,e,8)
![Page 17: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/17.jpg)
b c
a df
e
4 43
1
55
862
6
Sorted list: (b,c,1) ; (e,f,2) ; (a,b,3) ; (c,f,4) ; (b,f,4) ; (a,f,5) ; (d,f,5) ; (a,e,6) ; (c,d,6) ; (d,e,8)
![Page 18: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/18.jpg)
b c
a df
e
4 43
1
55
862
6
Sorted list: (b,c,1) ; (e,f,2) ; (a,b,3) ; (c,f,4) ; (b,f,4) ; (a,f,5) ; (d,f,5) ; (a,e,6) ; (c,d,6) ; (d,e,8)
![Page 19: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/19.jpg)
b c
a df
e
4 43
1
55
862
6
Sorted list: (b,c,1) ; (e,f,2) ; (a,b,3) ; (c,f,4) ; (b,f,4) ; (a,f,5) ; (d,f,5) ; (a,e,6) ; (c,d,6) ; (d,e,8)
![Page 20: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/20.jpg)
b c
a df
e
4 43
1
55
862
6
Sorted list: (b,c,1) ; (e,f,2) ; (a,b,3) ; (c,f,4) ; (b,f,4) ; (a,f,5) ; (d,f,5) ; (a,e,6) ; (c,d,6) ; (d,e,8)
![Page 21: Greed is Good But gluttony is a deadly sin. What are greedy algorithms? Why they are useful Dangers of using greedy algorithms](https://reader034.vdocument.in/reader034/viewer/2022051001/56649c8a5503460f9494347d/html5/thumbnails/21.jpg)
DONE!!DANKEI
THAKN YOU!
Nou kan jy aangaan met jou lewe…