cs.NENov 23, 2026

A steady-state genetic algorithm with multi-ratio seeding and pair exchange for the quadratic knapsack problem

Authors: Gaurav Srivastava, Rahul Verma, Alok Singh

Organizations: Department of Information Technology, Indian Institute of Information Technology Allahabad, Prayagraj, 211015, Uttar Pradesh, India · School of Computer and Information Sciences, University of Hyderabad, Hyderabad, 500046, Telangana, India

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.

Figures & tables

Appendix figures & tables2 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Jul 2, 2026

Hybridizing a Grouping Metaheuristic with Reinforcement Learning for the One-Dimensional Bin Packing Problem

The one-dimensional bin packing problem (1D-BPP) is a canonical NP-hard combinatorial optimization problem with broad industrial applications. We propose RL-HGGA, a hybrid algorithm that integrates Falkenauer's Hybrid Grouping Genetic Algorithm (HGGA) with a tabular Q-learning controller. Rather than applying genetic operators at fixed probabilities, a Q-learning agent dynamically selects among eight macro-actions -- including BPCX crossover, light and heavy mutation, Martello-Toth local search, and population restart -- based on an eight-dimensional state representation encoding generation progress, stagnation level, optimality gap, average fitness, population variance, and average bin fill rate. The agent is trained with an epsilon-greedy policy over 400 episodes, with epsilon decaying to 0.05. Experiments on standard benchmark families (Falkenauer T/U, Scholl 1-3, Hard28) show that RL-HGGA achieves an average optimality gap of 0.95% -- competitive with HGGA (0.75%) and well below FFD (2.47%) -- while reducing mean computation time from 64.22 s to 1.29 s, a 50x speedup. These results demonstrate that learned adaptive operator selection can achieve near-HGGA solution quality at a fraction of the computational cost.
Apr 22, 2026

Learning to Solve the Quadratic Assignment Problem with Warm-Started MCMC Finetuning

The quadratic assignment problem (QAP) is a fundamental NP-hard task that poses significant challenges for both traditional heuristics and modern learning-based solvers. Existing QAP solvers still struggle to achieve consistently competitive performance across structurally diverse real-world instances. To bridge this performance gap, we propose PLMA, an innovative permutation learning framework. PLMA features an efficient warm-started MCMC finetuning procedure to enhance deployment-time performance, leveraging short Markov chains to anchor the adaptation to the promising regions previously explored. For rapid exploration via MCMC over the permutation space, we design an additive energy-based model (EBM) that enables an O(1)O(1)-time 2-swap Metropolis-Hastings sampling step. Moreover, the neural network used to parameterize the EBM incorporates a scalable and flexible cross-graph attention mechanism to model interactions between facilities and locations in the QAP. Extensive experiments demonstrate that PLMA consistently outperforms state-of-the-art baselines across various benchmarks. In particular, PLMA achieves a near-zero average optimality gap on QAPLIB, exhibits remarkably superior robustness on the notoriously difficult Taixxeyy instances, and also serves as an effective QAP solver in bandwidth minimization.
Feb 8, 2026

Multi-Agent Route Planning as a QUBO Problem

Multi-Agent Route Planning considers selecting vehicles, each associated with a single predefined route, such that route-level coverage utility is maximized while redundant spatial overlaps are limited. This paper gives a formal problem definition, proves NP-hardness by reduction from the Weighted Set Packing problem, and derives a Quadratic Unconstrained Binary Optimization formulation whose coefficients directly encode route utility rewards and pairwise overlap penalties. A single penalty parameter λλ controls the coverage--overlap trade-off. We distinguish between a soft regime, which supports multi-objective exploration, and a hard regime, in which the penalty is strong enough to effectively enforce near-disjoint routes. We describe a practical pipeline for generating city instances, constructing candidate routes, building the QUBO matrix, and solving it with a binary quadratic programming baseline (Gurobi), simulated annealing, and D-Wave hybrid quantum annealing. Experiments on Barcelona instances with up to 10,00010{,}000 vehicles reveal a clear coverage--overlap knee and show that Pareto-optimal solutions are mainly obtained under the hard-penalty regime, while D-Wave hybrid solvers and Gurobi achieve very similar objective values on matching configurations with only minor runtime differences as problem size grows.