Skip to main content
QUICK REVIEW

[Paper Review] Genetic Algorithm for the 0/1 Multidimensional Knapsack Problem

Shalin Shah|arXiv (Cornell University)|Jul 20, 2019
Optimization and Packing ProblemsEngineering4 references36 citations
TL;DR

This paper proposes a novel genetic algorithm for the 0/1 multidimensional knapsack problem that integrates iteratively computed Lagrangian multipliers into a greedy crossover operator to enhance solution quality and convergence speed. By weighting constraints via Lagrangian multipliers and using a utility ratio-based selection process, the algorithm achieves optimal or near-optimal solutions in seconds on standard benchmark instances, outperforming prior methods in speed and accuracy.

ABSTRACT

The 0/1 multidimensional knapsack problem is the 0/1 knapsack problem with m constraints which makes it difficult to solve using traditional methods like dynamic programming or branch and bound algorithms. We present a genetic algorithm for the multidimensional knapsack problem with Java code that is able to solve publicly available instances in a very short computational duration. Our algorithm uses iteratively computed Lagrangian multipliers as constraint weights to augment the greedy algorithm for the multidimensional knapsack problem and uses that information in a greedy crossover in a genetic algorithm. The algorithm uses several other hyperparameters which can be set in the code to control convergence. Our algorithm improves upon the algorithm by Chu and Beasley in that it converges to optimum or near optimum solutions much faster.

Motivation & Objective

  • To address the computational difficulty of solving the 0/1 multidimensional knapsack problem using traditional methods like dynamic programming or branch and bound.
  • To improve convergence speed and solution quality over existing metaheuristics, particularly the Chu and Beasley algorithm.
  • To integrate domain-specific knowledge—specifically constraint weighting via Lagrangian multipliers—into a genetic algorithm framework to guide search constructively.
  • To develop a scalable and parallelizable implementation capable of solving large-scale instances efficiently.

Proposed method

  • Initial population is generated with a 50% probability of including each object, introducing diversity but also invalid solutions.
  • Lagrangian multipliers are iteratively computed and used to weight each constraint, adjusting the utility ratio of objects to reflect constraint difficulty.
  • The utility ratio is computed as profit divided by the sum of (weight × Lagrangian multiplier) across all constraints, normalized by the number of constraints.
  • A greedy crossover operator constructs offspring by selecting objects in non-increasing order of the modified utility ratio, ensuring all constraints are satisfied.
  • The algorithm uses configurable hyperparameters such as the number of generations, which can be adjusted via Constants.java in the code.
  • The framework is implemented in Java and C++, with support for standard benchmark datasets like ORLIB and Weing/Weish/Sento instances.

Experimental results

Research questions

  • RQ1Can a genetic algorithm enhanced with Lagrangian multiplier-based constraint weighting outperform existing metaheuristics in solving the 0/1 multidimensional knapsack problem?
  • RQ2How does integrating a greedy crossover guided by Lagrangian-multiplier-augmented utility ratios affect convergence speed and solution quality?
  • RQ3To what extent can this method achieve optimal or near-optimal solutions across diverse benchmark instances?
  • RQ4Can the algorithm be efficiently scaled to larger problem instances, and is it amenable to parallelization?

Key findings

  • The algorithm solved 100% of the Weish10, Weish15, Weish20, Weish25, and Weish30 instances to optimality, with an average solution time of 1.5 seconds.
  • For the Weing7 instance (105 objects, 2 constraints), the algorithm achieved optimal solutions in 27.4 seconds on average, though only 1 out of 20 runs succeeded.
  • The Sento1 and Sento2 instances were solved completely in 4.8 and 0.2 seconds respectively, with 0% gap from the optimum.
  • The Weing5 and Weing8 instances were solved completely in 0.6 and 2 seconds, respectively, with no optimality gap.
  • The algorithm consistently achieved 0% optimality gap on 16 out of 20 runs for Weish05, Weish10, and Weish15, indicating high reliability on smaller instances.
  • The method significantly outperforms the Chu and Beasley algorithm in convergence speed, reaching optimal solutions faster on most benchmark instances.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.