Question: Consider a modification to the activity-selection problem in which each activity a i has, in addition to a start and finish time, a value
Consider a modification to the activity-selection problem in which each activity ai has, in addition to a start and finish time, a value νi. The objective is no longer to maximize the number of activities scheduled, but instead to maximize the total value of the activities scheduled. That is, we wish to choose a set A of compatible activities such that ∑aki∈A νk is maximized. Give a polynomial-time algorithm for this problem.
Step by Step Solution
3.26 Rating (164 Votes )
There are 3 Steps involved in it
We can no longer use the greedy algorithm to solve this problem However as we show the problem still has an optimal substructure which allows us to formulate a dynamic programming solution The analysi... View full answer
Get step-by-step solutions from verified subject matter experts
