Question 8
Recall the Dance Class problem:
Problem Definition
Dance Classes
Input: A collection of intervals given by their left and right endpoints , where for all .
Question: What is the size of the largest collection of mutually pairwise non-overlapping intervals?
Consider the greedy approach to the problem where we repeat the following until there are no intervals left:
select the interval with ---------, eliminating ties arbitrarily; add it to our solution and eliminate all overlapping intervals.
Which of the following strategies guarantees an optimal result?
the shortest duration
the fewest overlaps with other intervals
the smallest left endpoint (i.e, a class that starts earliest)
the smallest right endpoint (i.e, a class that finishes earliest)