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

  Top ten principles

1. After you have read the article the "Top Ten Principles" that is provided the Web Link, identify any four business ethics principles that you feel are the most important and why?  How do these principles relate to either your either internship, pl..

  Explain the differences between excel and access

Explain the differences between Excel and Access and the advantage of Access. Outline the purpose of data analysis, data transformation, and visualization.

  Explaining good message digest function

Then calculate message digest on the result. Would this be a good message digest function? Describe. Message digests are reasonably fast.

  A savings account object holds a nonnegative balance

A savings account object holds a nonnegative balance, and provides deposit(k) and withdraw(k) methods, where deposit(k) adds k to the balance, and withdraw(k) subtracts k, if the balance is at least k, and otherwise blocks until the balance be..

  Describe some ways for the firsthand knowledge

Describe some ways in which the firsthand knowledge we have of some topic goes beyond what we are able to write down in a language. What accounts for our inability to express this knowledge?

  Apply programming design concepts through creation

The task is to animate a cat chasing a mouse as it tries to get close enough to catch it (within 1 foot). Of course, as the cat continues to chase the mouse, the mouse is also running away and moves to random positions, trying to lose the cat. You wa..

  What are the advantages and disadvantages for outsourcing

What are the advantages and disadvantages for outsourcing a system from another Organization?

  Draw an erd to model this situation

The local city youth league needs a database system to help track children that sign up to play soccer. Data needs to be kept on each team and the children that will be playing on each team and their parents.

  Report on quicksort algorithm in c language

The quicksort algorithm was developed in 1960 by Tony Hoare while in the Soviet Union, as a visiting student at Moscow State University.

  Explain how difficult was it for white-hat hackers to breach

Go online and search for information about Operation Eligible Receiver. What details can you find? For example, which government systems were infiltrated. How difficult was it for white-hat hackers to breach those systems

  Convey the meaning of the poem? chat conversation end

Write Poem Analysis essay, Works Cited, and Copy of Poem (with line numbers). Also, copy and paste your entire essay into the body of the thread. Essay: 3 pages in MLA format,use 3-5 in-text (short) citations and 1-2 block (long) quotations. You also..

  Self-mappings of ihi

Prove that if a linear fractional transformation w = (az + b) / ( cz + d) maps the real line of the z plane into the real line of the w plane, then a , b, c, and d must all be real, except possibly for a common phase factor that can be remov..

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