Abstract
The knapsack problem is one of the most popular NP-hard problems in combinatorial optimization. For 0-1 Knapsack Problem, there are two common approaches which guarantee the optimality of the solutions: Branch-and-Bound (BnB) and Dynamic Programming (DP) algorithms. Both algorithms suffer from a large amount of redundant calculations. To handle this problem, we proposed modifications of these algorithms. For DP, we suggest some new pre-processing and search rules which help us to avoid unneeded calculations. For BnB, we develop a combination of common BnB method with DP with list approach. Computational experiments on artificially generated data and common benchmarks show the effectiveness of the proposed algorithms.
Similar content being viewed by others
Data Availability
The large scale instances of 0/1 knapsack problem are described in “Pisinger, D., Where are the hard knapsack problems? Computers & Operations Research, 2005. 32(9): p. 2271-2284”, and the data can be found here: http://artemisa.unicauca.edu.co/~johnyortega/instances_01_KP/.
References
Merkle R, Hellman M (1978) Hiding information and signatures in trapdoor knapsacks. IEEE Trans Inf Theory 24(5):525–530
Bellman R (1954) The theory of dynamic programming. Bull Am Math Soc 60(6):503–515
Nemhauser GL, Ullmann Z (1969) Discrete dynamic programming and capital allocation. Manage Sci 15(9):494–505
Bas E (2011) A capital budgeting problem for preventing workplace mobbing by using analytic hierarchy process and fuzzy 0–1 bidimensional knapsack model. Expert Syst Appl 38(10):12415–12422
Kellerer H, Pferschy U, Pisinger D (2004) Multidimensional knapsack problems. Springer, Berlin, Heidelberg
Taillandier F, Fernandez C, Ndiaye A (2017) Real estate property maintenance optimization based on multiobjective multidimensional knapsack problem. Comput‐Aided Civ Infrastruct Eng 32(3):227–251
Pisinger D (2002) Heuristics for the container loading problem. Eur J Oper Res 141(2):382–392
Chang PT, Lee JH (2012) A fuzzy DEA and knapsack formulation integrated model for project selection. Comput Oper Res 39(1):112–125
Pfeiffer J, Rothlauf F (2007) Analysis of greedy heuristics and weight-coded eas for multidimensional knapsack problems and multi-unit combinatorial auctions. In Proceedings of the 9th annual conference on Genetic and evolutionary computation, pp 1529–1529.https://doi.org/10.1145/1276958.1277258
Kolesar PJ (1967) A branch and bound algorithm for the knapsack problem. Manag Sci 13(9):723–735
Martello S, Toth P (1977) An upper bound for the zero-one knapsack. Eur J Oper Res 1:169–175
Nauss RM (1976) An efficient algorithm for the 0–1 knapsack problem. Manag Sci 23(1):27–31
Lalami ME, El-Baz D (2012) GPU implementation of the branch and bound method for knapsack problems. In 2012 IEEE 26th international parallel and distributed processing symposium workshops & PhD Forum, pp 1769–1777. https://doi.org/10.1109/IPDPSW.2012.219
Ghassemi-Tari F, Hendizadeh H, Hogg GL (2018) Exact solution algorithms for multi-dimensional multiple-choice knapsack problems. Curr J Appl Sci Technol 1–21. https://doi.org/10.9734/CJAST/2018/40420
Martello S, Pisinger D, Toth P (1999) Dynamic programming and strong bounds for the 0–1 knapsack problem. Manag Sci 45(3):414–424
Pushpa SK, Mrunal TV, Suhas C (2016) A study of performance analysis on Knapsack problem. Int J Comput Appl
Manaseer S, Almogdady H (2017) New hybrid approach to solve the 0/1, bounded knapsack problem. Int J Fut Revol Comput Sci Commun Eng 3:2454
Zhou Y, Chen X, Zhou G (2016) An improved monkey algorithm for a 0–1 knapsack problem. Appl Soft Comput 38:817–830
Rezoug A, Bader-El-Den M, Boughaci D (2018) Guided genetic algorithm for the multidimensional knapsack problem. Memetic Comp 10(1):29–42
Martello S, Pisinger D, Toth P (2000) New trends in exact algorithms for the 0–1 knapsack problem. Eur J Oper Res 123(2):325–332
Ross GT, Soland RM (1975) A branch and bound algorithm for the generalized assignment problem. Math Program 8(1):91–103
Hristakeva M, Shrestha D (2005, April) Different approaches to solve the 0/1 knapsack problem. In: The Midwest Instruction and Computing Symposium
Dantzig GB (1957) Discrete-variable extremum problems. Oper Res 5(2):266–288
Pisinger D (2018) Instances of 0/1 knapsack problem. [Online]. Retrieved from September 30, 2024, from http://artemisa.unicauca.edu.co/~johnyortega/instances
Kellerer H, Pferschy U, Pisinger D (2004) Multidimensional knapsack problems. Springer Berlin Heidelberg, pp 235–283
Acknowledgements
The article was prepared within the framework of the Basic Research Program at the National Research UniversityHigher School of Economics (HSE University).
Author information
Authors and Affiliations
Contributions
I, Burashnikov E., conducted all aspects of the research, including writing the main manuscript text and preparing all figures. I reviewed and approved the final manuscript.
Corresponding author
Ethics declarations
Competing Interests
The authors declare no competing interests.
Additional information
Topical Collection on Networks and Decision Making.
Appendix
Appendix
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
Burashnikov, E. Branch-and-Bound and Dynamic Programming Approaches for the Knapsack Problem. Oper. Res. Forum 5, 98 (2024). https://doi.org/10.1007/s43069-024-00372-2
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s43069-024-00372-2