Professional Documents
Culture Documents
33-30-ET-V1-S1 Algorithms Unit2 Module6 Rod Cutting Problem E-Text
33-30-ET-V1-S1 Algorithms Unit2 Module6 Rod Cutting Problem E-Text
Learning Objective
By the end of this module, the learner will be able to:
Time Required
2 hours (approx)
Introduction
A company buys long steel rods and cuts them into shorter rods before
they sell. We assume that each cut is free. Let the price of a rod of
length i is of pi. So, given a rod of length n inches and a table of prices
pi for i = 1, 2, ..n. Below is a sample price table. The Company wants to
know the optimal way to break a rod of certain length n so that the
total price of all pieces is the maximum(optimal) price among all the
possible prices. There will be only one optimal value, but there might
be many optimal solutions. Our goal is to determine one such optimal
solution(rn) to this problem with the optimal value(maximum value in
this case). If price of the rod is large enough, an optimal solution may
require no cutting at all.
Analysis of the problem
We will start to analyze the problem with n=4. There are as many as 8
ways to cut the rod of 4 inches in length, including the way with no cuts
at all. For a rod of length 4 inches, we can cut it at 1 inch distance from
left, 2 inch distance from left and 3 inch distance from left. Below is a
picture that shows all the 8 ways to cut the rod of length 4.
Let us denote a decomposition into pieces using ordinary additive
notation: For example, 7 = 2 + 2 + 3 represents that a rod of length is
decomposed into two rods of length 2 and one of length 3. If an
optimal solution cuts the rods into k pieces, for some then
the optimal decomposition
n = i1 + i2 + ... + ik.
of the rod into pieces of length i1, i2, ..., ik provides maximum
corresponding revenue
rn = pi1 + pi2 + ... + pik.
For our sample problem, the optimal revenue figures ri for i = 1, 2, ...,
10 with corresponding optimal decompositions are shown below.
r1 = 1 [ Optimal Solution : 1 = 1 (no cuts) ]
r2 = 5 [ Optimal Solution : 2 = 2 (no cuts) ]
r3 = 8 [ Optimal Solution : 3 = 3 (no cuts) ]
r4 = 10 [ Optimal Solution : 4 = 2 + 2 ]
r5 = 13 [ Optimal Solution: 5 = 2 + 3 ]
r6 = 17 [ Optimal Solution: 6 = 6 (no cuts) ]
r7 = 18 [ Optimal Solutions : 7 = 1 + 6 or 7 = 2 + 2 + 3 ]
r8 = 22 [ Optimal Solution : 8 = 2 + 6 ]
r9 = 25 [ Optimal Solution : 9 = 3 + 6 ]
r10 = 30 [ Optimal Solution : 10 = 10 ( no cuts ) ]