Discrete Dynamic Programming Problem: Pt. Ravishankar Shukla University, Raipur
Discrete Dynamic Programming Problem: Pt. Ravishankar Shukla University, Raipur
Contents
1 Introduction
3 Question
5 References
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
Introduction
Making use of above notations, the recursive relationship (for minimization) for state
sn at Stage n may be stated as under:
Question
An electronic device consists of four components, each of which must be functional for
the system to function. The system reliability can be improved by installing parallel
units in one or more components. The reliability of components, R, with one, two, or
three parallel units, and the corresponding cost, C , are given below. The maximum
amount available for this device is 100. The problem is to determine the number of
parallel units in each component.
Number of Components
Parallel Units 1 2 3 4
R C R C R C R C
1 0.70 10 0.50 20 0.70 10 0.60 20
2 0.80 20 0.70 40 0.90 30 0.70 30
3 0.90 30 0.80 50 0.95 40 0.90 40
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
Solution: The reliability of the given electronic device is the product of the reliabilities
of each of its four components. If Rj and ui represent the reliability of the component
j and units in parallel in component i, then the reliability of the whole system,
consisting of n components in series, will be:
R1 u1 × R2 u2 × · · · × Rn un
Since the objective is to maximize the reliability of the system, the problem can be
stated as:
Maximize Z = R1 u1 × R2 u2 × · · · × Rn un
subject to the constraint
c1 u1 + c2 u2 + · · · + cn un ≤ C
where
cj uj = cost of component j
C = total capital available
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
Since the electronic device consists of n = 4 components, for solving this problem
consider each component as a stage. The state at any stage will be the capital to be
allocated. Let us adopt the following notations:
xj = capital allocated to stage j, through first stage inclusive
fj (xj ) = return when available capital cj is allocated optimally over n stages
(components)
Rj uj = reliability of component j (j = 1, 2, 3, 4)
Now the recursive equation can be expressed as:
The electronic device in this problem will consist of at least one unit in each
component. Thus, the range of investment, xj (j = 1, 2, 3, 4) in each case will be as
follows:
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
The constraints:
In Table 4, at stage 4, the value of return function f4 (x4 ) is the maximum, i.e. 0.308
at x4 = 100, and u4 = 3. This makes x3 = 100 − 40 = 60. In Table 3, x3 = 60
corresponds to u3 = 1, and we are left with x2 = . . . 60 − 10 = 50. In Table 2, x2 = 50
corresponds to u2 = 2, and we are left with x1 = 50 − 40 = 10. In Table 1, x1 = 10
corresponds to u1 = 1.
Hence, for maximum reliability, the device must have 1, 2, 1, and 3 units in
components 1, 2, 3, and 4, respectively, in order to attain a maximum reliability of
0.308 or 30.8 per cent.
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
A vessel is to be loaded with stocks of 3 items. Each unit of item ’n’ has a weight wn
and value vn . The maximum cargo weight the vessel can take is 5, and the details of
the three items are as follows:
Item (n) Weight (wn ) in tons Value (vn )
1 1 30
2 3 80
3 2 65
Develop the recursive equation for the above case and find the most valuable cargo
load without exceeding the maximum cargo weight by using dynamic programming.
[B.Tech. (Nov.), Hyderabad Univ. 2010]
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
Solution
We have to determine how many units of three items are to be loaded. So, it is a
three-stage problem. Define:
n: the stage (item) under consideration,
xn : the number of units of item of type n (n = 1, 2, 3),
W : maximum capacity available,
sn : state at stage n, indicating the weight available.
(
Let fn (sn ) denote the value of optimal allocation for the three types of items. If fn sn )
(
be the value associated with optimum solution fn sn ), n = 1, 2, 3; then
where, pn (xn ) denote the expected value obtained from allocation of xn units of weight
to item ’n’.
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
For one-stage problem (i.e., for one item cargo loading), we write
f1 (s1 ) = max{30x1 },
x1
h i
W
5
where the largest value of x1 is w1 = 1 = 5. We have the following tabular
computations:
5
For 2-stage problem, the largest value of x2 is 3 = 1, and
5
For 3-stage problem, the largest value of x3 is 2 = 2, and
Given W = 5, the optimum solution, therefore, is x3∗ = 2. This gives the allocation of
2 units of item 3 (weighing 2 tons). The remaining 5 − 2 × 2, i.e., one ton is allocated
in an optimal manner according to stage 2.
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
For this quantity, we have x2∗ = 0, so that no unit of item 2 is included. Proceeding to
stage 3, the optimal allocation is x1∗ = 1 (measuring 1 ton).
Hence, the optimum solution is to load 2 units of item 3, 1 unit of item 1 and no unit
of item 2. The maximum value is 2 × 65 + 1 × 30, i.e., 160 units.
Introduction Formulation of a dynamic programming problem Question Question (Cargo Load Problem) References
References
Thank You!