Note that two jobs where the finish time of one equals the start time of the other are still compatible
When trying to solve a problem using a greedy approach one can usually consider a collection of finite natural orderings that a normal human may guess. For example, for the interval scheduling problem we could consider the following approaches. Where we start with some element, and then iteratively try to add new elements so long as the new element is compatible and using some heuristic.
For earliest start time we can see that it does not work via this counter example
Shortest Interval Counter Example
TODO: Earliest finish time implementation
It turns out that adding valid jobs based on earliest finish time yields an optimal solution
Note that in the above proof it's important to realize that if was optimal then and , and then in the latter part of the proof we wouldn't be able to talk about because it would be an invalid index.