Show an example in which the algorithm uses n2 drives but


Question :

Suppose that you have a set of n files that have to be copied on 1GB USB drives. You can assume that the file sizes are known and always less than or equal to 1GB.

The objective is to use the minimum possible number of USB drives. Suppose that you use the following algorithm: if the file fits in the current USB drive, add the file to the drive, otherwise, put this USB drive aside and start a new one.

The algorithm is simple in that it does not pre-arrange the files according to their sizes and it never tries to revisit previously closed USB drives to scavenge for additional space.

a. Show an example in which the algorithm uses n/2 drives but the optimum file arrangement uses only n/4 + 1.

b. Show that the given algorithm is a 2-approximation algorithm.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Show an example in which the algorithm uses n2 drives but
Reference No:- TGS02935631

Expected delivery within 24 Hours