An effective GRASP and tabu search for the 0–1 quadratic knapsack problem

https://doi.org/10.1016/j.cor.2012.11.023Get rights and content

Abstract

As a generalization of the classical 0-1 knapsack problem, the 0-1 Quadratic Knapsack Problem (QKP) that maximizes a quadratic objective function subject to a linear capacity constraint is NP-hard in strong sense. In this paper, we propose a memory based Greedy Randomized Adaptive Search Procedures (GRASP) and a tabu search algorithm to find near optimal solution for the QKP. Computational experiments on benchmarks and on randomly generated instances demonstrate the effectiveness and the efficiency of the proposed algorithms, which outperforms the current state-of-the-art heuristic Mini-Swarm in computational time and in the probability to achieve optimal solutions. Numerical results on large-sized instances with up to 2000 binary variables have also been reported.

Introduction

The binary Quadratic Knapsack Problem (QKP) introduced by Gallo et al.[6] is a generalization of the classical 0-1 knapsack problem, which maximizes a quadratic objective function subject to a linear capacity constraint. The QKP can be formulated as{maxi=1nj=1ipijxixjs.t.j=1nwjxjcxj{0,1},j=1,...,n,where {pij}Ζ+n×n is a symmetric profit matrix, wjZ+(j=1,...,n) is the weight of item j and cZ+ is the capacity of knapsack. xj{0,1}(j=1,...,n) is a binary decision variable, which is equal to 1 if item j is selected and 0 otherwise.

The QKP has inspired intensive studies due to its simple structure but NP-hardness in computational complexity theory and its wide applicability in graph theory problems (max clique [4], weighted maximum b-clique problem [15]), in facility location problems [19], [20], in complier design [11] and in separation of valid inequalities (rounded capacity inequalities, path inequalities and depot capacity inequalities) for vehicle routing problems [26].

Different techniques and approaches have been proposed for the QKP. To our best knowledge, most of the exact methods are designed under a branch-and-bound (B&B) framework, where numerous upper bounds have been derived by using upper planes [6], linearization [11], [1], reformulation [3], Lagrangian relaxation [3], Lagrangian decomposition [14], [2], and semidefinite programming [10]. It is worth mentioning that the exact algorithm developed by Pisinger et al. [17] based on Lagrangian relaxation\decomposition and aggressive reduction is one of the most effective exact algorithms for the QKP up-to-date, in which some large-sized instances with up to 1500 binary variables had been solved to optimality within a reasonable time. Recently, Létocart et al. [13] proposed a reoptimization technique to accelerate the resolution of each independent sequence of 0-1 linear knapsack problems induced by the Lagrangian relaxation\decomposition [2], [3]. Computational results on randomly generated instances with up to 600 binary variables were reported.

Heuristic methods have also been proposed for the sake of practical interest, which require finding good feasible solution in high probability within reasonable time. Hammer and Rader [9] proposed a linearization and exchange (LEX) heuristic, which firstly finds a good initial solution by an approximation method and then improves this solution through an exchange method. Julstorm [12] compared the performance of several heuristics, including greedy, genetic and greedy genetic algorithm for the QKP. A dynamic programming heuristic was recently proposed by Fomeni and Letchford [27]. The Mini-Swarm algorithm proposed by Xie and Liu [21] is the current state-of-the-art heuristic, which computationally proves to be highly effective and capable of solving to optimality a very high percentage (94.9%) of Billionnet and Soutif's benchmark instances [2] with up to 200 binary variables in a very reasonable time. Approximation algorithms had also been proposed for special cases of QKP. Rader and Woeginger [28] developed a FPTAS for the special case where all profits pij0 and where the underlying graph is so-called edge series parallel. Recently, Kellerer and Strusevich [29], and Xu [30] proposed a FPTAS for the symmetric quadratic knapsack problem (SQKP), where the objective function can be separated into two terms, one depending on the variables xj, and the other depending on the variables (1xj), j=1,...,n. For a systematic survey on resolution methodologies of QKP and its applications, we recommend readers to refer [16].

Note that those large-sized benchmark instances of Pisinger et al. [17] (1500 binary variables) and Létocart et al. [13] (600 binary variables) were randomly generated and tested. They had not been recorded by the authors. (We had contacted Prof. Pisinger and Porf. Létocart). To push ahead the study on the resolution of QKP, the objective of this paper is thus to propose an effective heuristic to near optimal solution (or lower bound) for the QKP, since high quality solution is very necessary in exact algorithm development, especially, for solving those large-sized instances.

The Greedy Randomized Adaptive Search Procedures (GRASP) proposed by Feo and Resende [5] is an iterative multi-start process for combinatorial optimization problems, which has the characteristic of easy implementation. The GRASP has been applied successfully in a wide range of problem areas [18], [22]. In this paper, we propose a new memory based GRASP for the QKP. Different from those memory-based mechanisms proposed in literatures, for example Fleurent and Glover [23], and Prais and Ribeiro [24], in the construction phase of the proposed GRASP, the algorithm tends to select those high quality elements that have relatively little been selected in local optima obtained in previous GRASP iterations. A short-term memory tabu search is also proposed to further improve the best solution found so far by GRASP. Under the observation that the local optima have some similarities, the GRASP is restarted with those items that have always been selected in previously obtained local optima selected while in constructing new feasible solution in subsequent construction phase of GRASP iterations. The restart of GRASP is terminated if the best solution found so far has not been improved for a given number of consecutive restarts. By doing so, we can on the one hand reduce computational efforts in building new initial solution for local search phase of GRASP, and on the other hand focus more attention on the solution space with those items selected. Numerical experiments on benchmark instances demonstrate the effectiveness and the efficiency of the proposed algorithm, which outperforms the state-of-art heuristic Mini-Swarm proposed by Xie and Liu [21] in computational time and in the probability to attain optimal solutions. Numerical results on randomly generated instances with up to 2000 binary variables have also been reported. Note in literatures of QKP, the most large-sized benchmark instances have 1500 binary variables [17].

The remainder of the paper is organized as follows: the fundamental principles of GRASP are introduced in Section 2. The proposed memory based GRASP with restart is discussed in Section 3. A tabu search procedure is described in Section 4. Computational results on benchmark instances and on randomly generated instances are reported in Section 5. Finally, a conclusion is given in Section 6.

Section snippets

Fundamental GRASP

The Greedy Randomized Adaptive Search Procedures (GRASP) originally proposed by Feo and Resende [5] is an iterative multi-start process. Within each of GRASP iteration, it contains two phases:

The first phase (Construction Phase) builds a feasible solution in an adaptive and iterative manner. At each of its iteration, one element is selected randomly from a Restricted Candidate List (RCL) and added to the current solution. The RCL is a set of high quality ordered elements with respect to a

Memory-based GRASP

Since the iterations of fundamental GRASP are independent, two different GRASP iterations may produce the same feasible solution in the construction phase as well as the same local optimum in the local search phase. To avoid redundant work, memory-based mechanisms had been introduced by many authors. For example, Fleurent and Glover [23] introduced long-term memory mechanism in GRASP construction that makes use of a set of elite solutions found during the GRASP iterations. Prais and Ribeiro [24]

Tabu search

To further improve the best solution found so far by GRASP, a simple tabu search algorithm is proposed to overcome the limitations of local optimality ([7], [8]). Tabu restrictions are used to prevent any solution visited recently to be revisited. At each iteration of the tabu search procedure, the best admissible non-tabu shift or swap move is performed. The item involved in such move is declared as tabu-active, which is forbidden to be removed in the next t iterations. t is the tabu-tenure

Numerical results

The proposed GRASP and tabu search algorithm have been coded in c++ with Dev c++ and run on an IBM R52 desktop with Pentium 1.73 GHz processor and 2 GB RAM. The computational experiments were carried out on a collection of benchmark instances generated by Billionnet and Soutif [2] with 100, 200 and 300 binary variables (http://cedric.cnam.fr/∼soutif/QKP/QKP.html) and on some randomly generated instances with up most 2000 binary variables (these instances are available from the authors). Three

Conclusions

In this paper, a memory based GRASP with restart and a tabu search algorithm are proposed to search near optimal solutions for the QKP. Numerical tests on benchmark instances demonstrate the effectiveness and efficiency of the proposed GRASPr and the (GRASP+tabu)r, which outperform the state-of-the-art heuristic Mini-Swarm in terms of the success ratio, relative percentage deviation and computational time. Numerical results on randomly generated instances with up most 2000 binary variables have

Acknowledgments

The authors are grateful to the referees for their valuable and insightful comments and Prof. David Pisinger and Prof. Lucas Létocart in providing help in completing numerical experiments.

References (30)

  • G. Gallo et al.

    Quadratic knapsack problem

    Mathematical Programming Study

    (1980)
  • F. Glover

    Tabu search and adaptive memory programming—advances, applications and challenges

  • F. Glover et al.

    Tabu search

    (1997)
  • P.L. Hammer et al.

    Efficient methods for solving quadratic 0-1 knapsack problem

    INFOR

    (1997)
  • C. Helmberg et al.

    A semidefinite programming approach to the quadratic knapsack problem

    Journal of Combinatorial Optimization

    (2000)
  • Cited by (32)

    • Knapsack problems — An overview of recent advances. Part II: Multiple, multidimensional, and quadratic knapsack problems

      2022, Computers and Operations Research
      Citation Excerpt :

      The algorithm was enhanced by considering specific item ordering and a tie-breaking rule, giving solutions very close to the optimal ones. Toumi et al. (2015) introduced two variable neighborhood search heuristics and successfully compared them with the method in Yang et al. (2013). Cunha et al. (2016) investigated two Lagrangian heuristics and compared them with the method in Fomeni and Letchford (2014), showing that all these approaches provide good quality solutions.

    • Dual mean field search for large scale linear and quadratic knapsack problems

      2017, Physica A: Statistical Mechanics and its Applications
    View all citing articles on Scopus
    View full text