An effective hybrid cuckoo search algorithm (CS) with improved shuffled frogleaping algorithm (ISFLA) is put forward for solving 01 knapsack problem. First of all, with the framework of SFLA, an improved frogleap operator is designed with the effect of the global optimal information on the frog leaping and information exchange between frog individuals combined with genetic mutation with a small probability. Subsequently, in order to improve the convergence speed and enhance the exploitation ability, a novel CS model is proposed with considering the specific advantages of Lévy flights and frogleap operator. Furthermore, the greedy transform method is used to repair the infeasible solution and optimize the feasible solution. Finally, numerical simulations are carried out on six different types of 01 knapsack instances, and the comparative results have shown the effectiveness of the proposed algorithm and its ability to achieve good quality solutions, which outperforms the binary cuckoo search, the binary differential evolution, and the genetic algorithm.
The application of natureinspired metaheuristic algorithms to computational optimization is a growing trend [
In 2003, Eusuff and Lansey firstly proposed a novel metaheuristic optimization method: SFLA, which mimics a group of frogs to search for the location that has the maximum amount of available food. Due to the distinguished benefit of its fast convergence speed, SFLA has been successfully applied to handle many complicated optimization problems, such as water resource distribution [
CS, a natureinspired metaheuristic algorithm, is originally proposed by Yang and Deb in 2009 [
In 2011, Layeb [
Therefore, in this work, we propose a hybrid CS algorithm with improved SFLA (CSISFLA) for solving 01 knapsack problem. To verify effectiveness of our proposed method, a large number of experiments on 01 knapsack problem are conducted and the experimental results show that the proposed hybrid metaheuristic method can reach the required optima more effectively than CS, DE, and GA even in some cases when the problem to be solved is too complicated and complex.
The rest of the paper is organized as follows. Section
In this section, the model of 01 knapsack problem and the basic CS and SFLA are introduced briefly.
The 01 knapsack problem, denoted by KP, is a classical optimization problem and it has high theoretical and practical value. Many practical applications can be formulated as a KP, such as cutting stock problems, portfolio optimization, scheduling problems, and cryptography. This problem has been proven to be a NPhard problem; hence, it cannot be solved in a polynomial time unless
The 01 knapsack problem can be stated as follows:
CS is a relatively new metaheuristic algorithm for solving global optimization problems, which is based on the obligate brood parasitic behavior of some cuckoo species. In addition, this algorithm is enhanced by the socalled Lévy flights rather than by simple isotropic random walks.
For simplicity, Yang and Deb used the following three approximate rules [
each cuckoo lays only one egg at a time and dumps its egg in a randomly chosen nest;
the best nests with highquality eggs will be carried over to the next generations;
the number of available host nests is fixed, and the egg laid by the host bird with a probability
The last assumption can be approximated by a fraction
New solution
The SFLA is a metaheuristic optimization method that imitates the memetic evolution of a group of frogs while casting about for the location that has the maximum amount of available food [
In the SFLA, the initial population
Firstly, the new position of the frog individual is calculated by
If the new position
If nonimprovement becomes possible in this case, the new frog is replaced by a randomly generated frog; else replace
Here,
In this section, we will propose a hybrid metaheuristic algorithm integrating cuckoo search and improved shuffled frogleaping algorithm (CSISFLA) for solving 01 knapsack problem. First, the hybrid encoding scheme and repair operator will be introduced. And then improved frogleaping algorithm along with the framework of proposed CSISFLA will be presented.
As far as we know, the standard CS algorithm can solve the optimization problems in continuous space. Additionally, the operation of the original CS algorithm is closed to the set of real number, but it does not have the closure property in the binary set
The encoding scheme of the population is depicted in Table
Representation of population in CSISFLA.






After evolving a generation, the feasibility of all the generated solutions is taken into consideration. That is, to say, the individuals could be illegal because of violating the constraint conditions. Therefore, a repair procedure is essential to construct illegal individuals. In this paper, an effective greedy transform method (GTM) is introduced to solve this problem [
This GTM consists of two phases. The first phase, called repairing phase (RP), checks each solution in order of decreasing
In the evolution of SFLA, new individual is only affected by local optimal individual and the global optimal during the first two frog leapings, respectively. That is to say, there is a lack of information exchange between individuals and memeplexes. In addition, the use of the worst individual is not conducive to quickly obtain the better individuals and quick convergence. When the quality of the solution has not been improved after the first two frog leapings, the SFLA randomly generates a new individual without restriction to replace original individual, which will result in the loss of some valuable information of the superior individual to some extent. Therefore, in order to make up for the defect of the SFLA, an improved shuffled frogleaping algorithm (ISFLA) is carefully designed and then embedded in the CSISFLA. Compared with SFLA, there are three main improvements.
The first slight improvement is that we get rid of sorting of the items according to the fitness value which will decrease in time cost.
The second improvement is that we adopt a new frog individual position update formula instead of the first two frog leapings. The idea is inspired by the DE/Best/1/Bin in DE algorithm. Similarly, each frog individual
The third improvement is to randomly generate new individuals with certain probability instead of unconditional generating new individuals, which takes into consideration the retention of the better individuals in the population.
The main step of ISFLA is given in Algorithm
In this section, we will demonstrate how we combine the welldesigned ISFLA with Lévy flights to form an effective CSISFLA. The proposed algorithm does not change the main search mechanism of CS and SFLA. In the iterative process of the whole population, Lévy flights are firstly performed and then frogleaping operator is adopted in each memeplex. Therefore, the strong exploration abilities in global area of the original CS and the exploitation abilities in local region of ISFLA can be fully developed. The CSISFLA architecture is explained in Figure
The architecture of CSISFLA algorithm.
Through the design above carefully, the pseudocode of CSISFLA for 01 knapsack problems is described as follows (see Algorithm
CSISFLA is composed of three stages: the sorting by valuetoweight ratio, the initialization, and the iterative search. The quick sorting has time complexity
In existent researching files, cases studies and research of knapsack problems are about smallscale to moderatescale problems. However, in realworld applications, problems are typically largescale with thousands or even millions of design variables. In addition, the complexity of KP problem is greatly affected by the correlation between profits and weights [
uncorrelated instances: the weights
weakly correlated instances: the weights
strongly correlated instances: the weights
multiple strongly correlated instances: the weights
profit ceiling instances: the weights
circle instances: the weights
For each data set, we set the value of the capacity. Consider
Figures
Uncorrelated items.
Weakly correlated items.
Strongly correlated items.
Multiple strongly correlated items.
Profit ceiling items.
Circle items.
The KP instances in this study are described in Table
Knapsack problem instances.
Problem  Correlation  Dimension  Target weight  Total weight  Total values 

KP_{1}  Uncorrelated  150  6471  8628  8111 
KP_{2}  Uncorrelated  200  8328  11104  10865 
KP_{3}  Uncorrelated  300  12383  16511  16630 
KP_{4}  Uncorrelated  500  20363  27150  28705 
KP_{5}  Uncorrelated  800  33367  44489  44005 
KP_{6}  Uncorrelated  1000  41948  55930  54764 
KP_{7}  Uncorrelated  1200  49485  65980  66816 
KP_{8}  Weakly correlated  150  6403  8538  8504 
KP_{9}  Weakly correlated  200  8358  11144  11051 
KP_{10}  Weakly correlated  300  12554  16739  16778 
KP_{11}  Weakly correlated  500  20758  27677  27821 
KP_{12}  Weakly correlated  800  33367  44489  44491 
KP_{13}  Weakly correlated  1000  41849  55799  55683 
KP_{14}  Weakly correlated  1200  49808  66411  56811 
KP_{15}  Strongly correlated  300  12247  16329  19329 
KP_{16}  Strongly correlated  500  21305  28407  33406 
KP_{17}  Strongly correlated  800  33367  44489  52489 
KP_{18}  Strongly correlated  1000  40883  54511  64510 
KP_{19}  Strongly correlated  1200  50430  67240  79240 
KP_{20}  Multiple strongly correlated  300  12908  17211  23651 
KP_{21}  Multiple strongly correlated  500  20259  27012  37903 
KP_{22}  Multiple strongly correlated  800  32767  43689  61140 
KP_{23}  Multiple strongly correlated  1000  42442  56589  77940 
KP_{24}  Multiple strongly correlated  1200  50222  66963  92653 
KP_{25}  Profit ceiling  300  12666  16888  17181 
KP_{26}  Profit ceiling  500  19811  26415  26913 
KP_{27}  Profit ceiling  800  32011  42681  43497 
KP_{28}  Profit ceiling  1000  42253  56337  57381 
KP_{29}  Profit ceiling  1200  50208  66944  68157 
KP_{30}  Circle  300  12554  16739  26448 
KP_{31}  Circle  500  20812  27749  43880 
KP_{32}  Circle  800  32581  43441  69527 
KP_{33}  Circle  1000  42107  56143  88220 
KP_{34}  Circle  1200  49220  65627  104287 
The CSISFLA has some control parameters that affect its performance. In our experiments, we investigate thoroughly the number of subgroups
The effect of
Instance 






Best  Worst  Mean  STD  Best  Worst  Mean  STD  
KP_{9}  10  8727 

8711  5.5  2 

8704  8711  5.5 
15 

8701 


3  8725  8701  8713  7.0  
20 

8702 

6.5  4  8726 

8717 




KP_{10}  10  13152  13124  13140  8.7  2  13152  13124  13140  8.7 
15 

13120  13144  12.6  3  13167 




20 

13126 

13.3  4 







KP_{11}  10  21820  21737  21773  22.1  2  21820  21737  21773  22.1 
15  21827 



3 

21735  21783  24.6  
20  21814 

21778 

4 

21742 

23.5 
As expected, with the increase of the individual number in the population, it is an inevitable consequence that there are more opportunities to obtain the optimal solution. This issue can be indicated by bold data in Table
In this subsection, the effect of
The effect of
Instance  0  0.05  0.1  0.15  0.2  0.3  0.4  0.5  0.6  0.7  0.8  0.9  1.0 

KP_{1}  
Best  7474 




7474 

7474  7474  7474  7473  7474  7459 
Worst  7430  7469  7468 


7463  7457  7451  7451  7446  7437  7427  7407 
Mean  7461  7473 


7473  7471  7470  7468  7468  7461  7455  7448  7436 
STD  12.60  1.50  1.57 

1.27  3.57  4.96  6.03  5.87  8.83  10.11  11.17  13.88 
KP_{2}  
Best 




9863  9864  9860  9859  9850  9847  9844  9843  9842 
Worst  9821 

9845  9844  9839  9823  9830  9818  9804  9778  9775  9768  9757 
Mean  9847 

9856  9857  9852  9848  9847  9841  9833  9830  9812  9810  9783 
STD  11.96  5.75  6.12 

6.84  10.60  7.99  11.89  12.35  16.86  21.92  21.12  20.24 
KP_{8}  
Best  6676  6674  6673  6672  6671  6672  6672  6671 

6666  6666  6662  6654 
Worst  6658  6662  6663 

6662  6663  6662  6657  6655  6650  6652  6645  6642 
Mean  6668 

6669  6669  6668  6668  6668  6664  6664  6659  6658  6652  6647 
STD  4.59  2.95  2.59 

2.44  2.79  2.39  4.17  4.45  4.06  3.88  4.27  3.17 
KP_{9}  
Best  8730 


8728  8731  8720  8723  8716  8712  8710  8707  8701  8688 
Worst 

8703  8705  8701  8700  8702  8695  8684  8682  8675  8677  8664  8655 
Mean  8716 


8715  8714  8711  8707  8702  8697  8693  8690  8682  8676 
STD  6.23  8.79  6.66  6.85  7.45 

7.20  7.97  7.50  9.75  7.27  10.06  7.76 
From the results of Table
In this paper, in order to test the optimization ability of CSISFLA and further investigate effectiveness of the algorithms for different types of instance, we adopt a set of 34 knapsack problems (KP_{1}–KP_{34}). We compared the performance of CSISFLA with (a) GA, (b) DE, and (c) classical CS. In the experiments, the parameters setting are shown in Table
Parameter settings of GA, DE, CS, and CSISFLA on 01 knapsack problems.
Algorithm  Parameter  Value 

GA [ 

100 

0.6  

0.001  
DE 

100 

0.9  

0.3  
CS [ 

40 

0.25  
CSISFLA 

4 

10  

0.15 
In order to make a fair comparison, all computational experiments are conducted with Visual C++ 6.0. The test environment is set up on a PC with AMD Athlon(tm) II X2 250 Processor 3.01 GHz, 1.75 G RAM, running on Windows XP. The experiment on each instance was repeated 30 times independently. Further, best solution, worst solution, mean, median, and standard deviation (STD) for all the solutions are given in related tables. In addition, the maximum runtime was set to 5 seconds for the instances with dimension less than 500, and it was set to 8 seconds for other instances.
We do experiment on 7 uncorrelated instances, 7 weakly correlated instances, and 5 other types of instances, respectively. The numerical results are given in Tables
Table
From Table
Obviously, in point of search accuracy and convergence speed, it can be seen from Table
Similar results were found from Tables
Figures
Figures
Experimental results of four algorithms with uncorrelated KP instances.
Instance  Algorithm  Best  Worst  Mean  Median  STD 

KP_{1}  GA  7316  6978  7200  7208  75.78 
DE 

7433  7471  7473  7.68  
CS  7472  7358  7403  7405  27.82  
CSISFLA 








KP_{2}  GA  9673  9227  9503  9507  97.39 
DE 

9751  9854 

22.52  
CS  9848  9678  9737  9734  33.22  
CSISFLA 



9858 




KP_{3}  GA  15022  14275  14756  14795  158.91 
DE 

15088  15287  15301  54.45  
CS  15224  15024  15092  15081  51.37  
CSISFLA  15327 







KP_{4}  GA  25882  25212  25498  25493  150.68 
DE  26333  25751  26099  26096  135.88  
CS  26208  25786  25936  25911  103.4  
CSISFLA 








KP_{5}  GA  39528  38462  38976  39014  243.62 
DE  39652  39215  39410  39399  113.28  
CS  40223  39416  39565  39514  179.98  
CSISFLA 








KP_{6}  GA  49072  47835  48483  48570  316.62 
DE  49246  48835  48989  48979  101.11  
CS  49767  49024  49164  49142  143.08  
CSISFLA 








KP_{7}  GA  59793  58351  59135  59225  370.86 
DE  59932  59488  59707  59727 


CS  60629  59708  59939  59884  166.43  
CSISFLA 




130.56 
Experimental results of four algorithms with weakly correlated KP instances.
Instance  Algorithm  Best  Worst  Mean  Median  STD 

KP_{8}  GA  6627  6531  6593  6593  20.63 
DE 

6657 


4.80  
CS  6660  6637  6648  6646  6.79  
CSISFLA  6673 

6668  6668 




KP_{9}  GA  8658  8501  8588  8590  33.38 
DE 






CS  8717  8644  8676  8671  18.23  
CSISFLA  8728  8701  8714  8714  6.87  


KP_{10}  GA  13062  12939  12997  12991  30.64 
DE 






CS  13157  13069  13094  13087  21.91  
CSISFLA  13168  13120  13145  13145  11.90  


KP_{11}  GA  21671  21470  21571  21576  48.85 
DE 

21745 


37.61  
CS  21935  21670  21746  21722  76.53  
CSISFLA  21827 

21788  21787 




KP_{12}  GA  34587  34314  34488  34499  63.23 
DE  34814  34578  34721  34718  64.50  
CS 

34621  34697  34654  100.38  
CSISFLA  34818 







KP_{13}  GA  43241  42938  43082  43073  75.51 
DE  43327  43162  43217  43211  43.64  
CS 

43216  43340  43264  166.53  
CSISFLA  43409 







KP_{14}  GA  51472  50414  51058  51135  265.56 
DE  51947  51444  51600  51569  108.83  
CS 

51601  51831  51788  299.35  
CSISFLA  52403 




Experimental results of four algorithms with strongly correlated KP instances.
Instance  Algorithm  Best  Worst  Mean  Median  STD 

KP_{15}  GA  14785  14692  14754  14762  25.93 
DE  14797  14781  14789  14787  4.90  
CS  14804  14791  14797 



CSISFLA 




3.46  


KP_{16}  GA  25486  25402  25458  25465  21.61 
DE  25502  25481  25492  25493  4.21  
CS  25514  25502  25506  25505 


CSISFLA 




3.94  


KP_{17}  GA  40087  39975  40039  40041  28.33 
DE  40111  40068  40089  40088  8.66  
CS  40107  40096  40103  40105 


CSISFLA 




5.12  


KP_{18}  GA  49332  49225  49300  49309  27.26 
DE  49363  49333  49346  49345  7.50  
CS  49380  49350  49364  49363 


CSISFLA 




7.90  


KP_{19}  GA  60520  60418  60482  60489  26.62 
DE  60540  60501  60519  60519  8.55  
CS  60558  60530  60542  60540  6.77  
CSISFLA 





Experimental results of four algorithms with multiple strongly correlated KP instances.
Instance  Algorithm  Best  Worst  Mean  Median  STD 

KP_{20}  GA  18346  18172  18284  18288  38.39 
DE  18387  18335  18354  18348  15.25  
CS  18386  18355  18368  18368 


CSISFLA 




8.03  


KP_{21}  GA  29525  29387  29461  29462  31.97 
DE  29548  29488  29519  29520  14.10  
CS  29589  29527  29555  29549  13.94  
CSISFLA 








KP_{22}  GA  47645  47494  47568  47575  39.72 
DE  47704  47620  47659  47657  20.68  
CS  47727  47673  47696  47695  15.09  
CSISFLA 








KP_{23}  GA  60529  60312  60455  60463  47.39 
DE  60572  60508  60534  60530 


CS  60607  60540  60576  60574  16.96  
CSISFLA 




15.75  


KP_{24}  GA  72063  71725  71914  71917  64.42 
DE  72072  71973  72018  72018  19.38  
CS  72094  72031  72058  72057 


CSISFLA 




21.20 
Experimental results of four algorithms with profit ceiling KP instances.
Instance  Algorithm  Best  Worst  Mean  Median  STD 

KP_{25}  GA  12957  12948  12955  12957  2.53 
DE  12957  12951  12953  12954  1.83  
CS  12957  12954  12957  12957  0.76  
CSISFLA 








KP_{26}  GA  20295  20268  20285  20286  7.37 
DE  20301  20292  20294  20294  2.17  
CS  20304  20295  20299  20298 


CSISFLA 




2.28  


KP_{27}  GA  32796  32769  32785  32787  6.99 
DE  32802  32793  32797  32796 


CS  32811  32799  32803  32802  3.12  
CSISFLA 




3.34  


KP_{28}  GA  43248  43215  43234  43236  8.76 
DE  43257  43245  43249  43248  3.57  
CS  43269  43251  43257  43254  4.41  
CSISFLA 








KP_{29}  GA  51378  51348  51364  51366  7.25 
DE  51384  51372  51378  51378 


CS 

51378  51385  51384  4.32  
CSISFLA 




3.10 
Experimental results of four algorithms with circle KP instances.
Instance  Algorithm  Best  Worst  Mean  Median  STD 


GA  21194  20899  21086  21096  71.44 
DE  21333  21192  21264  21277  32.46  
CS  21333  21194  21261  21261 


CSISFLA 




34.04  



GA  35262  34982  35112  35124  82.25 
DE  35343  35184  35247  35267  38.08  
CS  35345  35271  35297  35277  31.29  
CSISFLA 









GA  55976  55451  55746  55771  116.83 
DE  56063  55914  55964  55954  44.95  
CS 

55988  56057  56061  55.01  
CSISFLA  56273 








GA  70739  70247  70487  70456  113.53 
DE  70806  70641  70696  70684 


CS  70915  70729  70789  70797  42.50  
CSISFLA 




41.17  



GA  83969  83339  83723  83757  142.75 
DE  84040  83820  83912  83899  56.64  
CS 

83954  84055  84033  121.94  
CSISFLA  84244 




The best profits obtained in 30 runs for KP_{7}.
The best profits obtained in 30 runs for KP_{14}.
The best profits obtained in 30 runs for KP_{19}.
The best profits obtained in 30 runs for KP_{24}.
The best profits obtained in 30 runs for KP_{29}.
The best profits obtained in 30 runs for KP_{34}.
The convergence graphs of KP_{7}.
The convergence graphs of KP_{14}.
The convergence graphs of KP_{19}.
The convergence graphs of KP_{24}.
The convergence graphs of KP_{29}.
The convergence graphs of KP_{34}.
Based on previous analyses, we can draw a conclusion that the superiority of CSISFLA over GA, DE, and CS in solving six types of KP instances is quite indubitable. In general, CS is slightly inferior to CSISFLA, so the next best is CS. DE and GA perform the thirdbest and the fourthbest, respectively.
In this paper, we proposed a novel hybrid cuckoo search algorithm with improved shuffled frogleaping algorithm, called CSISFLA, for solving 01 knapsack problems. Compared with the basic CS algorithm, the improvement of CSISFLA has several advantages. First, we specially designed an improved frogleap operator, which not only retains the effect of the global optimal information on the frog leaping but also strengthens information exchange between frog individuals. Additionally, new individuals randomly generated with mutation rate. Second, we presented a novel CS model which is in an excellent combination with the rapid exploration of the global search space by Lévy flight and the fine exploitation of the local region by frogleap operator. Third, CSISFLA employs hybrid encoding scheme; that is, to say, it conducts active searches in continuous real space, while the consequences are used to constitute the new solution in the binary space. Fourth, CSISFLA uses an effective GTM to assure the feasibility of solutions. The computational results show that CSISFLA outperforms the GA, DE, and CS in solution quality. Further, compared with ICS [
The authors declare that there is no conflict of interests regarding the publication of this paper.
This work was supported by Research Fund for the Doctoral Program of Jiangsu Normal University (no. 13XLR041) and National Natural Science Foundation of China (no. 61272297 and no. 61402207).