# A Heuristics-Guided Simplified Discrete Harmony Search Algorithm for Solving 0-1 Knapsack Problem
## 1 Introduction  
The knapsack problem (KP) is a classical combinatorial optimization problem with diverse applications across numerous fields. Over time, KP has evolved into a family of variants, including the 0-1 Knapsack Problem (0-1 KP), Multidimensional Knapsack Problem (MKP), Quadratic Knapsack Problem, and the Generalized Knapsack Sharing Problem. Among these, the 0-1 KP, as the foundational formulation of KP, plays a critical role in both theoretical and applied contexts. For instance, it has been utilized in real estate maintenance optimization [1], energy consumption minimization [2], cargo loading optimization [3], cryptographic systems [4], network security interdiction [5], and portfolio selection strategies [6]. These applications underscore the versatility of the 0-1 KP in addressing complex resource allocation challenges under constraints. The 0-1 KP is NP-hard, necessitating the development of advanced metaheuristics to approximate optimal solutions [7]. Prominent examples of these metaheuristics include the cuckoo search algorithm [8, 9, 10], firefly algorithm [10], social spider algorithm [11], cohort intelligence algorithm [12], monkey algorithm [13], wolf-inspired algorithms [14, 15, 16, 17, 18], bat algorithm [19], wisdom of artificial crowds algorithm [20], symbioticorganisms search algorithm [21], elite opposition-flower pollination algorithm [22], chemical reaction optimization algorithm [23; 24], genetic algorithm [25; 26], monarch butterfly optimization algorithm [27; 28; 29], particle swarm optimization algorithm [30], whale optimization algorithm [31], shuffled frog leaping algorithm [32; 33], slime mold algorithm [34], rice optimization algorithm [35], Differential Evolution algorithm [36], Quadratic Interpolation Optimization algorithm [36], Manta Ray Foraging Optimization algorithm [36], Artificial Jellyfish Search algorithm [37], Kepler Optimization Algorithm [38], harmony search algorithm [39; 40; 41; 42; 43; 44; 45; 46], local search algorithm [47; 48; 49], etc. Most of the aforementioned algorithms require additional transfer functions to obtain binary solutions from continuous search space, use a hybrid of multiple metaheuristics, use advanced computation technologies, use enhanced operators, and/or use extra operators. Take the five cuckoo search algorithms [8; 9; 10; 50; 51] as an example: (1) all those five algorithms use the Sigmoid function to transfer a real number into binary; (2) ref. [50] uses the genetic mutation operation to prevent it from being trapped in the local optimum; (3) ref. [51] uses a hybrid of the cuckoo search algorithm and shuffled frog-leaping algorithm; (4) ref. [9] uses a hybrid of the cuckoo search algorithm and harmony search; and (5) ref. [10] uses the stochastic hill-climbing technique to improve its intensification ability. Although those advanced strategies are helpful to obtaining good performance, they give rise to extra complexity also. The harmony search (HS) algorithm [52] is a kind of construction-based metaheuristic which was proposed to solve both continuous and combinatorial optimization problems. Inspired by the music improvisation process, the HS algorithm uses three operators, memory consideration operator, random search operator, and pitch adjustment operator, to construct a solution [53]. Since its publication, many improved HS algorithms have been proposed and successfully applied to many real-world optimization problems [54; 55; 56; 57; 58; 59]. Several HS algorithms [39; 40; 41; 42; 43; 44; 45; 46] have been successfully proposed to solve the 0-1 KP. As stated in [60] and [61], the performance of the HS algorithm is remarkably affected by its parameters, and it is annoying to fine-tune those parameters. In order to further improve the performance and simplify the implementation of the HS algorithm for solving the 0-1 KP, this paper proposes a heuristics-guided simplified discrete harmony search (SDHS) algorithm which does not use random search operator and has only one intrinsic parameter, harmony memory size (_lms_).