Due to its NP-hard nature, it is still difficult to find an optimal solution for instances of the binary knapsack problem as small as 100 variables. In this paper, we developed a three-level hyper-heuristic framework to generate algorithms for the problem. From elementary components and multiple sets of problem instances, algorithms are generated. The best algorithms are selected to go through a second step process, where they are evaluated with problem instances that differ in size and difficulty. The problem instances are generated according to methods that are found in the literature. In all of the larger problem instances, the generated algorithms have less than 1 % error with respect to the optimal solution. Additionally, generated algorithms are efficient, taking on average fractions of a second to find a solution for any instance, with a standard deviation of 1 s. In terms of structure, hyper-heuristic algorithms are compact in size compared with those in the literature, allowing an in-depth analysis of their structure and their presentation to the scientific world.
This is a preview of subscription content, access via your institution.
Buy single article
Instant access to the full article PDF.
Tax calculation will be finalised during checkout.
Subscribe to journal
Immediate online access to all issues from 2019. Subscription will auto renew annually.
Tax calculation will be finalised during checkout.
Binary knapsack problem
Genetic programming platform for evolving tree structures of code
In the knapsack list; data structure used by the evolved algorithms
Out of knapsack list; data structure used by the evolved algorithms
Uncorrelated instance of the binary knapsack problem
Weakly correlated instance of the binary knapsack problem
Strongly correlated instance of the binary knapsack problem
Subset sum instance of the binary knapsack problem
Fitness cases i.e. problem instances of the binary knapsack problem used to evolve algorithms
Affenzeller M, Winkler S, Wagner S, Beham A (2009) Genetic algorithms and genetic programming: modern concepts and practical applications, 1st edn. CRC, Chapman and Hall
Ahmed A, Shaikh AW, Ali M et al (2011) Hyper-heuristic approach for solving scheduling problem: a case study. Aust J Basic Appl Sci 5(9):190–199
Alinia A, Vakil B, Badamchi Z et al (2012) Hybrid particle swarm optimization transplanted into a hyper-heuristic structure for solving examination timetabling problem. Swarm Evol Comput 7:21–34. doi:10.1016/j.swevo.2012.06.004
Angelelli E, Mansini R, Grazia S (2010) Kernel search: a general heuristic for the multi-dimensional knapsack problem. Comput Oper Res 37(11):2017–2026
Balas E, Zemel E (1980) An algorithm for large zero-one knapsack problems. Oper Res 28(5):1130–1154
Bienstock D (2008) Approximate formulations for 0-1 knapsack sets. Oper Res Lett 36(3):317–320
Bilgin B, Demeester P, Misir M et al (2012) One hyper-heuristic approach to two timetabling problems in health care. J Heuristics 18(3):401–434. doi:10.1007/s10732-011-9192-0
Burke E, Kendall G, Newall J et al (2003) Hyper-heuristics: an emerging direction in modern search technology. Handbook of metaheuristics, pp 457–474
Burke E, Hyde M, Kendall G et al (2010) A classification of hyper-heuristic approaches. In: Handbook of metaheuristics (international series in operations research & management science, vol 146). Nottingham, UK, pp 449–468
Burke E, Hyde M, Kendall G et al (2012) Automating the packing heuristic design process with genetic programming. Evol Comput 20(1):63–89. doi:10.1162/EVCO_a_00044
Darehmiraki M, Mishmast N (2007) Molecular solution to the 0–1 knapsack problem based on DNA computing. Appl Math Comput 187(2):1033–1037
Demeester P, Bilgin B, De Causmaecker P et al (2012) A hyperheuristic approach to examination timetabling problems: benchmarks and a new problem from practice. J Sched 15(1):83–103. doi:10.1007/s10951-011-0258-5
Fortnow L (2009) The status of the P versus NP problem. Commun ACM 52(9):78–86
Fraser A, Weinbrenner T (1993) GPC++-genetic programming C++ class library. [Online]. ftp://cs.bham.ac.uk/pub/authors/W.B.Langdon/weinbenner/gp.html. Accessed 17 Dec 2013
Garey M, Johnson D (1979) Computers and intractability. A guide to the theory of NP-completeness. A series of books in the mathematical sciences. WH Freeman and Company, San Francisco, Calif
Garrido P, Castro C (2012) A flexible and adaptive hyper-heuristic approach for (dynamic) capacitated vehicle routing problems. Fundam Inform 119(1):29–60. doi:10.3233/FI-2012-726
Gómez JC, Terashima-Marín H (2012) Building general hyper-heuristics for multi-objective cutting stock problems. Computacion y Sistemas 16(3):321–334
Koza J (1992) Genetic programming: on the programming of computers by means of natural selection. The MIT press, Massachusetts
Koza J, Bennett F, Andre D et al (1997) Automated synthesis of analog electrical circuits by means of genetic programming. IEEE Trans Evol Comput 1(2):109–128. doi:10.1109/4235.687879
Koza J, Keane M, Streeter M, Mydlowec W, Yu J, Lanza G (2005) Genetic programming IV: routine human-competitive machine intelligence. Kluwer Academic Publishers, Norwell
Kumar R, Singh P (2010) Assessing solution quality of biobjective 0–1 knapsack problem using evolutionary and heuristic algorithms. Appl Soft Comput 10(3):711–718
Martello S, Toth P (1990). Knapsack problems: algorithms and computer implementations (revised). University of Bologna, Bologna, Italy
Pisinger D (2005) Where are the hard knapsack problems? Comput Oper Res 32(9):2271–2284
Rajni A, Chana I (2013) Bacterial foraging based hyper-heuristic for resource scheduling in grid computing. Future Gener Comput Syst 29(3):751–762. doi:10.1016/j.future.2012.09.005
Sabar N, Ayob M, Qu R et al (2012) A graph coloring constructive hyper-heuristic for examination timetabling problems. Appl Intell 37(1):1–11. doi:10.1007/s10489-011-0309-9
Taghipour H, Rezaei M, Esmaili H (2013) Solving the 0/1 knapsack problem by a biomolecular DNA computer. Advances in bioinformatics
Ye L, Zhang M (2013) Solutions to the 0-1 knapsack problem based on DNA encoding and computing method. J Comput 8(3):669–675
The authors would like to thank the Complex Engineering Systems Institute ICM: P-05-004-F, CONICYT: FBO16, DICYT: 61219-USACH, ECOS/CONICYT: C13E04, STICAMSUD: 13STIC-05.
About this article
Cite this article
Parada, L., Herrera, C., Sepúlveda, M. et al. Evolution of new algorithms for the binary knapsack problem. Nat Comput 15, 181–193 (2016). https://doi.org/10.1007/s11047-015-9483-8
- Automatic generation of algorithms
- Combinatorial optimization
- Evolutionary computation
- Genetic programming
- Knapsack problem