Design and analysis of algorithms

Assignment Help Basic Computer Science
Reference no: EM131416462

Design and Analysis of Algorithms

You are given a series of boxes. Each box i has a rectangular base with width Wi and length Li, as well as a height Hi. You are stacking the boxes, subject to the following: In order to stack a box i on top of a second box j, the width of box i must be strictly less than the width of box j and the length of box i must be strictly less than the length of box j (assume that you cannot rotate the boxes to turn the width into the length). Your job is to make a stack of boxes with total height as large as possible. You can only use one copy of each box. Design a dynamic programming algorithm to solve this problem.

Part a: Draw and explain the DAG corresponding to this problem. Hint: What is a reasonable way to sort the boxes so that all edges go from earlier nodes to later nodes?

Part b: Describe an efficient algorithm to determine the height of the tallest possible stack. You do not need to write pseudocode (though you can if you want to), but in order to get full credit, you must include all the details that someone would need to implement the algorithm. Hint: think about what the subproblems should be.

Reference no: EM131416462

Questions Cloud

What is the receivables turnover : ACP and Receivables Turnover Music City, Inc., has an average collection period of 39 days. Its average daily investment in receivables is $73,000. What are annual credit sales? What is the receivables turnover?
Who is responsible for preparing the budget document : Describe the two budgets and Describe the main focuses/purposes of the budgets -Explain who is responsible for preparing the budget document
Discuss about the adult learning theory : This week we read chapter 8 and 9 of the Smith text. Over the past three weeks, we learned about adult learning theory and the relationship it has to the workplace. For this learning activity, think of your dream job. It is likely that you are tak..
Whether given would be likely if you were to take a sample : Explain whether each of the following would be likely if you were to take a sample of 190 students from the original population.- The mean hours of sleep for the 190 students would be between 8 and 9 hours.
Design and analysis of algorithms : You are given a series of boxes. Each box i has a rectangular base with width Wi and length Li, as well as a height Hi. You are stacking the boxes, subject to the following: In order to stack a box i on top of a second box j, the width of box i mu..
What is your effective annual interest rate : What is your effective annual interest rate (an opportunity cost) on the revolving credit a rrangement if your firm does not use it during the year?
Present the strongest arguments against your claim : Your word choice and language level show that you have a college-level audience in mind and You present the strongest arguments against your claim.
Find the contribution margin per haircut : Find the contribution margin per haircut. Assume that the barbers' compensation is a fixed cost. Show calculations to support your answer. Determine the annual break-even point, in number of haircuts.
Calculate the cash cycle for each company : Calculate the cash cycle for each company and comment on any similarities or differences.

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