The data provided is for a traditional knapsack problem. You're being asked, with the data provided in the format provided, to determine the optimum solution for each knapsack file and also how long we should expect your solution to take.
Included in this data set are multiple files with different sets of knapsack data. The files look as such:
line number | elem[0] | elem[1] |
---|---|---|
1 | number of items | max weight allowed in the knapsack |
2 | value of item 1 | weight of item 1 |
3 | value of item 2 | weight of item 2 |
4 | value of item 3 | weight of item 3 |
... | ... | ... |
x | value of item x | weight of item x |
Your response output should include (for each file):
- total value of knapsack
- time to run solution
- indexes of items selected