 |  Introduction to Algorithms, 2/e Thomas H. Cormen,
Dartmouth College Charles E. Leiserson,
Massachusetts Institute of Technology Ronald L. Rivest,
Massachusetts Institute of Technology Clifford Stein,
Columbia University
Greedy Algorithms
Chapter ObjectivesSimilar to dynamic programming.
Used for optimization problems. Idea: When we have a choice to make, make the one that looks best right
now.
Make a locally optimal choice in hope of getting a globally optimal
solution.
Greedy algorithms dont always yield an optimal solution. But sometimes they
do. Well see a problem for which they do. Then well look at some general
characteristics of when greedy algorithms give optimal solutions.
[We do not cover Huffman codes or matroids in these notes.]
|