next up previous
Next: Example: Fractional Knapsack Problem Up: CSE 2320: Algorithms and Previous: Greedy Algorithms

Proving Greedy Algorithms Optimal

Need to prove 1) optimal substructure and 2) greedy choice property.

The proof of 2 typically involves:

Consider globally-optimal solution.
Show greedy choice at first step reduces problem to the same but smaller problem.
Greedy choice must be
  • Part of an optimal solution, and
  • Can be made first
Use induction to show greedy choice is best at each step (i.e., optimal substructure)

Copyright © 1998 The University of Texas at Arlington