 Research
 Open access
 Published:
Solving the largescale knapsack feasibility problem using a distributed computation approach to integer programming
Applied Informatics volume 4, Article number: 18 (2017)
Abstract
The knapsack feasibility problems have been intensively studied both because of their immediate applications in industry and financial management, but more pronounced for theoretical reasons, as knapsack problems frequently occur by relaxation of various integer programming problems. In this work, the largescale knapsack feasibility problem is divided into two subproblems. The first subproblem is transforming of the knapsack feasibility problem into a polytope judgement problem which is based on lattice basis reduction. In the next subproblem, a distributed implementation of Dang and Ye’s fixedpoint iterative algorithm is introduced to solve the polytope judgement problem generated in the former subproblem. Compared with the branch and bound method, numerical results show that this distributed fixedpoint method is effective.
Introduction
The knapsack problems, which have been intensively studied since the pioneering work of Dantzig (1957), have played an important role in industry, financial management, and so on. What is more, various integer programming problems can be relaxed to the knapsack problems. Therefore, the computing of the knapsack problems has been becoming the mark level of the computation in integer problems. To tackle this problem, many new contributions have been made in the following literature. A heuristic based upon genetic algorithms has been developed for multidimensional knapsack problem in paper (Chu and Beasley 1998). Based on the harmony search method, a new binarycoded version of harmony search (Kong et al. 2015) is presented to solve largescale multidimensional knapsack problem. In this proposed algorithm, attention is paid to the probability distribution rather than the exact value of each decision variable, and the concept of mean harmony is developed in the memory consideration. Inspired by region partition of items, an effective hybrid algorithm based on greedy degree and expectation efficiency is constructed in the paper (Lv et al. 2016). Combining advanced features both from the path relinking method and the responsive threshold search algorithm, the first evolutionary path relinking approach is introduced in paper (Chen et al. 2016) for solving the quadratic multiple knapsack problem approximately.
In this paper, the distributed Dang and Ye’s fixedpoint iterative method (Dang and Ye 2015) is implemented to solve largescale knapsack feasibility problem. This fixedpointed algorithm has been extended to airline disruption problem and other problems. The idea of solving multiple fleet airline disruption problems using a distributed computation approach to integer programming has been developed in the previous work (Wu et al. 2017a). The paper (Wu et al. 2017b) uses the Dang and Ye’s iterative fixedpoint method for integer programming to generate feasible flight routes which are used to construct an aircraft reassignment in response to the grounding of one aircraft. Some computing of Nash equilibria methods are derived from this Dang and Ye’s algorithm, such as the method from the papers (Wu et al. 2014, 2015). Some other engineering problems (Zhang et al. 2015, 2016) can also use this fixed point method to solve. The Dang and Ye’s fixedpointed method can be explained as follows.
Let \(\varvec{P}=\{\varvec{x}\in R^{n}\varvec{Ax}+\varvec{Gw}\le \varvec{b},{\text{for}}\, {\text{some}}\;\varvec{w}\in R^{p}\},\) where \(\varvec{A}\in R^{m\;\times \;n}\) is an \(m\;\times\; n\) integer matrix with \(n\ge 2,\;\varvec{G}\in R^{m\;\times\; p}\) an \(m\;\times \;p\) matrix, and \(\varvec{b}\) a vector of \(R^{m}.\)
Let \(x^{\text{max}}=(x^{\text{max}}_{1},\,x^{\text{max}}_{2},\,\ldots,x^{\text{max}}_{n})^{T}\) with \(x^{\text{max}}_{j}={\text{max}}_{x\in P}x_{j},\, j=1,2,\ldots ,n\) and \(x^{\text{min}}=(x^{\text{min}}_{1},x^{\text{min}}_{2},\ldots , x^{\text{min}}_{n})^{T}\) with \(x^{\text{min}}_{j}={\text{min}}_{x\in P}x_{j},\, j=1,2,\ldots ,n.\) Let \(D(P)=\left\{\varvec{x}\in Z^{n}\varvec{x}^{l}\le \varvec{x} \le \varvec{x}^{u}\right\},\) where \(\varvec{x}^{l}=\lfloor \varvec{x}^{\text{min}}\rfloor\) and \(\varvec{x}^{u}=\lfloor \varvec{x}^{\text{max}}\rfloor .\) For \(\varvec{z}\in R^{n}\) and \(k\in N_{0},\) let \(P(\varvec{z},\, k)=\{\varvec{x}\in Px_{i}=z_{i}, \,1\le i \le k,\, \text{and} \,x_{i}\le z_{i},\, k+1\le i \le n\}.\)
Given an integer point \(y\in D(P)\) with \(y_{1}\, >\,x_{i}^{l},\) Dang and Ye (2015) developed a fixedpoint iterative algorithm which is presented in Fig. 1.
In Dang and Ye’s algorithm for integer problem, a definition of an increasing mapping, which is from a finite lattice into itself, is developed. Any integer point, which is outside the P, is mapped into the first point in P that is smaller than them in the lexicographical order of \(x^{l}.\) All the integer points, which are inside the polytope, are the fixed points through this increasing mapping. Given an initial integer point, the method either proves there is no such point by a limited number of iterations or generates an integer point in the polytope. For more proofs and details about this iterative algorithm, one can consult the paper (Dang and Ye 2015). An appeal feature of this fixedpoint iterative method, which will be used in this paper, is that it can be easily implemented in a distributed way.
The rest of the paper is organized as follows. Some details of transformation of the knapsack feasibility problem into a polytope judgement problem, which is based on a LLL basis reduction, will be presented in “Transformation of the knapsack feasibility problem into a polytope judgement problem” section. The computation details and numerical results will be given in “Distributed computation and numerical results” section. Some conclusions and future work will be discussed in the last “Conclusions and future work” section.
Transformation of the knapsack feasibility problem into a polytope judgement problem
In order to analyze the knapsack feasibility problem easily, this problem is defined as follows (Dantzig 1957).
Definition 1
Find a 0–1 integer solution of \(p^{T}x=d,\) where \(p=(p_{1},p_{2},...,p_{n+1})^{T} > 0\) and \(p_{i} \ne p_{j}\) for all \(i \ne j\)
After analysis, one can see this knapsack problem is one special example of the market split problem. To convert this problem into an equivalent problem of determining whether there is an integer point in a fulldimensional polytope given by \(P=\{x\in R^{n}Ax \le b\},\) we can apply the LLL basis reduction algorithm (Khorramizadeh 2012) which has been described in paper (Wu et al. 2013).
Therefore, this knapsack feasibility problem can be formulated equivalently as follows:
Does there exist a vector
The solving of the Definition 1 can be transformed to judge whether there exists an integer point in the polytope (1). The distributed iterative algorithm, developed by Dang and Ye (2015), has a good performance to judge whether the polytope (1) has an integer point or not.
Distributed computation and numerical results
One master computer combined with several slave computers is equipped to implement the distributed computation. The master computer takes charge of solving the solution space of the polytope, dividing the solution space to segments, sending the segments to the slave computers, receiving the computation result from the slave computers, and exporting the computation result. Each slave computer receives the segment, judges whether there exits an integer point in its segment using Dang and Ye’s fixedpoint iterative method, and sends its result to the master computer. The outline of the distributed computation process in this paper is illustrated in Fig. 2
In present study, the distributed computation system consists of three computers which are OptiPlex 330 with two processors. The programs are written in C++ language. Subsegments which are distributed by the master computer are mutually independent. Therefore, subsegments can be solved simultaneously. Luc Lapointe (1994) has been adopted to establish a communication network among the computers. The other settings and parameters are taken the same as the research (Wu et al. 2013). Message Passing Interface (MPI) is a tool to establish a stable communication network between the master computer and the slave computers in the distributed computation. The pseudocode of building the distributed network by MPI is described in Fig. 3.
In the following case study, two methods have been employed to solve the same example, respectively. One is distributed fixedpoint method, while the other is the branch and cut method (Padberg and Rinaldi 1991) which is a classical algorithm for integer programming. The numerical results are shown in the following Table 1. For simplification, some symbols are defined as follows.
 NumLPs::

The number of iterations for a certain algorithm
 BC::

The branch and cut method
From Table 1, we can see that the distributed algorithm is superior to the branch and cut method regarding the number of iterations.
Conclusions and future work
In this paper, a new method has been used to solve the knapsack feasibility problem. This method is divided into two steps. In the first step, the knapsack feasibility problem is transformed into a polytope judgement problem based on a LLL basis reduction. In the other step, a distributed fixedpoint method for integer programming is implemented to solve the polytope judgement problem. Compared with the branch and cut method which is considered to be the best algorithm for the problem of this kind, numerical results show that this distributed fixedpoint method is promising.
However, the dimension of instances is low and the number of slave computers in the numerical experiment is only three. The potential ability of this method has not been fully expressed. In the next step, these two shortcomings will be settled. With large number of slave computers, one can be confident to believe that the numerical results will be more better. Additionally, the distributed method is easy to be extended to solving other problems.
References
Chen Y, Hao JK, Glover F (2016) An evolutionary path relinking approach for the quadratic multiple knapsack problem. Knowl Based Syst 92:23–34
Chu PC, Beasley JE (1998) A genetic algorithm for the multidimensional knapsack problem. J Heuristics 4(1):63–86
Dang C, Ye Y (2015) A fixed point iterative approach to integer programming and its distributed computation. Fixed Point Theory Appl 2015(1):1–15
Dantzig GB (1957) Discretevariable extremum problems. Oper Res 5(2):266–288
Khorramizadeh M (2012) Numerical experiments with the lllbased hermite normal form algorithm for solving linear diophantine systems. Int J Contemp Math Sci 7(13):599–613
Kong X, Gao L, Ouyang H, Li S (2015) Solving largescale multidimensional knapsack problems with a new binary harmony search algorithm. Comput Oper Res 63:7–22
Lv J, Wang X, Huang M, Cheng H, Li F (2016) Solving 0–1 knapsack problem by greedy degree and expectation efficiency. Appl Soft Comput 41:94–103
Luc Lapointe JM (1994) Message Passing Interface Forum. MPI: A Message Passing Interface Standard. J combin theory Ser A 112:44–81
Padberg M, Rinaldi G (1991) A branchandcut algorithm for the resolution of largescale symmetric traveling salesman problems. SIAM Rev 33(1):60–100
Wu Z, Dang C, Zhu C (2013) Solving the market split problem using a distributed computation approach. In: 2013 IEEE international conference on information and automation (ICIA), IEEE, pp 1252– 1257
Wu Z, Dang C, Karimi HR, Zhu C, Gao Q (2014) A mixed 01 linear programming approach to the computation of all purestrategy nash equilibria of a finite nperson game in normal form. Math Probl Eng 2014:8. https://doi.org/10.1155/2014/640960
Wu Z, Dang C, Hu F, Fu B (2015) A new method to finding all Nash equilibria. In: International conference on intelligent science and big data engineering, pp 499–507
Wu Z, Li B, Dang C (2017a) Solving multiple fleet airline disruption problems using a distributedcomputation approach to integer programming. IEEE Access 5:19116–19131
Wu Z, Li B, Dang C, Hu F, Zhu Q, Fu B (2017b) Solving long haul airline disruption problem caused by groundings using a distributed fixedpoint computational approach to integer programming. Neurocomputing 269:232–255. https://doi.org/10.1016/j.neucom.2017.02.091
Zhang Y, Lei ZX, Zhang LW, Liew KM, Yu JL (2015) Nonlocal continuum model for vibration of singlelayered graphene sheets based on the elementfree kpRitz method. Eng Anal Bound Elem 56:90–97
Zhang Y, Zhang LW, Liew KM, Yu JL (2016) Free vibration analysis of bilayer graphene sheets subjected to inplane magnetic fields. Compos Struct 144:86–95
Authors' contributions
The authors discussed the problem and the solutions were proposed all together. All authors participated in drafting and revising the final manuscript. All authors read and approved the final manuscript.
Competing interests
The authors declare that they have no competing interests.
Availability of data and materials
Data sharing is not applicable to this article as no datasets were generated or analyzed during the current study.
Funding
This work was partly supported by National Nature Science Foundation of China under Grants 71471091, 71271119, and 61672371; Research Foundation of USTS under Grants No. XKQ201517; Jiangsu Provincial Department of Housing and UrbanRural Development under Grants No. 2017ZD253; Natural science fund for colleges and universities in Jiangsu Province under Grants No.17KJD110008; Fundamental Research Funds for the Central Universities under Grant No.30917011339; and Natural Science Foundation of Jiangsu Province under Grant No. BK20170820.
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Wu, Z., Hu, F. & Fu, B. Solving the largescale knapsack feasibility problem using a distributed computation approach to integer programming. Appl Inform 4, 18 (2017). https://doi.org/10.1186/s4053501700470
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s4053501700470