I have found many proofs online about proving that a greedy algorithm is optimal, specifically within the context of the interval scheduling problem.
On the second page of Cornell's Greedy Stays Ahead handout, I don't understand a few things:
- All of the proofs make the base case seem so trivial (when r=1). I don't understand the context behind the base case - perhaps in more easy to understand terms.
- Are we essentially proving that the number of maximum activities in A cannot exceed the number of activities in O?
In short, are we saying that if A is not optimal, then there would be at least 1 more activity in the optimal solution, O, which would contradict our assumption that O is optimal and that A is the set of requests made by the greedy algorithm? Because we don't say that A is optimal. But we know that it's the set of requests selected by the greedy algorithm. So, if it doesn't include the same number of requests than O, then we know that it couldn't have been selected by the greedy algorithm?