Docsity

Introduction 3-Operation Research-Handouts, Lecture notes of Operational Research

Toggle sidebar
bg1
INTRODUCTION
Dynamic programming is basically a mathematical technique developed by Richard Bellman and his
associates at the Rand Corporation. This technique is a powerful tool for making a sequence of interrelated
decisions. There is no standard mathematical formulation of the dynamic programming problem, which is in contrast
to linear programming. It is a general type of approach to problem solving and each problem has to be analyzed
depending on the conditions pertaining to the problem and the particular equations used must be developed to suit
the problem. In this way one should take care to formulate a dynamic programming problem, using the method of
recursion.
Dynamic programming provides a solution with much less effort than exhaustive enumeration. In dynamic
programming we start with a small portion of the problem and find the optimal solution for this smaller problem.
We then gradually enlarge the problem finding the current optimal solution from the previous one, until we solve the
original problem in its entirety. In this connection we refer to Bellman's principle of optimality, which states:
"An optimal policy has the property that, whatever the initial state and initial decision are, the remaining
decisions must constitute an optimal policy with respect to the state resulting from the first decision".
Dynamic programming technique can be applied to problems of inventory control, production planning,
chemical reactor design, heat exchanger designs, business situation to take an optimal decision for investments etc.
A number of illustrative examples are presented for developing dynamic programming procedure.
Example We consider the following problem called "Stage coach problem" to illustrate the concepts of
dynamic programming. A salesman has to travel between points A to B indicated by the network shown in figure
A B
The distance to be traveled by the salesman from various states to other states, is given below.
1
2
3
4
7
6
5
8
9
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Introduction 3-Operation Research-Handouts and more Lecture notes Operational Research in PDF only on Docsity!

INTRODUCTION

Dynamic programming is basically a mathematical technique developed by Richard Bellman and his associates at the Rand Corporation. This technique is a powerful tool for making a sequence of interrelated decisions. There is no standard mathematical formulation of the dynamic programming problem, which is in contrast to linear programming. It is a general type of approach to problem solving and each problem has to be analyzed depending on the conditions pertaining to the problem and the particular equations used must be developed to suit the problem. In this way one should take care to formulate a dynamic programming problem, using the method of recursion.

Dynamic programming provides a solution with much less effort than exhaustive enumeration. In dynamic programming we start with a small portion of the problem and find the optimal solution for this smaller problem. We then gradually enlarge the problem finding the current optimal solution from the previous one, until we solve the original problem in its entirety. In this connection we refer to Bellman's principle of optimality, which states:

"An optimal policy has the property that, whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy with respect to the state resulting from the first decision".

Dynamic programming technique can be applied to problems of inventory control, production planning, chemical reactor design, heat exchanger designs, business situation to take an optimal decision for investments etc.

A number of illustrative examples are presented for developing dynamic programming procedure.

Example We consider the following problem called "Stage coach problem" to illustrate the concepts of dynamic programming. A salesman has to travel between points A to B indicated by the network shown in figure

A B

The distance to be traveled by the salesman from various states to other states, is given below.

Which route minimizes the total distance traveled from A to B.

Solution:

First point we note in this problem is that the decision, which is best for each successive stage, need not yield the over-all optimal decision.

If we follow the policy of minimum distance at each state, we land in a path A 2  6  9 B, with a total distance travelled as 130 km. However it should be evident that sacrificing a little on one is less distant that A 2 6 = (2 + 4).

We can solve the problem by trial and error. The number of possible routes is 18 in this example and having to calculate the total distance for all routes is a tiresome task. Instead of exhaustive enumeration of all the routes, it is better to start with a small problem and find the optimal solution for this smaller problem. Thus we extend this for the entire problem. This is what we try to do in dynamic programming.

The problem is divided into a number of stages and proceeds backwards from final destination. In this example if we were in 8 or 9 and the final destination is B we have to travel only one stage to complete the journey. This we call as one stage problem indicating that there is one more stage to go to complete the journey. If we were in 5 or 6 or 7 we have to travel 2 stages to reach the final destination. Like this we have 4 stages from A to B.

Let xn(n = 1, 2, 3, 4) be the immediate destination when there are n more stages to travel. Thus, the route selected would be 1x 4 x 3 x 2 x 1 , where x 1 = 10. Let fn(x, xn) be the total cost of the best over-all policy for the last n stages, given that the salesman is in the state s and selects xn as the immediate destination called the state. Given s and n , let xn* denote the value of xn which minimizes fn(s1, xn), and let fn(s) be the corresponding minimum value of fn(x, xn). Thus, fn(s) = fn(s, xn*). The objective is to find f 4 *(1) and the corresponding policy. In dynamic programming we successively find f 1 *(s), f 2 *(s), f 3 *(s) and f 4 *(1).

The problem is divided into four stages. In one stage problem, we have one more stage to go, we can write the solution to one-stage problem as follows.

s f 1 *(s) x 1 *

When the salesman has two more stages to go, the solution requires a little analysis. When two stages are ahead to reach final destination he may occupy one of the states 5 or 6 or 7. If he is in state 5, he must go to either state 8 or 9 at a cost of 10 or 40 respectively. If he selects state 8, the minimum additional distanced to travel after reaching there, is given in the above table as 30 so that the total distance for this decision would be 10 + 30 = 40. If he selects state 9, the total distance is 40 + 40 = 80. Comparing the two cases, it is better if he would choose 8, x 2 * = 8, since it

  1. Each stage has a number of states associated with it.
  2. The effect of the policy decision at each stage is to change the current state into a state associated with the next stage.
  3. Given the current state, an optimal policy for the remaining stage, is independent of the policy adopted in previous stages.
  4. The procedure of solving the problem begins by finding the optimal policy for each state of the last stage.
  5. A recursive formula can be framed to identify the optimal policy for each state with ( n - 1) stages remaining.
  6. Using the recursive relationship the procedure is to move backward stage by stage, until it finds the optimal policy when starting at the initial stage.

Example Six units of capital is available to invest in four business ventures. The returns from each unit of investment in all the four ventures are given in the table below. Find how should the capital be allocated to business proposals in order to maximize profit.

Expected returns from Business proposals Unit A B C D 0 0 0 0 0 1 5 2 6 2 2 6 4 7 3 3 7 6 8 4 4 8 8 8 5 5 8 9 8 6 6 8 10 8 6

Solution: The problem has 4 stages, each business proposal representing a stage and we have six states with each stage.

One stage problem Here we consider only one business proposal namely D (working backward) we can allot any unit of capital and the expected returns are as shown in table. For business D alone,

**S f 1 *(s) x 1 *** 0 0 0 1 2 1 2 3 2 3 4 3 4 5 4 5 6 5 6 6 5,

Two-stage problem:

Here we consider two business proposals D and C. The capital is to be allocated to D and C in many possible ways. If a certain unit of capital is allotted to C (second new business) then the remaining capital only can be allocated to D and we have several combinations. The convenient way to understand about the returns is to analyse all possible combinations. Let x 1 , be the amount allotted to D and x 2 to C.

The profit function is given by

f 3 (s, x 3 ) = p(x 3 ) + f 2 *(s-x 3 )

Capital, s, Allotment for B

Allotment for C and D

**Net Return from three ventures x 3 ***

s = x 3 + (s-x 1 ) (x 3 ) (s-x 3 ) f 3 (s) s = 0 0 0 0 s = 1 0 1 0 + 6 = 6* 0 1 0 2 + 0 = 2 s = 2 0 2 2 + 6 = 8* 0 1 1 4 + 0 = 4 0, 1 s = 3 0 3 0 + 9 = 9 1 2 2 + 8 = 10* 1 2 1 4 + 6 = 10* 1, 2 3 0 6 + 0 = 6 s = 4 0 4 0 + 10 = 10 1 3 2 + 9 = 11 2 2 4 + 8 = 12 * 2 3 1 6 + 6 = 12 * 2, 3 4 0 8 + 0 = 8 s = 5 0 5 0 + 11 = 11 1 4 2 + 10 = 12 2 3 4 + 9 = 13 3 2 6 + 8 = 14* 3 4 1 8 + 6 = 14* 3, 5 0 9 + 0 = 9 s = 6 0 6 0 + 12 = 12 1 5 2 + 11 = 13 2 4 4 + 10 = 12* 3 3 6 + 9 = 15 4 2 8 + 8 = 16* 4 5 1 9 + 6 = 15 6 0 10 + 0 = 10

Now finally, we come to the four-stage problem, in which we consider all the business proposals A, B, C and D. A certain capital is allotted to A and the remaining for B, C and D together for which the optimum result can be taken from the three-stage problem.

The profit function

f 4 (s, x 4 ) = p(x 4 ) + f 3 *(s-x 3 )

We analyse all possible combinations of investment with the available capital and we tabulate the net returns as shown below

Capital, s, Allotment for A

Allotment for B,C & D

Net Return from all ventures x 4 *** s = x 2 + x 1 x 4 (s-x 4 ) f 4 (s) s = 0 0 0 0 s = 1 0 1 0 + 6 = 6 1 1 0 5 + 0 = 5 s = 2 0 2 0 + 8 = 8 1 1 5 + 6= 11 0 2 0 6 + 0 = 6 s = 3 0 3 0 + 10 = 10 1 2 5 + 8 = 13* 1 2 1 6 + 6 = 12 3 0 7 + 0 = 7 s = 4 0 4 0 + 12 = 12 1 3 5 + 10 = 15 * 1 2 2 6 + 8 = 14 3 1 7 + 6 = 13 4 0 8 + 0 = 8 s = 5 0 5 0 + 14 = 4 1 4 5 + 12 = 17* 1 2 3 6 + 10 = 16 3 2 7 + 8 = 15 4 1 8 + 6 = 14 5 0 8 + 0 = 8 s = 6 0 6 0 + 16 = 16 1 5 5 + 14 = 19* 1 2 4 6 + 12 = 18 3 3 7 + 10 = 17 4 2 8 + 8 = 16 5 1 8 + 6 = 14 6 0 8 + 0 = 8

Analysis of the Result

From the above table with a total capital of 6 units, we get the maximum returns as Rs. 19. This is achieved by allotting one unit to business A and the remaining 5 units to business ventures B, C and D combined. Then

Case 1

If we allot 3 units of capital to B, then the remaining capital is only 6 - (1+3) = 2 units, that can be allotted to business ventures C and D. Then from the results of the two-stage problem, we see the optimum allotment of one unit capital to C and the remaining one unit to D can be made. Therefore, for this case, the allotment of capital to A, B, C and D are 1, 3, 1 and 1 units respectively.

Case 2

If we allot 4 units of capital to B, then the remaining capital is only 6-(1+4) = 1 unit that can be allotted to business ventures C and D. Then from the results of the two-stage problem, we see that the optimum allotment of one unit of capital to C and nothing to D. Hence for this case, the allotments of capital to A, B, C and D are 1, 4, 1 and 0 respectively.

Both the policies yield the net return of Rs. 19.

Example A truck can carry a load of 10 tonnes of a product. There are three types of products to be transported by the truck. The weights and profits are as tabulated in the next page. With the condition that at least one of each type must be transported, determine the loading which will maximize the total profit.

Type Profit (Rs.) Weight (Tonnes) A 20 1 B 50 2 C 60 2

Solution: In this problem, a decision is to be taken as to how many units of A, B and C should be transported. Thus let each stage represent transported. We divide the problem into three stages. The one stage problem is to divide the amount of product C to be transported.

One Stage Problem:

The profit per unit of C (weight = 2 tonnes) is Rs. 60. The restriction is that at least one unit of types A and B must be transported. Out of maximum 10 tonnes, (1 + 2) tonnes are allotted to A and B. Hence we can load the remaining 7 tonnes only. Let the total load be transported vary from 2 tonnes to 7 tonnes represented by si. Let xi be the states representing one, two or three units (i = 1, 2, 3). Let f 1 * represent the optimum profit in one stage problem. The results are as in the table below.

xi fi xi si 1 2 3** 2 1 x 60 = 60 Not feasible Not feasible 60 1 3 1 x 60 = 60 Not feasible Not feasible 60 1 4 1 x 60 = 60 2 x 60 = 120 Not feasible 120 2 5 1 x 60 = 60 2 x 60 = 120 Not feasible 120 2 6 1 x 60 = 60 2 x 60 = 120 3 x 60 = 180 180 3 7 1 x 60 = 60 2 x 60 = 120 3 x 60 = 180 180 3

Two Stage Problem:

Here the decision is taken as to how much of product B and C to be transported. We take the decision to allot same space to transport product B and the remaining space is available for C for which the optimum values are taken from the results of one stage problem. The optimum values are taken from the results of one stage problem. The space to be used for B and C together varies from 4 tonnes to 9 tonnes.

Let x 2 represent the amount of units if product of type B to be transported. Then the remaining (s 2 - x 2 ) tonnes of space are available for product C. The results are as shown in the table below.

s 2 x 2 f 2 * x 2 * 1 2 3 2 50+60= 110 Not feasible Not feasible 110 1 3 50+60= 110 Not feasible Not feasible 110 1 4 50+120= 170 100+60 = 160 Not feasible 170 1 5 50+120= 170 100+60 = 160 Not feasible 170 1 6 50+180= 230 100+120 = 220 150 + 60 = 210 230 1 7 50+180= 230 100+120 = 220 150 + 60 = 210 230 1

Three Stage Problem:

Here we consider all the three types of products. Let s 3 be the space available for transporting items, x 3 be the amount of product of type A to be transported, so that (s 3 - x 3 ) tonnes of space is available for sending products B and C together for which the optimum profit is taken from the two stage problem. The space available (s 3 ) varies from 5 tonnes to 10 tonnes and x 3 varies from one tonne to 6 tonnes. The results of the three stage problem are as shown in the table below.

s 3 x 3 f 3 * x 3 * 1 2 3 4 5 6 5 20+110=130 Not feasible - - - - 130 1 6 20+110=130 40+110=150 N.F - - - 150 2 7 20+170=190 40+110=150 60+ =

N.F - - 210 2

  1. An investor has Rs. 50000 to invest. He has three alternatives to choose. The estimated returns for different amounts of capital invested in each alternative are tabulated. Zero allocation returns Rs. 0. What is the optimal investment policy?

Amount Alternative (Rs.) 1 2 3 10000 10 20 10 20000 10 20 20 30000 30 20 20 40000 40 30 30 50000 40 30 40