I've been following Greedy algorithms in the textbook Jeff Erickson. Here is the following Question I was stuck in proving Proof of Correctness for the following variant of the standard Activity Selection problem.
For each of the following alternative greedy strategies, either prove that the resulting algorithm always constructs an optimal schedule, or describe a small input example for which the algorithm does not produce an optimal schedule.
(a) Choose the course x that ends last, discard classes that conflict with x, and recurse.
(b) Choose the course x that starts first, discard all classes that conflict with x, and recurse.
(c) Choose the course x that starts last, discard all classes that conflict with x, and recurse.
(d) Choose the course x with shortest duration, discard all classes that conflict with x, and recurse.
(e) Choose a course x that conflicts with the fewest other courses, discard all classes that conflict with x, and recurse.
(f) If no classes conflict, choose them all. Otherwise, discard the course with longest duration and recurse.
(g) If no classes conflict, choose them all. Otherwise, discard a course that conflicts with the most other courses and recurse.
(h) Let x be the class with the earliest start time, and let y be the class with the second earliest start time.
• If x and y are disjoint, choose x and recurse on everything but x.
• If x completely contains y, discard x and recurse.
• Otherwise, discard y and recurse.
(i) If any course x completely contains another course, discard x and recurse. Otherwise, choose the course y that ends last, discard all classes that conflict with y, and recurse.
I've been able to provide counter examples for (a),(b),(d) and I found that (c) is correct as it is just the the original problem if we imagine time running in reverse.
It will be very helpful if one provides the idea of proof of correctness for the remaining 2 correct strategies (as it's said in the text that out of all 9 strategies, 3 are correct).