Question

KNAPSACK Optimization Problem using Greedy Method Problem 1: Item Weight Value 1    14 20 2...

KNAPSACK Optimization Problem using Greedy Method
Problem 1:
Item Weight Value
1    14 20
2     6 16
3   10 8
4     5 10
5   4 12
Allowed weight = 24 Kg

Problem 2:
Item Weight Value
1 6 30
2 8 40
3 15 45
4 22 88
5 25 80
Allowed weight = 60 Kg

Problem 3:
Item Weight Value
1     6 30
2     8 40
3    15 45
4    22 88
5 25 80
Allowed weight = 60 Kg



Homework Answers

Answer #1

Solution 1:-

Item Value Weight Value/Weight
1 20 14 1.42
2 16 6 2.66
3 8 10 0.8
4 10 5 2
5 12 4 3

Arranging items in decreasing order of Value/Weight: 5 , 2 , 4 , 1 , 3. Now the items will be put in the bag in this order.

Allowed weight = 24 kg

Items put in the bag Value Weight in the bag
5 12 4
2 16 6
4 10 5
1 9 * 20/14 9

Total value = 50.85

Solution 2:-

Items Value Weight Value/Weight
1 30 6 5
2 40 8 5
3 45 15 3
4 88 22 4
5 80 25 3.2

Decreasing order of Value/Weight : 1,2,4,5,3

Allowed weight = 60 kg

Items put in the bag Value Weight in the bag
1 30 6
2 40 8
4 88 22
5 24*3.2 24

Total value= 234.8

Solution 3:-

It has same values as that of Problem 2 so the solution is also same.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
the table is for 0-1 knapsack problem given for the following items, each labeled with weight...
the table is for 0-1 knapsack problem given for the following items, each labeled with weight and value. Assume the total weight limit W is 8 lbs. Item 1 2 3 4 Value ($) 8 40 30 54 Weight (lb) 1 2 3 6 Solve the fractional knapsack problem using the input?
Solve the following instance of the 0/1 knapsack problem by using dynamic programming approach. Where W=5...
Solve the following instance of the 0/1 knapsack problem by using dynamic programming approach. Where W=5 item weight Value 1 3 SR 40 2 2 SR 6 3 1 SR 20 4 4 SR 12
The table below shows a portfolio of stocks. 1. Stock 2. Total Value 3. Weight Stock...
The table below shows a portfolio of stocks. 1. Stock 2. Total Value 3. Weight Stock Return Recession (60%) Normal (40%) MRK $ 4,600 15% 10% VZ $ 4,400 1% 15% AAPL $ 7,500 8% 18% CAT $ 2,500 -2% 5% FDX $ 1,000 3% 12% Using the information on the table, perform the following tasks. (30 points) 1. Stock 2. Total Value 3. Weight Stock Return Recession (60%) Normal (40%) MRK $ 4,600 15% 10% VZ $ 4,400 1%...
Please follow the above definitions in calculating the quartiles. There are two distinct situations: set size...
Please follow the above definitions in calculating the quartiles. There are two distinct situations: set size equal to a power of 4 (L is already a whole number – integer), set size not a power of 4. Note: each of the following problems is 15 points. PROBLEM 2: Average wait in minutes for the train QM3; n=12 15 4 5 9 6 12 17 10 8 13 8 16 PROBLEM 3: Quiz scores L n = 13 students 5   7  ...
For the problem below, what is the quantity assigned to the cell Source 1-Destination 2 using...
For the problem below, what is the quantity assigned to the cell Source 1-Destination 2 using the intuitive lowest-cost method for an initial feasible solution? COSTS Dest. 1 Dest. 2 Dest. 3 Supply Source 1 2) 1) 3) 50 Source 2 4) 7) 5) 40 Source 3 3) 12) 6) 30 Demand 50 45 25 120 \ 120 A) 1 B) 5 C) 30 D) 45 E) 50
Person number X Value Y Value Person number X Value Y Value Person number X Value...
Person number X Value Y Value Person number X Value Y Value Person number X Value Y Value 1 24 30 11 39 42 21 21 27 2 42 53 12 60 65 22 33 29 3 20 27 13 34 40 23 25 27 4 31 30 14 24 26 24 22 25 5 22 24 15 51 57 25 28 33 6 46 47 16 80 83 26 34 40 7 52 60 17 28 27 27 53...
1. Find the Nash Equilibria of the following games. (Some may have more than one!) Player...
1. Find the Nash Equilibria of the following games. (Some may have more than one!) Player 2 D E F Player 1 A 30 , 30 20 , 0 0 , 10 B - 60 , 60 50 , 50 10 , 10 C 10 , 80 25 , 30 60 , 90 Player 2 E F G H Player 1 A 20 , 20 -5 , -5 15 , 90 15 , 15 B 5 , 70 30 ,...
Problem 1: Write a Java program for traversing a Binary Search Tree in following ways: (use...
Problem 1: Write a Java program for traversing a Binary Search Tree in following ways: (use any data structure, library functions) ---------- 20 points i) Depth First Traversal: Inorder, LVR ii) Depth First Traversal: Inorder, RVL iii) Depth First Traversal: Preorder, VLR iv) Depth First Traversal: Preorder, VRL v) Depth First Traversal: Postorder, LRV vi) Depth First Traversal: Postorder, RLV No choice menu required. Sample Input (taken from keyboard, single space separated nodes as found in a complete BFS: top-down,...
An end item’s demand forecasts for the next 10 weeks are 30, 20, 35, 50, 25,...
An end item’s demand forecasts for the next 10 weeks are 30, 20, 35, 50, 25, 25, 0, 40, 0, and 50 units. The current on-hand inventory is 80 units. The order policy is to produce in lots of 100. The booked customer orders for the item, starting with week 1, are 22, 30, 15, 9, 0, 0, 5, 3, 7, and 0 units. At present, no MPS quantities are on-hand for this item. The lead time is 2 weeks....
for the following array 30 5 40 11 20 9 15 2 60 25 80 3...
for the following array 30 5 40 11 20 9 15 2 60 25 80 3 73 35 4 75 20 6 Show the new array after each pass of Merge sort. Show the new array after each pass of Quick sort.