Design an dynamic programming algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM132819390

Question: Erica is an undergraduate student at USC, and she is preparing for a very important exam. There are n days left for her to review all the lectures. To make sure she can finish all the materials, in every two consecutive days she must go through at least k lectures. For example, if k = 5 and she learned 2 lectures yesterday, then she must learn at least 3 today. Also, Erica's attention and stamina for each day is limited, so for i'th day if Erica learns more than ai lectures, she will be exhausted that day.

You are asked to help her to make a plan. Design an Dynamic Programming algorithm that output the lectures she should learn each day (lets say bi), so that she can finish the lectures and being as less exhausted as possible(Specifically, minimize the sum of max(0,bi -ai)). Explain your algorithm and analyze it's complexity.

Reference no: EM132819390

Questions Cloud

Is this data cross-sectional or time series : You're looking to build a model which identifies the type of person that responded to your marketing campaign and purchased a new smartphone
Find what is the present value of stream of cash flows : $56,000 payments occur at the end of each of the next 24 years. If 8 percent is the discount rate, what is the present value of this stream of cash flows?
How much is the minimum price for the deal : David expected to sell 50,000 units of Monster Craz. How much is the minimum price for the deal, if a minimum targeted profit of $500,000 is expected?
How the allocation would be performed : Provide a simple example of how the allocation would be performed if your company paid $1,000,000 cash in total for a restaurant (land, building, and equipment)
Design an dynamic programming algorithm : You are asked to help her to make a plan. Design an Dynamic Programming algorithm that output the lectures she should learn each day (lets say bi).
Determine the total cost for replacing the machine : Williams Auto has a machine that installs tires. The machine is now in need of repair. Determine the total cost for replacing the machine
What you would like to learn for future study in the course : Write an essay of atleast 500 words on what you would like to learn for future study in this course. Write in essay format, not outline or bulleted.
How much should be recorded as the total cost : If all the rights are exercised, how much should be recorded as the total cost of the new investment through the exercise of share rights?
Calculate the direct material price and quantity variances : Use the variance formulas to calculate the direct material price and quantity variances and the direct labour rate and efficiency variances

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Processor sharing to worse performance than fcfs

Create a second experiment answering the question "Is it possible for processor sharing to have worse performance than FCFS? "

  Calculation of a binary tree

Write a function in C programming language that can find and return the cost of more expensive path from the root of a binary tree to a leaf.

  Write a program that compares the execution times

Write a program that compares the execution times of various O(n2) sorting algorithms described in this section for randomly generated lists of integers.

  Include methods to set and get values for each data field

Design a class named MagazineSubscription that has fields for a subscriber's name, the magazine name, and number of months remaining in the subscription. Include methods to set and get the values for each data field.

  Draw the bst that results when the words are inserted

Perform in order, preorder, and post order traversals of the tree that results and show the sequence of words that results in each case.

  Order of semaphores in the customer changes

Explain what will happen if the order of semaphores in the customer changes - Explain, in words, what changes should be made and why

  Explain concept of linked list with details of algorithms

COMP 2230 – Data Structures and Algorithm Analysis - This first assignment is to explain the concept of linked list with the details of the algorithms behind it

  Create a program for a windows company

The program should display the total amount a customer owes, given the number of windows ordered and the price per window.

  Rewrite pseudocode of warshalls algorithm assuming that the

rewrite pseudocode of warshalls algorithm assuming that the matrix rows are represented by bit strings on which the

  Write sql select statement that would re-organize results

Describe an algorithm that you could implement that would allow you to find a given person's telephone number in the shortest amount of time

  How to implement the class as two stacks

Suppose that you want to add the find Min (but not delete Min) operation to the stack repertoire. Implement this class as two stacks, as described in Exercise.

  Write a program that reads a list of names from a text file

Write a program that reads a list of names and telephone numbers from a text file and inserts them into a BST tree. Once the tree has been built, present the user with a menu that allows him or her to search the list for a specified name.

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