0-1 Knapsack Problem Solving using Genetic Optimization Algorithm

Optimization Algorithms, 0-1 Knapsack Problem, Genetic Algorithm, Dynamic programming, Python.

Authors

  • Mubarak Altamimi Karabuk University, Department of Computer Engineering, Karabük, Türkiye
  • Nehad Ramaha Karabuk University, Department of Computer Engineering, Karabük, Türkiye
July 12, 2024

Downloads

A 0-1 knapsack problem with m constraints is known as the 0-1 multidimensional knapsack problem, and it is challenging to solve using standard techniques like branch and bound algorithms or dynamic programming. The goal of the Knapsack problem is to maximize the utility of the items in a knapsack while staying within its carrying capacity. This paper presents a genetic algorithm with Python code that can solve publicly available instances of the multidimensional knapsack problem in a very quick computational time. By identifying the significant genes, the attribute reduction method that uses the rough set theory reduces the search space and guarantees that useful information is not lost. To regulate convergence, the algorithm makes use of many additional hyperparameters that can be adjusted in the code.