Find the optimal shelf placement

Assignment Help Basic Computer Science
Reference no: EM131366263

Consider the problem of storing n books on shelves in a library. The order of the books is fixed by the cataloging system and so cannot be rearranged. Therefore, we can speak of a book bi, where 1 ≤ i ≤ n, that has a thickness ti and height hi. The length of each bookshelf at this library is L. Suppose all the books have the same height h (i.e. , h = hi = hj for all i, j) and the shelves are all separated by a distance of greater than h, so any book fits on any shelf. The greedy algorithm would fill the first shelf with as many books as we can until we get the smallest i such that bi does not fit, and then repeat with subsequent shelves. Show that the greedy algorithm always finds the optimal shelf placement, and analyze its time complexity.

Reference no: EM131366263

Questions Cloud

Component of plasma membrane : Consider a plant cell that makes a particular protein that is a necessary component of its plasma membrane. Trace the pathway this protein will take, beginning with its synthesis at the ribosome bound to the endoplasmic reticulum (which is where a..
Explain the relevant historical background : Do you summarize and explain the relevant historical background - Do you clearly explain the relationship between the historical background and the literary work?
Did you know that the moon may be made of cheese : The purpose of this assignment is to help you distinguish between different types of information sources and evaluate sources of information for credibility. Scientists and scholars use information from a variety of sources, some of them scholarly..
Plasma osmolarity during dehydration or water loading : Explain why we do not see significant changes in plasma osmolarity during dehydration or water loading.
Find the optimal shelf placement : Show that the greedy algorithm always finds the optimal shelf placement, and analyze its time complexity.
Describe the procedures for compliance plans : In a 4-page paper, describe the procedures for each of the two compliance plans. Break each procedure section into 2 pages each
Environmental issue facing community : Imagine that you have been asked to educate the members of your community on this environmental issue.
Identify one or two behavioral risk factors : Phase 3 of the PRECEDE-PROCEED model is the education and ecological assessment. After the key risk factors have been identified, they are classified into three categories: Predisposing, reinforcing, and enabling factors. Approaches to these facto..
Comparing the characters hamlet and robert wringhim : Write at least 400 words comparing the characters Hamlet and Robert Wringhim and the events of their lives. What elements of comparison and contrast can you see between these two?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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