of n jobs {1, 2, . . . , n} to run on this machine, one at a time. Each job has a start time si finish time fi and profit pi where 0 ≤ si < fi < ∞ and pi > 0. Two jobs i and j are compatible if the intervals [si , fi) and [sj , fj ) do not overlap. The goal is to find a set A of mutually compatible jobs with the maximum total profit, i.e.,P j∈A pj is maximized. Consider the following two greedy choices. For each one, determine whether it is a “safe” greedy choice for this Job Scheduling 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. a.Greedy choice 1: Always select a job with the earliest finish time that is compatible with all previously selected activities. b.Greedy choice 2: Always select a job with the highest profit per ti
Consider the following Job Scheduling problem. We have one machine and a set
of n jobs {1, 2, . . . , n} to run on this machine, one at a time. Each job has a start time si
finish time fi and profit pi where 0 ≤ si < fi < ∞ and pi > 0. Two jobs i and j are compatible if the intervals [si
, fi)
and [sj , fj ) do not overlap. The goal is to find a set A of mutually compatible jobs with the maximum
total profit, i.e.,P j∈A pj is maximized.
Consider the following two greedy choices. For each one, determine whether it is a “safe” greedy choice
for this Job Scheduling 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.
a.Greedy choice 1: Always select a job with the earliest finish time that is compatible with all
previously selected activities.
b.Greedy choice 2: Always select a job with the highest profit per time unit (i.e., pi/(fi − si))
that is compatible with all previously selected activities.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps