A novel quantum inspired cuckoo search for Knapsack problems

Page created by Don Romero
 
CONTINUE READING
A novel quantum inspired cuckoo search for Knapsack problems
International Journal of Bio-Inspired Computation Vol. x, No. x, 2011                                                               1

                                 A novel quantum inspired cuckoo search for Knapsack
                                 problems

                                 Abdesslem Layeb
                                 MISC Lab., Computer Science Department
                                 Mentouri University Constantine, Algeria.
                                 layeb@umc.edu.dz

                                 Abstract. This paper presents a new inspired algorithm called Quantum Inspired Cuckoo Search
                                 Algorithm (QICSA). This one is new framework relying on Quantum Computing principles and
                                 Cuckoo Search algorithm. The contribution consists in defining an appropriate representation scheme
                                 in the cuckoo search algorithm that allows applying successfully on combinatorial optimization
                                 problems some quantum computing principles like qubit representation, superposition of states,
                                 measurement, and interference. This hybridization between quantum inspired computing and
                                 bioinspired computing has led to an efficient hybrid framework which achieves better balance between
                                 exploration and exploitation capabilities of the search process. Experiments on knapsack problems
                                 show the effectiveness of the proposed framework and its ability to achieve good quality solutions.

                                 Keywords: Cuckoo Search Algorithm, Quantum Computing, Hybrid Algorithms

                                 Biographical notes: Abdeslem Layeb is Associate Professor in the department of computer science at
                                 the University of Constantine. He is a member of MISC laboratory. He received his PhD degree in
                                 computer science from the University Mentouri of Constantine, Algeria. Dr. Layeb is interested to the
                                 combinatorial optimization methods and its application to solve several problems from different
                                 domains like Bioinformatics, imagery, formal methods,etc. Dr. Layeb has many publications in
                                 theoretical computer science, combinatorial optimization, and bioinformatics.

1    Introduction                                                   computation fields. There are many algorithms based swarm
                                                                    intelligence like Ant Colony optimization [3, 4], eco-
The combinatorial optimization plays a very important role          systems optimization [5, 6], etc. The main algorithm for
in operational research, discrete mathematics and computer          swarm intelligence is Particle Swarm Optimization (PSO)
science. The aim of this field is to solve several                  [7, 8], which is inspired by the paradigm of birds grouping.
combinatorial optimization problems that are difficult to           PSO was used successfully in various hard optimization
solve. Several methods were developed to solve such                 problems. The simplicity of implementation and use are the
problems that can be classified into two classes [1]. Exact         main features of PSO compared to other evolutionary
methods, like branch and bound, dynamic programming,                computing algorithms. In fact, the updating mechanism in
can give the exact solutions. However, in the worst case, the       the algorithm relies only on two simple PSO self-updating
computation time required for the execution of such                 equations.
methods, increases exponentially with the size of the
instance to solve. The second class contains metaheuristic          One of the most recent variant of PSO algorithm is Cuckoo
methods which give a sub-optimal solution but in                    Search algorithm (CS). CS is an optimization algorithm
reasonable times compared to the exact methods [1, 2].              developed by Xin-She Yang and Suash Deb in 2009 [9]. It
                                                                    was inspired by the obligate brood parasitism of some
Evolutionary computation has been proven to be an                   cuckoo species by laying their eggs in the nests of other host
effective way to solve complex engineering problems. It             birds (of other species). Some bird’s host can involve direct
presents many interesting features such as adaptation,              conflicts with the intruding cuckoos. For example, if a
emergence and learning [2]. Artificial neural networks,             bird’s host discovers that the eggs are strange eggs, it will
genetic algorithms and swarm intelligence are examples of           either throw these alien eggs away or simply abandon its
bio-inspired systems used to this end. In recent years,             nest and build a new nest elsewhere [10]. The cuckoo’s
optimizing by swarm intelligence has become a research              behavior and the mechanism of Lévy flights [11, 12] have
interest to many research scientists of evolutionary                leading to design of an efficient inspired algorithm

Copyright © 200x Inderscience Enterprises Ltd.
performing optimization search. The recent applications of      decision making, budget controlling, and projects selection
Cuckoo Search for optimization problems have shown its          and so on. This problem was proved to be NP-Hard [20, 21].
promising effectiveness. For example, a promising discrete      The knapsack problem can be defined as follows:
cuckoo search algorithm is recently proposed to deal with       We have a knapsack with maximum capacity equal to C and
nurse scheduling problem [13].                                  a set of N items. Each item i has a profit pi and a weight wi.
                                                                The problem consists in choosing a subset of items that
Quantum Computing (QC) is a new research field that             maximize the knapsack profit, and having a total weight less
induced intense researches in the last decade, and that         than or equal to C. By using the binary decision variable xi,
covers investigations on quantum computers and quantum          with xi = 1 if item i is selected, and xi = 0 otherwise. The
algorithms [14]. QC relies on the principles of quantum         problem can be formulated as follows:
mechanics like qubit representation and superposition of
states. QC is able of processing huge numbers of quantum
states simultaneously in parallel. QC brings new philosophy                      N                                     (1)
to optimization due to its underlying concepts. Recently, a     Maximize ∑ pi xi
                                                                                 i =1
growing theoretical and practical interest is devoted to
researches on merging evolutionary computation and
quantum computing [15, 16]. The aim is to get benefit from                 N
quantum computing capabilities to enhance both efficiency       Subject ∑ wi xi ≤ C                                    (2)
and speed of classical evolutionary algorithms. This has led              i =1
to the design of several quantum inspired algorithms such as    xi ∈ {0,1}
quantum inspired genetic algorithm [15], quantum
differential algorithm [17], quantum inspired scatter search
[18], etc. Unlike pure quantum computing, quantum               The multidimensional knapsack problem (MKP) is a
inspired algorithms don’t require the presence of a quantum     generalization of the knapsack problem [22]. In the MKP,
machine to work. Quantum inspired algorithms have been          each item xi has a profit pi like in the simple knapsack
used to solve successfully many combinatorial optimization      problem. However, instead of having a single knapsack to
problems [15, 19].                                              fill, we have a number m of knapsack of capacity Cj (j = 1 ...
                                                                m). Each item xi has a weight wij that depends of the
Within this issue, we propose in this paper a new hybrid        knapsack j (example: an item can have a weight 3 in
algorithm called Quantum Inspired Cuckoo Search                 knapsack 1, 5 in knapsack 2, etc.). A selected item must be
Algorithm (QICSA) to cope with combinatorial                    in all knapsacks. The objective in MKP is to select a subset
optimization problems. The proposed algorithm combines          of items that maximizes profit and that this subset must be
Cuckoo Search algorithm and quantum computing in new            in all m knapsacks. MKP is an important problem because
one. The features of the proposed algorithm consist in          many practical problems can be formulated as a MKP, such
adopting a quantum representation of the search space. The      as the capital budgeting problem, project selection and
other feature of QICSA is the integration of the quantum        cargo loading, and cutting stock problems [23]. MKP can be
operators in the cuckoo search dynamics in order to             stated as follows:
optimize a defined objective function. The QICSA
                                                                                 N                                     (3)
                                                                Maximize ∑ pi xi
distinguishes with other evolutionary algorithms in that it
offers a large exploration of the search space through                           i =1
intensification and diversification. We have tested our
algorithm on Knapsack problems [20] and the results are
promising.                                                                 N
                                                                Subject ∑ wi j xi ≤ C j     j = 1...m                  (4)
The remainder of the paper is organized as follows. Section               i =1

2 presents the knapsack problems formulation. In section 3,     xi ∈ {0,1}
some basic concepts of quantum computing are presented.
Section 4 presents an overview of the cuckoo search
algorithm. In section 5, the proposed algorithm is described.   Clearly, there are 2N potential solutions for these problems.
Experimental results are discussed in section 6. Finally,       It is obviously that knapsack problem and its variants are
conclusions and future work are drawn.                          combinatorial optimization problems. Several techniques
                                                                have been proposed to deal with knapsack problems [20].
                                                                However, it appears to be impossible to obtain exact
2    Knapsack problems                                          solutions in polynomial time. The main reason is that the
                                                                required computation grows exponentially with the size of
Knapsack problem (KP) is a well-known optimization              the problem. Therefore, it is often desirable to find near
problem. Several problems are encoded like Knapsack             optimal solutions to these problems. Efficient heuristic
problem involving resource distribution, investment             algorithms offer a good alternative to accomplish this goal.
                                                                Exploitation of the optimization philosophy and the parallel
great ability of quantum computing is an attractive way to         Quantum Algorithms consist in applying successively a
probe complex problems like the knapsack problems.                 series of quantum operations on a quantum system.
Within this perspective, we are interested in applying             Quantum operations are performed using quantum gates and
quantum computing principles and a cuckoo search                   quantum circuits. It should be noted that designing quantum
algorithm to solve these problems.                                 algorithms is not easy at all. Yet, there is not a powerful
                                                                   quantum machine able to execute the developed quantum
                                                                   algorithms. Therefore, some researchers have tried to adapt
3 Overview of Quantum Computing                                    some properties of quantum computing in the classical
                                                                   algorithms. Since the late 1990s, merging quantum
Quantum computing is a new theory which has emerged as             computation and evolutionary computation has been proven
a result of merging computer science and quantum                   to be a productive issue when probing complex problems.
mechanics. Its main goal is to investigate all the possibilities   Like any other EA, a Quantum Evolutionary Algorithm
a computer could have if it followed the laws of quantum           (QEA) relies on the representation of the individual, the
mechanics. The origin of quantum computing goes back to            evaluation function and the population dynamics. The
the early 80 when Richard Feynman observed that some               particularity of QEA stems from the quantum representation
quantum mechanical effects cannot be efficiently simulated         they adopt which allows representing the superposition of
on a computer. During the last decade, quantum computing           all potential solutions for a given problem. It also stems
has attracted widespread interest and has induced intensive        from the quantum operators it uses to evolve the entire
investigations and researches since it appears more powerful       population through generations. QEA has been successfully
than its classical counterpart. Indeed, the parallelism that the   applied on many problems [15, 16].
quantum computing provides reduces obviously the
algorithmic complexity. Such an ability of parallel
processing can be used to solve combinatorial optimization         4    Cuckoo Search
problems which require the exploration of large solutions
spaces. The basic definitions and laws of quantum                  In order to solve complex problems, ideas gleaned from
information theory are beyond the scope of this paper. For         natural mechanisms have been exploited to develop
in-depth theoretical insights, one can refer to [14].              heuristics. Nature inspired optimization algorithms has been
                                                                   extensively investigated during the last decade paving the
The qubit is the smallest unit of information stored in a two-     way for new computing paradigms such as neural networks,
state quantum computer. Contrary to classical bit which has        evolutionary computing, swarm optimization, etc. The
two possible values, either 0 or 1, a qubit will be in the         ultimate goal is to develop systems that have ability to learn
superposition of those two values. The state of a qubit can        incrementally, to be adaptable to their environment and to
be represented by using the braket notation:                       be tolerant to noise. One of the recent developed bioinspired
                                                                   algorithms is the Cuckoo Search (CS) [9] which is based on
                                                                   style life of Cuckoo bird. Cuckoos use an aggressive
|Ψ⟩ = α |0⟩+ β |1⟩                                     (5)
                                                                   strategy of reproduction that involves the female hack nests
                                                                   of other birds to lay their eggs fertilized. Sometimes, the egg
where |Ψ⟩ denotes more than a vector Ψ in some vector
                                            →
                                                                   of cuckoo in the nest is discovered and the hacked birds
                                                                   discard or abandon the nest and start their own brood
space. |0⟩ and |1⟩ represent the classical bit values 0 and 1
                                                                   elsewhere. The Cuckoo Search proposed by Yang and Deb
respectively; a and b are complex numbers such that:
                                                                   2009 [9] is based on the following three idealized rules:
                                                                        • Each cuckoo lays one egg at a time, and dumps it
| a |2 + | b |2 = 1                                   (6)                   in a randomly chosen nest;
                                                                        • The best nests with high quality of eggs (solutions)
a and b are complex number that specify the probability                     will carry over to the next generations;
amplitudes of the corresponding states. When we measure                 • The number of available host nests is fixed, and a
the qubit’s state we may have ‘0’ with a probability | a |2                 host can discover an alien egg with a probability pa
and we may have ‘1’ with a probability | b |2. A system of                  ∈ [0, 1]. In this case, the host bird can either throw
m-qubits can represent 2m states at the same time. Quantum                  the egg away or abandon the nest so as to build a
computers can perform computations on all these values at                   completely new nest in a new location.
the same time. It is this exponential growth of the state
space with the number of particles that suggests exponential           The last assumption can be approximated by a fraction
speed-up of computation on quantum computers over                  pa of the n nests being replaced by new nests (with new
classical computers. Each quantum operation will deal with         random solutions at new locations). The generation of new
all the states present within the superposition in parallel.       solutions x(t+1) is done by using a Lévy flight (eq.7). Lévy
When observing a quantum state, it collapses to a single           flights essentially provide a random walk while their
state among those states.                                          random steps are drawn from a Lévy distribution for large
                                                                   steps which has an infinite variance with an infinite mean
(eq.8). Here the consecutive jumps/steps of a cuckoo           5 The proposed Algorithm
essentially form a random walk process which obeys a
power-law step-length distribution with a heavy tail [9].      In section, we present the proposed algorithm called
                                                               Quantum Inspired Cuckoo Search (QICSA) which integers
      xit +1 = xit + α ⊕ Lévy (λ )                    (7)      the quantum computing principles such as qubit
                                                               representation, measure operation and quantum mutation, in
      Lévy ~ u = t -λ                                 (8)      the core the cuckoo search algorithm. This proposed model
                                                               will focus on enhancing diversity and the performance of
                                                               the cuckoo search algorithm.
where α > 0 is the step size which should be related to the
scales of the problem of interest. Generally we take           The QICSA architecture, which has been developed to solve
 α = O(1). The product ⊕ means entry-wise multiplications.     combinatorial problems, is explained in the Figure 2. Our
This entry-wise product is similar to those used in PSO, but   architecture contains three essential modules. The first
here the random walk via Lévy flight is more efficient in         module contains a quantum representation of cuckoo
exploring the search space as its step length is much longer   swarm. The particularity of quantum inspired cuckoo search
in the long run.                                               algorithm stems from the quantum representation it adopts
                                                               which allows representing the superposition of all potential
   The main characteristics of CS algorithm it’s its           solutions for a given problem. Moreover, the generation of
simplicity. In fact, comparing with other population or        a new cuckoo depends on the probability amplitudes a and b
agent-based metaheuristic algorithms such as particle swarm    of the qubit function Ψ (eq.5). The second module contains
optimization and harmony search, there are few parameters      the objective function and the selection operator. The
to set. The applications of CS into engineering optimization   selection operator is similar to the elitism strategy used in
problems have shown its encouraging efficiency. For            genetic algorithms. Finally, the third module, which is the
example, a promising discrete cuckoo search algorithm is       most important, contains the main quantum cuckoo
recently proposed to solve nurse scheduling problem [17].      dynamics. This module is composed of 4 main operations
An efficient computation approach based on cuckoo search       inspired from quantum computing and cuckoo search
has been proposed for data fusion in wireless sensor           algorithm: Measurement, Mutation, Interference, and Lévy
networks [18]. In more details, the proposed cuckoo search     flights operations. QICSA uses these operations to evolve
algorithm can be described as follow:                          the entire swarm through generations.

   Objective function f(x), x =(x1,.., xd)T ;                  In the following, we will explain in more detail each
   Initial a population of n host nests xi (i                  component of QICSA architecture.
   = 1, 2, ..., n);
     while (t < MaxGeneration) or (stop
   criterion);
      • Get a cuckoo (say i) randomly by Lévy                                    Problem
        flights;
      • Evaluate its quality/fitness Fi;
      • Choose a nest among n (say j)
        randomly;                                                              Quantum
      • if (Fi > Fj),                                                       representation
        Replace j by the new solution;                                     of cuckoo swarm
        end
      • Abandon a fraction (pa) of worse nests                                                     Quantum Cuckoo
      • build new ones at new locations via                                                           dynamics
                                                                           Evaluation &
        Lévy flights;                                                        Selection
                                                                                                   Measurement
      • Keep the best solutions (or nests with                                                     Mutation
        quality solutions);                                                                        Interference
                                                                                             No
      • Rank the solutions and find the                                       Stop                 Lévy flights
        current best;
     end while

               Fig. 1. Cuckoo Search Schema.                                 Best solution

                                                                         Fig. 2. Architecture of the QICSA algorithm
5.1 Quantum representation of cuckoo solution                   several different solutions for the knapsack problem, which
                                                                gives a great diversity to the cuckoo search algorithm.
To successfully apply quantum principles on binary
problems like the knapsack problem, we have needed to                       a1 a 2 a n  Measure
map potential solutions into a quantum representation that                             
                                                                            b b ... b    →(0,1,...,1)
could be easily manipulated by quantum operators. In terms                   1   2   n 
of quantum computing, each binary solution is represented
as a quantum register of length N (N is the solution size) as                     Fig. 4. Quantum measurement.
shown in Figure 3. Each column represents a single qubit
and corresponds to the binary digit 1 or 0. For each qubit, a   5.2.2 Quantum interference
binary value is computed according to its probabilities ai 2
and bi 2 , which can be interpreted as the probabilities to     This operation amplifies the amplitude of the best solution
                                                                and decreases the amplitudes of the bad ones. It primarily
have respectively 0 or 1. Consequently, all potential
                                                                consists in moving the state of each qubit in the direction of
solutions can be represented by a Quantum Vector QV
                                                                the corresponding bit value in the best solution in progress.
(figure 3) that contains the superposition of all possible
                                                                The operation of interference is useful to intensify research
solutions. This quantum vector can be viewed as a
                                                                around the best solution and it plays the role of local search
probabilistic representation of all the problem solutions. It
                                                                method. This operation can be accomplished by using a unit
plays the role of a quantum cuckoo in the QICSA algorithm.
                                                                transformation which achieves a rotation whose angle is a
A quantum representation offers a powerful way to
                                                                function of the amplitudes ai, bi (figure 5). The rotation
represent the solution space and reduces consequently the
                                                                angle’s value δθ should be well set in order avoid
required number of cuckoos. Only one cuckoo is needed to
                                                                premature convergence. A big value of the rotation angle
represent the entire swarm.
                                                                can lead to premature convergence or divergence; however
                 a1 a 2  an                                   a small value to this parameter can increase the convergence
                            
                 b b ... b                                    time. Consequently, the angle is set experimentally and its
                 1    2   n 
                                                                direction is determined as a function of the values of ai, bi
     Fig. 3. Quantum representation of the cuckoo solution.     and the corresponding element’s value in the binary vector
                                                                (table 1). In our algorithm, we have set the rotation angle
                                                                δθ= pi/20. However, we can use a dynamic value of the
5.2 Quantum operators                                           rotation angle in order to increase the performance of the
                                                                interference operation.
We have integrated in the cuckoo search algorithm, some of
quantum operations. This integration helps to increase the
optimization capacities of the cuckoo search.                                                                      ±δθ
                                                                                             bi
5.2.1 Measurement

  a) This operation transforms by projection the quantum                                                      ai
vector into a binary vector (figure 4). Therefore, there will
be a solution among all the solutions present in the
superposition. But contrary to the pure quantum theory, this
measurement does not destroy the superposition. That has
the advantage of preserving the superposition for the                              Fig. 5. Quantum interference
following iterations knowing that we operate on traditional
machines. The binary values for a qubit are computed            Table 1. Lookup table of the rotation angle
according to its probabilities ai 2 and bi 2 . This                                  Reference bit
                                                                a          b                            Angle
operation is accomplished as follows: for each qubit, we                             value
generate a random number Pr between 0 and 1; the value of       >0         >0        1                  +δθ
the corresponding bit is 1 if the value bi 2 is greater than    >0         >0        0                  -δθ
Pr, and otherwise the bit value is 0. Moreover, the             >0         0
5.2.3 Mutation operator                                          cuckoo. For that, we apply the measure operation in order to
                                                                 get a binary solution which represents a potential solution.
This operator is inspired from the evolutionary mutation. It     After this step, we apply the interference operation
allows moving from the current solution to one of its            according to the best current element. We replace some
neighbours. This operator allows exploring new solutions         worst nests by the current cuckoo if it is better or by new
and thus enhances the diversification capabilities of the        random nests generated by the Lévy flight. The selection
search process. In each generation, the mutation is applied      phase in QICSA of the best nests or solutions is comparable
with some probability. We distinguish two types of quantum       to some form of elitism selection used in genetic algorithms,
mutations:                                                       which ensures the best solution is kept always in the next
  • Inter-qubit Mutation: this operator performs                 iteration. Finally, the global best solution is then updated if
     permutation between two qubits. It consists first in        a better one is found and the whole process is repeated until
     selecting randomly a register in the quantum matrix.        reaching a stopping criterion. In more details, the proposed
     Then, pairs of qubits are chosen randomly according to      QICSA can be described as in figure 8.
     a defined probability (figure 6).
  • Intra-qubit Mutation: it consists in selecting randomly      The particularity of QICSA algorithm stems from the
     a qubit according to a defined probability, next we         quantum representation it adopts which allows representing
     make a permutation between the qubit amplitudes ai et       the superposition of all potential solutions for a given
     bi as it is shown on Figure 7.                              problem. Moreover, the position of a nest depends on the
                                                                 probability amplitudes a and b of the qubit function. The
View that the quantum representation offers a great
                                                                 probabilistic nature of the quantum measure offers a good
diversity; it is recommended to use small values for the of
                                                                 diversity to the cuckoo search algorithm, while the
mutation probability in order to keep good performance of
                                                                 interference operation helps to intensify the search around
the quantum inspired cuckoo search.
                                                                 the good solutions.

        0.44 0.77 0.44 0.00 1.00                                 Input: Problem data
                                   
        0.99 0.77 − 0.99 1.00 0.00                               Output: problem solution
                                                               Construct an initial population of p host
                              Exchange                           nests
                                                                   while (stop criterion)
             Fig. 6. inter-qubit quantum mutation.
                                                                    • Apply Lévy flights operator to get cuckoo
                                                                      randomly;
                                                                    • Apply randomly a quantum mutation
                                                                    • Apply measurement operator;
     0.44 0.77 0.44 0.00 1.00 
                                                                  • Evaluate the quality/fitness of this
     0.99 0.77 − 0.99 1.00 0.00 
                                                                    cuckoo;
                                                                    • Apply Interference operator;
                                                                    • replace some nests among n randomly by
     0.44 0.77 − 0.99 0.00 1.00                                     the new solution according to its
                                
     0.99 0.77 0.44 1.00 0.00                                       fitness;
                                                                  • A fraction (pa) of the worse nests are
                                                                      abandoned and new ones are built via Lévy
               Fig. 7. intra-qubit quantum mutation.                  flights;
                                                                    • Keep the best solutions (or nests with
                                                                      quality solutions);
5.3 Outlines of the proposed algorithm                              • Rank the solutions and find the current
                                                                      best;
Now, we describe how the representation scheme including           end while
quantum representation and quantum operators has been
embedded within a cuckoo search algorithm and resulted in
                                                                        Fig. 8. Quantum Inspired Cuckoo Search Schema.
a hybrid stochastic algorithm. Firstly, a swarm of p host nest
is created at random positions to represent all possible
solutions. The algorithm progresses through a number of          6 Implementation and Validation
generations according to the QICSA dynamics. During each
iteration, the following main tasks are performed. A new         QICSA for knapsack problems is implemented in Matlab 7
cuckoo is built using the Lévy flights operator followed by      and tested on a micro-computer 3 GHz and 1 GB of
the quantum mutation which is applied with some                  memory. To assess the efficiency and accuracy of our
probability prm. The next step is to evaluate the current        approach several experiments were performed. In the first
experiment, we have used small tests taken from [21]. We
have compared our results by those given by a harmony
search algorithm NGHS [21]. The results are given in the
Table 2. In this experiment, QICSA is better than NGHS in
two tests (f1 and f6) and has the same results in the other
tests (table 2).

Table 2. Results for small test size

test              size            QICSA           NGHS
f1                10              340             295
f2                20              1024            1024
f3                4               35              35
f4                4               23              23
f5                15              481.0694        481.0694
f6                10              52              50               Fig. 9. Friedman test compares initial solution and best solutions.
f7                7               107             107
f8                23              9761            9761             To evaluate the performance of QICSA for
f9                5               130             130
                                                                   multidimensional knapsack problem, several tests are used
                                                                   taken from the benchmark library OR-Library
f10               20              1025            1025             (http://people.brunel.ac.uk/~mastjjb/jeb/orlib/mknapinfo.ht
                                                                   ml). We have made two experiments. In the first
                                                                   experiment, we have used easy tests of the benchmark
In the second experiment we have used knapsack tests               mknap1. In this experiment, QICSA is able to find the best
generated using a random generator. In these tests, the            solution for all the tests of mknap1 (table 4).
knapsack capacity is calculated using the following formula:
                                                                   Table 4. Results MKP tests (mknap1)
                                                                      Test       Number        Number of       QICSA           best
             3 N
       C=     ∑ wi
             4 i =0
                                                             (9)                 of items      constraints     solution       known
                                                                                                                             solution
                                                                   mknap1             6            10            3800          3800
Where wi is a random weight of item i and N is the number          mknap2            10            10           8706,1        8706,1
of items. We have used different size of N varying from 50         mknap3            15            10            4015          4015
to 30000.                                                          mknap4            20            10            6120          6120
                                                                   mknap5            28            10           12400         12400
The found results are summarized in table 3. As we can see,        mknap6            39            5            10618         10618
the results of the experiments are encouraging and prove the       mknap7            50            5            16537         16537
feasibility and the efficiency of our approach. There is clear
enhancement of the initial solutions as it is confirmed by the     The second experiment contains hard MKP instances which
statistical Friedman test (figure 9).                              are considered to be rather difficult for optimization
                                                                   approaches. We have used 5 tests of the benchmarks
Table 3. Results for random tests
                                                                   maknapcb1 (5.100) which have 5 constraints and 100 items,
      Test size        Initial         Best                        and we have used 5 tests of the benchmarks maknapcb4
                       solution        solution                    (10.100) which have 10 constraints and 100 items.
      50               721             1045                        Moreover, we have compared our results with two methods
      100              1945            2245                        based on PSO algorithms. The first method, denoted as
      200              2680            4266                        PSO-P, is based on a standard PSO with penalty function
      300              3853            6096                        technique [23]. The second method, called PSO-R, is based
      500              7607            10021                       on the structure of PSO-P, in combination with a problem-
      700              10927           14571
                                                                   specific repair operator to guarantee feasible solutions [23].
      900              12996           17596
                                                                   Finally, statistical tests of Freidman were carried out to test
      1000             16613           20209
                                                                   the significance of the difference in the accuracy of each
      1200             19620           23603
                                                                   method in this experiment.
      1500             26594           29362
      1700             22274           32973
                                                                   The found results of this experiment are summarized in
      2000             36718           39953
                                                                   Table 5. The found results are encouraging. QICSA
      2500             38814           48864
                                                                   outperforms PSO-P in all the tested instances but it is less
      3000              48842          58079
competitive than PSO-R because PSO-R uses specific repair        quantum operations such as the interference, the quantum
operator based on pseudo-utility ratios derived from the         mutation and measurement. We have explained the basis of
surrogate duality approach [23]. Our program ranks third in      QICSA through the resolution of two variants of knapsack
the Freidman test (Figure 10) after best-known and PSO-R.        problems: the 0-1 knapsack and the multidimensional
However, the performances of QICSA can be increased by           knapsack problems. The approach has been thoroughly
the introduction of some specified knapsack heuristic            assessed with different instance types and problem sizes.
operators utilizing problem-specific knowledge like the          The experimental studies prove the feasibility and the
repair operator used in the method PSO-R.                        effectiveness of our approach. The proposed algorithm
                                                                 reduces efficiently the population size and the number of
Table 5. Results MKP tests (mknapcb1, mknapcb4)
                                                                 iterations to have the optimal solution. Thanks to
             Best                                                superposition, interference, and quantum mutation
Test                    QICSA PSO-P       PSO-R
             known
                                                                 operators, better balance between intensification and
5.100.00      24381      23416    22525    24381
                                                                 diversification of the search is achieved. However, there are
5.100.01       24274     22880    22244    24258                 several issues to improve our algorithm. Firstly, in order to
5.100.02       23551     22525    21822    23551                 improve the effectiveness of our algorithm, it is better to
                                                                 integrate a local search method like Tabu Search in the core
5.100.03       23534     22727    22057    23527
                                                                 of the algorithm. Secondly, to raise the speed of our
5.100.04       23991     22854    22167    23966                 program, it is better to use parallels machines because it was
10.100.00      23064     21796    20895    23057                 verified effectively that quantum inspired algorithms can
                                                                 work better on parallels machines. Finally, the performance
10.100.01      22801     21348    20663    22781
                                                                 of the algorithm may be improved by using a clever startup
10.100.02      22131     20961    20058    22131                 solution.
10.100.03      22772     21377    20908    22772
10.100.04      22751     21251    20488    22751
                                                                 References
                                                                 1. Jourdan, L., Basseur, M. and Talbi, E.G., Hybridizing exact
                                                                    methods and metaheuristics: a taxonomy. European Journal of
                                                                    Operational Research. Vol. 199. 620-629, 2009.
                                                                 2. Fogel, D.B., An Introduction to Evolutionary Computation,
                                                                    Tutorial, Congress on Evolutionary Computation (CEC’2001),
                                                                    Seoul, Korea, 2001.
                                                                 3. Dorigo M. and Gambardella, L.M. Ant Colony System : A
                                                                    Cooperative Learning Approach to the Traveling Salesman
                                                                    Problem, IEEE Transactions on Evolutionary Computation,
                                                                    Vol.1, N. 1, pp. 53-66, 1997.
                                                                 4. Hu, X, Zhang, J. and Li, Y. Orthogonal methods based ant
                                                                    colony search for solving continuous optimization problems.
                                                                    Journal of Computer Science and Technology, 23(1), pp.2-18,
   Fig. 10. Friedman test compares QICSA, PSO-P, PSO-R and          2008.
                      best known solutions.                      5. Nabti, S. and Meshoul, S. Predator Prey Optimisation for
                                                                    Snake Based Contour Detection, International Journal of
The effectiveness of our approach is explained by the good          Intelligent Computing and Cybernetics - IJICC, Emerald
combination between the exploitation of the local random            Publishers, 2(2), pp.228-242, 2009.
walk and the exploration of Lévy flights, which leads the        6. Zheng, S. An intensive restraint topology adaptive snake model
algorithm to effectively explore the search space and locate        and its application in tracking dynamic image sequence. Inf.
a good solution.                                                    Sci. Vol.180, N.16, pp. 2940-2959, 2010.
                                                                 7. Clerc, M., and Kennedy, J. The particle swarm - explosion,
                                                                    stability, and convergence in a multidimensional complex
7 Conclusion                                                        space. IEEE Trans. Evo. Comp., 6(1) 58–73, 2002.
                                                                 8. Eberhart, R. C., Shi, Y. and Kennedy, J: Swarm Intelligence.
   In this work, we have presented a new inspired algorithm         The Morgan Kaufmann Series in Artificial Intelligence. Morgan
based on hybridization between cuckoo search algorithm              Kaufmann, San Francisco, CA, USA, 2001.
and quantum computing called Quantum Inspired Cuckoo             9. Yang, X.-S., and Deb, S., Engineering Optimisation by Cuckoo
Search Algorithm (QICSA). The quantum representation of             Search, Int. J. Mathematical Modelling and Numerical
the solutions allows the coding of all the potential solutions      Optimisation, Vol. 1, No. 4, 330–343, 2010.
with a certain probability. The optimization process consists    10.Barthelemy, P., Bertolotti, J., Wiersma, D. S., 2008. A Lévy
of the application of a cuckoo search dynamics enhanced by          flight for light. Nature, 453, 495-498.
11.Payne, R. B., Sorenson, M. D., and Klitz, K. The Cuckoos,
   Oxford University Press, 2005.
12.Pavlyukevich, I. Lévy flights, non-local search and simulated
   annealing, J. Computational Physics, 226, 1830-1844, 2007.
13.Tein L. H. and Ramli R., Recent advancements of nurse
   scheduling models and a potential path, in: Proc. 6th IMT-GT
   Conference on Mathematics, Statistics and its Applications
   (ICMSA 2010), pp. 395-409, 2010.
14.Jaeger, G. Quantum Information: An Overview. Berlin:
   Springer. 2006
15. Han, K.H. and Kim, J.H.. "Quantum-inspired Evolutionary
   Algorithms with a New Termination Criterion, Hε Gate, and
   Two Phase Scheme," IEEE Transactions on Evolutionary
   Computation, IEEE Press, vol. 8, no. 2, pp. 156-169, April
   2004.
16.Layeb, A., Saidouni, D.E. A New Quantum Evolutionary Local
   Search Algorithm for MAX 3-SAT Problem. In Proceedings of
   the 3rd international Workshop on Hybrid Artificial intelligence
   Systems. Lecture Notes in Artificial Intelligence, vol. 5271.
   Springer-Verlag, Berlin, Heidelberg, (2008)172-179.
17.Draa A., Meshoul S., Talbi H., Batouche A Quantum-Inspired
   Differential Evolution Algorithm for Solving the N-Queens
   Problem. Int. Arab J. Inf. Technol. 7(1):pp. 21-27, 2010.
18.Layeb, A. Hybrid Quantum Scatter Search Algorithm for
   Combinatorial Optimization Problems. In the journal of Annals.
   Computer Science Series , ISSN: 1583-7165, Vol. 8, No.2,
   pp.227-244, 2010
19.Layeb, A., Saidouni, D.E. A New Quantum Evolutionary
   Algorithm with Sifting Strategy for Binary Decision Diagram
   Ordering Problem, in the International Journal of Cognitive
   Informatics and Natural Intelligence. ISSN 1557-3958, Vol. 4.
   No 4, pp. 47-61, December 2010.
20.Pisinger, D.: Where are the hard knapsack problems?
   Computers and Operations Research, Vol.32, N°. 9, pp. 2271-
   2284, 2005.
21.Dexuan Zou, Liqun Gao, Steven Li, Jianhua Wu, Solving 0-1
   knapsack problem by a novel global harmony search algorithm,
   Applied Soft Computing, Volume 11, Issue 2, The Impact of
   Soft Computing for the Progress of Artificial Intelligence,
   Pages 1556-1564, March 2011.
22.M. Vasquez and Y. Vimont, Improved results on the 0–1
   multidimensional knapsack problem, European Journal of
   Operational Research 165 (1), pp. 70–81, 2005.
23.Kong, M and Tian, P. Apply the Particle Swarm Optimization
   to the Multidimensional Knapsack Problem. In the proceedings
   of ICAISC, LNAI 4029, pp. 1140–1149, 2006.
24.Tein L. H. and Ramli R., Recent advancements of nurse
   scheduling models and a potential path, in: Proc. 6th IMT-GT
   Conference on Mathematics, Statistics and its Applications
   (ICMSA 2010), pp. 395-409, 2010.
25.Dhivya, M. Energy Efficient Computation of Data Fusion in
   Wireless Sensor Networks Using Cuckoo Based Particle
   Approach (CBPA), Int. J. of Communications, Network and
   System Sciences, Vol. 4, No. 4, 249-255, 2011.
You can also read