Subset items and give the total weight and value

Assignment Help Basic Computer Science
Reference no: EM131046469

We have 5 objects, and the weights and values are

No. 1 2 3 4 5

w 10 20 30 40 50

v 20 30 66 40 60

The knapsack can carry a weight not exceeding 100, find a subset items and give the total weight and value for following algorithms:

1) By using the algorithm of greedy of value for 0-1 knapsack problem? By selecting the highest value first.

2) By using the algorithm of greedy of weight for 0-1 knapsack problem? By selecting lightest item first.

3) By using the algorithm of greedy of density for 0-1 knapsack problem? By selecting the highest density item first.

4) By using the algorithm of greedy of density for fractional knapsack problem? By selecting the highest density item first.

Reference no: EM131046469

Questions Cloud

Create a list of all necessary documents and information : A good start to creating a disaster recovery plan is to create a list of all necessary documents and information - this is something that you typically create after a risk assessment. Answer each question below with at least 300 words.
Which of the following linux distros are based on debian : Which of the following Linux distros are based on debian?
Consequences of changing the organizational architecture : Does your company use transfer pricing to ‘‘charge'' divisions for the cost of the products they consume? Are these prices set equal to the opportunity cost of the product? Why or why not? Can you think of a better organizational architecture?
Assess how consumer perceptions affect behavior : Analyze the concepts of consumer behavior, changes, and their effect on marketing. Assess how consumer perceptions affect behavior.
Subset items and give the total weight and value : The knapsack can carry a weight not exceeding 100, find a subset items and give the total weight and value for following algorithms: 1) By using the algorithm of greedy of value for 0-1 knapsack problem? By selecting the highest value first.
Who coined the word energy in 1807 : The electrons in an atom which rotate about the nucleus possess what kind of energy?
Develop a comprehensive security plan : Develop a comprehensive security plan outline for the organization that you work for or choose an organization that you would like to create a plan for.
Borrowing from depositors at low interest rates : Banks earn money by borrowing from depositors at low interest rates and lending to individuals and businesses at high interest rates. As banks grow, they split into functional divisions that either generate deposits or make loans. To measure the p..
Discuss how the ad caught your attention : What type of appeal did the messages use to capture attention? Did you or will you buy the product because of the ad? Explain why or why not.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  National institute of standards and technology

The National Institute of Standards and Technology (NIST) replaced the former NIST Special Publication 800-37, Guide for the Security Certification and Accreditation of Federal Information Systems with NIST Special Publication

  What information does the data mining generate

What information does the data mining generate?

  What is the accuracy of a two-bit predictor

What is the accuracy of a two-bit predictor, assuming the predictor starts off in the bottom left state? What if the pattern repeats forever?

  Symmetric ciphers provide

What CAIN cryptographic services do symmetric ciphers provide?

  Transform g to an equivalent g'' that has no

Let G be a context free grammar with productions S->ABAC , A->aA|? , B->bB|? , C->d Transform G to an equivalent G' that has no ? productions and no unit productions

  Large consulting firm and specialise

You are a strategic analyst for a large consulting firm and specialise in the analysis of Australian companies. You have been asked by your manager to write a report analysing an Australian company's underlying strategy that has resulted in it mov..

  Create a program that asks user for number between 1 and 100

Develop a JavaScript solution to the follow problem: Create a program that asks a user for a number between 1 and 100, the program should then output to the user higher, lower, or correct, depending upon the input from the user and the random numb..

  Driving force causing this evolution

Discuss the evolution of client-server computing from file server to multilayer applications to Web-based applications. What has been the driving force causing this evolution? Where do you think network computing will be in the next five years? Ten y..

  Modify the definition of avl tree and require

Suppose that we modify the definition of AVL tree and require that for every node, the difference between the heights of its left and right sub-trees is at most 2. Is the height of the tree still O(log n)? Prove your answer using induction.

  Research issues in enterprise architecture

Analyze the types of organizational and computer architectures for integrating systems.

  Show how many days are in the month

Complete the printMonth(int numDays, int startDay) method below to print a calendar month. The parameters numDays and startDay show how many days are in the month, and which day of the week the month starts on

  Create the data flow diagrams needed

The Chocolate Delights Candy Company needs to add the following functionality to its cash register: When a customer is checking out, the cash register needs to store the required data pertaining to each item the customer is buying.

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