answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elena L [17]
2 years ago
5

You are consulting for a trucking company that does a large amount ofbusiness shipping packages between New York and Boston. The

volume ishigh enough that they have to send a number of trucks each day betweenthe two locations. Trucks have a fixed limit w on the maximum amountof weight they are allowed to carry. Boxes arrive at the New York stationone by one, and each package i has a weight wi. The trucking stationis quite small, so at most one truck can be at the station at any time.Company policy requires that boxes are shipped in the order they arrive;otherwise, a customer might get upset upon seeing a box that arrivedafter his make it to Boston faster. At the moment, the company is usinga simple greedy algorithm for packing: they pack boxes in the order theyarrive, and whenever the next box does not fit, they, send the truck on itsway.But they wonder if they might be using too many trucks, and theywant your opinion on whether the situation can be improved. Here ishow they are thinking. Maybe one could decrease the number of trucksneeded by sometimes sending off a truck that was less full, and in thisway allow the next few trucks to be better packed.Prove that, for a given set of boxes with specified weights, the greedyalgorithm currently in use actually minimizes the number of trucks thatare needed. Your proof should follow the type of analysis we used forthe Interval Scheduling Problem: it should establish the optimality of thisgreedy packing algorithm by identifying a measure under which it "staysahead" of all other solutions.
Computers and Technology
1 answer:
likoan [24]2 years ago
6 0

Answer:

Answer explained with detail below

Explanation:

Consider the solution given by the greedy algorithm as a sequence of packages, here represented by indexes: 1, 2, 3, ... n. Each package i has a weight, w_i, and an assigned truck t_i. { t_i } is a non-decreasing sequence (as the k'th truck is sent out before anything is placed on the k+1'th truck). If t_n = m, that means our solution takes m trucks to send out the n packages.

If the greedy solution is non-optimal, then there exists another solution { t'_i }, with the same constraints, s.t. t'_n = m' < t_n = m.

Consider the optimal solution that matches the greedy solution as long as possible, so \for all i < k, t_i = t'_i, and t_k != t'_k.

t_k != t'_k => Either

1) t_k = 1 + t'_k

    i.e. the greedy solution switched trucks before the optimal solution.

    But the greedy solution only switches trucks when the current truck is full. Since t_i = t'_i i < k, the contents of the current truck after adding the k - 1'th package are identical for the greedy and the optimal solutions.

    So, if the greedy solution switched trucks, that means that the truck couldn't fit the k'th package, so the optimal solution must switch trucks as well.

    So this situation cannot arise.

  2) t'_k = 1 + t_k

     i.e. the optimal solution switches trucks before the greedy solution.

     Construct the sequence { t"_i } s.t.

       t"_i = t_i, i <= k

       t"_k = t'_i, i > k

     This is the same as the optimal solution, except package k has been moved from truck t'_k to truck (t'_k - 1). Truck t'_k cannot be overpacked, since it has one less packages than it did in the optimal solution, and truck (t'_k - 1)

     cannot be overpacked, since it has no more packages than it did in the greedy solution.

     So { t"_i } must be a valid solution. If k = n, then we may have decreased the number of trucks required, which is a contradiction of the optimality of { t'_i }. Otherwise, we did not increase the number of trucks, so we created an optimal solution that matches { t_i } longer than { t'_i } does, which is a contradiction of the definition of { t'_i }.

   So the greedy solution must be optimal.

You might be interested in
Allison wants to use equations to simplify the process of explaining something to the Sales team, but the default eq
yarga [219]

Answer:

Search for something that fits her needs

Explanation:

There are several approaches to problem solving, the approach that will be employed depends on our definition of the problem. Not all processes can be modeled by mathematical equations, some processes are simply theoretical and can be explained by simple logic.

If Allison does not find the needed equations among the available default equations, she can come up with an equation that addresses the process at hand. If she cannot come up with any, she can use other approaches that fit her needs to explain the required concept to the team.

7 0
2 years ago
Read 2 more answers
Windows is displaying an error about incompatible hardware. You enter BIOS/UEFI setup to change the boot priority order so that
Irina18 [472]

Answer:

A

Explanation:

The most likely cause of the problem is that You signed in to BIOS/UEFI with the user power-on password rather than the supervisor power-on password. The User password only enables the machine to boot while the supervisor password allows entering the BIOS settings.

4 0
2 years ago
Edhesive Assignment 3: Chatbot on Python
marta [7]

Answer:

Explanation:

Easy peasy lemon squeezy

print: ("hey how are you why are you what are you")

print: ("1,2,3:"):

eif: ("1"):

print: ("nothing")

eif: ("2"):

print: ("Well i am doing this")

eif: ("3):

print: ("watched pewdiepie")

4 0
2 years ago
Read 2 more answers
based on the transcript, what did broadcasting the story through the medium of radio allow welles to do?
tamaranim1 [39]

Answer:

It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theatre performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey.

Explanation:

It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theater performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey. Just previously it was Halloween night, and hence, this was expected. And various listeners of the show were shocked, and they made a lot of crazy calls to the nearby Police Stations, as well as the newspaper publication houses. The radio stations tried to convince various journalists that the radio episode was able to cause hysteria throughout the USA. And by the very next dawn, the front column of each new newspaper from coast to coast together with the headlines related to the huge panic inspired allegedly by the CBS broadcast.

8 0
2 years ago
Iris called the company’s security hotline. The hotline is an anonymous way to report suspi- cious activity or abuse of company
marishachu [46]

Answer 1 :

if Iris had approached Henry, it might had become a personal matter rather than professional. Following the proper protocol is the best way to report in any organization.

Answer 2 :

Yes, Gladys should call the legal authorities. Federal Trade Commission (FTC) is the best agency to file a complaint prevention of corruption within a company.

Answer 3 :

Yes, she should have followed her chain of command because that is one of the many questions that an investigator will ask is if she reported it to her supervisor and human resources. Somehow in companies they use that term when it is somewhat of a legal issue. Internally if she knew the IT director and the security office she could have gone to them along with human resources. Outside I would say start with her local police department and they may have directed her to the proper channel.

Answer 4 :

What Henry did was not ethical even in the slightest. He used the flash drive without permission from the company, he knew he shouldn’t have, but he did it anyway. It is acted in a complete ethical way. If Iris had left this in a coffee station and forgot about it, then it would have been unethical behavior because she knew about it but didn’t whistle blow. There are security laws that get violated in this issue which is why it is unethical and troublesome.

5 0
2 years ago
Other questions:
  • When conducting research, protecting the privacy of patients requires careful attention to ensure ?
    11·2 answers
  • During which phase of web publishing would you use a text editor to enter codes that instruct the browser how to display webpage
    5·1 answer
  • there are four stage of the product life cycle. during which of these stages do you think is the best time for a company to purc
    10·2 answers
  • An expression containing the operator &amp;&amp; is true either or both of its operands are true. True/False
    15·1 answer
  • Gwen recently purchased a new video card, and after she installed it, she realized she did not have the correct connections and
    6·1 answer
  • There is a file "IT4983" in my home (personal) directory. I don’t know my current working directory. How can I find out the file
    11·1 answer
  • Show the stack with all activation record instances, including static and dynamic chains, when execution reaches position 1 in t
    10·1 answer
  • Given main(), define the Team class (in file Team.java). For class method getWinPercentage(), the formula is:teamWins / (teamWin
    15·1 answer
  • Suppose that a class named ClassA contains a private nonstatic integer named b, a public nonstatic integer named c, and a public
    14·1 answer
  • Write a program that takes a single integer input from the user and stores it in a variable. Your program should increase the va
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!