+ All Categories
Home > Documents > Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II....

Greedy Algorithms II CS 170 Section 5 170 Section 5.pdf · 2020. 5. 30. · Greedy Algorithms II....

Date post: 02-Oct-2020
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
12
CS 170 Section 5 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

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

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

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

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

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

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

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

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

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

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

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

Horn Formulas, cont.

●○○○

∧ ∧ ⇒ ∧ ⇒ ⇒ ⇒ ∧ ⇒ ∨ ∨

∧ ∧ ⇒ ∧ ⇒ ⇒ ⇒ ∧ ⇒ ∨ ∨

∧ ∧ ⇒ ∧ ⇒ ⇒ ⇒ ∧ ⇒ ∨ ∨

∧ ∧ ⇒ ∧ ⇒ ⇒ ⇒ ∧ ⇒ ∨ ∨


Recommended