Problem 1. (4 + 4 = 8 points) Interval Scheduling Recap
This problem will test your understanding of dynamic programming by having you run through the algorithm for interval scheduling that we saw in class. Consider the following input for the interval scheduling problem:
V1 = 3
P1 = 0
V2 = 7
P2 = 1
V3 = 9
V4 = 13
P4 = ?
V5 = 4
P5 = ?
V6 = 7
P6 = ?
V7 = 8
P7 = ?
(a) Recall that for any interval i, Pi is the largest j < i such that interval j is compatible with i. List the values for Pi for 3 < i < 7.
(b) Fill out the dynamic programming table: That is, for each value of i = 0, 1, ..., 7, determine both the value of OPT(i) and whether or not the schedule Oi includes schedule i. Finally, write the optimal schedule O7 and its value.
Pg = ?