OR Report
OR Report
Linear Programming
Where all cj's, aij's, bi's are constants and xj's are decision variables. The
expression (≤, = , ≥ ) means that each constraint may take only one of
the three possible forms :
Linear programming problems with two decision variables can be easily solved by
graphical method. A problem of three dimensions can also be solved by this method,
but their graphical solution becomes complicated.
● Convex Set
A region or a set R is convex, if for any two points on the set R, the segment
connecting those points lies entirely in R. In other words, it is a collection of
points such that for any two points on the set, the line joining the points
belongs to the set. In the following figure, the line joining P and Q belongs
entirely in R.
● Redundant Constraint
It is a constraint that does not affect the feasible region.
subject to
x1, x2 ≥ 0
x1, x2 ≥ 0
The remaining three constraints are not affecting the feasible region in any
manner. Such constraints are called redundant constraints.
● Extreme Point
Extreme points are referred to as vertices or corner points. In the following
figure, P, Q, R and S are extreme points.
Simplex Method
Many different methods have been proposed to solve linear programming problems,
but simplex method has proved to be the most effective. Simplex Method is
applicable to any problem that can be formulated in terms of linear objective function,
subject to a set of linear constraints. Often, this method is termed Dantzig's simplex
method, in honour of the mathematician who devised the approach.
Basic Terminology -
1.Slack variable-It is a variable that is added to the left-hand side of a less than or
equal to type constraint to convert the constraint into an equality. In economic terms,
slack variables represent left-over or unused capacity
Specifically:
ai1x1 + ai2x2 + ai3x3 + .........+ ainxn ≤ bi can be written as
Where i = 1, 2, ..., m
subject to
Where:
cj (j = 1, 2, ...., n) in the objective function are called the cost or profit
coefficients.
bi (i = 1, 2, ...., m) are called resources.
aij (i = 1, 2, ...., m; j = 1, 2, ...., n) are called technological coefficients or
input-output coefficients.
The initial simplex table is formed by writing out the coefficients and
constraints of a LPP in a systematic tabular form. The following table
shows the structure of a simplex table.
Where:
cj = coefficients of the variables (m + n) in the objective function.
cB = coefficients of the current basic variables in the objective function.
Simplex Algorithm -
Several steps involved in the algorithm of simplex method.
1. Formulate the Problem
Formulate the mathematical model of the given linear programming problem.
If the values of zj – cj are positive, the current basic feasible solution is the
optimal solution. In case there are one or more negative values, select the
variable corresponding to which the value of zj – cj is least (most negative)
because this is likely to boost the profit most.
subject to
x1, x2, x3 ≥ 0
Solution ->
Where:
x4 is a slack variable.
x5 is a surplus variable.
A1& A2 are artificial variables.
Phase 1
Maximize 0x1 + 0x2 + 0x3 + 0x4 + 0x5 + (–A1) + (–A2)
subject to
In other words, when the problem involves the allocation of n different facilities to n
different tasks, it is often termed as an assignment problem.The model's primary
usefulness is for planning. The assignment problem also encompasses an important
sub-class of so-called shortest- (or longest-) route models. The assignment model is
useful in solving problems such as, assignment of machines to jobs, assignment of
salesmen to sales territories, travelling salesman problem, etc.
Hungarian Method -
Hungarian Method is an efficient method for solving assignment problems.
If a constant is added to, or subtracted from, every element of a row and/or a column
of the given cost matrix of an assignment problem, the resulting assignment problem
has the same optimal solution as the original problem.
1. Identify the minimum element in each row and subtract it from every element
of that row.
2. Identify the minimum element in each column and subtract it from every
element of that column.
3. . Make the assignments for the reduced matrix obtained from steps 1 and 2 in
the following way:
a. For each row or column with a single zero value cell that has not be
assigned or eliminated, box that zero value as an assigned cell.
b. For every zero that becomes assigned, cross out (X) all other zeros in
the same row and the same column.
c. If for a row and a column, there are two or more zeros and one cannot
be chosen by inspection, then you are at liberty to choose the cell
arbitrarily for assignment.
d. The above process may be continued until every zero cell is either
assigned or crossed (X)
4. . An optimal assignment is found, if the number of assigned cells equals the
number . of rows (and columns). In case you have chosen a zero cell arbitrarily,
there may be . alternate optimal solutions. If no optimal solution is found, go to
step 5.
5. Draw the minimum number of vertical and horizontal lines necessary to cover all
. the zeros in the reduced matrix obtained from step 3 by adopting the following
. procedure:
6. Select the smallest element from all the uncovered elements. Subtract this
smallest . element from all the uncovered elements and add it to
the elements, which lie at the . intersection of two lines. and we obtain another
reduced matrix for fresh assignment.
7. Go to step 3 and repeat the procedure until you arrive at an optimal assignment.
Example :
The Funny Toys Company has four men available for work on four separate jobs.
Only one man can work on any one job. The cost of assigning each man to each job
is given in the following table. The objective is to assign men to jobs in such a way
that the total cost of assignment is minimum.
Solution.
Step 1
Identify the minimum element in each row and subtract it from every element of that
row. The result is shown in the following table.
Step 2
Identify the minimum element in each column and subtract it from every element of
that column.
Step 3
Make the assignments for the reduced matrix obtained from steps 1 and 2 in the
following way:
1. For each row or column with a single zero value cell that has not be assigned
or eliminated, box that zero value as an assigned cell.
2. For every zero that becomes assigned, cross out (X) all other zeros in the
same row and the same column.
3. If for a row and a column, there are two or more zeros and one cannot be
chosen by inspection, choose the cell arbitrarily for assignment.
4. The above process may be continued until every zero cell is either assigned
or crossed (X).
Step 4
An optimal assignment is found, if the number of assigned cells equals the number
of rows (and columns). In case you have chosen a zero cell arbitrarily, there may be
alternate optimal solutions. If no optimal solution is found, go to step 5.
Step 5
Draw the minimum number of vertical and horizontal lines necessary to cover all the
zeros in the reduced matrix obtained from step 3 by adopting the following
procedure:
Final Table:
Since the number of assignments is equal to the number of rows (& columns), this is
the optimal solution.
20 + 17 + 17 + 24 = Rs. 78.
Transportation Problem: Linear
Programming
1. Transportation Problem:
Let us suppose that there are m origins (dairy plants) supplying a certain
homogeneous dairy product to n destinations (cold storages). Let plant Pi (i = 1, 2,
…,m) produce ai units and cold storage Wj (j = 1, 2,. . .,n) requires bj units. Suppose
that the cost of transporting from plant Pi to cold storage Wj is directly proportional to
the amount/quantity transported and let Cij be the cost of transporting one unit of
product from ith origin to jth destination and Xij be the amount/quantity transported
from ith origin to jth destination. The objective is to determine the number of units to
be transported from ith origin to jth destination such that the transportation cost is
minimized. For balanced transportation problem, it is assumed that the total supply
equals to the total demand. The transportation problem in a tabular form can be
represented as follows:
Tabular representation of transportation problem
Dairy Dairy Plant
Plants/ Warehouses (Cold storage)/Destinations
Capacity
Sources
W1 W2 ….. ….. Wj ….. Wn
P1 …. …. …… a1
P2 …. …... ….. a2
: : : : : : : :
Pi : : : ai
: : : : : : : :
Pm …. …. …… am
Where Cij and Xij are unit cost of transportation and quantity transported respectively in the
cell (i, j). Then the sum of the product of Xij and Cij of allocated cells
gives us the net cost in transporting Xij units from plant Pi to cold storage Wj.
Example ( Operation Research Assignment 1)
Milk in a milk shed area is collected on three routes A, B and C. There are four
chilling centers P, Q, R and S where milk is kept before transporting it to a milk
plant. Each route is able to supply on an average one thousand litres of milk per day.
The supply of milk on routes A, B and C are 150, 160 and 90 thousand litres
respectively. Daily capacity in thousand litres of chilling centers is 140, 120, 90 and
50 respectively. The cost of transporting 1000 litres of milk from each route (source)
to each chilling center (destination) differs according to the distance. These costs (in
Rs.) are shown in the following table:
Chilling centers
Routes
P Q R S
A 16 18 21 12
B 17 19 14 13
C 32 11 15 10
Solution-
A transportation problem can be formulated as a linear programming problem. To
illustrate this, let us see how this example can be formulated as a linear
programming problem. Let Xij represent the quantity transported from ith route to jth
chilling center. These are the decision variables. In this example there are twelve
decision variables. Let Cij represents the cost of transported thousand litres of milk
from ith route to j th
chilling center. The objective is to find the values for the X ij so
as to minimize total transportation cost. Thus the LP objective function is:
The supply of milk on routes A, B and C and daily capacity in thousand litres of
chilling centers P, Q, R and S impose constraints. The total quantity transported
from route A must be equal to its capacity i.e. 150 thousand litres milk. Thus, for
route A, the constraint is:
Similarly, the constraint for other two routes B and C can be expressed as under:
Similarly, we must satisfy the demand for each of the four chilling centers. The units
can be transported through route A, B and C. Thus, for Chilling centre P, the
constraint is:
Finally, all values of Xij must be greater than or equal to zero, as negative units
cannot be transported. Thus,
Subject to
Supply constraints Demand Constraints
Using the notations described in the previous section, the transportation problem
consist of finding Xij (i =1,2, . . ., m; j=1, 2, . . , n) in order to minimize the total
transportation cost Z =
Such types of problems where supply and demand are exactly equal are known as
Balanced Transportation Problem. Supply (from various sources) is written in the
rows, while a column is an expression for the demand of different warehouses. In
general, if a transportation problem has m rows and n columns, then the problem is
solvable if there are exactly (m + n –1) basic variables. However, a transportation
problem is unbalanced if the total supply and the total demand are not equal.
Step 2: Obtain an initial basic feasible solution. This initial basic feasible solution
can be obtained by using any of the following five methods:
a) North West Corner Rule
b) Minimum cost method
c) Row Minimum Method
d) Column Minimum Method
e) Vogel’s Approximation Method
The solution obtained by any of the above methods must fulfill the following
conditions:
i. The solution must be feasible, i.e., it must satisfy all the supply and
demand constraints. This is called rim condition.
ii. The number of positive allocations must be equal to m+n–1, where,
m is number of rows and n is number of columns.
The solution that satisfies both the above mentioned conditions is called a non-
degenerate basic feasible solution.
Step 3: Test the initial solution for optimality. Using any of the following methods
one can test the optimality of an initial basic solution:
i. Stepping Stone Method
ii. Modified Distribution Method (MODI)
If the solution is optimal then stop, otherwise, find a new
improved solution.
Step 4: Updating the solution. Repeat Step 3 until the optimal
solution is obtained
4. Methods of Obtaining an Initial Basic Feasible Solution
Five methods are described to obtain the initial basic feasible solution of the
transportation problem. These methods can be explained by considering the
following :
Let us consider the formulation of TP as given in example 1 of the previous lesson
which can be represented by the following e transportation table:
Each cell in the table represents the amount transported from one route to one
chilling center. The amount placed in each cell is, therefore, the value of a decision.
The smaller box within each cell contains the unit transportation cost for that route.
Step I: The first assignment is made in the cell occupying the upper left-hand
(North West) corner of the transportation table. The maximum feasible
amount is allocated there. That is X 11 = Min (a1, b1) and this value of X11 is
then entered in the cell (1, 1) of the transportation table.
Step II: a) If b1>a1, we move down vertically to the second row and make the
second allocation of magnitude X21=Min. (a2, b1- X11) in the cell (2, 1).
c) If b1= a1, there is a tie for the second allocation. One can make the
Let us illustrate the above method with the help of example 1 given above.
Following North-West corner rule, the first allocation is made in the cell (1,1), the
magnitude being X11=Min.(150,140)=140. The second allocation is made in cell
(1,2) and the magnitude of allocation is given by X 12=Min. (150-140,120)=10. Third
allocation is made in the cell (2,2), the magnitude being X 22=Min. (160,120-
10)=110. The magnitude of fourth allocation in the cell (2,3) is given by X 23=Min.
(160-110, 90)=50. The fifth allocation is made in the cell (3,3), the magnitude being
X33= Min. (90-50, 90)=40. The sixth allocation in the cell (3,4) is given by X 34=Min.
(90-40, 50) = 50. Now all requirements have been satisfied and hence an initial basic
feasible solution to T.P. has been obtained
Step II: a) If Xij = ai, cross off the ith row of the transportation table and decrease b i
by ai and go to Step III.
b) If Xij = bj, cross off the jth column of the transportation table and decrease
ai by bj and go to Step III.
c) If Xij = ai = bj, cross of either the ith row or the jth column but not the both.
Step III: Repeat steps I & II for the resulting reduced transportation table until all the
requirements are satisfied. Whenever the minimum cost is not unique, make
Let us illustrate this method by considering example 1given earlier in this lesson .
The first allocation is made in the cell (3, 4) where the cost of transportation is
minimum, the magnitude being X34=50. This satisfies the requirement of S chilling
centre. Therefore cross off the fourth column. The second allocation is made in the
cell (3,2) having minimum cost among remaining cells and its magnitude being
X32=Min.(120,90-50)=40.
This satisfies the supply of route C. Cross off the third row. Among the remaining
cells, the minimum cost is found in cell (2, 3) so the third allocation is done in cell
(2, 3) and its magnitude being X23=Min.(90,160)=90.
The requirement of the chilling center R is fulfilled, hence third column is crossed
off. Out of the remaining cells the minimum cost is found in cell (1,1) and its
magnitude is X11=Min(140,150)=140, as the requirement of chilling center P is
exhausted hence column first is deleted. Among remaining two cells minimum cost
is found in cell (1,2) and its magnitude X 12=Min(80,150-140)=10 and the last
allocation is done in the cell (2,2) and its magnitude is X22=Min(80-10,70)=70. Now
all requirements have been satisfied and hence an initial basic feasible solution to
T.P. has been obtained and given in the following table.
The transportation cost according to the above allocation is given by
z = 16 × 140 + 18 × 10 + 19 × 70 + 11 × 40 + 14 × 90 + 10 × 50 = 5950
Step II: a) If Xij = a1, so that the availability at origin O 1 is completely exhausted,
cross off the first row of the table and move down to the second row.
the jth column and reconsider the first row with the remaining
This method is same as Row minima method except that we apply the concept of
minimum cost in column instead of row.
The Vogel’s Approximate Method takes into account not only the least cost C ij but
also the costs that just exceed Cij. Various steps of the method are given below:
Step I: For each row of the transportation table identify the smallest and the next to
smallest cost. Determine the difference between them for each row. These are
called penalties (opportunity cost). Put them along side of the transportation
table by enclosing them in parenthesis against the respective rows. Similarly
compute these penalties for each column.
Step II: Identify the row or column with the largest penalty among all the rows and
columns. If a tie occurs, use any arbitrary tie breaking choice. Let the
greatest penalty correspond to i th row and let cij be the smallest cost in the i th
row. Allocate the largest possible amount X ij = min. (ai, bj) in the (i, j) of the
cell and cross off the ith row or jth column in the usual manner.
Step III: Re-compute the column and row penalty for the reduced transportation table
In the first reduced penalty table the maximum penalty of rows and columns occurs
in column 3, allocate the maximum possible amount to the cell (2,3) with minimum
cost and allocate an amount X23=Min(90,160)=90 to it . This exhausts the capacity of
chilling center R .As such cross off third column to get second reduced penalty table
as given below.
In the second reduced penalty table there is a tie in the maximum penalty between
first and second row. Choose the first row and allocate the maximum possible
amount to the cell (1,4) with minimum cost and allocate an amount
X14=Min(50,150)=50 to it . This exhausts the capacity of chilling center S so cross
off fourth column to get third reduced penalty table as given below:
The largest of the penalty in the third reduced penalty table is (2) and is associated
with first row and second row. We choose the first row arbitrarily whose min. cost is
C11 = 16. The fourth allocation of X11=min. (140,100) =100 is made in cell (1, 1).
Cross off the first row. In the fourth reduced penalty table i.e. second row, minimum
cost occurs in cell (2,1) followed by cell (2,2) hence allocate X 21=40 and X22=30.
Hence the whole allocation is as under:
z = 16 × 100 + 12 × 50 + 17 × 40 + 19 × 30 + 14 × 90 + 11 × 90 = 5700
After examining the initial basic feasible solution, the next step is to test the
optimality of basic feasible solution. Though the solution obtained by Vogel’s
method is not optimal, yet the procedure by which it was obtained often yields close
to an optimal solution. So to say, we move from one basic feasible solution to a
better basic feasible solution, ultimately yielding the minimum cost of transportation.
There are two methods of testing optimality of a basic feasible solution. The first of
these is called the Stepping Stone method and the second method is called Modified
Distribution method (MODI).By applying either of these methods, if the solution is
found to be optimal, then problem is solved. If the solution is not optimal, then a new
and better basic feasible solution is obtained. It is done by exchanging a non-basic
variable for one basic variable i.e. rearrangement is made by transferring units from
an occupied cell to an empty cell that has the largest opportunity cost and then
shifting the units from other related cells so that all the rim requirements are
satisfied.
In this method, the net cost change can be obtained by introducing any of the non-
basic variables (unoccupied cells) into the solution. For each such cell find out as to
what effect on the total cost would be if one unit is assigned to this cell. The criterion
for making a re-allocation is simply to know the desired effect upon various costs.
The net cost change is determined by listing the unit costs associated with each cell
and then summing over the path to find the net effect. Signs are alternate from
positive (+) to negative (-) depending upon whether shipments are being added or
subtracted at a given point. A negative sign on the net cost change indicates that a
cost reduction can be made by making the change while a positive sign will indicate
a cost increase. The stepping stone method for testing the optimality can be
summarized in the following steps:
Step
1. Determine an initial basic feasible solution.
2. Make sure that the number of occupied cells is exactly equal to m+n-1, where m
is number of rows and n is number of columns.
3. Evaluate the cost–effectiveness of transporting goods through the transportation
routes not currently in solution. The testing of each unoccupied cell is conducted
by following four steps given as under:
a. Select an unoccupied cell, where transportation should be made. Beginning
with this cell, trace a closed path using the most direct route through at least
three occupied cells and moving with only horizontal and vertical moves.
Further, since only the cells at the turning points are considered to be on the
closed path, both unoccupied and occupied boxes may be skipped over. The
cells at the turning points are called Stepping Stone on the path.
b. Assign plus (+) and minus (-) sign alternatively on each corner cell of the
closed path traced starting a plus sign at the unoccupied cell to be evaluated.
c. Compute the net change in the cost along the closed path by adding together
the unit cost figures found in each cell containing a plus sign and then
subtracting the unit cost in each square containing the minus sign.
d. Repeat sub step (a) through sub step (b) until net change in cost has been
calculated for all unoccupied cells of the transportation table.
4. Check the sign in each of the net changes .If all net changes computed are
greater than or equal to zero, an optimal solution has been reached. If not, it is
possible to improve the current solution and decrease total transportation cost.
5. Select the unoccupied cell having the highest negative net cost change and
determine the maximum number of units that can be assigned to a cell marked
with a minus sign on the closed path, corresponding to this cell. Add this number
to the unoccupied cell and to other cells on the path marked with a plus sign.
Subtract the number from cells on the closed path marked with a minus sign.
6. Go to step 2 and repeat the procedure until we get an optimal solution.
To demonstrate the application of this method let us take example 1 discussed above
for consideration. Example 1: Find optimal solution of the problem given in example
1 by stepping stone method.
Solution :
The initial basic feasible solution using Least Cost Method was found in example 1
of previous lesson with the following allocations.
Beginning at first unoccupied cell (A,Q) trace a closed path and this closed path is
.
Assign plus (+) and minus (-) sign alternatively on each corner cell of the
closedpath traced starting a plus sign at the unoccupied cell .Evaluate the cost–
effectiveness of transporting milk on different transportation routes of each
unoccupied cell and given in the following table:
Unoccupied cell Closed Path Net Cost change (in Rs.)
(A,R) 21-14+19-18= 8
(A,S) 12-10+11-18= -5
(B,P) 17-16+18-19= 0
(B,S) 13-10+11-19= -5
(C,P) 32-16+18-11= 23
(C,R) 15-11+19-14= 9
Select the unoccupied cell having the highest negative net cost change i.e. cell (A,S) .
The maximum number of units that can be transported to a cell marked with a minus
sign on the closed path is 10. Add this number to the unoccupied cell and to other
cells on the path marked with a plus sign. Subtract the number from cells on the
closed path marked with a minus sign. New solution is given in the following table.
Beginning at the first unoccupied cell (A,Q) and repeating the steps given above.
Evaluate the cost– effectiveness of transporting milk on different transportation
routes of each unoccupied cell given in the following table:
Since all the unoccupied cells have positive values for the net cost change, hence
optimal solution has reached and optimal cost is Rs. 5700.
5.2 MODI (Modified Distribution) Method
Find optimal solution of the problem given in example 1 above by MODI method.
The initial basic feasible solution using Least Cost Method was found in example 1
above with the following allocations.
The transportation cost according to the above allocation is given by
Step 1: Since the number of occupied cells are m+n-1=3+4-1=6 the initial solution is
non –degenerate. Thus optimal solution can be obtained.
Step 2: We first set up an equation for each occupied cell:
Step 3: After the row and column numbers have been computed, the next step is to
evaluate the opportunity cost for each of the unoccupied cells by using the
relationship
To test this solution for further improvement, we recalculate the values of u r and vs
based on the second solution for each of the occupied cells.
Again, we again calculate the opportunity costs for each unoccupied cell by using the
relationship
Again, we calculate the opportunity costs for each unoccupied cell by using the
relationship
2. Investment Problem:
A portfolio manager with a fixed budget of $100 million is considering the eight
investment opportunities shown in Table 1. The manager must choose an
investment level for each alternative ranging from $0 to $40 million. Although an
acceptable investment may assume any value within the range, we discretize the
permissible allocations to intervals of $10 million to facilitate the modeling. This
restriction is important to what follows. For convenience we define a unit of
investment to be $10 million. In these terms, the budget is 10 and the amounts to
invest are the integers in the range from 0 to 4. Following table provides the net
annual returns from the investment opportunities expressed in millions of dollars. A
ninth opportunity, not shown in the table, is available for funds left over from the first
eight investments. The return is 5% per year for the amount invested, or
equivalently, $0.5 million for each $10 million invested. The manager's goal is to
maximize the total annual return without exceeding the budget .
Proposed Solution-
Table 1 provides the net annual returns from the investment opportunities expressed
in millions of dollars. A ninth opportunity, not shown in the table, is available for funds
left over from the first eight investments. The return is 5% per year for the amount
invested, or equivalently, $0.5 million for each $10 million invested. The manager's
goal is to maximize the total annual return without exceeding the budget.
The investment problem has a general mathematical programming formulation.
The problem as stated is similar in structure to the knapsack problem but the
objective function is nonlinear. To formulate it as a mixed-integer linear program it
would be necessary to introduce 32 binary variables, one for each nonzero level of
investment. Since the budget and investment amounts are integer the slack variable,
y, can be treated as integer. Rather than pursuing the MILP formulation we will use
the problem as an introduction to dynamic programming.
DP Approach :
To begin, we ask the manager to decide on the amount to invest sequentially. That
is, we first ask her to consider opportunity 1, then opportunity 2, and so on. This is
difficult to do in a way that maximizes the total return. The manager notes that the
more she invests in opportunity 1, the greater the annual return. Consequently, she
might feel that a greedy approach is called for -- one that invests in the highest
possible level, 4 in this case. It should be apparent, though, that such an approach
may yield very poor results. Committing a large portion of the budget to early
opportunities precludes potentially more attractive returns later on. Instead, we ask
the manager to solve the problem backwards, starting with opportunity 8, then 7 and
so on until she makes a decision for opportunity 1. With a little organization, we find
that this procedure is possible.
First we ask, how many units should we invest in opportunity 8? The manager
responds that she cannot make that decision unless she knows how much of the
budget has already been spent for the first 7 opportunities. Then, the decision is
obvious. For example, if all the budget is spent by the previous opportunities, the
investment in 8 must be zero. If one unit of budget remains she will invest 1 in
opportunity 8 if the return exceeds the 0.5, the value for leftover funds. In general, if
x units are already spent, she can invest up to 10 – x in opportunity 8. Of course
when x is 5 or less, 4 units can be invested and there will still be money left over.
We use = 9 to mean that there are no more opportunities. For this problem, we call
any state that has equal to 9 a final state because there are no more decisions in
our sequential process. The set of final states is F. For the investment problem
A final state has a value defined by the final value function, f(s). For this problem, the
final value is the annual return of the funds not spent.
Graphically, we represent a state as a node as in Fig. 1 where only the final states
are shown. The final state values are in brackets next to the nodes.
Now we address the question of finding the optimal decision for opportunity 8. In
general, a decision is identified by the decision variable, d, the amount to invest.
Let be the number of units selected for opportunity 8. In state (8, 10) no budget
remains so the optimal value of must be 0. In state (8, 9), the choice is between
investing 0 or 1. For = 0, a unit of budget will remain for a final return of 0.5. For =
1, the return is 1. Clearly better choice is is 1. The details of the decision process for
four states are given in Table 2.
The computations for a particular state are shown by the colored bands in the table.
We see that a separate optimization is carried out for each state s. The column
labeled d shows all feasible values of the decision variable. A value not in this list
would use more than the budget available. The decision objective is the annual
return for selecting the amount d. This value comes from Table 1. The column
labeled s' is the next state reached by making decision d while in state s. The next
state is given by the transition function T(s, d).
The value of the next state, f(s'), has already been computed and is shown in the
next column. The total return is the sum of the decision return and the next state
value and is the quantity to be maximized.
For each value of s, we compare the total returns for the different values of d and
choose the one that gives the maximum. This is a simple one-dimensional problem
solved by enumerating the discrete alternatives. The optimal decision is , where the
argument s indicates that the decision is a function of s. Finally the optimal return is
the value f(s).
The computations are performed by solving the following backward recursive
equation.
It is a recursive equation because the function f(s) appears on both sides of the
equality sign. We can solve it, only if we proceed in a backward direction through the
states.
DP FINISH-:
In a similar manner, once we know the function values for each state with = 8, we
can compute the optimal decisions and function values for the states with equal to 7.
These results are shown in Fig. 3. Again we take a backward step in Fig. 4 to
compute the optimal decisions and function values when equal to 6.
The process continues until = 1. At this point, the manager must make a decision for
opportunity 1. Since this is the first decision, she knows how much of the budget is
already spent. It must be 0. Accordingly, we call (1, 0) the initial state. Now it is
possible to decide on the amount to invest in opportunity 1 because the value of the
remaining budget for opportunities 2 through 8 is known. The decision process
associated with opportunity 1 is shown in Figure.
The figure shows the four decisions leaving the initial state. The recursive equation
used to determine the optimal value and decision at (1, 0) is
The procedure just described has uncovered the path through the decision network
with the largest total return. For the investment problem, this path starts at the initial
state (1,0) and terminates at the final state (9,10).
The algorithm computes the optimal decision leaving each state. For the example,
the decision in state (1, 0) is 2, leading to state (2, 2). The optimal decision in state
(2, 2) is 1, leading to state (3, 3), and so on. The process of constructing the
optimum decision sequence is called forward recovery since it begins in an initial
state and moves in the forward direction until a final state is reached. Table 3 lists
the optimal decisions from one state to the next.The investor should invest $10 unit
each in opportunities 2, 3, 5, and 7; invest $20 million in opportunities 1, 4 and 6; and
make no investment in opportunity 8. The entire budget has been spent and there is
no slack. The total annual return is $22.3 million.
In addition to the path leaving (1, 0), it is possible to identify an optimal path for every
state by tracing the optimal decisions from the specified state to some final state.
The complete set of decisions is called a policy because it specifies an action for
every state. The amount of work required to determine an optimal policy is
proportional to the size of the state space. During the solution process a simple
problem, each with a single variable, was solved for each state leading to an optimal
policy for all states.