Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started