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

  Display the sum of the numbers entered

Design the logic (pseudocode and diagram) for a program that allows a user to continuously enter numbers until the user enters 0. Display the sum of the numbers entered.

  Write the program in java

You are not required to write the program in Java. However, detailed pseudo code must be provided. Demonstrate your understanding of tree data structure.

  Find the standard deviation of the assembly time model

One way the company could solve this problem would be to change the advertising claim. What assembly time should the company quote in order that 60% of customers succeed in finishing the desk by then?

  Explain the need for arrays in a program

You will code, build, and execute two programs requiring arrays and strings.  First program (Video Game Player Program): Determine the average score for a group of players and then determine who scored below average.

  What advantage is there to the nesting of subroutines

In what type of machine operation can this instruction save a great deal of duplicate programming?

  What value minimizes the rmse for the matrix m

If we wish to start out, as in Fig. 9.10, with all U and V entries set to the same value, what value minimizes the RMSE for the matrix M of our running example?

  Different types of social engineering

People in general try to be helpful and cooperative social creatures. As part of this social characteristic people tend to talk to others and often give out more information than they should. The bad guys are aware of this and will use crafty ways..

  Determine the max profit in dollars

Determine the number of luxury cars that must be produced and sold to obtain the max profit Determine the max profit in dollars

  Prove that time efficiency of warshall''s algorithm is cubic

Explain how to implement Warshall's algorithm without using extra memory for storing elements of the algorithm's intermediate matrices.

  Write a function create audio colla()

Write a function createAudioCollage() that will create an audio collage.

  Influence individuals and organizations.

Digital media has changed the ways ideas, information, and arguments in society are communicated both locally and globally.

  Describe two disadvantages of normalized tables

If data duplication is only reduced, how can we say that the possibility of data inconsistencies has been eliminated?

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