Greedy Algorithms8 sections · 316 units
Open in Course

Proof Step 2 - Induction

Extending the argument

After the first exchange, OPT' agrees with G on the first activity. Now consider the remaining activities in OPT' and G. Apply the same argument: if they differ on the next activity, swap OPT's choice for G's choice.

By induction, we can transform OPT into G through a sequence of exchanges, each maintaining the same count (or improving it). Therefore, G has at least as many activities as OPT. Each swap keeps or improves the count and maintains validity.