Question: Consider a modified version of the Activity Selection problem, where we have a set of activities A = {a1,,an}, and each activity ai takes place
Consider a modified version of the Activity Selection problem, where we have a set of activities A = {a1,,an}, and each activity ai takes place in the open interval [si, fi). Differently from the standard formulation, here we want to maximize the class utilization, i.e. the amount of time the class is utilized. Provide the pseudo code of a greedy algorithm for this problem (20pt), highlighting what is the greedy criteria adopted at each iteration. Provide a counter example (10pt), showing the output of the proposed algorithm and the optimal solution.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
