Lec 16
Lec 16
In this lecture, we consider the 1-dimensional cutting-stock problem. Column generation and
dynamic programming are discussed while we solve the problem.
Using yi ∈ {0, 1}, i = 1, 2, ..., N to denote whether or not the i-th roll is used in a solution and
xij ∈ {0, 1}, j = 1, 2, ..., N to denote whether or not the j-th desired roll (with length wj ∈ {sk :
k = 1, ..., m}) is obtained from the i-th complete roll, we may formulate the integer programming
problem as:
PN
min y
PNi
i=1
s.t. (1): j=1 xij wj ≤ W for i = 1, . . . , N (maximum available per roll)
P
(2): N i=1 xij = 1 for j = 1, . . . , N (all demands must be satisfied)
(3): 0 ≤ xij ≤ yi ∀ i, j (must cut from a complete roll which is used)
(4): xij , yi integers.
If we drop the “integer-valued” requirement in (4), we get an LP relaxation of the original problem
which we can solve to get a lower bound for the IP. Unfortunately, the lower bound obtained is
almost useless. The existence of the feasible solution xij = yi = 1/N ∀i, j implies the optimal
solution we get will always be smaller than or equal to 1.
PN
We can improve this somewhat by changing (1) to (1’): j=1 xij wj ≤ W yi for all i (where the
RHS represents the fraction of each complete roll we actually use). However, even this
Pm formulation
is not great. One can show that the optimal value of the LP relaxation is merely k=1 bk sk /W
(a fairly natural lower bound which one could compute without solving an LP!). Heuristically, one
can make an improvement by starting with a good solution (which possibly does not make use of
all N rolls).
Of course, the quality of the bound produced by the LP relaxation is not the only factor in how
effective a formulation is within a branch-and-bound code. Another factor is the extent to which
solutions are represented multiple times, since then bad fractional solutions have to be ruled out
multiple times within the search. The above formulation is particularly bad in this respect.
1
1.2 An alternate formulation
We switch our attention to one complete roll with length W . We use a column vector Aj to represent
a feasible cutting pattern pj . The i-th component of Aj (aij ) corresponds to the number of pieces
of length si cut in one roll of configuration pj . For pj to be a feasible cutting P pattern, the elements
of Aj must all be non-negative integers and the sum of them must be ≤ W ( m i=1 aij ≤ W ).
Taking W = 10, s1 = 5, s2 = 3 and s3 = 2 as an example, it is easy to verify that the set of all
feasible cutting patterns (expressed in rows) is
{(2, 0, 0), (1, 1, 1), (0, 3, 0), (1, 0, 2), (0, 0, 5), (0, 1, 3), (0, 2, 2), (1, 0, 2)} = A union with all possible
subsets of each of the elements of A. (Aside: Note that the set A consists only of cutting patterns
that could not fit any more rolls with one of the required lengths. We call these cutting patterns
“maximal”. Any subset of an element of A will however have enough space to fit one or more rolls
with one of the required lengths.) Let n be the total number of distinct feasible cutting patterns
(that is, the number of vectors Aj satisfying the constraints) and let xj denote the number of rolls
cut according to the j-th pattern. We may now formulate the 1-dimensional cutting stock problem
as the following IP:
Pn
min xj
Pj=1
n
s.t. j=1 aij xj ≥ bi for i = 1, . . . , m (demand constraint)
xj ≥ 0 integer-valued
Solving the LP-relaxation will give us another lower bound for the IP. Recall that since there are
only m constraints, there are at most m non-zero variables. Given the LP-solution, we may round
up decision variables with fractional values to the next integer and conclude that IP-optimal ≤
LP-optimal + m. (Note that an IP which has ≥ replaced by = in the constraints above but
otherwise remains the same is also valid. But the ≥ format meshes well with the situation where
we only use “maximal” cutting patterns.)
It is not difficult to find an initial basic feasible solution for this problem. Consider the set of
column vectors {Aj }1≤j≤m where aij = bW/sj c if i = j and 0 otherwise. Using this as a basis, we
get the basic feasible solution xj = bj for j = 1, ..., m and 0 otherwise.
We now consider how to generate new patterns (i.e., how to find a non-basic column whose reduced
cost is negative.) Given any basic feasible solution, we can obtain the corresponding dual solution
easily by solving yAB = cB . The reduced cost associated with an arbitrary cutting pattern pj is
equal to cj − yAj = 1 − yAj . Consider the auxiliary optimization problem:
2
P
max Pm i=1 y i ai
m
s.t. i=1 si ai ≤ W
ai ≥ 0, integer-valued ∀i
This problem is referred to as the integer knapsack problem. With the discussion above, one can
see that any feasible solution for the auxiliary problem corresponds to a feasible cutting pattern in
the cutting-stock problem.
Lemma 1 There exists a negative reduced cost column (in the cutting-stock problem) if and only if
the optimal value to this auxiliary IP is > 1. The optimal solution gives a column whose associated
reduced cost is < 0.
Proof: As mentioned, any feasible solution to the integer knapsack problem corresponds to a feasi-
ble cutting pattern in the cutting-stock problem.
PmIf the optimal solution for the knapsack problem
is > 1 , its reduced cost would be equal to 1 − i=1 y i ai < 0. Hence we may enter this column into
the basis (in the cutting stock problem). If the integer knapsack problem has an optimal solution
≤ 1, all the reduced costs are non-negative and we may conclude that we have an optimal solution
for the cutting-stock problem.
Let Fi (v) denote the maximum value obtained from the integer knapsack problem where W is
replaced by v and m is replaced by i above. The ultimate goal here is to find out what Fm (W )
is. We first try to write an expression for Fi (v). Given a roll of paper with length v, we start by
cutting rolls with length si from it. The number of rolls with length si one could get is any integer
ai between 0 and bv/si c. Fixing ai , we then try to cut rolls with lengths sk , k = 1, ..., i−1 optimally
from the v − ai si which remains. Therefore, we can express Fi (v) using the following equation:
This gives a recursive relationship that links Fi with Fi−1 . Because it is very easy to compute F1 (v)
(F1 (v) = y i bv/si c if y i ≥ 0 and 0 otherwise), we have a way of computing Fm (W ). In each iteration
i, compute Fi for all v. These values depend only on the input data and the values of Fi−1 already
computed. By storing the maximization of each entry, we may backwards construct the optimal
solution we need (the cutting pattern with the most negative reduced cost).