What is the running time of your algorithm in terms of n

Assignment Help Data Structure & Algorithms
Reference no: EM13860806

1. Let p1; p2; :::pn be n programs to be stored on a disk. Program pi requires si kilobytes of storage, and the capacity of the disk is D, where s1 + s2 + : : : + sn > D.

(a) Give an ecient algorithm to determine which programs to store on the disk so that the total number of programs on the disk is maximized. If you give a greedy algorithm, be sure to prove that your algorithm is correct by proving both greedy choice and optimal program substructure. What is the running time of your algorithm, in terms of n?

(b) Give an ecient algorithm to determine which programs to store on the disk so that as much of the disk as possible is utilized. If you give a greedy algorithm, be sure to prove that your algorithm is correct by proving both greedy choice and optimal program substructure. What is the running time.

Reference no: EM13860806

Questions Cloud

Derive the payoff matrix and nash equilibria : Two companies are deciding at what point to enter a market. The market lasts for four periods and companies simultaneously decide whether to enter in period 1, 2, 3, or 4, or not enter at all. Thus, the strategy set of a company is {1,2,3,4,do not en..
Bradmark case description : Read the Bradmark Case located in the "Bradmark Case Description" folder and answer the following questions:
The journal entry to write off an account judged : The journal entry to write off an account judged to be uncollectible under the allowance would include a debit to
How do i display and parse a date : 1) How do I display and parse a date? 2) What is object serialization? 3) Can I persist my objects using serialization instead of using a relational or object database?
What is the running time of your algorithm in terms of n : If you give a greedy algorithm, be sure to prove that your algorithm is correct by proving both greedy choice and optimal program substructure. What is the running time of your algorithm, in terms of n?
Sojourner truth''s interpreted by cicely tyson in video form : Consider the imagery you created in your mind as you interacted with the written version of The Open Window. Describe this imagery and discuss whether it helped you understand the story. Did the imagery or imagined tone change when you listened t..
What is the probability that a plan recipientd ies before : What is the probability that a plan recipientd ies before they reach the standard retirement age of 65?
Analyze the seven types of new religious movements : Outline the development of Islam from the death of Muhammad to the end of the Ottoman Empire. Discuss some of the factors that led to the eventual stagnation of Islam in comparison with the dynamic scientific and political developments of the mode..
Create a project to detect the iris and pupil : Create a Project to do the following: Detect the Iris and pupil, Measure the location "Centroid" of iris/pupil and Measure the diameter of the iris and pupil.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Describe open source and proprietary databases

Describe open source and proprietary databases. What are some drawbacks and benefits of each type of database?

  Question about java programming

Define a class named Document that have an instance variable of type String named text that stores any textual content for the file. Design a technique named toString that returns the text field and also include a method to set this value.

  Write algorithm to reverse elemens in queue

Using basic queue and stack operationns, write algorithm to reverse elemens in the queue. Suppose that 'Stack' is class described in section with 'StackType' set to int and STACK_CAPACITY

  Use insertion sort on a randomly ordered array

Suppose that we use insertion sort on a randomly ordered array where items have only one of three values. Is the running time linear, quadratic, or something in between?

  Write a method that uses the bst to output

Write a method to count the number of items in the BST (Note that you should do this by traversing the BST and not in any other way). The method returns an integer.

  Write a program to perform stack operations

Write a program to perform stack operations - pus, pop, display.

  Measure the execution time of the three sorting algorithms

The program should display the array values before sorting and then after invoking each sorting method. For this case, consider SIZE value 100 and MAXRNG value 9999.

  Dbms and data mining to imporve customer service

Discuss how a database management system and data mining can help motor vehicle maintenance center improve its services, and what tables would be required in such a database.

  Creating villian

Announce a new Villian called sharpay who has a wit of 24, a stealth of sixteen, and who has currently claimed three victims: Chad, Troy, and Gabriella.

  Create a decision tree diagram for selection of a cell phone

Use Microsoft Visio, PowerPoint, or Word to create a decision tree diagram for the selection of a cell phone. Address risk in your decision tree

  Design an algorithm to find the selling price of item sold

To make a profit, the prices of the items sold in a furniture store are marked up by 60%. Design an algorithm to find the selling price of an item sold at the furniture store. What information do you need to find the selling price?

  Designing a visual c-sharp program

Design a Visual C-Sharp program for an Ice Cream Shop. The program will store information about ice cream cones and customers.

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