INPUT: A collection of intervals over the real line.
OUTPUT: A maximum cardinality collection of disjoint intervals.
We consider greedy algorithms for solving this problem that are of the following form:
1. Pick the interval I from the remaining intervals in C, and add I to the solution set S.
2. Remove I, and any intervals that overlap with I, from C.
3. If C is not yet empty, go to step 1.
One can get different greedy algorithms depending on how
I is selected. For each of the following method of selecting
I, prove or disprove the that resulting greedy algorithm
correctly solves the problem.
Note that this is identical to the taxi cab homework problem except that we now assume three taxis instead of two taxis.