Applied Intelligence

, Volume 46, Issue 1, pp 158–179 | Cite as

Modified swarm intelligence based techniques for the knapsack problem

  • Kaushik Kumar Bhattacharjee
  • S. P. SarmahEmail author


Swarm intelligence based algorithms have become an emerging field of research in recent times. Among them, two recently developed metaheuristics, cuckoo search algorithm (CSA) and firefly algorithm (FA) are found to be very efficient in solving different complex problems. CSA and FA are usually applied to solve the continuous optimisation problems. In this paper, an attempt has been made to utilise the merits of these algorithms to solve combinatorial problems, particularly 01 knapsack problem (KP) and multidimensional knapsack problem (MKP). In the improved version of CSA, a balanced combination of local random walk and the global explorative random walk is utilised along with the repair operator; whereas in the modified version of FA, the variable distance move with the repair operator of the local search and opposition-based learning mechanism is applied. Experiments are carried out with a large number of benchmark problem instances to validate our idea and demonstrate the efficiency of the proposed algorithms. Several statistical tests with recently developed algorithms from the literature present the superiority of these proposed algorithms.


Cuckoo search algorithm Firefly algorithm Particle swarm optimization Knapsack problem Performance metrics 


  1. 1.
    Abraham A, Guo H, Liu H (2006) Swarm intelligence: foundations,perspectives and optimization. SpringerGoogle Scholar
  2. 2.
    Agrawal S, Panda R (2012) An efficient algorithm for gray level image enhancement using cuckoo search. In: Swarm, evolutionary, and memetic computing. Springer, pp 82–89Google Scholar
  3. 3.
    Alsmadi MK (2014) A hybrid firefly algorithm with fuzzy-c mean algorithm for mri brain segmentation. Am J Appl Sci 11(9):1676–1691CrossRefGoogle Scholar
  4. 4.
    Arntzen H, Hvattum LM, Lokketangen A (2006) Adaptive memory search for multidemand multidimensional knapsack problems. Comput Oper Res 33(9):2508–2525MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Bansal JC, Deep K (2012) A modified binary particle swarm optimization for knapsack problems. Applied Mathematics and Computation 218:11,042–11,061MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Baykasoglu A, Ozsoydan FB (2014) An improved firefly algorithm for solving dynamic multidimensional knapsack problems. Expert Syst Appl 41:3712–3725CrossRefGoogle Scholar
  7. 7.
    Beasley JE (1990) Or-library: distributing test problems by electronic mail. Journal of Operational Research Society 41(11):1069–1072CrossRefGoogle Scholar
  8. 8.
    Bhattacharjee KK, Sarmah SP (2014) Shuffled frog leaping algorithm and its application to 0/1 knapsack problem. Appl Soft Comput 19:252–263CrossRefGoogle Scholar
  9. 9.
    Bhattacharjee KK, Sarmah SP (2015) A binary cuckoo search algorithm for knapsack problems. IEEE, DubaiCrossRefGoogle Scholar
  10. 10.
    Bhattacharjee KK, Sarmah SP (2015) A binary firefly algorithm for knapsack problems. In: IEEE international conference on industrial engineering and engineering management. IEEE, SingaporeGoogle Scholar
  11. 11.
    Bonabeau E, Meyer C (2001) Swarm intelligence: a whole new way to think about business. Harv Bus Rev 79(5):106–115Google Scholar
  12. 12.
    Chandrasekaran K, Simon S (2012) Network and realiability constrained unit commitment problem using binary real coded firefly algorithm. Int J Electr Power Energy Syst 43(1):921–932CrossRefGoogle Scholar
  13. 13.
    Chandrasekaran K, Simon SP (2012) Multi-objective scheduling problem: hybrid approach using fuzzy assisted cuckoo search algorithm. Swarm Evol Comput 5:1–16CrossRefGoogle Scholar
  14. 14.
    Chih M, Lin CJ, Chern MS, Ou TY (2014) Particle swarm optimization with time-varying acceleration coefficients for the multidimensional knapsack problem. Appl Math Model 38:1338–1350MathSciNetCrossRefGoogle Scholar
  15. 15.
    Chu PC, Beasley JE (1998) A genetic algorithm for the multidimensional knapsack problem. J Heuristics 4(1):63–86CrossRefzbMATHGoogle Scholar
  16. 16.
    Chuang LY, Yang CH, Li JC (2011) Chaotic maps based on binary particle swarm optimization for feature selection. Appl Soft Comput 11:239–248CrossRefGoogle Scholar
  17. 17.
    Civicioglu P, Besdok E (2013) A conceptual comparison of the cuckoo-search, particle swarm optimization, differential evolution and artificial bee colony algorithms. Artif Intell Rev 39(4):315–346CrossRefGoogle Scholar
  18. 18.
    Durgun I, Yildiz AR (2012) Structural design optimization of vehicle components using cuckoo search algorithm. Material Testing 54(3):185–188CrossRefGoogle Scholar
  19. 19.
    Durkota K (2011) Implementation of a discrete firefly algorithm for the qap problem within the seage framework. Master’s thesis, Electrical Engineering, Czech Technical University, PragueGoogle Scholar
  20. 20.
    Egeblad J, Pisinger D (2009) Heuristic approaches for the two- and three-dimensional knapsack packing problem. Comput Oper Res 36(4):1026–1049MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Elkeran A (2013) A new approach for sheet nesting problem using guided cuckoo search and pairwise clustering. Eur J Oper Res 231(3):757–769MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Engelbrecht AP (2005) Fundamentals of computational swarm intelligence. Wiley, ChichesterGoogle Scholar
  23. 23.
    Falcon R, Almeida M, Nayak A (2011) Fault identification with binary adaptive fireflies in parallel and distributed systems. In: IEEE congress on evolutionary computation, CEC-2011. IEEE, pp. 1359–1366Google Scholar
  24. 24.
    Fister I, Fister Jr. I, Yang XS, Brest J (2013) A comprehensive review of firefly algorithm. Swarm Evol Comput 13:34–46CrossRefGoogle Scholar
  25. 25.
    Freville A, Plateau G (1990) Hard 0-1 multiknapsack test problems for size reduction methods. Investigation Operativa 1:251–270Google Scholar
  26. 26.
    Garcia S, Fernandez A, Luengo J (2009) A study of statistical techniques and performance measures for genetic-based machine learning: accuracy and interpretability. Soft Comput 13:959–977CrossRefGoogle Scholar
  27. 27.
    Garcia S, Fernandez A, Luengo J, Herrera F (2010) Advanced non-parametric tests for multiple comparisons in the design of experiments in computational intelligence and data mining: experimental analysis of power. Inf Sci 180:2044–2064CrossRefGoogle Scholar
  28. 28.
    Garcia S, Molina D, Lozano M, Herrera F (2009) A study on the use of non-parametric tests for analyzing the evolutionary algorithms behavior: a case study on the cec2005 special season on real parameter optimization. J Heuristics 15:617–644CrossRefzbMATHGoogle Scholar
  29. 29.
    Glover F, Kochenberger GA (1996) Critical event tabu search for multidimensional knapsack problems. Meta-heuristics: Theory and Applications, Kluwer Academic Publisher, Cited By (since 1996) 63Google Scholar
  30. 30.
    Jati G (2011) Evolutionary discrete firefly algorithm for travelling salesman problem. Adaptive and Intelligent Systems LNAI 6943:393–403MathSciNetCrossRefGoogle Scholar
  31. 31.
    Kavousi-Fard A, Samet H, Marzbani F (2014) A new hybrid modified firefly algorithm and support vector regression model for accurate short term load forecasting. Expert Syst Appl 41(13):6047–6056CrossRefGoogle Scholar
  32. 32.
    Ke L, Feng Z, Ren Z, Wei X (2010) An ant colony optimization approach for the multidimensional knapsack problem. J Heuristics 16(1):65–83CrossRefzbMATHGoogle Scholar
  33. 33.
    Kenedy J, Eberhart RC (1997) A discrete binary version of the particle swarm optimization. In: Computational cybernatics and simulation, vol 5. IEEE International Conference, Systems, Man, and Cybernatics, pp 4104–4108Google Scholar
  34. 34.
    Kennedy J, Eberhart RC (1995) Particle swarm optimization. In: IEEE conference of neural networks, vol 4, pp 1942–1948Google Scholar
  35. 35.
    Khadwilard A, Chansombat S, Thepphakorn T, Thapatsuwan P, Chainate W, Pongcharoen P (2011) Application offirefly algorithm and its parameter setting for job shop scheduling. In: The first symposium on hands-on research and development, pp 1–10Google Scholar
  36. 36.
    Kong M, Tian P (2006) Apply the particle swarm optimization to the multidimensional knapsack problem. Lect Notes Comput Sci LNAI(4029):1140–1149CrossRefGoogle Scholar
  37. 37.
    Lee S, Soak S, Oh S, Pedrycz W, Jeon M (2008) Modified binary particle swarm optimization. Prog Nat Sci 18(9):1161–1166MathSciNetCrossRefGoogle Scholar
  38. 38.
    Li ZK, Li N (2009) A novel multi-mutation binary particle swarm optimization for 0/1 knapsack problem. In: Control and decision conference 2009, pp 3042–3047Google Scholar
  39. 39.
    Liu Y, Liu C (2009) A schema-guiding evolutionary algorithm for 0-1 knapsack problem. In: 2009 International association of computer science and information technology-spring conference, pp 160–164Google Scholar
  40. 40.
    Luengo J, Garcia S, Herrera F (2009) A study on the use of statistical tests for experimentation with neural networks: analysis of parametric test conditions and non-parametric tests. Expert Syst Appl 36:7798–7808CrossRefGoogle Scholar
  41. 41.
    Malan KM, Engelbrecht AP (2014) Recent advances in the theory and application of fitness landscapes. In: Ritcher H, Engelbrecht A (eds) Emergence, complexity and computation, vol 6. Springer, pp 103–132Google Scholar
  42. 42.
    Mantegna RN (1994) Fast, accurate algorithm for numerical simulation of levy stable stochastic processes. Phys Rev E 49(5):4677–4683CrossRefGoogle Scholar
  43. 43.
    Mishra A, Agarwal C, Sharma A, Bedi P (2014) Optimized gray-scale image watermarking using dwt-svd and firefly algorithm. Expert Syst Appl 41(17):7858–7867CrossRefGoogle Scholar
  44. 44.
    Ouaarab A, Ahiod B, Yang XS (2015) Random-key cuckoo search for the travelling salesman problem. Soft Comput 19:1099–1106CrossRefGoogle Scholar
  45. 45.
    Palit S, Sinha S, Molla M, Khanra A, Kule M (2011) A cryptoanalytic attack on the knapsack crypto system using binary firefly algorithm. In: The second international conference on computer and communication technology, ICCCT-2011, IEEE, pp 428–432Google Scholar
  46. 46.
    Pirkul H (1987) A heuristic solution procedure for the multiconstraint zero-one knapsack problem. Nav Res Logist 34:161–172CrossRefzbMATHGoogle Scholar
  47. 47.
    Rahmaniani R, Ghaderi A (2013) A combined facility location and network design problem with multi-type of capacited links. Appl Math Model 37:6400–6414MathSciNetCrossRefGoogle Scholar
  48. 48.
    Rahnamayan S, Tizhoosh HR, Salama MMA (2006) Opposition-based differential evolution algorithms. In: IEEE congress on evolutionary computation, pp 2010–2017Google Scholar
  49. 49.
    Rahnamayan S, Tizhoosh HR, Salama MMA (2008) Opposition versus randomness in soft computing techniques. Appl Soft Comput 8:906–918CrossRefGoogle Scholar
  50. 50.
    Senyu S, Toyada Y (1967) An approach to linear programming with 0-1 variables. Manag Sci 15:B196–B207Google Scholar
  51. 51.
    Shi HX (2006) Solution to 0/1 knapsack problem based on improved ant colony algorithm. In: International conference on information acquisition 2006, pp 1062–1066Google Scholar
  52. 52.
    Shi W (1979) A branch and bound method for the multiconstraint zero one knapsack problem. J Oper Res Soc 30:369–378CrossRefGoogle Scholar
  53. 53.
    Suganthan PN, Hasen N, Liang JJ, Deb K, Chen YP, Auger A, Tiwari S (2005) Problem definitions and evaluation criteria for the cec 2005 special session on real-parameter optimization. Tech. rep., Nanyang Technical University, SingaporeGoogle Scholar
  54. 54.
    Tan RR (2007) Hybrid evolutionary computation for the development of pollution prevention and control strategies. J Clean Prod 15(10):902–906CrossRefGoogle Scholar
  55. 55.
    Tizhoosh HR (2005) Opposition-based learning: a new scheme for machine intelligence. In: International conference on computational intelligence for modeling control and automation, pp 695–701Google Scholar
  56. 56.
    Walton S, Hassan O, Morgan K, Brown M (2011) Modified cuckoo search: a new gradient free optimisation algorithm. Chaos Solitons Fractals 44(9):710–718CrossRefGoogle Scholar
  57. 57.
    Wang H, Zhijian W, Rahnamayan S (2011) Enhanced opposition-based differential evolution for solving high-dimensional continuous optimization problems. Soft Comput 15:2127–2140CrossRefGoogle Scholar
  58. 58.
    Wang L, Yang RX, Xu Y (2013) An improved adaptive binary harmony search algorithm. Inf Sci 232:58–87MathSciNetCrossRefGoogle Scholar
  59. 59.
    Wanga Y, Feng XY, Huang YX, Pub DB, Zhoua WG, Liang YC, Zhou CG (2007) A novel quantum swarm evolutionary algorithm and its applications. Neurocomputing 70:633–640CrossRefGoogle Scholar
  60. 60.
    Weingartner HM, Ness DN (1967) Methods for the solution of the multi-dimensional 0/1 knapsack problem. Oper Res 15(1):83–103CrossRefGoogle Scholar
  61. 61.
    Yang XS (2008) Firefly algorithm. Nature-Inspired Metaheuristic Algorithms 20:79–90Google Scholar
  62. 62.
    Yang XS (2009) Firefly algorithm for multimodal optimization. Lect Notes Comput Sci 5792:169–178MathSciNetCrossRefzbMATHGoogle Scholar
  63. 63.
    Yang XS (2010) Nature-inspired metaheuristic algorithms. Luniver PressGoogle Scholar
  64. 64.
    Yang XS, Deb S (2009) Cuckoo search via levy flights. In: World congress on nature biologically inspired computing, pp 210–214Google Scholar
  65. 65.
    Yang XS, Gandomi AH, Talatahari S, Alavi AH (2013) Metaheuristics in water, geotechnical and transport engineering, ElsevierGoogle Scholar
  66. 66.
    Yildiz AR (2013) Cuckoo search algorithm for the selection of optimal machining parameters in milling operations. Int J Adv Manuf Technol 64(1-4):55–61CrossRefGoogle Scholar
  67. 67.
    Zhao JF, Huang TL, Pang F, Liu YJ (2009) Genetic algorithm based on greedy strategy in the 0-1 knapsack problem. In: 3Rd international conference on genetic and evolutionary computing, WGEC ’09, pp 105–107Google Scholar
  68. 68.
    Zhou GD, Yi TH, Li HN (2014) Sensor placement optimization in structural health monitoring using cluster-in-cluster firefly algorithm. Adv Struct Eng 17(8):1103–1115CrossRefGoogle Scholar
  69. 69.
    Zou D, Gao L, Li S, Wu J (2011) Solving 0-1 knapsack problem by a novel global harmony search algorithm. Appl Soft Comput 11:1556–1564CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  1. 1.Department of Industrial and Systems EngineeringIndian Institute of Technology KharagpurKharagpurIndia

Personalised recommendations