Abstract
This work address a variant of the knapsack problem, known as the knapsack problem with forfeits, which has numerous applications. In this variant, a set of items and a conflict graph are given, and the objective is to identify a collection of items that adhere to the knapsack’s capacity while maximizing the total value of the items minus the penalties for conflicting items. We propose a novel heuristic for this problem based on the concepts of iterated local search, variable neighborhood descent, and tabu search. Our heuristic takes into account four neighborhood structures, and we introduce efficient data structures to explore them. Experimental results demonstrate that our approach outperforms the state-of-the-art algorithms in the literature. In particular, it delivers superior solutions within significantly shorter computation times across all benchmark instances. Additionally, this study includes an analysis of how the proposed data structures have influenced both the quality of the solutions and the execution time of the method.





Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Data availability
The instances and the source code are available at: https://github.com/Sekva/ilsvnd_kpf.
Change history
13 September 2024
A Correction to this paper has been published: https://doi.org/10.1007/s10732-024-09535-0
References
Bastos, L., Ochi, L.S., Protti, F., Subramanian, A., Martins, I.C., Pinheiro, R.G.S.: Efficient algorithms for cluster editing. J. Combin. Optim. 31(1), 347–371 (2014). https://doi.org/10.1007/s10878-014-9756-7
Bettinelli, A., Cacchiani, V., Malaguti, E.: A branch-and-bound algorithm for the knapsack problem with conflict graph. INFORMS J. Comput. 29(3), 457–473 (2017). https://doi.org/10.1287/ijoc.2016.0742
Cacchiani, V., Iori, M., Locatelli, A., Martello, S.: Knapsack problems—an overview of recent advances. Part I: single knapsack problems. Comput. Oper. Res. 143, 105692 (2022). https://doi.org/10.1016/j.cor.2021.105692
Capobianco, G., D’Ambrosio, C., Pavone, L., Raiconi, A., Vitale, G., Sebastiano, F.: A hybrid metaheuristic for the knapsack problem with forfeits. Soft Comput. 26(2), 749–762 (2021). https://doi.org/10.1007/s00500-021-06331-x
Carrabs, F., Cerrone, C., D’Ambrosio, C., Raiconi, A.: Column generation embedding carousel greedy for the maximum network lifetime problem with interference constraints. In: Optimization and Decision Science: Methodologies and Applications: ODS, Sorrento, Italy, September 4–7, 2017 47. Springer, pp 151–159. https://doi.org/10.1007/978-3-319-67308-0_16 (2017)
Cerrone, C., Cerulli, R., Golden, B.: Carousel greedy: a generalized greedy algorithm with applications in optimization. Comput. Oper. Res. 85, 97–112 (2017). https://doi.org/10.1016/j.cor.2017.03.016
Cerulli, R., D’Ambrosio, C., Raiconi, A., Vitale, G.: The knapsack problem with forfeits. In: Combinatorial Optimization, pp. 263–272. https://doi.org/10.1007/978-3-030-53262-8_22 (2020)
Cerulli, R., D’Ambrosio, C., Iossa, A., Palmieri, F.: Maximum network lifetime problem with time slots and coverage constraints: heuristic approaches. J. Supercomput. 78(1), 1330–1355 (2022). https://doi.org/10.1007/s11227-021-03925-y
D’Ambrosio, C., Laureana, F., Raiconi, A., Vitale, G.: The knapsack problem with forfeit sets. Comput. Oper. Res. 151, 106093 (2023). https://doi.org/10.1016/j.cor.2022.106093
Glover, F., Laguna, M.: Tabu Search. Springer, Boston (1998)
Hansen, P., Mladenović, N., Brimberg, J., Pérez, J.A.M.: Variable neighborhood search. In: Handbook of Metaheuristics, pp. 57–97. https://doi.org/10.1007/978-3-319-91086-4_3 (2018)
Hifi, M., Michrafy, M.: A reactive local search-based algorithm for the disjunctively constrained knapsack problem. J. Oper. Res. Soc. 57(6), 718–726 (2006). https://doi.org/10.1057/palgrave.jors.2602046
Hifi, M., Michrafy, M.: Reduction strategies and exact algorithms for the disjunctively constrained knapsack problem. Comput. Oper. Res. 34(9), 2657–2673 (2007). https://doi.org/10.1016/j.cor.2005.10.004
Lourenço, H.R., Martin, O.C., Stützle, T.: Iterated local search: framework and applications. In: Handbook of Metaheuristics, pp. 129–168 (2018). https://doi.org/10.1007/978-3-319-91086-4_5
Martins, I.C., Pinheiro, R.G.S., Protti, F., Ochi, L.S.: A hybrid iterated local search and variable neighborhood descent heuristic applied to the cell formation problem. Expert Syst. Appl. 42(22), 8947–8955 (2015). https://doi.org/10.1016/j.eswa.2015.07.050
Nogueira, B., Pinheiro, R.G.S., Subramanian, A.: A hybrid iterated local search heuristic for the maximum weight independent set problem. Optim. Lett. 12(3), 567–583 (2017). https://doi.org/10.1007/s11590-017-1128-7
Nogueira, B., Pinheiro, R.G.S., Tavares, E.: Iterated local search for the generalized independent set problem. Optim. Lett. 15(4), 1345–1369 (2020). https://doi.org/10.1007/s11590-020-01643-7
Penna, P.H.V., Subramanian, A., Ochi, L.S.: An iterated local search heuristic for the heterogeneous fleet vehicle routing problem. J. Heuristics 19(2), 201–232 (2013)
Pferschy, U., Schauer, J.: The knapsack problem with conflict graphs. J. Graph Algorithms Appl. 13(2), 233–249 (2009). https://doi.org/10.7155/jgaa.00186
Queiroga, E., Pinheiro, R.G.S., Christ, Q., Subramanian, A., Pessoa, A.A.: Iterated local search for single machine total weighted tardiness batch scheduling. J. Heuristics 27(3), 353–438 (2020). https://doi.org/10.1007/s10732-020-09461-x
Snoek, J., Larochelle, H., Adams, R.P.: Practical bayesian optimization of machine learning algorithms. Advances in neural information processing systems 25 (2012). https://doi.org/10.48550/arXiv.1206.2944
Wei, Z., Hao, J.K., Ren, J., Glover, F.: Responsive strategic oscillation for solving the disjunctively constrained knapsack problem. Eur. J. Oper. Res. (2023). https://doi.org/10.1016/j.ejor.2023.02.009
Yamada, T., Kataoka, S., Watanabe, K.: Heuristic and exact algorithms for the disjunctively constrained knapsack problem. Inf. Process. Soc. Jpn. J. 43(9), 2864–2870 (2002)
Acknowledgements
We would like to thank Prof. Andrea Raiconi for providing the instances. The authors acknowledge the support from the Coordination for the Improvement of Higher Education Personnel—Brazil (CAPES), the National Council for Scientific and Technological Development—Brazil (CNPq), and the Fundação de Amparo à Pesquisa do Estado de Alagoas (FAPEAL).
Funding
This work was supported by FAPEAL, CNPq, and CAPES.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare they have no Conflict of interest.
Ethical Approval
This article does not contain any studies with human participants or animals performed by any of the authors.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The original version of the article was revised: The affiliation information for first author has been corrected.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Vieira, M.M., Nogueira, B. & Pinheiro, R.G.S. An integrated ILS-VND strategy for solving the knapsack problem with forfeits. J Heuristics 30, 399–420 (2024). https://doi.org/10.1007/s10732-024-09532-3
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10732-024-09532-3