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 ν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

1 Expert Approved Answer
Step: 1 Unlock

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

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Algorithms Questions!