subject
Engineering, 04.04.2020 08:34 ciya12

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.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Condition monitoring is a major component of. (clo4) a)- predictive maintenance. b)-preventive maintenance c)-proactive maintenance d)-reactive maintenance.
Answers: 1
question
Engineering, 04.07.2019 18:20
Modern high speed trains do not have perpendicular expansion gaps where rails are joined end-to-end any more they are mostly welded together but what might happen if there was a spell of particularly hot weather that causes inspection of the tracks?
Answers: 1
question
Engineering, 04.07.2019 18:20
Wiy doeres rere okhn a pump whon working betwon the same pressure range?
Answers: 2
question
Engineering, 06.07.2019 02:30
Define thermoplastic polymers and thermosetting polymers in terms of their structures, and (ii) describe briefly a process suitable for the production of products from each type of polymer.
Answers: 3
You know the right answer?
Suppose you are acting as a consultant for the Port Authority of a small Pacific Rim nation. They ar...
Questions
question
Mathematics, 22.09.2021 14:00
Questions on the website: 13722363