Question: Write a program that provides a dynamic programming solution to the 0 / 1 knapsack problem. Provide a solution for each of the two problems

Write a program
that
provides a dynamic programming solution to the
0/1
knapsack problem.
Provide a solution for each of the two problems below
.
The solution should include the maximum value
as well as the items used in an
easy
-
to
-
read
format
.
Knapsack size =11
Items (first column is value, second column is weight):
11
62
185
226
287
Knapsack size =10
,
000
Items (first column is value, second column is weight):
16808250
50074659
8931273
27545879
77924710
64441166
8449343
7988504
82328730
78841613
44304170
17710158
29561934
93100279
51817336
99098827
13513268
23811634
80980150
36580822
11968673
1394337
25486746
2522992
dynamicProgrammingAssignment.pdf
40195358
35002154
16709945
15669491
88125197
9531904
27723667
2855025
Write a program
that
provides a dynamic programming solution to the
0/1
knapsack problem.
Provide a solution for each of the two problems below
.
The solution should include the maximum value
as well as the items used in an
easy
-
to
-
read
format
.
Knapsack size =11
Items (first column is value, second column is weight):
11
62
185
226
287
Knapsack size =10
,
000
Items (first column is value, second column is weight):
16808250
50074659
8931273
27545879
77924710
64441166
8449343
7988504
82328730
78841613
44304170
17710158
29561934
93100279
51817336
99098827
13513268
23811634
80980150
36580822
11968673
1394337
25486746
2522992
40195358
35002154
16709945
15669491
88125197
9531904
27723667
2855025
Approved programming language Python
Hand in:
1.
The code used to complete the task
2.
The solution to each of the two cases
listed above.
The solution should include the
maximum value as well as the items used in an
easy to read format.
3.
A word document listing all of the variables used in your assignment (including iterators)with an explanation of what value they hold and the purpose of the variable in yourprogram

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!