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

  Database tables that the it staff

Suppose that you are the database developer for a local college. The Chief Information Officer (CIO) has asked you to provide a summary of normalizing database tables that the IT staff will use in the upcoming training session.

  How many students in this group take every one

For any three of these courses, there are precisely 20 students who take each of them. For any four among these courses, there are precisely 10 students who take each of them. How many students in this group take every one among the five courses i..

  Calculate the weighed score for the homework assignments

For this program, you are going to modify your previous program so that it will now read multiple inputs for each homework assignment (you will need to have a flag to end inputting assignments).

  Explain findings after conducting search for .cde files

You work for mid-sized corporation known for its inventions which does a lot of copyright and patent work. Explain your findings after conducting Internet search for .cde files.

  Explain intrinsic or extrinsic factors

Review your classmates' posts, and respond to at least two of your peers. Select at least one peer who noted different intrinsic or extrinsic factors than yours. Why do you think their factors are different

  Write a java method to five a 10 percent raise to every

write a java method to five a 10 percent raise to every employee who has a student record and whose grade point index is higher than 3.0.

  Best practices for network security

Need an orgianal paper over one of the followingProtecting IT: A Roadmap for Securing the Enterprise•Best Practices for Network Security

  Composite magic number is a positive integer

Question 1A composite Magic number is a positive integer which is composite as well as a magic number. Composite number: A composite number is a number which has more than two factors. For example: 10 Factors are: 1,2,5,10 Magic number: A Magic numbe..

  What is the command to list files in a directory

It will move the contents of temp1 from directory temp to temp1 of current directory and when finished it will erase the contents of temp1 of temp directory. What kind of files will be matched

  Feasibility of the active window with respect to the te unit

If the experts claim that a window with L win = 1 m allows 581 W to enter the building, what conclusions can you draw based on the feasibility of the Active Window with respect to the TE units?

  Regions and memory management

There are a wide variety of algorithms to chose from when implementing garbage collection for a speci?c language. In this problem, we examine one algorithm for ?nding garbage in pure Lisp (Lisp without side effects) based on the concept of regions..

  What are the benefits and risks of cloud computing

What are the benefits and risks of cloud computing? Do you use a cloud to store any of your files or photographs? Does your employer use a cloud to store files or sensitive documents? Responses need to be in essay format with an introductory paragrap..

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