Question: Consider a modification to the Activity Selection problem in which each activity i has, in addition to a start time s _ i and finish

Consider a modification to the Activity Selection problem in which each activity i has, in addition to a start time s_i and finish time f_i, a profit p_i. The goal is no longer to maximize the number of activities scheduled, but instead to maximize the total profit of the activities scheduled. That is, we wish to choose a set A of compatible activities such that _j in A p_j is maximized. Consider the following two greedy choices. For each one, determine whether it is a "safe" greedy choice for this modified Activity Selection problem. If your answer is yes, prove the "Greedy-choice property". If your answer is no, please give a counterexample and show that the greedy choice will not lead to an optimal solution. (1) Greedy choice 1: Always select a job with the earliest finish time that is compatible with all previously selected activities. (2) Greedy choice 2: Always select a job with the highest pro t per time unit (i.e.,.p_i /(f_i-s_i)) that is compatible with all previously selected activities.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!