greedy algorithms ii cs 170 section 5 170 section 5.pdf · 2020. 5. 30. · greedy algorithms ii....
TRANSCRIPT
![Page 1: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/1.jpg)
CS 170 Section 5Greedy Algorithms II
![Page 2: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/2.jpg)
Agenda
●○○○
●
![Page 3: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/3.jpg)
Greedy Algorithms
![Page 4: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/4.jpg)
Minimum Spanning Trees
●●
![Page 5: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/5.jpg)
Kruskal’s Algorithm
●●●
●●
![Page 6: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/6.jpg)
The Cut Property
●●●
![Page 7: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/7.jpg)
Prim’s Algorithm
●○
●○ ∅
○■■ ∪ ∪
●●●
![Page 8: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/8.jpg)
Huffman Encoding
●●●
○●
○
●●
![Page 9: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/9.jpg)
Huffman Encoding, cont.
●○
●
![Page 10: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/10.jpg)
Huffman Encoding, cont.
●
●●
○●
○
![Page 11: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/11.jpg)
Horn Formulas
●○
■ ⇒
■○
■■
![Page 12: Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II. Agenda Greedy Algorithms. Minimum Spanning Trees Kruskal’s Algorithm The Cut Property](https://reader036.vdocument.in/reader036/viewer/2022071210/6021eec49e87047b88365ca5/html5/thumbnails/12.jpg)
Horn Formulas, cont.
●
●○○○
∧ ∧ ⇒ ∧ ⇒ ⇒ ⇒ ∧ ⇒ ∨ ∨
∧ ∧ ⇒ ∧ ⇒ ⇒ ⇒ ∧ ⇒ ∨ ∨
∧ ∧ ⇒ ∧ ⇒ ⇒ ⇒ ∧ ⇒ ∨ ∨
∧ ∧ ⇒ ∧ ⇒ ⇒ ⇒ ∧ ⇒ ∨ ∨