Problem 1. (Package Delivery) Tom is working for a delivery company. Every morning, Tom is given a list of *n* packages to choose those that he wants to deliver within *L* hours. Each package has a specified arrival time (when it is available to be delivered) and a specified delivery reward. The company requires that one person cannot choose two packages whose arrival times are less than or equal to 3 hours apart.

The problem is to find a subset of packages so as to maximize the total delivery reward, subjecting to this restriction.

Example. Suppose *L* = 10, *n* = 4, arrival time list (sorted in increasing order as {t1, t2, t3, t4} = {3, 5, 7, 9}, and delivery reward list as{r1, r2, r3, r4} = {6, 8, 7, 4}, then the optimal solution would be to choose package 1 and 3, for total reward of 13.

0 comments