How many different optimal subsets does the instance have

Assignment Help Basic Computer Science
Reference no: EM131125354

a. Apply the dynamic programming algorithm to the following instance of the 0-1 knapsack problem:

Item

Weight

Value

1

3

$25

2

2

$20

3

1

$15

4

4

$40

5

5

$50

capacity W = 6. Show your pseudo codes for the dynamic programming solution. You should include a procedure to retrieve an optimal solution.

b. How many different optimal subsets does the instance of part (a) have?

c. In general, how can we use the table generated by the dynamic programming algorithm to tell whether there is more than one optimal subset for the knapsack problem's instance?

Reference no: EM131125354

Questions Cloud

Gallatin hardware is a small hardware store : Gallatin Hardware is a small hardware store in the rural township of Willow Creek that rarely extends credit to its customers in the form of an account receivable.
Write a c program that reads several different name : This union should itself contain two structures, one for baseball-related statistics and the other for football-related statistics. Test the program using a current set of league statistics. (Ideally, the program should be tested using both baseba..
First calendar quarter to consider three projects : Your company Portfolio Manager is convening a review board in the first calendar quarter to consider three projects. You have been asked to provide recommendations with respect to the capital budgeting aspects of these projects.
Discuss three major concerns of public budgeting : From the first e-Activity, discuss three major concerns of public budgeting and finance for a public administrator. Justify your response with examples.
How many different optimal subsets does the instance have : In general, how can we use the table generated by the dynamic programming algorithm to tell whether there is more than one optimal subset for the knapsack problem's instance?
In what section of the balance sheet should a note : In what section of the balance sheet should a note receivable be listed if its term is (a) 90 days, (b) six years?
Analyze the broad range of talent management efforts : Describe and analyze the broad range of talent management efforts that use software applications to help you Director to make an educated decision.
Determine the number of days sales in inventory : Determine the number of days' sales in inventory and inventory turnover for the three companies. Round to the nearest day and one decimal place.
Generated a forecast for the next eight weeks : Spring and Summer Fashions, a clothing producer, has generated a forecast for the next eight weeks. Demand is expected to be fairly steady, except for periods 3 and 4, which have higher demands:

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  What would tcp have to do

Suppose TCP senders did reliably get explicit congestion indications from routers. Assuming links as above were common, would it be feasible to support window sizes much larger than four segments? What would TCP have to do?

  Why are building codes such as those for stairways required

Stairways-and mechanical engineers sometimes design stairways-have certain geometric requirements for their design, e.g., stairway steps shall be uniform with respect to rise and run. Review local and/or uniform building codes for stairways and st..

  The gain or loss for the stock

Write a program to process stock data. The stock data should be read from a text file containing the following data: stock code, stock name, amount invested (XXX.XX), shares held, and current price. Sue the internet or your local paper to gather..

  Theurl of the article

Find 1 article related to  security and the cloud. and to turn in the following: (1) TheURL of the article, (2) A brief summary of the article

  Formulate one or more problem statements

Formulate one or more problem statements

  Set the character variable r=0

Write a small program that will set the character variable R=0

  The code to implement the singleton pattern is complex

The object-oriented approach to user-centered design focuses on users and their work by identifying actors, use cases, and scenarios followed when using the system..

  Computer memory to store a value for a symbol

What is the process of reserving a place in computer memory to store a value for a symbol?

  Compare tcp and udp protocols

)You suspect that the failure of a router or of a transmission line connecting routers has left some of your important servers unavailable to clients at your site. How could you narrow down the location of the problem?

  Plot the input and output

1. Consider the audio system in a car. Some people like to hear a lot of bass. Give an equation, in your preference of time or frequency domain, for a bass boost

  Organizations in self-governance

How does the COBIT framework assist organizations in self-governance? Specifically, what areas of the COBIT framework relate to governance?

  Create an alice method with a loop to make

Using the walk, move and turn methods, create an Alice method with a loop to make the character walk around in a complete circle. (You can approximate a circle with a polygon, such as an octagon.)

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