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 si and finish time fi a profit pi 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 pj 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 "Greedychoice property". If your answer is no please give a counterexample and show that the greedy choice will not lead to an optimal solution. Greedy choice : Always select a job with the earliest finish time that is compatible with all previously selected activities. Greedy choice : Always select a job with the highest pro t per time unit iepi fisi 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
