Lecture 6
Today’s topics: Greedy Algorithms
- Introduction to Greedy Slides
1-15.
- We will look a greedy algorithm for the coin-change problem. This only
works with certain denomination coins. You should understand the
proof of why it works, and when it works.
- Interval scheduling. Again we met a dynamic programming solution
before, here we will look at a simple greedy algorithm and
understand why it is correct.
- Shortest Paths as a greedy algorithm. Slides 1-16
- All-Pairs Shortest path using Dynamic programming (The
‣ Bellman–Ford–Moore algorithm). Slides
33-41
Reading Guide
- Chapter 16 except 16.4 and 16.5 of
CLRS3
or Chapter 15, 15.1,15.2 and
15.3 of
CLRS4.
What should I know by the end of this lecture?
- How do I set up shortest paths as a dynamic program? How do I avoid cycles?
- How does Dijkstra’s algorithm work? Why is it correct?
- What is a greedy algorithm?
- How do greedy algorithms compare with dynamic programming?
- Are Greedy algorithms always optimal?
Last updated on Aug 19, 2020