Questions: Activity Selection Problem Using Greedy Algorithms

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

You need to schedule the maximum number of non-overlapping activities. Which sorting criterion guarantees an optimal greedy solution?

ASort by start time — activities starting earliest should be prioritized
BSort by end time — finishing earliest leaves the most remaining capacity for future activities
CSort by duration — shortest activities maximize the number that fit
DSort by number of conflicts — activities with fewer conflicts should be selected first
Question 2 Multiple Choice

The greedy-choice property for activity selection states that...

AThe activity with the fewest overlapping activities is always in some optimal solution
BThe earliest-starting activity is always in some optimal solution
CThe earliest-finishing activity is always in some optimal solution
DAny activity can be the first selection without affecting the number selected
Question 3 True / False

Sorting activities by shortest duration usually maximizes the number of non-overlapping activities selected.

TTrue
FFalse
Question 4 True / False

The activity selection problem can be solved optimally in O(n log n) time, with the sort dominating and the selection pass requiring only O(n).

TTrue
FFalse
Question 5 Short Answer

Explain why sorting activities by end time — rather than by start time or shortest duration — leads to an optimal greedy solution.

Think about your answer, then reveal below.