Skip to main content

Advertisement

Log in

Evolution of new algorithms for the binary knapsack problem

  • Published:
Natural Computing Aims and scope Submit manuscript

Abstract

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, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Abbreviations

BKP:

Binary knapsack problem

GP:

Genetic programming

GPC++:

Genetic programming platform for evolving tree structures of code

IKL:

In the knapsack list; data structure used by the evolved algorithms

OKL:

Out of knapsack list; data structure used by the evolved algorithms

UC:

Uncorrelated instance of the binary knapsack problem

WC:

Weakly correlated instance of the binary knapsack problem

SC:

Strongly correlated instance of the binary knapsack problem

SS:

Subset sum instance of the binary knapsack problem

FC:

Fitness cases i.e. problem instances of the binary knapsack problem used to evolve algorithms

References

  • 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

    Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

  • Balas E, Zemel E (1980) An algorithm for large zero-one knapsack problems. Oper Res 28(5):1130–1154

    Article  MathSciNet  MATH  Google Scholar 

  • Bienstock D (2008) Approximate formulations for 0-1 knapsack sets. Oper Res Lett 36(3):317–320

    Article  MathSciNet  MATH  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • Darehmiraki M, Mishmast N (2007) Molecular solution to the 0–1 knapsack problem based on DNA computing. Appl Math Comput 187(2):1033–1037

    Article  MathSciNet  MATH  Google Scholar 

  • 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

    Article  Google Scholar 

  • Fortnow L (2009) The status of the P versus NP problem. Commun ACM 52(9):78–86

    Article  Google Scholar 

  • 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

    MathSciNet  Google Scholar 

  • 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

    Google Scholar 

  • Koza J (1992) Genetic programming: on the programming of computers by means of natural selection. The MIT press, Massachusetts

    MATH  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

  • Poli R, Langdon W, McPhee N (2008) A field guide to genetic programming. Published via http://lulu.com and freely available at http://www.gp-field-guide.org.uk

  • 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

    Article  Google Scholar 

  • 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

    Article  Google Scholar 

  • 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

    Google Scholar 

Download references

Acknowledgments

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Lucas Parada.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11047-015-9483-8

Keywords

Navigation