Efficient algorithm that returns the minimum total cost

Assignment Help Computer Engineering
Reference no: EM133423601

Question: There are n libraries L1, L2, . . . , Ln. We want to store copies of a book in some of the libraries. Storing a copy at Li incurs an integer purchase cost ci > 0. A copy of the book is always stored at Ln. If a user requests the book from Li and Li does not have it, then Li+1, Li+2, . . . are searched sequentially until a copy of the book is found at Lj , for some j > i. This results in a user delay of j - i. (Note that, in this case, no library Lk with an index k smaller than i is searched; also, if the user finds the book at Li , then the user delay is 0.) We define the total cost as the sum of all the purchase costs and all the user delays, assuming that there is one user in each of the n libraries. For example, if there are 4 libraries, and copies of the book are stored at L1 and L4, the total cost is c1 + c4 + 2 + 1. Give an efficient algorithm that returns (a) the minimum total cost; and (b) a set of libraries where copies of the books must be placed to achieve the minimum total cost.

Reference no: EM133423601

Questions Cloud

What is the number of passes needed to sort the data : What is the number of passes needed to sort the data using external merge sort in this scenario.
Discuss importance of teaching secondary science education : Discuss the importance of teaching secondary science education. Discuss and Note critical points in lectures, discussions, and demonstrations.
How data will influence the future of storytelling : How Data will Influence the Future of Storytelling Introduction, Findings and Conclusion, with last 5 years industrial examples
What is human population size that the earth can support : What is human population size that the Earth can support if everyone had your ecological footprint? Explain the basis on which you determined this number.
Efficient algorithm that returns the minimum total cost : Give an efficient algorithm that returns the minimum total cost; and (b) a set of libraries where copies of the books must be placed to achieve the minimum
Describe the biological levels of organization from : Describe the biological levels of organization from the smallest unit of matter called the atom to highest level of organization, the biosphere.
Draw an erd with crows foot notation : Draw an ERD with crows foot notation and How many database tables are we going to have based on the ERD
What was the cause of michael jackson addiction to drugs : What was the cause of Michael Jackson addiction to drugs?
Cultural and linguistic skills with particular community : You have been employed because of your cultural and linguistic skills with a particular community of newly arrived forced migrants.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Evaluate and choose appropriate software design patterns

Demonstrates an ability to evaluate a problem and choose an appropriate software design pattern. Demonstrates a sound understanding of the chosen software

  Investigate the use of web services for the construction

discuss the statement "In the near future, Web application development will be dominated by Web Services, and we can envisage a time when most web application development will involve just the calling of existing Web Services".

  Design verilog model-hardware and software driver

Design the Verilog model, hardware, and the software driver that will implement a byte-wide bidirectional data transfer between your processor and four different peripheral devices.

  Write a little man program that prints out the sums of odd

Write a Little Man program that prints out the sums of the odd values from 1 to 39. The output will consist of 1, 1+3, 1+3+5, 1+3+5+7... No input is required.

  Describe the mechanics of Buffer overflows

Prepare a complete tutorial, including an analogy to describe the mechanics and a graphic to support your analogy, on one of the subsequent areas

  Short notes on reusability

In the real world, an entire program is rarely written from scratch. It is very likely that there are classes or functions that already exist. The key to using these existing modules successfully depends on how modular the classes or functions are..

  As a member of the information security team at a small

as a member of the information security team at a small college you have been made the project manager to install an

  Program to implement the calculations

Write down a program which has a function named presentValue which carry out this calculation. The function must accept future value, annual interest rate, and number of the years as arguments.

  How the transition between user to kernel mode

Explain how the transition between user to kernel mode and vice versa takes place during system boot time and Describe TWO {2) reasons on why virtual machine

  Is there an area regarding google drive where you struggle

BSTC 1036 Barton Community College Name 2 new concepts you learned about throughout the videos provided for Google Drive.

  Write a sequence of arm instructions to multiply the number

A single precision IEEE 754 number is stored in memory at address X. Write a sequence of ARM instructions to multiply the number at X by 16 and store the result

  Find a dos attack that has occurred in the last six months

Find a DoS attack that has occurred in the last six months. Write a brief explanation of how you might have defended against that specific attack.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd