Question: Problem 5 Let pi, p,..., Pn be n programs to be stored on a disk. Program pi requires si kilobytes of storage, and the capacity

Problem 5 Let pi, p,..., Pn be n programs to be stored on a disk. Program pi requires si kilobytes of storage, and the capacity of the disk is D kilobytes, where D is smaller than the sum of sis. a) We want to maximize the number of programs held on the disk. Prove or give a counter-example: we can use a greedy algorithm that selects programs in order of non-decreasing si b) We want to use as much of the capacity of the disk as possible. Prove or give a counter-example: we can use a greedy algorithm that selects programs in order of non-decreasing si
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
