Question: 6. Dynamic Programming I Suppose you have an array w of m positive integers. These integers represent the weights of various objects. We want to

 6. Dynamic Programming I Suppose you have an array w of

6. Dynamic Programming I Suppose you have an array w of m positive integers. These integers represent the weights of various objects. We want to answer the question of whether we can have a weight of n using exactly k weights. Objects: 1 2 3 4 5 Weights 30 105 5040 (1) For the objects and weights given above, can you choose k 3 objects whose total weight is 2 85 (if so, list the 3 objects you would choose)? (2) Give a short description of a greedy algorithm which answers this question for a general w, m, n,and k

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!