# A Heuristics-Guided Simplified Discrete Harmony Search Algorithm for Solving 0-1 Knapsack Problem
## 4 Behavior Analysis
### Effect of Heuristics and Parameter on Performance
The simulation results of the SDHS2 algorithm on these six instances show that (1) there exists a range of parameter _lms_ for the SDHS2 algorithm to always obtain the best-known solution on KP01, KP04, KP08, KP09, and KP14, respectively; (2) using the parameters in range of 100 to 2000, the SDHS2 algorithm can never obtain the best solution on KP15; and (3) even on the five instances except KP15, there is not a common _lms_ for the SDHS2 algorithm to obtain the best-known solutions on all these five instances. These results indicate that the performance of the SDHS2 algorithm is not as good as that of the SDHS algorithm. Because the only difference between the SDHS algorithm and the SDHS2 algorithm is the heuristic used to guide the processing order of the items in the solution-based pitch adjustment operator, it means that, for the solution-based pitch adjustment operator, the profit-guided processing order is superior to the profit-weight ratio-guided processing order. [PERSON] et al. [25] analyzed that only using the profit-weight ratio may fail to find the best solution for the construction method in some cases. Similarly, only using the profit-weight ratio may also fail to find best solution for metaheuristics in some cases. For example, suppose the remaining capacity of package is 30 and there are 3 items not in the package. The profits and weights of those three items are [20; 25; 25] and [10; 15; 15], respectively. Then, the profit-weight ratio of those three items are [2, 5/3, 5/3]. If the profit-weight ratio is used to guide the pitch adjustment operator, then the total profit will increase by 45. But if the profit is used to guide the pitch adjustment operator, then the \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline  & \multicolumn{3}{c}{**KP08**} & \multicolumn{3}{c}{**KP09**} \\ _lms_ & **SDHS** & **SDHS1** & **SDHS2** & **SDHS** & **SDHS1** & **SDHS2** \\ \hline  
Average & 0.010 & 73.359 & 0.016 & 0.843 & 208.290 & 0.017 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance comparison among the SDHS algorithm, the SDHS1 algorithm, and the SDHS2 algorithm on KP08 and KP09 instances with different parameter _lms_. total profit will increase by 50. In the SDHS algorithm, the memory consideration operator is guided by the profit-weight ratio, and the pitch adjustment operator is guided by the profit. These two heuristics cooperate with each other to guarantee good performance for the SDHS algorithm. To further experimentally analyze whether this result is reliable, we carry out comparative experiment on six types of 0-1 KP instances with a wide range of parameters. The six types include uncorrelated (UC), weakly correlated (WC), strongly correlated (SC), multiple strongly correlated (MSC), profit ceiling (PC), and circle (CI) instances. The weights are distributed in [1, \(R\)] where \(R\) is in 100, 1000, 10,000. The profits are created according to the type of instance [62]. The value of \(n\) (number of items) is from 1000 to 2000 with a step of 100. For each combination of type, \(R\), and \(n\), 10 instances are created. In total, 1980 instances (\(6\times 3\times 11\times 10\)) are used in the comparative experiment. For each instance, we run the methods 50 times and use the mean value to compare the performance of using profit and using profit-weight ratio. Table 6 lists the statistical values of the experimental results, where columns \(>\), \(=\), and \(<\) list the number of instances where using profit has better, equal, or worse performance, respectively. Column \(p\)-value lists the results of the Wilcoxon signed ranks test which is highlighted in bold if using profit is significantly better than using profit-weight ratio. In case the two strategies obtain exactly same results on 110 instances, the corresponding cells of \(p\)-value are labeled as '-'.