Greedy Algorithms and Exchange Proofs
Prove earliest-finish interval scheduling by transforming an optimal schedule, then identify the assumption that fails with weights.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Replace the first choice safely
For half-open intervals, pick one ending as early as possible and discard intervals that overlap it. To prove correctness, take an optimal schedule whose first interval is \(j\), and call the greedy choice \(i\). The finish of \(i\) is at most the finish of \(j\). Replacing \(j\) by \(i\) preserves feasibility of every later interval and preserves the count. The remaining problem begins at the finish of \(i\). Induction on the remaining intervals completes the proof.
The replacement must preserve the objective
Suppose \([0,1)\) and \([1,2)\) have value one each, while \([0,2)\) has value five. Earliest finish still returns two intervals, but replacing the long interval by the earliest ending one can decrease total value. Weighted interval scheduling compares alternatives rather than making that exchange. For another exchange proof, the minimum-spanning-tree cut property replaces an edge while preserving connectivity.[1][2]