ISSN 1990-4789, Journal of Applied and Industrial Mathematics, 2018, Vol. 12, No. 2, pp. 264–277.
Pleiades Publishing, Ltd., 2018.
Original Russian Text
A.B. Khutoretskii, S.V. Bredikhin, A.A. Zamyatin, 2018, published in Sibirskii Zhurnal Industrial’noi Matematiki, 2018, Vol. XXI, No. 2,
A Lexicographic 0.5-Approximation Algorithm
for the Multiple Knapsack Problem
A. B. Khutoretskii
, and A. A. Zamyatin
Novosibirsk State University, ul. Pirogova 2, Novosibirsk, 630090 Russia
Institute of Computational Mathematics and Mathematical Geophysics,
pr. Akad. Lavrent’eva 6, Novosibirsk, 630090 Russia
Received October 12, 2017
Abstract—We present a 0.5-approximation algorithm for the Multiple Knapsack Problem (MKP).
The algorithm uses the ordering of knapsacks according to the nondecreasing of size and the two
orderings of items: in nonincreasing utility order and in nonincreasing order of the utility/size ratio.
These orderings create two lexicographic orderings on A × B (here A is the set of knapsacks and B
is the set of indivisible items). Based on each of these lexicographic orderings, the algorithm creates
a feasible solution to the MKP by looking through the pairs (a, b) ∈ A × B in the corresponding
order and placing item b into knapsack a if this item is not placed yet and there is enough free space
in the knapsack. The algorithm chooses the best of the two obtained solutions. This algorithm is
0.5-approximate and has runtime O(mn) (without sorting), where m and n are the sizes of A and B
Keywords: multiple knapsack problem, lexicographic ordering, approximation algorithm,
The Multiple Knapsack Problem (MKP) consists in the following (for example, see [1, 2]):
There is a set A of knapsacks, |A| = m,andasetB of indivisible items, |B| = n; it is necessary to
place in the knapsacks the items of maximum total utility.
Such a problem arises, for example, when we need to distribute the computing resource in a multi-
The problem is NP-complete [3, Theorem 15.8], and therefore the approximate algorithms for solving
it are of interest. in , Tt is proved in  that if P = NP then there is no fully polynomial time
approximation scheme (FPTAS) for the MKP even for m =2. A polynomial time approximation scheme
(PTAS) for the MKP is also constructed there, which allows us to construct a (1 − ε)-approximate
solution with the runtime of O(n
) (this estimate of the runtime is given in ).
Looking through the pairs (a, b) ∈ A × B in some order and placing item b in knapsack a if the item
has not yet been placed and there is enough space in the knapsack, it is possible to construct a feasible
solution of the MKP. Various orderings of pairs generate a family of greedy algorithms for the MKP; we
call them packing.Thedeﬁnition of packing can be easily modiﬁed for the problems with divisible items
(for example, the linear relaxation of the MKP): for each next pair (a, b) the maximum admissible part of
item a (taking the previous loading into account) is packed in knapsack b. The total order relations ≺
on A and B, respectively, determine the lexicographic ordering on A × B and, so, some packing.
The special case of the MKP for m =1is the Knapsack Problem, the KP. For the linear relaxation of the