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

You have n programs p1, ..., pn with size s1, ..., sn MB (mega bytes). You have

ID: 3560474 • Letter: Y

Question

You have n programs p1, ..., pn with size s1, ..., sn MB (mega bytes). You have a disk that can store up to T MB. T is less than the total size of the programs. You are asked to use a dynamic programming solution to store the programs onto the disk so as to maximize the disk space utilization. In other words, you want to find a subset of programs such that its total size is maximized but has to be less than T.


Define U[i,t] as the maximum disk utilization of a disk with capacity t MB and programs p1,...,pi to be selected for storing it on the disk. Write a recurrence for U[i,t] and identify the boundary condition.

Explanation / Answer

replacing T here with s

Assume that it doesn

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