Describe data structure you will use to store opt value

Assignment Help Management Information Sys
Reference no: EM132092900

A person is shopping at a store that carries n different food items as packaged goods. A box of the i-th item will bring the shopper a benefit of bi and costs pi dollars, where bi and pi are integers.

The shopper would like to receive maximum benefit, subject to the requirement that they can't spend more than P dollars in total. So, the problem is which boxes to take (they can take multiple boxes of the same item).

This is known as the integral shopping problem. In the fractional shopping problem, the same n items are sold in bulk, so the shopper can take as much or as little as they like of each food item, instead of having to buy a whole box or nothing.

1. Suppose that the items have the same order if we sort them by price from low to high, and if we sort them by benefit from high to low. Give an efficient algorithm to find an optimal solution to the integral shopping problem in this special case, and argue that your algorithm is correct. Hint: Describe the algorithm in English (1 line). Argue correctness in 3 lines.

2. Prove that the fractional version has the following property: the optimal solution can be found by making a series of locally optimal choices. Therefore, give a greedy algorithm to solve this version and proof it correct. Hint: Ditto.

Solve using Dynamic Programming:

1) Write the identity for the OPT value.

2) Explain why the identity holds.

3) Describe data structure you will use to store OPT value for the subproblems and the order in which you will fill out the entries in your data structure.

4) In the problems you are asked to return the solution ( not just the value of the solution), state the additional information you record which will allow you to retrace your steps and report an optimal solution.

5) Bound the running time by the size of the data structure and the work per entry in it.

Reference no: EM132092900

Questions Cloud

Create a coin toss simulation program : A no-arg constructor, which randomly determines the side of the coin, that is facing up ("heads" or "tails") and initializes the sideUp field accordingly.
How frequently should the key be changed : What attack is more likely to succeed if a key has been used frequently? How frequently should the key be changed?
Update the credit hours and classification : Update the credit hours, classification, and the GPA, taking into account the current GPA and grades in the courses the student is currently enrolled in.
Insert at least five sample rows of data into the employee : The database should have a table named Employee , with columns for employee ID, name, position, and hourly pay rate.
Describe data structure you will use to store opt value : Describe data structure you will use to store OPT value for the subproblems and the order in which you will fill out the entries in your data structure.
Write an algorithm for the following input two numeric value : If the second is larger than the first, perform a real division. Otherwise, perform an integer division.
How do you call a subroutine called myprogram : Write the code to assign "Dean", "Sam", "Castiel", "Bobby", and "Charlie" to the Perl equivalent of an array.
Write a script that prompts the user for a date : Use the code that reads a single character to ask the user to press a key indicating whether they want to compare to today or another date.
Could a shortage of paid code checkers mean there might : Because OpebSSL is open source, could a shortage of paid code checkers mean there might be more errors like Heartbleed? Why?

Reviews

Write a Review

Management Information Sys Questions & Answers

  Is this a discrete or a continuous probability distribution

Convert the information on the number of hours parked to a probability distribution. Is this a discrete or a continuous probability distribution?

  What documentation you will provide with your system

Make a decision about what documentation you will provide with your system and explain it to Ray and Jason.

  Describe the scope and analyze how to control the scope

Documenting the existing IT network and system is an important first step, but you, the CIO, know that capturing the needed changes can be critical to your success as an executive. You know that procuring and documenting quality business requireme..

  How companies use information technology for competitive

how companies use information technology for competitive advantage

  Describe it security policy framework implementation issues

Describe your IT Security Policy Framework implementation issues and challenges and provide recommendations for overcoming these implementation issues and challenges.

  Conduct research on ais - erp systems

HI5019 - STRATEGIC INFORMATION SYSTEMS -  Disk4U is a Sydney based company which sells CDs and Vinyl Records. They are a small family-owned business with four outlets spread around the Sydney metropolis.

  How does data leakage occur in an organization

The focus of the research paper is Data Leakage. How does data leakage occur in an organization? What are the common causes of this problem? How would use address this troublesome trend? Use your textbook, internet, and other publications to re..

  Shows the pros and cons of your business would experience

Prepare an 8- to 10-slide Microsoft PowerPoint presentation that shows the pros and cons your business would experience from using such a service compared to hosting the application internally.

  Explain an effective entity relationship model diagram

Analyze the risks that can occur if any of the developmental or iterative steps of creating an ERM Diagram are not performed.

  Develop business recovery strategies for sangrafix

Develop business recovery strategies for SanGrafix, a video game design company. The strategies should contain detailed guidance and procedures for restoring a damaged system unique to the system's security impact level and recovery requirements.

  Describe the most critical business processes

Explain how IT makes the company's business processes faster, cheaper, more accurate, and customer-savvy than that of competitors.

  Differences between scorecards and dashboards

Discuss the purpose and other considerations behind dashboards in less than one page. Highlight the differences between scorecards and dashboards; and BAM and BPM

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