From Dynamic Programs to Greedy Algorithms
Dieter van Melkebeek

TL;DR
This paper demonstrates how classical greedy algorithms for specific cases of problems like interval scheduling, knapsack, and shortest paths can be derived from dynamic programming formulations using monotonicity properties, providing educational insights.
Contribution
It introduces a simple, systematic method to derive greedy algorithms from dynamic programs for certain problems, enhancing understanding and teaching.
Findings
Greedy algorithms can be derived from dynamic programs using monotonicity.
The approach clarifies the change in order for interval scheduling.
It offers an alternative method for teaching greedy algorithms.
Abstract
We show for several computational problems how classical greedy algorithms for special cases can be derived in a simple way from dynamic programs for the general case: interval scheduling (restricted to unit weights), knapsack (restricted to unit values), and shortest paths (restricted to nonnegative edge lengths). Conceptually, we repeatedly expand the Bellman equations underlying the dynamic program and use straightforward monotonicity properties to figure out which terms yield the optimal value under the respective restrictions. The approach offers an alternative for developing these greedy algorithms in undergraduate algorithms courses and/or for arguing their correctness. In the setting of interval scheduling, it elucidates the change in order from earliest start time first for the memoized dynamic program to earliest finish time first for the greedy algorithm.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNumerical Methods and Algorithms · Constraint Satisfaction and Optimization · Complexity and Algorithms in Graphs
