A steady-state genetic algorithm with multi-ratio seeding and pair exchange for the quadratic knapsack problem
Abstract
The quadratic knapsack problem (QKP) seeks a subset of items of maximum total linear and pairwise profit whose total weight does not exceed a given capacity. Most QKP heuristics rank items by a profit-to-weight ratio. We show on benchmark instances that this ranking can steer the search away from the best known solutions, and that on an almost full knapsack a local optimum can be separated from a better solution by an exchange where every single swap loses profit. We propose SSGA-P, a steady-state genetic algorithm with pair exchange that addresses both effects. Its initial population contains greedy solutions built with a grid of exponents between 0.5 and 3 applied to the item weights, and its pair exchange move combines an improving swap violating the capacity with a second swap or removal that restores feasibility. Incremental contribution vectors keep the method practical up to 10,000 items. SSGA-P finds optimal solutions in every run on the 100 classical instances and reaches all best known values in 99.8\% of the runs on the 80 instances with 1000 and 2000 items and in 99.75\% on the 40 instances with 5000 and 6000 items, significantly above the 87.7\% of the iterated hyperplane exploration algorithm, improving one best known value. On the 144 Large-QKP instances of Hochbaum et al. (2025), with the same 120-second limit, it improves 20 best known values and matches the other 124. An ablation study shows that the multi-ratio seeding and the pair exchange account for most of this performance.
Create a lesson
Related papers
A Multi-Parent Edge Assembly Crossover Driven Hybrid Genetic Algorithm for the Hamiltonian \textit{p}-Median Problem
Shared title terminologycs.NEJunkai Huang, Pengfei He, Jin-Kao Hao et al.
Speeding up Automated Algorithm Design by Batch Evaluation: A Case Study of Genetic Programming for Ant Colony Optimisation
Shared title terminologycs.NEBo-Cheng Lin, Yi Mei, Mengjie Zhang
TSGP-2: On the Non-Linearity of Symbolic Regression Problems and How to Exploit It with Model-based Semantic Genetic Programming
Shared title terminologycs.NEPhilipp Anthes, Alina Geiger, Martin Briesch et al.
AscendMOEA: An Ascend NPU-Accelerated Platform for Tensorized Multi-Objective Evolutionary Algorithms
Shared title terminologycs.NEQianlong Dang, Zhiyang Zhang, Baosheng Li et al.
A restart rule for genetic algorithms based on Schnabel census
Shared title terminologycs.NEAnton Eremeev, Yulia Zakharova
When the implementation matters more than the algorithm: NSGA-II and other multi-objective optimizers in engineering design tools
Shared title terminologycs.NELuciano Ambrosini