Reputation: 301
I learned that the interval scheduling problem is optimal when we accepts the requests in the order of earliest finish time.
Then, is it also true that we also have always optimal solution if we accept the requests in the order of latest starting time?
I think it is false, because we would get a different schedule set, but I am wondering how I can come up with a more mathematical proof.
Upvotes: 1
Views: 1630
Reputation: 372714
As a hint, imagine mirroring all the intervals, or pretending that time runs backwards. You know that the greedy “take the earliest finish time” will select the maximum number of intervals. If you sweep backwards in time, what’s the equivalent condition?
Upvotes: 0
Reputation: 59144
Scheduling by latest starting time is the same as:
By symmetry, the maximum number of schedulable intervals is the same whether you reverse time or not, so if "earliest finish time" is optimal, then "latest start time" is optimal, too.
Upvotes: 1