Need help with computer science to Find the pseudo-code to optimize this problem.
User Generated
ivpurn7544
Computer Science
Description
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.
This question has not been answered.
Create a free account to get help with this and any other question!
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Similar Content
Related Tags
The Awakening
by Kate Chopin
Invisible Man
by Ralph Ellison
Sharp Objects
by Gillian Flynn
My Brilliant Friend
by Elena Ferrante
Shutter Island
by Dennis Lehane
The Fault in Our Stars
by John Green
I Cant Make This Up - Life Lessons
by Kevin Hart
Sense And Sensibility
by Jane Austen
50 Shades of Grey
by E. L. James