Question: (20 points) We talked in class about writing the knapsack problem as an integer linear program. Remember for the knapsack problem (without replacement) you are

(20 points) We talked in class about writing the knapsack problem as an integer linear program. Remember for the knapsack problem (without replacement) you are given the following: W; - the weight of item i for i=1..., vi- the value of each item i for i=1...n, and m - the maximum weight you can cary in your knapsack. The goal is to find a set of items with maximum value such that the total weight of the items is less than or equal to the maximum weight you can cary. Your task for this homework assignment is to formalize the ILP for the 0/1 knapsack problem, and provide an explanation to how each component (each constraint or group of constraints and the objective equation) contributes to solving the problem. The definition should be in the same form as the example below. The explanation should be in paragraph form following the solution. The variables in your ILP will be the set ti of binary values (ie. Bi {1,0}) that states if item i is in (1) or not in (0) your knapsack. (20 points) We talked in class about writing the knapsack problem as an integer linear program. Remember for the knapsack problem (without replacement) you are given the following: W; - the weight of item i for i=1..., vi- the value of each item i for i=1...n, and m - the maximum weight you can cary in your knapsack. The goal is to find a set of items with maximum value such that the total weight of the items is less than or equal to the maximum weight you can cary. Your task for this homework assignment is to formalize the ILP for the 0/1 knapsack problem, and provide an explanation to how each component (each constraint or group of constraints and the objective equation) contributes to solving the problem. The definition should be in the same form as the example below. The explanation should be in paragraph form following the solution. The variables in your ILP will be the set ti of binary values (ie. Bi {1,0}) that states if item i is in (1) or not in (0) your knapsack
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
