Question: Question: Knapsack problem definition : Given n different items, where each item i has an assigned value (vi) and weight (wi), select a combination of
Question:
Knapsack problem definition : Given n different items, where each item i has an assigned value (vi) and weight (wi), select a combination of the items to maximize the total value without exceeding the weight limitations, W, of the knapsack. important when coding with Python!: When generating random problem instance set n = 100 and use a seed value (for the random number generator) of 5113.
- Implement Hill Climbing with Best Im-provement using Python to solve the knapsack problem. Note you will need to implement your strategy for determining an initial solution, handlinginfeasibility, and possible your neighborhood structures. Apply the technique to the random problem instance and determine the best solution and objective value using your revised algorithm.
-Implement Hill Climbing with First Improvement using Python to solve the knapsack problem. Apply the technique to the random problem instance and determine the best solution and objective value using your revised algorithm.
-Implement Simulated Annealing using Python to solve the Knapsack problem. Make sure to include the following: --Explanation of how you determined the initial temperature. --Well-defined the temperature schedule (the temperature update procedure, the number of iterations performed at a given temperature, etc.) --Explanation of the stopping criterion. Apply the technique to the random problem instance and determine the best solution and objective value using your revised algorithm.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
