Knapsack Problems: I. History
Knapsack Problems: I. History
Knapsack Problems: I. History
I. History
1.1 Introduction
Knapsack Problems have been intensively studied since the pioneering work of
Dantzig in the late 50’s, 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 such
application, we need to solve a Knapsack Problem each time a bounding function is derived,
demanding extremely fast solution techniques.
The family of Knapsack Problems all requires a subset of some given items to be
chosen such that the corresponding profits sum is maximized without exceeding the capacity
of the knapsack(s). Different types of Knapsack Problems occur, depending on the
distribution of the items and knapsacks: In the 0-1Knapsack Problem each item may be
chosen at most once, while in the Bounded Knapsack Problem we have a bounded amount
of each item type. The Multiple-choice Knapsack Problem occurs when the items should be
chosen from disjoint classes and, if several knapsacks are to be filled simultaneously, we get
the Multiple Knapsack Problem. The most general form is the Multi-constrained Knapsack
Problem, which basically is a general Integer Programming (IP) Problem with positive
coefficients.
We assume, without loss of generality, that all input data are positive integers.
Introducing the binary decision variables xj, with xj = 1 if item j is selected, and xj =0
otherwise, we get the integer linear programming (ILP) model:
n
maximize z pjxj
j 1
n
subject to w
j 1
j xj c
x j 0 ,1 , j 1,...,n,
where all data are positive integers. In the following we will denote the Knapsack Problem
by KP. Without loss of generality we may assume that wj <c for j = 1,...,n, to ensure that
n
each item considered fits into the knapsack, and that p
j 1
j c to avoid trivial solutions.
Many industrial problems can be formulated as Knapsack Problems: Cargo loading, cutting
stock, project selection, and budget control to mention a few examples. Many combinatorial
problems can be reduced to KP, and KP arises also as a subproblem in several algorithms of
integer linear programming.
Subset-sum problem
The maximum subset sum problem has a wide range of important applications.
Example fields are material, transportation, television and radio industries, and
computer system resource allocation. In addition, the problem also models static job
scheduling in a multiprogrammed parallel system. In such a system, there are M
identical processors. Assume that we are given a set S of n jobs J1, J2,…, Jn, where
job Ji requires xi processors for parallel execution. The problem here is to find a
subset S’ of jobs to execute simultaneously in such a way that system utilization is
maximized. Furthermore, we try to schedule as many jobs as possible to maximize
system throughput.
Application 1
Source:
Shih, W., 1979. A branch and bound method for the multiconstraint zero-one knapsack problem.
Journal of the Operational Research Society, 30, 369-378.
Description:
Maximize: 84 x1 + 34x2 + 31x3 + 14x4 + 67x5 + 65X6 + 86x7 + 98X8 + 50x9 + 7x10
Subject to (1) 20 x1 + 12 x2 + 7x3 + 75x4 + 93x5 + 21 x6 + 75x7
+ 67 x8 + 34x9 + 28x10 190 lbs.
(2) 41 x1 + 51 x2 + 24 x3 + 40 x4 + 84 x5 + 70 x6 + 34 x7
+ 41 x8 + 49 x9 + 27 x10 250 cubic feet
and xj = 0,1; j=1,2,...,10;
Description:
For every value of n = 10, 20, 40, 60, 80, 100 and c = 100, 120, 150, 200, 300,
400, 500, item weights were generated in each of the three intervals [a, 99],
with a= 1, 20 and 50, according to a discrete uniform distribution, and
n
discarding instances not satisfying w
j 1
j 2c . No instances were generated for
n
the combination n = 10 and c = 500 since w
j 1
j 2c cannot be satisfied in this
Description:
Four types of randomly generated data instances are considered as listed
below. Each type will be tested with data-range R = 100, 1000, 10000 for
different problem sizes n = 50, 100, 200, 500, 1000, 2000, 5000, 10000,
1
20000, 50000, 100000. The capacity c is chosen as c w n c.
2
• uncorrelated data instances (uc): pj and wj are randomly distributed in [1, R];
• weakly correlated data instances (we): wj randomly distributed in [1, R] and Pj
1 1
randomly distributed in w j R, w j R such that p j 1 ;
10 10
• strongly correlated data instances (sc): wj randomly distributed in [1, R] and
pj = wj + 10;
• subset-sum data instances (ss): wj randomly distributed in [1, R] and pj =wj.
For each problem type, size and range, we construct and solve 50 different
data instances. The presented results are average values. If some data
instance was not solved within 1 hour the field is marked with a ,_,.
Application 4
Source:
Soma, N.Y., Toth, P., 2002. An exact algorithm for the subset sum problem. European journal of
operation research, 136, 57-66.
Description:
Problem P(E). Given a postitive integer E, the weights wi’s are randomly distributed in [1, 10E] and
c=[n10E/4]. We consider E=3 and E=6
Problems even-odd. wi’s even, randomly distributed [1,104], c=2[n104/8]+1 (odd).
Problems F2(E, v, ). Given three positive integers E, v, , find a pair (a0, a1) =1,
c=(a0-1)( (a1-1)-1, and ( v)10 E c 10 E . We consider E=3, v=5, =50. The
coefficients wi’s are defined by:
c
w2i 1 1 i 1 mod a0 ,
a 0
c
w2i 1 1 i 1 mod a1 ,
a1
i 1,..., n / 2.
Problems F2(E, v, ) have no optimal solution of value z=c, indeed it is well known that
a0y1+a1y2=(a0-1)( (a1-1)-1, gcd (a0, a1) =1 has no positive integer solutions (in y 1
and y2), since it is the exact Frobenius bound for the linear Diophantine
equation with two variable. Incidentally, it is also well known that the
determination of such bound is NP-Hard.
IV. Reference
[1] Li, K., 1998. Average-case performance analysis of an approximation algorithm for maximum
subset sum using recurrence relations. Computers math, 36(6), 63-75.
[2] Martello,S., Toth, P. 1990. Knapsack problems: algorithms and computer implementations.
John Wiley & Sons.
[3] Martello,S., Pisinger, D., 2000. New trends in exact algorithms for the 0-1 knapsack problem.
European journal of operational research, 123, 325-332.
[4] Pisinger, D., 1995. Algorithm for knapsack problem.
[5] Pisinger, D., 1995 An expanding-core algorithm for the exact 0-1 Knapsack problem. European
journal of operational research, 87(1), 175-187.
[6] Shih, W., 1979. A branch and bound method for the multiconstraint zero-one knapsack problem.
Journal of the Operational Research Society, 30, 369-378.
[7] Sinha, P., Zolters A.A., 1979. The multiple-choice knapsack problem. Operation research,
27(3), 503-515.
[8] Sinuany-Stern, Z., Weiner, I., 1994. The one dimensional cutting stock problem using two
objectives, Journal of the operational research society, 45(2), 231-236.