subject

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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:10
Suppose we have a byte addressable computer that has a 32-byte cache with 8 bytes per block. the memory address is 8 bits long. the system accesses memory addresses (in hex) in this exact order: 6e, b9, 17, e0, 4e, 4f, 50, 91, a8, ab, ad, 93, and 94. (a) assuming the cache is direct mapped, what memory addresses will be in cache block 2 after the last address has been accessed? (b) assuming the cache is direct mapped, what is the hit ratio for the entire memory reference sequence given, assuming the cache is initially empty? (c) assuming the cache is 2-way set associative with a lru replacement policy, what is the hit ratio?
Answers: 3
question
Computers and Technology, 22.06.2019 09:00
What is one way in which tablets differ from laptops and notebooks? tablets are designed for touch-based interaction. tablets are designed to be used as desktops. tablets are designed for input via a keyboard and mouse. tablets are designed to be larger than laptops.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
You know the right answer?
Barr the bear has started a business to sell fish to poe and his fellow penguins. the penguin custom...
Questions
question
Health, 20.04.2020 19:11
question
Mathematics, 20.04.2020 19:11
Questions on the website: 13722360