Question: P.1 (20pts) in the weighted interval scheduling problem, we are given n jobs, each of which has a start time, finish time, and weight. We
P.1 (20pts) in the weighted interval scheduling problem, we are given n jobs, each of which has a start time, finish time, and weight. We say that two jobs are compatible if they do not overlap in time. We want to find the subset of compatible jobs with the maximum weight, In the figure below, the numbers in the rectangles represent the job weight. a. (15 pts.) Fill in the table below and calculate P ) and MII columns, using the iterative algorithm we discussed in the class, memoiaing the resolt in the MII array. Compute p(1),p(2),p(n) Iterative-Conpute-opt t M[0]=0 Por y=1 to n 1 b. (5 pts.) Once we are done executing the algorithm in (a), we have computed the total weight of the optimal schedule. However, we don't actually know which jobs to include. To extract that information, we will use a recursive algorithm Find-Solution, calling Find-Solution (n). Use this to fill in the last column of your table. Then list the jobs that provide maximum weight. rind-solutian (1) i if (1=0) retarn else if (wj+M(p(j)]>M[j1]} Find-solution (p(j)) 1 in in the solucion Find-solution (51)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
