Computers and Technology

Suppose you are acting as a consultant for the port authority of a small pacific rim nation. they are currently doing a multi-billion-dollar business per year, and their revenue is constrained almost entirely by the rate at which they can unload ships that arrive in the port. here is a basic sort of problem they face. a ship arrives with n containers of weight w1, w2, . . , wn. standing on the dock is a set of trucks, each of which can hold k units of weight. (you may assume that k and wi are integers.) you can stack multiple containers in each truck, subject to the weight restrictions of k. the goal is to minimize the number of trucks that are needed to carry all the containers. this problem is np-complete. a greedy algorithm you might use for this is the following. start with an empty truck and begin piling containers 1, 2, 3, . . into it until you get to a container that would overflow the weight limit. (these containers might not be sorted by weight.) now declare this truck “loaded” and send it off. then continue the process with a fresh truck. by considering trucks one at a time, this algorithm may not achieve the most efficient way to pack the full set of containers into an available collection of trucks.
(a) give an example of a set of weights and a value for k where this algorithm does not use the minimum number of trucks.
(b) show that the number of trucks used by this algorithm is within a factor of two of the minimum possible number for any set of weights and any value of k.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:40, penelopymorales24
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
image
Computers and Technology, 22.06.2019 23:30, TheBurntToast
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, lopez7512
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
image
Computers and Technology, 23.06.2019 20:00, shadow6728g
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
Do you know the correct answer?
Suppose you are acting as a consultant for the port authority of a small pacific rim nation. they ar...

Questions in other subjects:

Konu
Mathematics, 06.11.2021 05:40
Konu
History, 06.11.2021 05:40