From Dynamic Programs to Greedy Algorithms

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autore principale: van Melkebeek, Dieter
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918356645314560
author van Melkebeek, Dieter
author_facet van Melkebeek, Dieter
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2508_00776
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle From Dynamic Programs to Greedy Algorithms
van Melkebeek, Dieter
Data Structures and Algorithms
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.
title From Dynamic Programs to Greedy Algorithms
topic Data Structures and Algorithms
url https://arxiv.org/abs/2508.00776