McGraw-Hill OnlineMcGraw-Hill Higher EducationLearning Center
Student Center | Instructor's Center | Introduction to Algorithms | Home
Glossary A-B
Glossary B-D
Glossary D-F
Glossary F-J
Glossary J-M
Glossary M-O
Glossary O-P
Glossary P-S
Glossary S-T
Glossary T-Z
Chapter Objectives
Chapter Overview
Glossary
PowerPoint Slides
Algorithm Pseudocode
Feedback
Help Center


small text cover image
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 Objectives

Similar 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 don’t always yield an optimal solution. But sometimes they
do. We’ll see a problem for which they do. Then we’ll look at some general
characteristics of when greedy algorithms give optimal solutions.
[We do not cover Huffman codes or matroids in these notes.]