subject

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: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
question
Computers and Technology, 24.06.2019 19:00
Which of the following "invisible" marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 25.06.2019 04:10
While creating a web page, what does each of the following html tags define? 1. 2. 3. 4. a. defines a new paragraph b. defines a term c. defines a single line break d. defines a heading
Answers: 1
question
Computers and Technology, 25.06.2019 05:40
How to make a negative number positive in excel
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
Geography, 14.11.2019 11:31
question
Mathematics, 14.11.2019 11:31
Questions on the website: 13722359