Computers and Technology

Barr the bear has started a business to sell fish to poe and his fellow penguins. the penguin customers submit many fish orders, but barr can only process one order at a time. suppose that barr currently has orders from n penguin customers (label them as 1, 2, . . , n). customer i’s order takes ti time to complete. barr is going to process each penguin’s order one by one, and the scheduling of orders can be described as a permutation of the customers. let ci denote the completion time of order i. for instance, if customer j’s order is the first to be completed, then we would have cj = tj (assume barr begins processing orders at time 0); if customer k’s order is the second to be completed after that, then ck = cj + tk = tj + tk, and so on. each customer is of different importance to barr’s business, and we denote this relative weight by wi (for customer i). barr wishes to minimize the weighted sum of the completion times of n orders, pn i=1 wi · ci . intuitively, the more important a customer is, the sooner barr wishes to complete the customer’s order. design an o(n log n) algorithm to solve this problem to barr. you are given a set of n orders with a processing time ti and a weight wi for each customer i (assume ti , wi are positive integers). you want to decide an ordering of the customer orders so as to minimize the weighted sum of the completion times. prove correctness of your algorithm (i. e., optimality) and analyze its runtime.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:00, jennifer7037
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
image
Computers and Technology, 23.06.2019 01:50, jumoke26
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors. java.
Answers: 2
image
Computers and Technology, 23.06.2019 22:00, rocksquad9125
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
image
Computers and Technology, 23.06.2019 22:30, keel5468
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
Do you know the correct answer?
Barr the bear has started a business to sell fish to poe and his fellow penguins. the penguin custom...

Questions in other subjects: