Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

More Books

Students also viewed these Databases questions

Question

The Coase theorem implies that there are no externalities.

Answered: 1 week ago