Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

An independent trucker has 8 cubic meter of available space on a truck scheduled

ID: 3802625 • Letter: A

Question

An independent trucker has 8 cubic meter of available space on a truck scheduled to depart for Paris. A distributor with large quantities of three different appliances, all destined for Paris, has offered the trucker the following fees to transport as many items as the truck can accommodate. How many items of each appliance should the trucker accept to maximize shipping fees without exceeding the truck's available capacity? Solve through dynamic programming by (a) first writing down the recursive relation and then (b) using that formulation to find the answer.

Explanation / Answer

(a)F(n) = max(F(n-1)+11,F(n-3)+32,F(n-5)+58)
F(n) is the maximum amount of fee to transport n cubic meter. F(n) is 0 if n is less than or equal to zero.

(b) We create the array F[8] where F[i] represents the maximum amount of fee to transport i cubic meter.

F[1] = 11
F[2] = 22
F[3] = 33
F[4] = 44
F[5] = 58
F[6] = 69
F[7] = 80
F[8] = 91

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote