Computers and Technology

Suppose we have n pieces of candy with weights W[1 .. n] (in ounces) that we want to load into boxes. Our goal is to load the candy into as many boxes as possible, so that each box contains at least L ounces of candy. Describe an efficient 2-approximation algorithm for this problem. Prove that the approximation ratio of your algorithm is 2. [Hint: First consider the case where every piece of candy weighs less than L ounces.]

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 13:30, Gearyjames8
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
image
Computers and Technology, 23.06.2019 14:00, ava5015
What is html ? give a small description about html
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, Amrinderkhattra
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
image
Computers and Technology, 24.06.2019 00:50, sequoyaburke
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
Do you know the correct answer?
Suppose we have n pieces of candy with weights W[1 .. n] (in ounces) that we want to load into boxes...

Questions in other subjects:

Konu
Mathematics, 12.03.2021 04:00