Wed Nov 2 17:36:40 2022 knapsack_dynamic_test(): Python version: 3.6.9 Test knapsack_dynamic(). Number of items is 10 Knapsack capacity is 165 Item weights: [23 31 29 44 53 38 63 85 89 82] Item values: [92 57 49 68 60 43 67 84 87 72] # Index Weight Value 0 5 38 43 1 3 44 68 2 2 29 49 3 1 31 57 4 0 23 92 -- ----- ----- Total: 5 165 309 Number of items is 5 Knapsack capacity is 26 Item weights: [12 7 11 8 9] Item values: [24 13 23 15 16] # Index Weight Value 0 3 8 15 1 2 11 23 2 1 7 13 -- ----- ----- Total: 3 26 51 Number of items is 6 Knapsack capacity is 190 Item weights: [56 59 80 64 75 17] Item values: [50 50 64 46 50 5] # Index Weight Value 0 4 75 50 1 1 59 50 2 0 56 50 -- ----- ----- Total: 3 190 150 Number of items is 7 Knapsack capacity is 50 Item weights: [31 10 20 19 4 3 6] Item values: [70 20 39 37 7 5 10] # Index Weight Value 0 3 19 37 1 0 31 70 -- ----- ----- Total: 2 50 107 Number of items is 8 Knapsack capacity is 104 Item weights: [25 35 45 5 25 3 2 2] Item values: [350 400 450 20 70 8 5 5] # Index Weight Value 0 7 2 5 1 6 2 5 2 4 25 70 3 3 5 20 4 2 45 450 5 0 25 350 -- ----- ----- Total: 6 104 900 Number of items is 10 Knapsack capacity is 67 Item weights: [23 26 20 18 32 27 29 26 30 27] Item values: [505 352 458 220 354 414 498 545 473 543] # Index Weight Value 0 7 26 545 1 3 18 220 2 0 23 505 -- ----- ----- Total: 3 67 1270 knapsack_dynamic_test(): Normal end of execution. Wed Nov 2 17:36:40 2022