Question

In: Statistics and Probability

Consider the following items in the Knapsack Problem: Item                weight             value &nbsp

Consider the following items in the Knapsack Problem:

Item                weight             value            Knapsack capacity W = 9.

1                      3                   $6

2 4 $12

3                      2                  $10

4                      5                  $20

Determine the maximum value in the knapsack if we allow repetitions; i.e., if there are an unlimited number of each item so that more than one such item can be chosen.

Find the missing value in the following linear array. P(w) is the maximum profit obtainable for a knapsack of capacity w.

w-->

            0       1      2       3       4       5       6       7       8       9

P(w):    0 0 10 10     20     20     30    30 40 ?  

P(9) =

Select one:

a. $38

b. $43

c. $32

d. $40

Solutions

Expert Solution

Solution:-

Given that:-

We need to find the maximum profit attainable for a Knapsack of capacity  

W = 9 p(9)

Determine the maximum value in the knapsack if we allow repetitions; i.e., if there are an unlimited number of each item so that more than one such item can be chosen.

we can use each item more than once as there is unlimited amount of each item.

We will solve this problem using dynamic programming considering capacity = 9

v[i, j] 0 1 2 3 4 5 6 7 8 9

0 0 0 0 0 0 0 0 0 0 0

3 0 0 0 3 3 3 6 6 6 9

4 0 0 0 3 12 12 12 15 24 24

2 0 0 10  10 20 20 30 30 40 40

5 0 0 0 3 20 20 30 30 40 40

weights

Find the missing value in the following linear array. P(w) is the maximum profit obtainable for a knapsack of capacity w.

Formula used

maximum profit = $ 40

when capacity = 9 in either of the 2 ways, filling bag with 1 item of weight 5 and 2 items of weight 2.

OR by filling bag with 4 items of weight 2

correct answer = $ 40. option "d".

Thanks for supporting...

Please give positive rating....


Related Solutions

Knapsack algorithm problem: Consider the following variation of the Knapsack problem. There are n types of...
Knapsack algorithm problem: Consider the following variation of the Knapsack problem. There are n types of items, let call them 1,2,3,4,...,n. There are exactly c_i copies of item i, and each such copy has value v_i and weight w_i. As before, the knapsack capacity is W, and the other constraint is that you can only take at most c_i copies of item i ( since no more are available). Show how to compute the optimal value that can be achieved...
Consider the knapsack problem with the capacity C = 8 and 5 items with weights 6,...
Consider the knapsack problem with the capacity C = 8 and 5 items with weights 6, 4, 3, 7, 1. Find which items will exactly fill the knapsack using dynamic programming solution introduced in class. Show all your work. use I/O knapsack
The Knapsack problem is an optimization problem that asks to fill a knapsack with maximum possible...
The Knapsack problem is an optimization problem that asks to fill a knapsack with maximum possible value. Using greedy paradigm, we can solve this problem easily. Your task is the following: (a) Write the pseudo-code of a greedy solution for knapsack problem. (b) Give is the time complexity of your solution in part (a). (c) Implement part (a) in C programming language.
Fractional Knapsack Problem Algorithm which best describes the tightest range of the number of items with...
Fractional Knapsack Problem Algorithm which best describes the tightest range of the number of items with only fractional inclusion (i.e. not entirely included or excluded) in the knapsack? (Let n denote the number of items for possible inclusion.) A) At least 0 items and at most n items B) At least 1 items and at most n items C) Exactly n items D) At least 0 items and at most n-1 items E) At least 1 items and at most...
There are many variations on the Knapsack problem. In this question, consider the same set up...
There are many variations on the Knapsack problem. In this question, consider the same set up as the 0-1 Knapsack problem except suppose there are as many copies of each item as you would like. Thus, if one of the items is small but very valuable, it is possible to put many exact duplicates of that item into the knapsack. To maximize the value of items in the knapsack, the thief may decide to put in as many of the...
Urgent! How do you do solve a knapsack problem recursively in JAVA. for an arbitrary knapsack...
Urgent! How do you do solve a knapsack problem recursively in JAVA. for an arbitrary knapsack capacity and series of weights. Assume the weights are sorted in an array. **The arguments to the knapsack function are target weight and the array index where the remaining items start. For example if you want your knapsack to weigh exactly 20 pounds and you have five items with weights of 11,8,7,6 and 5 pounds. In this case only combination that works is 8,...
how to write a genetic algorithm for a knapsack problem .
how to write a genetic algorithm for a knapsack problem .
Write a program that solves the Knapsack problem. Code to the following standards. Your source of...
Write a program that solves the Knapsack problem. Code to the following standards. Your source of items to put into the knapsack should consist of five randomly generated integers in the range of 1 to 20. Your knapsack can hold 20 lbs.
Which of the following 4 items is most likely to be classified as an A item...
Which of the following 4 items is most likely to be classified as an A item in ABC Analysis? annual usage unit cost widget 300 75 thingamajig 150 5 whatchamacallit 400 4 dohickey 82 60 A. whatchamacallit B. thingamajig C. dohickey D. widget
Question: For each of the following items, determine whether the item would be:
Question: For each of the following items, determine whether the item would be:a. added to the bank balanceb. subtracted from the bank balancec. added to the book balanced. subtracted from the book balance11. Interest revenue earned12. NSF check13. Deposit in transit14. Service charge15. Outstanding checkĀ 
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT