Skip to main content
Log in

A modified nature inspired meta-heuristic whale optimization algorithm for solving 0–1 knapsack problem

  • Original Article
  • Published:
International Journal of Machine Learning and Cybernetics Aims and scope Submit manuscript

Abstract

The Whale optimization algorithm (WOA) is one of the most recent nature-inspired meta-heuristic optimization algorithms, which simulates the social character of the humpback whales. WOA has an efficient performance in solving the continuous problems and engineering optimization problems. This paper presents an improved whale optimization algorithm (IWOA) for solving both single and multidimensional 0–1 knapsack problems with different scales. A penalty function is added to the evaluation function so that the fitness of the feasible solutions can outperform the fitness of the infeasible ones. The sigmoid function can take the real-valued solutions as input and produces the binary solutions as output. A two-stage repair operator is employed for handling the infeasible solutions. IWOA can give a better tradeoff between the diversification and the intensification through using two strategies: Local Search Strategy (LSS) and the Lévy flight walks. In addition to the bitwise operation which increases the IWOA efficiency. The proposed IWOA is compared with other state-of-art algorithms to validate the effectiveness of the proposed algorithm in solving 0–1 knapsack problems. Further, the experimental results and extensive numerical illustrations have been indicated that IWOA is efficient, effective, and robust for solving the hard 0–1 knapsack problems than the other existing approaches in the available literature. The source code of the IWOA algorithm will be available after the paper accepted as a toolbox in MATLAB library.

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
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

References

  1. Wang XZ, He YC (2017) A survey on evolutionary algorithms of solving knapsack problems. J Softw (Chinese) 281(1):1–16. doi: 10.13328/j.cnki.jos.005139

    Article  Google Scholar 

  2. De Vries S, Vohra RV (2003) Combinatorial auctions: a survey. INFORMS J Comput 15(3):284–309

    Article  MathSciNet  Google Scholar 

  3. Kellerer H, Pferschy U, Pisinger D (2004) Introduction to NP-completeness of knapsack problems. Knapsack problems. Springer, Berlin Heidelberg, pp 483–493

    MATH  Google Scholar 

  4. Abdel-Basset M et al (2017) Solving 0–1 knapsack problems by binary dragonfly algorithm. In: International Conference on Intelligent Computing. Springer, Cham, pp 491–502

    Google Scholar 

  5. Kennedy J (2011) Particle swarm optimization. Encyclopedia of machine learning. Springer, US, pp 760–766

    Google Scholar 

  6. Abdel-Raouf O, Abdel-Baset Metwally M (2013) A survey of harmony search algorithm. Int J Comput Appl 70(28)

  7. Abdel-Basset M, Hessin AN, Abdel-Fatah L (2016) A comprehensive study of cuckoo-inspired algorithms. Neural Comput Applic 1–17

  8. Abdel-Raouf O, Abdel-Baset M, El-henawy I (2014) Chaotic firefly algorithm for solving definite integral. Int J Inf Technol Comput Sci (IJITCS) 6(6):19

    Google Scholar 

  9. Abdel-Raouf O, Abdel-Baset M (2014) A new hybrid flower pollination algorithm for solving constrained global optimization problems. Int J Appl Oper Res Open Access J 4(2):1–13

    Google Scholar 

  10. Srikanth K, Panwar LK, Panigrahi BK, Herrera-Viedma E, Sangaiah AK, Wang GG (2017) Meta-heuristic framework: quantum inspired binary grey wolf optimizer for unit commitment problem. Comput Electr Eng

  11. Medhane DV, Sangaiah AK (2017) Search space-based multi-objective optimization evolutionary algorithm. Comput Electr Eng 58:126–143

    Article  Google Scholar 

  12. El-Shahat D, Abdel-Basset M, El-Henawy I, Sangaiah AK (2017). A modified flower pollination algorithm for the multidimensional knapsack problem: human-centric decision making. Soft Comput, 1–19

  13. Zhu H, He Y, Tsang E, Wang X. Discrete differential evolution for the discounted {0–1} Knapsack problem. J Bio-Inspired Comput Int J Bio-Inspired Comput X(Y):200x

  14. He Y, Xie H, Wong TL, Wang X (2017) A novel binary artificial bee colony algorithm for the set-union knapsack problem. Accepted (May). Future Gener Comput Syst. doi:10.1016/j.future.2017.05.044

    Article  Google Scholar 

  15. He YC, Wang XZ, He YL, Zhao SL, Li WB (2016) Exact and approximate algorithms for discounted {0–1} knapsack problem. Inf Sci 369: 634–647. doi:10.1016/j.ins.2016.07.037

    Article  MathSciNet  MATH  Google Scholar 

  16. Sonuc E, Sen B, Bayir S (2016) A parallel approach for solving 0/1 knapsack problem using simulated annealing algorithm on CUDA platform. Int J Comput Sci Inf Sec 14(12):1096

    Google Scholar 

  17. Nguyen PH, Wang D, Truong TK (2016) A new hybrid particle swarm optimization and greedy for 0–1 Knapsack problem. Indones J Electr Eng Comput Sci 1(3):411–418

    Article  Google Scholar 

  18. Lv J et al (2016) Solving 0–1 knapsack problem by greedy degree and expectation efficiency. Appl Soft Comput 41:94–103

    Article  Google Scholar 

  19. Zhou Y, Li L, Ma M (2016) A complex-valued encoding bat algorithm for solving 0–1 knapsack problem. Neural Process Lett 44(2):407–430

    Article  Google Scholar 

  20. Zhou Y et al (2017) A complex-valued encoding wind driven optimization for the 0–1 knapsack problem. Appl Intell 46(3):684–702

    Article  Google Scholar 

  21. Zhou Y, Chen X, Zhou G (2016) An improved monkey algorithm for a 0–1 knapsack problem. Appl Soft Comput 38:817–830

    Article  Google Scholar 

  22. Zou D et al (2011) Solving 0–1 knapsack problem by a novel global harmony search algorithm. Appl Soft Comput 11(2):1556–1564

    Article  Google Scholar 

  23. Kulkarni AJ, Krishnasamy G, Abraham A (2017) Solution to 0–1 knapsack problem using cohort intelligence algorithm. cohort intelligence: a socio-inspired optimization method. Springer International Publishing pp 55–74

  24. Zouache D, Nouioua F, Moussaoui A (2016) Quantum-inspired firefly algorithm with particle swarm optimization for discrete optimization problems. Soft Comput 20(7):2781–2799

    Article  Google Scholar 

  25. Beheshti Z, Shamsuddin SM, Hasan S (2015) Memetic binary particle swarm optimization for discrete optimization problems. Inf Sci 299:58–84

    Article  Google Scholar 

  26. Chih M, Lin CJ, Chern MS, Ou TY (2014) Particle swarm optimization with time-varying acceleration coefficients for the multidimensional knapsack problem. Appl Math Modell 38(4):1338–1350

    Article  MathSciNet  Google Scholar 

  27. Chih M (2015) Self-adaptive check and repair operator-based particle swarm optimization for the multidimensional knapsack problem. Appl Soft Comput 26:378–389

    Article  Google Scholar 

  28. Nakbi W, Alaya I, Zouari W (2015) A hybrid lagrangian search ant colony optimization algorithm for the multidimensional knapsack problem. Proc Comput Sci 60:1109–1119

    Article  Google Scholar 

  29. Meng T, Pan QK (2017) An improved fruit fly optimization algorithm for solving the multidimensional knapsack problem. Appl Soft Comput 50:79–93

    Article  Google Scholar 

  30. Gherboudj A, Layeb A, Chikhi S (2012) Solving 0–1 knapsack problems by a discrete binary version of cuckoo search algorithm. Int J Bio-Inspired Comput 4(4):229–236

    Article  Google Scholar 

  31. Layeb A (2011) A novel quantum inspired cuckoo search for knapsack problems. Int J Bio-inspired Comput 3(5):297–305

    Article  Google Scholar 

  32. Mirjalili S, Lewis A (2016) The whale optimization algorithm. Adv Eng Software 95:51–67

    Article  Google Scholar 

  33. Ling Y, Zhou Y, Luo Q (2017) Lévy flight trajectory-based whale optimization algorithm for global optimization. IEEE Access 5:6168–6186

    Article  Google Scholar 

  34. He Y, Wang X, Kou Y (2007) A binary differential evolution algorithm with hybrid encoding. Jisuanji Yanjiu yu Fazhan (Comput Res Dev) 44(9):1476–1484

    Google Scholar 

  35. Kennedy J, Eberhart RC (1997) A discrete binary version of the particle swarm algorithm. 1997 IEEE International Conference on Systems, Man, and Cybernetics, 1997. Computational Cybernetics and Simulation, vol 5, pp 4104–4108. IEEE

  36. Beasly JE (2014) OR-library. Acesso em 10. http://people.brunel.ac.uk/~mastjjb/jeb/orlib /files/

  37. Liu J, Wu C, Cao J, Wang X, Teo KL (2016) A Binary differential search algorithm for the 0–1 multidimensional knapsack problem. Appl Math Modell 40(23):9788–9805

    Article  MathSciNet  Google Scholar 

  38. López LFM, Blas NG, Albert AA (2017). Multidimensional knapsack problem optimization using a binary particle swarm model with genetic operations. Soft Comput 1–16

  39. Li H, Bai P, Wu HS (2017) Hybrid binary wolf pack algorithm for the 0–1 multidimensional knapsack problem. Int J Wireless Mobile Comput 12(3):291–304

    Article  Google Scholar 

  40. Wang L, Wang SY, Xu Y (2012) An effective hybrid EDA-based algorithm for solving multidimensional knapsack problem. Expert Syst Appl 39(5):5593–5599

    Article  MathSciNet  Google Scholar 

  41. Mantegna RN (1994) Fast, accurate algorithm for numerical simulation of Levy stable stochastic processes. Phys Rev E 49(5):4677

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Arun Kumar Sangaiah.

Ethics declarations

Conflict of interest

The authors declare that there is no conflict of interests regarding the publication of this article.

Research involving human and animal rights

This article does not contain any studies with human participants or animals performed by any of the authors.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Abdel-Basset, M., El-Shahat, D. & Sangaiah, A.K. A modified nature inspired meta-heuristic whale optimization algorithm for solving 0–1 knapsack problem. Int. J. Mach. Learn. & Cyber. 10, 495–514 (2019). https://doi.org/10.1007/s13042-017-0731-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13042-017-0731-3

Keywords

Navigation