**1. Introduction**

The 0-1 knapsack problem (KP01) is a classical combinatorial optimization problem. It has many practical applications, such as project selection, investment decisions, and complexity theory [1,2]. Two classes of approaches were previously proposed to solve the KP01 [3]. The first class of approaches includes exact methods based on mathematical programming and operational research. It is possible to obtain the exact solutions of smallscale KP01 problems by exact methods such as branching and bound algorithm [4] and dynamic programming [5]. However, KP01 problems in various complex situations are NP-hard problems, and it is impractical to obtain optimal solutions using deterministic optimization methods for large-scale problems. The second class contains approximate methods based on metaheuristic algorithms [6]. Metaheuristic algorithms are shown to be effective approaches to solving complex engineering problems in a reasonable time when compared with exact methods [7]. Therefore, the application of metaheuristic algorithms has drawn a grea<sup>t</sup> deal of attention in the field of optimization.

In recent years, most of the metaheuristic algorithms, such as the genetic algorithm (GA) [8], ant colony optimization (ACO) [9], particle swarm algorithm (PSO) [10], artificial bee colony (ABC) [11], cuckoo search (CS) [12], firefly algorithm (FA) [13], and improved approaches based on these algorithms [14–19], were applied to KP01 problems and achieved outstanding results. However, these metaheuristic algorithms require not only a large amount of memory for storing the population of solutions, but also a long computational time for finding the optimal solutions. In the last few years, novel metaheuristic algorithms were proposed. Wang et al. [20,21] improved the swarm intelligence optimization approach

**Citation:** Wang, Y.; Wang, W. Quantum-Inspired Differential Evolution with Grey Wolf Optimizer for 0-1 Knapsack Problem. *Mathematics* **2021**, *9*, 1233. https:// doi.org/10.3390/math9111233

Academic Editor: Amir H. Alavi

Received: 1 March 2021 Accepted: 5 May 2021 Published: 28 May 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

inspired by the herding behavior of krill and came up with the krill herd (KH) algorithm to solve combinatorial optimization problems. Faramarzi et al. [22] presented a metaheuristic called the Marine Predators Algorithm (MPA) with an application in engineering design problems. MPA follows the rules that naturally govern in optimal foraging strategy and encounters a rate policy between predator and prey in marine ecosystems. Inspired by the phototaxis and <sup>L</sup>évy flights of moths, Wang et al. [23] developed a new metaheuristic algorithm called the moth search (MS) algorithm. MS was applied to solve discounted 0-1 knapsack problems [24] and set-union knapsack problems [25]. Gao et al. [26] presented a novel selection mechanism augmenting the generic DE algorithm (NSODE) to achieve better optimization results for solving fuzzy job-shop scheduling problems. Abualigah et al. [27] proposed the arithmetic optimization algorithm (AOA) based on the distribution behavior of the main arithmetic operators in mathematics: multiplication, division, subtraction, and addition. Wang et al. [28] proposed a new nature-inspired metaheuristic algorithm called monarch butterfly optimization (MBO) by simulating the migration of monarch butterflies. MBO was applied to solve classic KP01 [29], discounted KP01 [30], and large-scale KP01 [31,32] problems with superior searching accuracy, convergen<sup>t</sup> capability, and stability. In most metaheuristic algorithms, it is difficult to use the information from individuals in previous iterations in the updating process. Wang et al. [33] presented a method for reusing the information available from previous individuals and feeding previous useful information back into the updating process in order to guide later searches.

The emergence of quantum computing [34,35] was derived from the principles of quantum theory such as quantum superposition, quantum entanglement, quantum interference, and quantum collapse. Quantum computing brings new ideas to optimization due to its underlying concepts, along with the ability to process huge numbers of quantum states simultaneously in parallel. The merging of metaheuristic optimization and quantum computing recently became a growing theoretical and practical interest aiming at deriving benefits from quantum computing capabilities to enhance the convergence and speed of metaheuristic algorithms. Several scholars investigated the effect of introducing quantum computing in metaheuristic algorithms to maintain a balance between exploration and exploitation. Han and Kim proposed a genetic quantum algorithm (GQA) [36] and a quantum inspired evolutionary algorithm (QEA) [37] by merging classical evolutionary algorithms with quantum computing concepts such as the quantum bit and the quantum rotation gate. Talbi et al. [38] proposed a new algorithm inspired by genetic algorithms and quantum computing for solving the traveling salesman problem (TSP). Chang et al. [39] proposed a quantum-inspired electromagnetism-like mechanism (QEM) to solve the KP01. Xiong et al. [40] presented an analysis of quantum rotation gates in quantum-inspired evolutionary algorithms. To avoid the problem of premature convergence, mutation operation [41], crossover operation [42], new termination criterion, and new rotation gate [43] were applied to the QEA and subsequently improved.

The differential evolution (DE) algorithm [44], proposed by Storn and Price, was derived from differential vectors of solutions for global optimization. Several simple operations including mutation, crossover, and selection were used in the DE algorithm to explore the search space. Subsequently, several algorithms combining the DE algorithm with quantum computing were designed to increase global search ability. Hota and Pat [45] extended the concept of differential operators with adaptive parameter control to the quantum paradigm and proposed the adaptive quantum-inspired differential evolution (AQDE) algorithm. In addition, quantum interference operation [46] and mutation operation [47] were brought into a quantum-inspired DE algorithm.

Several metaheuristic algorithms combining the QEA and DE were proven to be effective and efficient for solving the KP01. Wang et al. [48] proposed a quantum swarm evolutionary (QSE) algorithm that updated quantum angles automatically with improved PSO. Layeb [49] presented a quantum inspired harmony search algorithm (QIHSA) based on a harmony search algorithm (HSA) and quantum computing. Zouache et al. [50] proposed a merged algorithm called quantum-inspired differential evolution with particle swarm optimization (QDEPSO) to solve the KP01. Gao et al. [51] proposed a quantuminspired wolf pack algorithm (QWPA) with quantum rotation and quantum collapse to improve the performance of the wolf pack algorithm for the KP01.

The grey wolf optimizer (GWO) proposed by Mirjalili et al. [52] mimics the specific behavior of grey wolves based on leadership hierarchy in nature. Srikanth et al. [53] presented a quantum-inspired binary grey wolf optimizer (QIBGWO) to solve the problem of unit commitment scheduling.

Population diversity is crucial in evolutionary algorithms to enable global exploration and to avoid poor performance due to premature convergence [54]. However, it is hard for classical algorithms to enhance diversity and convergence performance because their population quickly converges to a specific region of the solution space. In addition, these algorithms require a large amount of memory as well as long computational time to find the optimal solution for high-dimensional situations. To avoid these difficulties, we propose a new algorithm, called quantum-inspired differential evolution algorithm with grey wolf optimizer (QDGWO). The proposed algorithm combines the features of the QEA, DE, and GWO to solve the 0-1 knapsack problem. To preserve diversity throughout the evolution, the new algorithm adopts the concepts of quantum representation and the integration of the quantum operators such as quantum measurement and quantum rotation. The adaptive operations of the DE (mutation, crossover, selection) and GWO can increase the adaptation and diversification in updating individuals. The experimental results demonstrate the competitive performance of the proposed algorithm.

The rest of the paper is organized as follows: Section 2 defines the 0-1 knapsack problem. The proposed QDGWO algorithm is presented in Section 3. The experimental results and discussion are summarized in Section 4. Conclusions and directions for future work are discussed in Section 5.
