Study Material
Study Material
Study Material
i
C ONTENTS
Contents iii
iii
iv CONTENTS
1
2 CHAPTER 1. FORMULATING LINEAR PROGRAMS
since a table generates more contribution than a chair, the unit should man-
ufacture as many tables as the market can absorb (i.e. 300 tables), and then
use the remaining your resources to manufacture chairs. Another line of ar-
gument can be that since chairs require less resources than tables, the unit
should manufacture only chairs. In that way the total contribution will be
higher, even though the contribution per unit is less. You need to decide
which of the two considerations, if either, is a most profitable option.
Let us analyze the first option. The unit’s stock of wood is sufficient to
manufacture a maximum of 400 tables per day and its labor resources are suf-
ficient to manufacture a maximum of 500 tables. However, the market can
absorb only 300 tables. So after manufacturing 300 tables, the unit can use
its remaining resources to manufacture 175 chairs. See that this is within the
capacity of your employees. Let us call this Mix A. At the given contribution
rates, this mix of products yields a daily contribution of Rs.(300×70+175×50)
= Rs.29,750.00 and completely uses up the wood available to you each day.
Next, let us analyze the second option. The unit’s stock of wood is suffi-
cient to manufacture a maximum of 700 chairs per day, and its labor capacity
is sufficient to manufacture a maximum of 600 chairs. So as per this consider-
ation, the unit should manufacture 600 chairs. This would exhaust the labor
capacity available to the unit, and hence tables will not be manufactured. Let
us call this product mix Mix B. This product mix would generate a contribu-
tion of Rs. (600 × 50) = Rs. 30,000.00. Hence the positive effect of trading off
the higher production rates of chairs against the higher contribution of tables
yields a higher contribution in this situation.
The question now is whether Mix B is the best mix available to you. While
manufacturing according to Mix B, ypu see that you have used up your la-
bor resources, but have a seventh of your stock of wood unused at the end of
each day. (You had stock to manufacture 700 chairs but you only manufac-
tured 600 chairs.) So, can you use your resources more efficiently? Starting off
with Mix B, let us assume that you manufacture one less chair. This frees up
1/600-th of your labor capacity, which along with your excess stock of wood
allows you to manufacture 5/6-th of a table. This change in product mix leads
to an excess utilization of (5/6) × (1/400) − (1/700) = 11/16800-th of your stock
of wood, and leads to an increase in contribution worth Rs.((5 × 70)/6 − 50) =
Rs.8.33. This shows that Mix B is not the best possible mix and you can obtain
a better mix by substituting a chair with 5/6-th of a table. So the next natu-
ral question is: How much of such substitutions can you make? Obviously,
the substitution did not change the total amount of labor resources that you
utilized, but uses 11/16800-th more of your daily stock of wood than that you
used for Mix B. You have 1/7-th of your daily stock in excess, so that you could
reduce the number of chairs that you produce by (1/7)/(11/16800) = 2400/11
1.2. FORMULATION OF MATHEMATICAL PROGRAMS 3
and produce (5/6) × (2400/11) = 2000/11 tables. This leads to a product mix
with 2000/11 (i.e., 181 9/11) tables and 4200/11 (i.e., 381 9/11) chairs which
generates a contribution of Rs.31,818.18 per day. It is easy to check in a simi-
lar way that no further trade-offs between the number of tables and chairs you
produce will increase the contribution generated. So manufacturing 181 9/11
tables and 381 9/11 chairs is a best, i.e., optimal daily product mix for your
unit.
Notice that while taking decisions, we do not consider the wages you pay
to the unit’s employees, nor do we consider the rent you pay. This is because
these are not “relevant costs”, i.e., costs directly related to the production of
What are
tables and chairs. The cost of wood that you obtain from the lumber com-
relevant costs?
pany is also not relevant, since both the quantity and price of wood that you
receive is fixed through a long term contract, and does not change with your
product mix. In this example, all relevant costs are taken into account while
computing the contributions from tables and chairs.
making schenario and code them using variables called “decision variables”.
Notice that when we talk about making decisions, we talk about things that we
are allowed to change. A vector of the decision variables represents a generic
solution to the problem. Assigning values to the decision variables in a solu-
tion yields particular solutions to the problem. In our example, we can code
the decision regarding the number of tables and chairs you produce daily with
decision variables T and C , and a product mix (T,C ) as a solution to the prob-
lem. The units in which we measure our decision variables need to be clear to
us.
In the second part, we specify a function that evaluates solutions. This
function of the decision variables is called an “objective function”. We also
specify the nature of the best (i.e., optimal) solution to the problem in terms
of the objective function by specifying whether we want to maximize or min-
imize the objective function. This specification is called the objective of the
mathematical program.
In the third and final part of the formulation we define “constraints” that
restrict the options we have for solutions to be considered in the problem.
Each constraint is an inequality or an equation in the decision variables in-
troduced in the first part, and in the mathematical program, they represent
restrictions on the decision variables brought about by the nature of the prob-
lem. Examples of constraints in our problem are the restrictions on availabil-
ity of wood and labor, and the market capacity for absorbing tables that we
produce. It is conventional to represent constraints as inequalities or equa-
tions, whose left hand side consists of a function of the decision variables and
whose right hand side is a constant.
A solution is called “feasible”, if the values assigned to the decision vari-
ables in that solution are such that all constraints in the model are satisfied,
otherwise it is called “infeasible”. A constraint that holds as an equality at a
given solution is said to be “tight” at that solution. Constraints that are not
tight are said to have a “slack” or “surplus” depending on whether their left
hand side is less than or greater than their right hand side at that solution.
“Solving a mathematical program” refers to the process of finding a feasible
solution to mathematical program that maximizes (or minimizes, as the case
may be) the given objective function. A solution for which the value of the ob-
jective function is the best possible among feasible solutions (i.e., the largest
for maximization problems and smallest for minimization problems) is called
an “optimal solution”. A mathematical programming problem in which the
What is a linear
objective function and all the constraints are linear is called a “linear pro-
program?
gramming problem”. Linear programming problems are widely studied, since
they occur widely in practice, and have very nice properties which allows us
to solve them very efficiently.
1.2. FORMULATION OF MATHEMATICAL PROGRAMS 5
• First, the stock of wood available each day is enough to manufacture ei-
ther 400 tables or 700 chairs. This means that each table uses up 1/400th
of your daily stock of wood, and each chair uses up 1/700th of it. Thus,
if you manufacture T tables and C chairs, you use up T /400 + C /700
part of your daily stock of wood. This obviously cannot exceed the stock
of wood you have for a day, so that you are constrained to obey the in-
equality T /400 +C /700 ≤ 1.
• The market demand restricts you to producing at most 300 tables each
day, hence your manufacturing plan has to obey the restriction T ≤ 300.
• Lastly, you must ensure that neither T nor C assumes negative values.
These constraints are called non-negativity constraints. While they look
trivial, they are important in a mathematical program, since the model
that we are describing is a mathematical construct and will not be linked
to the physical problem as far as the solving agent (e.g., a computer pro-
gram) is concerned.
The linear program corresponding to the example thus looks like Figure 1.1.
Two other examples of creating linear programming models for practical
problems are given below.
Example 1.1: A manufacturer manufacturers tin cans. Each can has a cylin-
drical main body shaped out of a rectangular piece of sheet metal, and two
circular pieces that form the two ends of the can. He manufacturers the main
body and ends by stamping out sheets of metal. He gets metal sheets in three
sizes, A, B, and C. The numbers of rectangular and circular pieces that can be
obtained from each sheet of the three sizes are:
6 CHAPTER 1. FORMULATING LINEAR PROGRAMS
Decision Variables
Maximize
Contribution z =70T + 50C
Subject to
T /400 +C /700 ≤ 1 (Stock of wood)
T /500 +C /600 ≤ 1 (Labor capacity)
T ≤ 300 (Market restriction on tables)
T, C ≥0 (Non-negativity)
Figure 1.1: Linear programming formulation for the example in Section 1.1
Number of Number of
rectangular circular
Size pieces pieces
A 2 8
B 3 6
C 3 3
Each week, the manufacturer receives a supply of 300 sheets of size A, 150
sheets of size B, and 250 sheets of size C. Each sheet requires 5 minutes to
stamp out. Once the stamped out pieces are obtained, assembling the pieces
into cans require 3 minutes per can. The manufacturer can sell as many cans
as he can produce. Any excess rectangular or circular pieces produced can be
kept in inventory. Cans sell at Rs. 4 per can. With a working week of 40 hours,
the manufacturer wants to determine his optimal production plan so that he
can maximize his weekly revenues.
The Model: The output of our model for the production plan should tell the
manufacturer how many sheets of each size he should stamp out every week.
So we define the following decision variables:
The following variables can also be defined in order to make the formulation
more readable.
Maximize 4K .
x A ≤ 300,
xB ≤ 150, and
xC ≤ 250.
The number of cans that can be produced each week cannot exceed the
number of rectangular pieces stamped out each week or half the number of
circular pieces stamped out each week. Hence we have the following con-
straints:
K − R ≤ 0, and
2K −C ≤ 0.
The numbers of rectangular and circular pieces produced depend on the num-
bers of sheets of sizes A, B, and C that are used every week. These relations are
represented by the following constraints:
Decision Variables
Maximize
Contribution z =3K
Subject to
xA ≤ 300 (Availability of size A sheets)
xB ≤ 150 (Availability of size B sheets)
xC ≤ 250 (Availability of size C sheets)
K −R ≤0 (Rectangular pieces in cans)
2K −C ≤0 (Circular pieces in cans)
R − 2x A − 3x B − 3xC =0 (Stamping out of rectangular pieces)
C − 8x A − 6x B − 3xC =0 (Stamping out of circular pieces)
5x A + 5x B + 5xC + 3K ≤ 2400 (Time constraint)
x A , x B , xC , R, C , K ≥0 (Non-negativity)
In addition all the decision variables defined in this example need to be non-
negative.
Since any excess of rectangular or circular pieces are kept in the inventory,
we do not bother about it in the model. Of course, in practice, one would
consider the inventory of rectangular and circular pieces from the previous
month while deciding on the production plan.
Combining all this, the linear programming model to solve the manufac-
turer’s problem is given in Figure 1.2.
The Solution: Solving the model, the following optimal solution is obtained:
z = 2042.7, x A = 10.1, xB = 150, xC = 13.5, K = 510.7, and C = 1021.4. In the
1.2. FORMULATION OF MATHEMATICAL PROGRAMS 9
context of the example, this means that the manufacturer should procure and
stamp 10.1 size A sheets, 150 size B sheets, and 13.5 size C sheets each week
on average. This would provide him with 510.7 rectangular pieces and 1021.4
circular pieces per week on average, which can be made into 510.7 cans per
week on average, which sell for Rs. 2042.70. No extra rectangular or circular
pieces are produced in the process.
Note that the number of decision variables that we have used in the formu-
lation in Example 1.1 above is larger than what is strictly required. For model
maintenance purposes, it is better to use more decision variables and keep
the program readable, rather than use fewer decision variables and make the
program compact but undecipherable.2
Also note that even though the number of sheets stamped, the number of
components, and the number of cans produced need to be integers in prac-
tice, the formulation only requires them to be non-negative. This is because
fractional values for these variables can be explained easily; the suggestion to
produce K = 510.7 cans per week in an optimal solution translates to produc-
ing a total of 5107 cans in ten weeks. It can also be rounded down to 510 cans
per week for a good enough solution.
Example 1.2: A small bank offers three types of loans: housing loans at 8.50%
interest, education loans at 13.75% interest rates, and loans to senior citizens
at 12.25% interest. Further, it needs to adhere to certain policy restrictions.
These restrictions require the bank to ensure that
Condition 1: housing loans make up between 25% and 60% of the total loan
amount disbursed; and
Condition 2: the amount of loans disbursed to senior citizens should be at
least one third of the total amount disbursed as loans.
In a particular year, its lending capacity is Rs.25,000,000. The bank would like
to disburse loans so as to maximize its earnings from interest paid.
The Model: Our model should help the bank to find the amounts that it can
loan out under each of the three types of loans. Thus we define three decision
variables:
The lending capacity of the bank is Rs.25,000,000. This results in the con-
straint
H + E + S ≤ 25.
We do not write this as an equality constraint. The reason for this is that
Rs.25,000,000 is the lending capacity, and we do not want the bank to lend
the full amount if the conditions turn out to be unfavorable.
The first condition imposed by the bank’s policy requires the housing loans
to be between 25% and 60% of the total loan amount. This can be ensured by
including the constraints
and
The second condition ensures that loans to senior citizens should be at least
one third of the total loans disbursed, i.e.
S 1
≥ .
H +E +S 3
This constraint is not linear; however, it can be converted by cross-multiplication
to the linear constraint 3S ≥ H +E +S which can be simplified to H +E −2S ≤ 0.
Of course, the amounts H, E , and S need to be non-negative.
Thus, the linear programming model that the bank needs to formulate to
plan its loan disbursement policy is the one shown in Figure 1.3.
The Solution: The optimal solution to the problem is: z = 2.98, H = 6.25,
E = 10.42, and S = 8.33. Notice that since housing loans yield the lowest rate
of interest, they have been put at the minimum permitted level, i.e., 25% by
the bank. Among the other two, loans to senior citizens yields less interest.
Hence they have been kept at their minimum possible level, i.e., 1/3rd of the
total allocation.
1.3. PROPERTIES OF LINEAR PROGRAMS 11
Decision Variables
Maximize
Revenue z =0.085H + 0.1375E + 0.1225S
Subject to
H +E +S ≤ 25 (Lending capacity constraint)
0.75H − 0.25E − 0.25S ≥ 0 (Condition 1)
0.4H − 0.6E − 0.6S ≤ 0 (Condition 1)
H + E − 2S ≤ 0 (Condition 2)
H, E, S ≥ 0 (Non-negativity)
800
Wood Availability
600
Market Capacity
400
Feasible
200 Solutions
Labor Capability
being convex, the feasible set is also a polyhedron, i.e., a figure bounded by
lines in two dimensions (see Figure 1.4), planes in three dimensions and hy-
perplanes in more than three dimensions.
EE The fact that the set of feasible solutions for a linear program is convex
is quite easy to prove. Let X (1) = (x1(1) , x2(1) , . . . , xn(1) ) and X (2) = (x1(2) , x2(2) , . . . , xn(2) )
be two feasible solutions to a linear program. Let a solution Y = (y 1 , y 2 , . . . , y n )
such that y i = αxi(1) + (1 − α)xi(2) for 1 ≤ i ≤ n, be infeasible for some α0 ∈ [0, 1].
Since Y is infeasible, it must violate at least one constraint. Without loss of
generality, assume that one of the constraints violated is of the form p 1 x1 +
p 2 x2 + · · · + p n xn ≤ q. (Satisfy yourself that this is completely general.) So
p 1 y 1 + p 2 y 2 + · · · + p n y n > q. (1.1)
Replacing each y i with α0 xi(1) +(1−α0 )xi(2) and rearranging the terms, (1.1) can
be rewritten as
α0 (p 1 x1(1) +p 2 x2(1) +· · ·+p n xn(1) )+(1−α0 )(p 1 x1(2) +p 2 x2(2) +· · ·+p n xn(2) ) > q. (1.2)
The expression (1.2) cannot be valid, since X (1) and X (2) being feasible implies
that both p 1 x1(1) + p 2 x2(1) + · · · + p n xn(1) and p 1 x1(2) + p 2 x2(2) + · · · + p n xn(2) are indi-
vidually less than or equal to q, and 0 ≤ α0 ≤ 1 implies that both α0 and (1−α0 )
are non-negative. So the left hand side of (1.1) cannot exceed α0 q + (1 − α0)q,
i.e., q. Hence Y must be feasible. Since X (1) and X (2) are arbitrary feasible solu-
tion, this shows that the set of feasible solutions for linear programs is convex.
The fact that the set of feasible solutions is convex, and that the objective
function is linear allows us to narrow down our search for an optimal solu-
tion tremendously. To illustrate this, we return to our example about man-
ufacturing furniture. Figure 1.5 shows the set of solutions for which the ob-
jective function values are 15,000 (the lower bold line) and the set for which
the objective function values are 25,000 (the upper bold line). These sets (i.e.,
parallel lines) are obtained by setting z, i.e. 70T + 50C to 15,000 and 25,000
respectively.
Except the case when we are optimizing a constant, we can show that a
point in the interior of the feasible region i.e., not on the boundary of the
feasible region, cannot represent an optimal solution. If we are optimizing
a constant, then all feasible solutions are optimal. A point being in the inte-
rior of the feasible region means that, starting at that point, we can move in
any direction for at least a very small distance and still remain inside the fea-
sible region. Now, since the objective function is linear, there always exists a
14 CHAPTER 1. FORMULATING LINEAR PROGRAMS
800
600
400
z=25000
200
z=15000
Figure 1.5: Solutions with same objective function values for the example
problem
direction of improvement of the objective function at any point, and this di-
rection is perpendicular, or more correctly, normal to the lines (or planes, or
hyperplanes) representing the sets of solutions with the same objective func-
tion values. For example, refer to Figure 1.6. Consider the solution T = 100,
C = 200, (represented by the point A in the figure) as a solution in the in-
terior of the feasible region. The objective function value of this solution is
Rs.17,000. The bold line in the figure represents the set of solutions for which
the objective function value is Rs.17,000. The direction of improvement is
shown by the arrow in the figure. Since A lies in the interior of the feasible re-
A point in the
gion, we can move along the direction of improvement to some point B which
interior of the
has a better objective function value, and is also feasible. The existence of a
feasible region
better feasible solution proves that A cannot be optimal.
cannot be
This fact seems obvious when we consider the practical situation. Suppose
optimal.
we suggest that you manufacture 100 tables and 200 chairs. For this produc-
tion plan you are using up 100/400 + 200/700 = 15/28th portion of your daily
stock of wood, and 100/500 +200/600 = 8/15th of your labor capability. In ad-
dition, the market can absorb more tables and chairs. Since some portion of
all your resources are free due to this plan, and the market can absorb more
of your products, surely you can do better than the current plan.
We cannot use the same argument for solutions on the boundary of the
1.3. PROPERTIES OF LINEAR PROGRAMS 15
800
600
Direction of
400 improvement
200
A
feasible region, since for such solutions, it is possible that any movement
along the direction of improvement would be impossible and would render
a solution infeasible. Thus, we can restrict our search for optimal solutions
to the boundary of the feasible region in a linear program. However, we can
do even better! Consider a linear program with two decision variables, X and
Y , and a maximization objective. Each solution at the boundary of the fea-
sible region is either a corner point solution, or a convex combination of two
adjacent corner point solutions. Consider a solution point (x, y) that is a con-
vex combination of two adjacent corner points, say (x1 , y 1 ) and (x2 , y 2 ). This
means that there exists an α0 ∈ [0, 1] such that x = α0 x1 + (1 − α0 )x2 and y =
α0 y 1 +(1−α0)y 2 . Geometrically, this also means that (x, y) is on the boundary
of the feasible region. Let the objective function for the problem be cx + d y.
Without any loss of generality, assume that cx1 + d y 1 ≥ cx2 + d y 2 , i.e., (x1 , y 1 )
is a better solution than (x2 , y 2 ) for a maximization problem. The objective
function value at the point (x, y) is given by the expression cx + d y.
Now note that
This means that the corner point solution (x1 , y 1 ) is not worse than the
solution (x, y). Observe that if we had assumed that cx1 +d y 1 ≤ cx2 +d y 2 , then
a similar argument would have shown that the corner point solution (x2 , y 2 ) is
not worse than the solution (x, y). So we see that for linear programs with two
decision variables, we only need to evaluate corner point solutions to obtain
an optimal solution.
Similar arguments follow through for linear programs with more than two
decision variables, so that we obtain what is perhaps the most attractive prop-
erty of linear programming problems: If a linear programming problem has
one optimal solution, then the optimal solution is a corner point solution. If
there are more than one optima, then there are an infinite number of them,
but at least one of them is a corner point solution. In other words, if there is an
One of the
optimal solution that is not a corner point, then at least one adjacent corner
optimal
point also represents an optimal solution.
solutions to a
Based on this property, instead of looking at an infinite number of feasible
linear program is
solutions in search of an optimal solution; we can restrict ourselves to corner
a corner point
point solutions only, which are at least countably finite.
solution.
EE The arguments in the last three pages can be compressed greatly, and ex-
pressed more precisely using linear algebra. To see this, note that since the fea-
sible region is a polyhedron, each feasible solution can be expressed as a convex
combination of the corner point solutions. Since the objective function is linear,
the objective function value of any feasible solution cannot be better than the
best among the objective function values at all corner point solutions.
constraint that the proportion of C 1 in the product does not exceed k is mod-
eled by the constraint
x1
≤ k,
x1 + x2 + · · · + xn
x1 − k(x1 + x2 + · · · + xn ) ≤ 0,
(1 − k)x1 − k(x2 + · · · + xn ) ≤ 0.
Example 1.3: An aluminium mine has two shafts from which bauxite ore is
extracted. The company working the mine can extract 3000 tons of ore from
the first shaft and 5000 tons of ore from the second shaft each month. The
first shaft yields ore with 50% impurity, and the second shaft yields ore with
75% impurity. The impurities in the ore are removed by sending them through
a cleaning process. The cleaning process is equipped to handle 7000 tons of
ore. However, the process can handle ores with a maximum of 55% impurity.5
The company would like to maximize the amount of impurity-free ore that it
can produce.
The Model: The model developed for this problem needs to output the am-
ount of ore to extract from each of the mines. For this, we define the following
decision variables:
x1 : tons of ore extracted from the first shaft each month; and
x2 : tons of ore extracted from the second shaft each month.
x1 ≤ 3000, and
x2 ≤ 5000.
The capacity restriction for the cleaning process enforces the constraint:
x1 + x2 ≤ 7000.
The cleaning process can handle a maximum level of 55% impurity. Assuming
that impurity percentages mix linearly, this implies the constraint:
0.5x1 + 0.75x2
≤ 0.55.
x1 + x2
0.05x1 − 0.2x2 ≥ 0.
The Solution: The optimal solution to the model is the following: z = 1687.5,
x1 = 3000, x2 = 750. This means that the company can produce 1687.5 tons of
impurity-free ore each month. For this, they mine 3000 tons of impure ore
from Shaft 1 and 750 tons of impure ore from Shaft 2. Observe that even
though the company can mine 4250 more tons of ore from Shaft 2, and can
clean 3250 more tons of ore through their cleaning process, the high levels of
impurity in the ores prevent the company from fully utilizing their mining and
cleaning capacity.
Modeling penalties
In delivery setups, one is often committed to supplying a certain quantity of
a product, failing which, one is required to pay a penalty proportional to the
shortfall. What makes it interesting in modeling such a situation is that the
penalty amount is not a linear function of the quantity supplied; ifthe supplier
supplies more than the quantity committed, she does not pay any “negative
penalty”. As an illustration, the amount of penalty p paid by a supplier at
1.4. SELECTED SITUATIONS . . . 19
Decision Variables
x 1 : tons of ore extracted from the first shaft each month; and
x 2 : tons of ore extracted from the second shaft each month.
Maximize
Impurity-free ore z =0.5x 1 + 0.25x 2
Subject to
x1 ≤ 3000 (Extraction capacity from Shaft 1)
x2 ≤ 5000 (Extraction capacity from Shaft 2)
x1 + x2 ≤ 7000 (Cleaning process capacity)
0.05x 1 − 0.2x 2 ≥ 0 (Cleaning process quality restriction)
x1, x2 ≥0 (Non-negativity)
50
40
30
20
10
0 1 2 3 4 5 6 7 x
production is x units is max(0, c(a − x)). This is not a linear function, although
it is piecewise linear. We can model this as a linear program in the follow-
ing manner. We define a non-negative variable p denoting the the amount
of penalty to be paid for a given supply quantity. In our model we add the
following constraints that make p a lower bound on the penalty to be paid.
p − c(a − x) ≥ 0, and
p ≥ 0.
We also add a term in the objective function that minimizes the value of p.
When the supply level is at x ≥ a, then the penalty constraint ensures that
p is not less than a negative value c(a − x). However, the non-negativity con-
straint on p ensures that p ≥ 0. So in this case, the penalty constraint is su-
perfluous, and the objective function, which tries to minimize the value of p
sets it to zero. When the supply level is at x < a, then p ≥ c(a − x) > 0. In this
case the non-negativity condition on p is superfluous. The objective function,
which tries to minimize the value of p sets it to the value c(a − x) as desired.
Example 1.4: The state cooperative society buys raw milk from local farmers
and converts it to toned milk and butter, which are then either sent to meet
contractual requirements or are sold in the open market. The society is under
obligation to buy any raw milk brought to it by farmers at a price of Rs.2 per
liter. On average, 1200 liters of raw milk is brought to the society every day.
One liter of raw milk produces 0.95 liters of toned milk. The same liter of raw
milk can be used to produce 100g of butter. Toned milk and butter sell for
Rs.5 per liter and Rs.50 per kilo in the open market. The society is under con-
tractual obligation to supply 600 liters of toned milk to an organization. If the
society is unable to supply the organization with its quota of toned milk, then
it is penalized at the rate of Rs. 6 per liter of shortfall. The society needs to plan
its daily toned milk and butter production in order to maximize its revenues
net of any penalties paid.
The Model: Since the cooperative has no choice but to buy all the raw milk
it receives, the decision the model needs to suggest the allocation of raw milk
into the production of the two products — toned milk and butter. For this, we
define the following decision variables:
M t : liters of raw milk used each day to produce toned milk; and
Mb : liters of raw milk used each day to produce butter.
The amount of toned milk produced each day is thus be 0.95M t , and the
amount of butter produced is 0.1Mb .
1.4. SELECTED SITUATIONS . . . 21
M t + Mb ≤ 1200.
Notice that we do not use an equality here, since we want to allow the option
of letting raw milk go waste if it is profitable to do so.
Next, given the allocation of M t liters for production of toned milk, and
Mb liters for production of butter, we compute the penalty that the cooperative
needs to pay to the organization. Let us define the variable
T s : shortfall in liters in the supply of toned milk from the cooperative to the
organization, i.e., T s = max{0, 600 − 0.95M t }.
The penalty that the cooperative needs to pay the organization is 6T s . The ob-
jective function minimizes the the penalty paid, and so we do not add the con-
straint T s ≤ 600 that would be required otherwise.
The amounts of toned milk and butter that the society sells in the open
market is 0.95M t − 600 + T s and 0.1M t respectively. The penalty it pays to the
organization is 6T s . Its objective is to maximize its net revenue, i.e., to
which simplifies to
The complete model that the society needs to solve to find out its production
plan is given in Figure 1.9.
The Solution: The optimal solution to the model is: z = 5842.10, M t = 631.6,
Mb = 568.4, and T s = 0. So at the prices of toned milk and butter mentioned in
the problem the cooperative society would earn a net revenue of Rs.5842.10
per day on average, produce just enough toned milk to satisfy its contractual
obligations, and sell 0.1 × 568.4 = 56.84 kilos of butter in the open market.
22 CHAPTER 1. FORMULATING LINEAR PROGRAMS
Decision Variables
Maximize
Net revenue z =4.75M t + 5M b − T s
Subject to
M t + Mb ≤ 1200 (Raw milk availability)
T s + 0.95M t ≥ 600 (Shortfall in supply to the organization)
M t , Mb , Ts ≥ 0 (Non-negativity)
is hard means that for any feasible solution x† = (x1† , x2† , . . . , xn† ), the value of
c1 x1† + · · · + cn xn† has to equal p. This is the normal expectation from a con-
straint. However, if p is just a desired value for c1 x1 + · · · + cn xn , then we can
formulate the condition as a “soft” constraint, and allow, but discourage devi-
ations of the value of c1 x1 + · · · + cn xn from p.
This is done by defining additional decision variables δ+ denoting a posi-
tive deviation, and δ− denoting a negative deviation, and specifying the con-
straint as
c1 x1 + · · · + cn xn − δ+ + δ− = p.
The deviations are then discouraged by penalizing them in the objective func-
tion; if the objective function is to be maximized, then a term k(δ+ +δ− ), k > 0,
is subtracted from it, and if the objective function is to be minimized then the
term is added to it. The value of k is chosen to signify the amount of penal-
1.4. SELECTED SITUATIONS . . . 23
ization, a very low value will allow a feasible solution to ignore this constraint,
while a high value of k will turn it into a hard constraint.
If the soft constraint is an inequality rather than an equality, then only one
of the deviation variables is meaningful. For example, if the constraint is of
the form
c1 x1 + · · · + cn xn ≤ p,
then the negative deviation variable δ− has no role to play, since negative devi-
ations are anyway allowed by the constraint. The soft constraint correspond-
ing to this constraint is
c1 x1 + · · · + cn xn − δ+ ≤ p.
c1 x1 + · · · + cn xn ≥ p
c1 x1 + · · · + cn xn + δ− ≥ p.
Note that since the objective minimizes the value of k(δ+ + δ− ), the values of
δ+ and δ− cannot both be strictly positive in an optimal solution to the model.
Example 5 illustrates the use of soft constraints.
Example 1.5: A media planner is planning a media campaign for a new car.
The media vehicles that she is willing to consider are television, newspaper,
and billboards. She has the following data about the awareness generated by
advertisements in each of the vehicles in the relevant target segment:
Increase in awareness
Media Vehicle per million spent
Television advertisement 1.45%
Newspaper advertisement 0.75%
Billboard advertisement 1.75%
The car manufacturing company has stipulated that not more than 30% of
the allocated budget should be used for billboard advertisements, and at least
25% should be used for newspaper advertisements. They would also like the
allocation on television advertisements to be roughly twice the allocation on
billboard advertisements. The media planner has a budget of Rs.10,000,000
and wants to maximize the increase in awareness possible.
24 CHAPTER 1. FORMULATING LINEAR PROGRAMS
The Model: The media planner’s decision is to allocate the available re-
sources to the three media vehicles. Therefore, the decision variables in our
model are:
Decision Variables
Maximize
Increase in awareness z =0.0145T + 0.0075N + 0.0175B − k(δ+ + δ− )
Subject to
T +N +B ≤ 10 (Budget constraint)
B ≤3 (Upper limit for billboard advertisement
N ≥ 2.5 (Lower limit for newspaper advertisement)
+ −
T − 2B − δ + δ =0 (Maintaining the rough ratio of allocations)
+ −
T, N , B, δ , δ ≥0 (Non-negativity)
The Solution: The optimal solution in this case depends on the value of k.
In this simple problem, for all values of k less than 0.001, the optimal solution
is to use Rs. 4,500,000 for television advertising, Rs. 3,000,000 for billboard ad-
vertising, and Rs. 2,500,000 for advertising in the newspapers. However, if the
value of k is 0.001 or more, then the allocation changes. In this situation, the
optimal solution is to use Rs. 5,000,000 for television advertising, Rs. 2,500,000
each for billboard advertising and newspapers. Thus higher values of k force
the soft constaints to be satisfied exactly.
Maximize k(c1 x1 + · · · cn xn ) + (d 1 x1 + · · · d n xn ),
where the weight k, (k > 1) represents the the relative importance of the first
objective with respect to the second. A high value of k implies that the first
objective is much more important than the second objective, while a low value
of k implies that it is only marginally more important.
A drawback of this method is that it is often difficult to quantify the im-
portance of one objective in relation to another, especially when objectives
are measured in different units. The solution we get critically depends on the
value of k.
Another way of handling multiple objectives is based on a hierarchical ap-
proach. The idea is to optimize on the most important criterion, and if there
is a tie, to use a less important criterion to break it. To illustrate, let us again
assume that we have two objectives, represented by functions c1 x1 + · · · cn xn
and d 1 x1 +· · · d n xn , and both of these require to be maximized. Let the first ob-
jective be more important to us. We first choose the more important objective
and optimize it ignoring the second objective. Let the optimal objective func-
tion value for the first objective in this case be z c . Subsequently we optimize
the second objective while adding the constraint
c1 x1 + · · · cn xn = zc
to the original set of constraints. The solution that we get from this stage is
the solution that our model outputs. This method ensures that achieving the
second objective can in no way affect the level of achievement of the first ob-
jective.
A variation of this approach is also seen in practice, especially when the
optimal solution to a high priority objective is unique. In this variation the
constraint added to the later stage includes a concession on the value of the
first objective. As an illustration, the constraint that would get added to the
second stage in our setup will be
c1 x1 + · · · cn xn ≥ (i − α)z c ,
1.4. SELECTED SITUATIONS . . . 27
where α is a pre-defined value less than unity. This means that we are allowing
a concession of α to the optimal value of the first objective to obtain a better
optimal value to the second.
It should be obvious that more than two objectives can be modeled using
both these formulation techniques.
Example 1.6: An organization sells two types of lunch packets at very low
prices. A Class-A lunch packet sells for Rs.6.00, and a Class-B lunch packet
sells for Rs.4.00. The organization buys Class-A packets from its suppliers at
Rs.4.80 per packet, and Class-B packets at Rs.3.20 per packet. Its budget for
buying food is Rs.1000 per day on average. To be sustainable, it has a primary
objective to generate as much surplus as possible from selling the packets. The
organization also wants to supply as many Class-A lunch packets as possible.
The organization wants to determine the mix of Class-A and Class-B lunch
packets that it should buy from its suppliers.
The Model: The organization needs to determine the number of each class
of lunch packets that it needs to buy every day. So it needs to define the fol-
lowing decision variables:
The surplus from each class-A lunch packet is Rs.1.20, while that from each
Class-B lunch packet is Rs.0.80. So the two objective functions that the orga-
nization wants to maximize are
Now let us demonstrate the two ways in which the two objectives are con-
sidered in the model.
In the first method, let us decide to assign a weight of k (k > 1) to Objective 1
in order to show that it is more important than the second objective. In this
case, the objective of the organization’s model is
Decision Variables
Maximize
Combined objective z =k(1.20x A + 0.80x B ) + (x A )
Subject to
4.8x A + 3.2x B ≤ 1000 (Budget constraint)
x A , xB ≥0 (Non-negativity)
to the budget and non-negativity constraint and then maximize the second ob-
jective. This is shown as the second stage model in Figure 1.12.
The Solutions: In the first formulation, regardless of the value of k, the op-
timal solution is x A = 233.33 and xB = 0. In other words, this formulation al-
ways suggests that, on average, the organization buys 233.33 Class-A packets
and no Class-B packets.
In the first stage of the second formulation, there are an infinite num-
ber of optimal solution. All convex combinations of the solutions (x A , xB ) =
(233.33, 0) and (x A , xB ) = (0, 312.5) are optimal for the first stage model.
In the second stage model, the optimal solution would be the one among
the optimal solutions from the first stage with the largest value of x A , i.e., the
solution (x A , xB ) = (233.33, 0). The search will be restricted among the optimal
solutions of the first stage because of the constraint 1.20x A + 0.80xB = 250.
1.4. SELECTED SITUATIONS . . . 29
Decision Variables
Maximize
First objective z 1 =1.20x A + 0.80x B
Subject to
4.8x A + 3.2x B ≤ 1000 (Budget constraint)
x A , xB ≥0 (Non-negativity)
Maximize
Second objective z 2 =x A
Subject to
4.8x A + 3.2x B ≤ 1000 (Budget constraint)
1.20x A + 0.80x B = 250 (Satisfying Objective 1 level)
x A , xB ≥0 (Non-negativity)
c1 x1 + · · · + cn xn ≤ v, and
d 1 x1 + · · · + d n xn ≤ v,
We then minimize the value of v through the objective function. Notice that v
itself is not non-negative; as it may achieve negative values depending on the
objective functions.
Next let us examine another kind of bottleneck objective. Assume that
we have a linear programming formulation with n decision variables, x1 , . . . ,
xn , a set of constraints that define the feasible region, two functions, c1 x1 +
· · · + cn xn and d 1 x1 + · · · + d n xn , and we want to choose values of the decision
variables such that the smaller of the two functions is as large as possible. This
kind of objective is called a max-min objective. The technique for modeling
What is a
this is similar to the one above; we define a decision variable w, and constrain
max-min
it not to be larger than both the objective function values with the constraints
objective?
c1 x1 + · · · + cn xn ≥ w, and
d 1 x1 + · · · + d n xn ≥ w,
Example 1.7: Chotamota Construction Company (CCC) has two small ware-
houses at Ambapur and Belapur, which need to supply cement to two build-
ing sites at Palampur and Rampur. The warehouses at Ambapur and Belapur
have 10 truckloads of cement and 4 truckloads of cement in stock. Palampur
requires 6 truckloads of cement, while Rampur requires 8 truckloads. Each
building site has one truck to transport cement, and can send that truck to
either of the two warehouses. The times taken for round trips from the ware-
houses to the building sites are:
Palampur Rampur
Ambapur 6 hours 5 hours
Belapur 7 hours 8 hours
1.4. SELECTED SITUATIONS . . . 31
CCC must decide on how many truckloads to supply to each building site
from each warehouse so that the time required to satisfy all the demands is the
minimum possible.
The Model: CCC needs to decide how many truckloads of cement to send
from each warehouse to each building site. So our model has the following
decision variables:
Notice that the sum of the demands at the two locations exactly equal the
sum of the stocks at the two warehouses. So the demands would be met ex-
actly, and the amounts of cement sent from each of the two warehouses would
exactly equal their stocks.
Since the demands of both the building locations have to be met, we have
the following constraints in our model:
Also, since the full cement stock at both the warehouses have to be sent
out, we have the following constraints in our model:
x AP + x AR = 10 (for Ambapur),
xBP + xBR = 4 (for Belapur).
The building site at Palampur has only one truck. So, the time taken to
deliver its requirement of cement is
TP = 6x AP + 7xBP .
TR = 5x AR + 8xBR .
We need the following decision variable to indicate the time required to meet
all demands:
Decision Variables
Minimize
Delivery time z =v
Subject to
x AP + x B P = 6 (Demand at Palampur)
x AR + x B R = 8 (Demand at Rampur)
x AP + x AR = 10 (Stock at Ambapur)
xB P + xB R = 4 (Stock at Belapur)
6x AP + 7x B P − v ≤ 0 (linking v to TP )
5x AR + 8x B R − v ≤ 0 (linking v to TR )
x AP , x AR , x B P , x B R ≥ 0 (Non-negativity)
Clearly,
v = max(TP , TR ),
Minimize v
The model that we construct for CCC thus is the one shown in Figure 1.13.
Notice that we do not impose a non-negativity constraint on v in the model.
1.5. SOLVING LINEAR PROGRAMS 33
The Solution: The optimal solution to the model is the following: v = 40,
x AP = 2, x AR = 8, xBP = 4, and xBR = 0. This means that the delivery would
be complete in 40 hours, with the warehouse at Ambapur supplying 2 truck-
loads of cement to the building site at Palampur and 8 truckloads of cement
to the building site at Rampur, and the warehouse at Belapur supplying all its
4 truckloads of cement to the site at Palampur.
800
P
600
400 Q
200 R
S
–100 O 100 200 300 400 500 T
Figure 1.14: Feasible region of the problem in Section 1.1 with corners labeled
find a feasible objective function value c (usually from any feasible solution)
to start the method, and draw a line with the equation z = c, where z is the
objective function of the linear program. We also obtain the direction of im-
provement of the objective function. In case of the problem in the example
in Section 1.1, when c = 17, 000, the diagram at this stage looks like Figure 1.6
on page 15. We then slide the line z = c parallel to the original line along the
direction of improvement until it just touches the feasible region. This situa-
tion depicted in Figure 1.15. The solution corresponding to the corner point
at which the line now touches the feasible region is an optimal solution. We
leave it to the reader to figure out whether the line can touch more than one
corner point at this stage, and if it does, what inferences can be drawn from it.
1.5. SOLVING LINEAR PROGRAMS 35
800
600
400
200
formula for the the objective function value (i.e., contribution) of the solu-
tion represented by the cells B2 and C2. This is computed using the formula
‘=SUMPRODUCT(B2:C2,B3:C3)’. We next enter the constraints in the work-
sheet. It is always a good idea to label each constraint. In our case, rows 7, 8,
Figure 1.16: The Microsoft® Excel sheet set up before calling Solver
and 9 contain the constraints for wood availability, labor capacity, and market
capacity for tables respectively. We have entered the function corresponding
to the left hand side of the constraints in column E, marked LHS, and writ-
ten the formula alongside. We next enter the values on the right hand side of
the constraints in column D, marked RHS. Normally we would have the LHS
column appear before the RHS column. We break from convention here so
that we can write down the SUMPRODUCT function used in the formulae for
LHS for illustrative purposes only. Notice that we have not yet entered the
non-negativity constraints in our model.
We are now ready to invoke Solver by choosing the Tools menu and choos-
ing the Solver option. Solver opens a dialog box labeled Solver Parameters
similar to the one shown in Figure 1.17. We first input the cell reference at
which the objective function value is computed (in our case, cell $C$4), and
click the radio button below it to specify that we want to maximize the objec-
tive function. As is clear from the figure, the other choices that Solver allows
you are to minimize an objective function, or to find a solution that sets the
1.5. SOLVING LINEAR PROGRAMS 37
objective function to a pre-specified value. Next, in the box labeled “By chang-
ing cells”, we specify the cells in which the decision variables of the model are
stored. Finally, we add constraints to the model by clicking on the “Add” but-
ton and adding the constraints.
Solver has found an optimal solution. Once this dialog box is seen, there is
nothing further to be done, and the Solver Results dialog box can be removed
by clicking on the “OK” button on this box.
Figure 1.18: Microsoft® Excel solution dialog box after running Solver
When the Solver Results dialog box is removed, the values of the decision
variables and the optimal solution obtained by Solver appear in the appro-
priate cells (in our case, cells B2, C2 and C4 respectively). After the solution
process is over, the worksheet looks like Figure 1.19. Notice that the solution
shown in the worksheet is the same as the one that was arrived at in the intro-
ductory section.
EE The report in the Solver Results dialog box is inconspicuous and often
ignored, but needs to be checked every time a linear program is solved using
Solver. If the model does not have a finite optimal solution (i.e., is unbounded)
or has no feasible solution (i.e., infeasible), the cells containing the decision
variables and the objective function value in the worksheet would have inter-
mediate values assigned to them by Solver. It is not necessary that these values
correspond to the best solution that Solver found (i.e., the least infeasible solu-
tion). Ignoring the message in the Solver Results dialog box can mislead the
modeler in such cases.
1.6. ADDITIONAL TERMINOLOGY 39
Basic variables: Consider the problem discussed in Section 1.1. In this prob-
lem, there are two decision variables, and three constraints (excluding
the non-negativity constraints). There are several corner point solu-
tions in this problem, and at each corner point solution, some decision
variables assume values which are not at their lower bounds (which is
zero in this case) or at their upper bounds (which is infinite in this case).
These decision variables are said to be basic variables corresponding to
the particular corner point.
For example, at the corner point solution marked Q in Figure 1.15 on
page 35, both T and C assume non-zero values. So T and C are both
basic variables corresponding to the corner point solution at Q. At the
corner point solution marked P, only C assumes a non-zero value, while
T assumes a zero value, i.e., it is at its lower bound. So C is a basic vari-
40 CHAPTER 1. FORMULATING LINEAR PROGRAMS
Maximize
z =x1 + x2
Subject to
x1 ≤ 1 (Constraint 1)
x2 ≤ 1 (Constraint 2)
x1 + x2 ≤ 2 (Constraint 3)
x1 , x2 ≥ 0 (Non-negativity)
In this program, there are two decision variables, x1 and x2 , and all three
constraints pass through the corner point (1, 1). (Draw the feasible re-
gion to convince yourself of this fact). The point (1, 1) is therefore a de-
generate solution in this program. Given a linear program with a degen-
erate solution, it is always possible to remove a constraint which does
not affect the feasible region. However, the constraint to be removed
needs to be chosen with care. For example, removing constraint 2 in the
1.6. ADDITIONAL TERMINOLOGY 41
Maximize
z =x1 + x2
Subject to
x1 + x2 ≤ 2 (Constraint 1)
x1 + x2 ≥ 4 (Constraint 2)
x1 , x2 ≥ 0 (Non-negativity)
Maximize
z =x1 + x2
Subject to
2x1 + x2 ≥ 5 (Constraint 1)
x1 + x2 ≥ 4 (Constraint 2)
x1 , x2 ≥ 0 (Non-negativity)
Problems
Problem 1.1: A paint manufacturer manufactures two types of paint, Regular
and Premium. To manufacture these paints, he mixes three components, a
base, a pigment, and some adhesive. Each liter of Regular paint has 950ml of
base, 40ml of pigment, and 10ml of adhesive. Each liter of Premium paint has
930ml of base, 55ml of pigment, and 15ml of adhesive. Regular paint sells at
Rs. 150 a liter, and Premium paint sells at Rs. 180 a liter.
The manufacturer obtains the components from two suppliers. He has
signed a yearly contract with the first supplier valued at Rs. 2,00,000, to sup-
ply him with 4000 liters of base and 340 liters of pigment each day. He has
also signed a yearly contract with the second supplier, valued at Rs. 1,50,000
to supply him with 3500 liters of base and 100 liters of adhesive each day.
The manufacturing unit is staffed by ten permanent employees each earning
Rs. 10,000 per month, in addition to a bonus of Rs. 0.50 for every liter of Regu-
lar paint produced, and Rs. 0.80 for every liter of Premium paint produced.
The manufacturer wants to find out how much Regular and Premium paint
he should produce each day in order to maximize the contribution to profits.
c. What would be the best product mix from the manufacturer’s point of
view?
d. If the company employees were given a free hand at deciding the product
mix, what product mix would they suggest? How does this product mix
compare with the product mix you obtained in part (c)?
[Answer(s): (c) 6398.67 liters of Regular and 1528.24 liters of Premium (d) 0
liters of Regular and 6181.82 liters of Premium ]
Problem 1.2: A cafeteria serves one among three meals, Meal A, Meal B, and
Meal C to all students in a school each day for lunch. Each student gets one
serving of the meal of the day. One serving of Meal A contains 30g of protein,
65g of carbohydrates, 25mg of minerals, and 55g of fat. One serving of Meal B
contains 45g of protein, 40g of carbohydrates, 20mg of minerals, and 45g of
fat. One seving of Meal C contains 40g of protein, 35g of carbohydrates, 25mg
of minerals, and 45g of fat.
44 CHAPTER 1. FORMULATING LINEAR PROGRAMS
The school dietitian has suggested that from each meal serving, students
should obtain on average at least 40g each of proteins and carbohydrates, be-
tween 22 and 30mg of minerals, and at most 50g of fat. One serving of Meal A,
Meal B, and Meal C costs the cafeteria Rs. 20, Rs. 35 per meal, and Rs. 40 re-
spectively. The school management wants to know the minimum price that it
can set for meals in its fee structure.
b. What is the minimum price that can be set for the meal plan?
c. Are any of the conditions that you specified in part (a) redundant?
d. Can you solve this problem using only two decision variables?
Problem 1.4: OilComp Ltd. has put out a tender for 50,000 barrels of petrol,
30,000 barrels of kerosene, and 25,000 barrels of lube oil. Your company thinks
that it can bid for this tender.
Your company procures two types of crude, called Crude A and Crude
B, and refines them into the desired products. Each barrel of Crude A costs
Rs. 750 and yields 20% by volume of petrol, 10% by volume of kerosene, and
50% by volume of lube oil. Each barrel of Crude B costs Rs. 1000, and yields
40% by volume of petrol, 30% by volume of kerosene, and 20% by volume of
lube oil. You are confident that any excess of petrol, kerosene, and lube oil
that you produce will be sold in the market at Rs. 500 a barrel, Rs. 400 a bar-
rel, and Rs. 100 a barrel respectively. Due to existing regulations, you cannot
procure more than 100,000 barrels of Crude A and more than 80,000 barrels of
Crude B during this period. Answer the following questions independent of
each other.
a. Formulate a linear programming model that will allow you to decide on
the minimum price you should bid for the OilComp tender.
b. Suppose that OilComp revises its tender. According to the new tender, the
requirements are for 30,000 barrels of petrol, 50,000 barrels of kerosene,
and 25,000 barrels of lube oil. OilComp allows you to revise/cancel your
bid after these changes. What should you do?
c. Ignore the change in the tender mentioned in part (b). The price of crude
oil has just increased. Now Crude A costs Rs. 900 per barrel, and Crude B
costs Rs. 1200 per barrel. However, the market prices of petrol and kerosene
have also increased by Rs. 100 per barrel and Rs. 50 per barrel respectively.
The price of lube oil has remained the same. How do these changes alter
your bid?
[Answer(s): (a) Rs. 142,700,000 (c) Rs. 172,050,000 ]
Problem 1.5: The VegOil company buys two grades of raw vegetable oils VEG1
and VEG2, blends and processes them into three intermediate products, Reg-
ular, High, and Super; and supplies them to another company, OilSel. The
vegetable oils that VegOil obtain have the following active components.
VEG1 costs Rs. 160 a barrel, and VEG2 costs Rs. 170 a barrel.
Quality restrictions on the three intermediate products are stringent. While
Regular oil can have as high as 80% of unsaturated fatty acids (both PUFA and
MUFA), High oil can have a maximum of 78% and Super oil can have a maxi-
mum of 75%. Regular oil must have at least 13% of SFA, while High oil needs
to have at least 15% SFA. For this problem, assume that fatty acids blend lin-
early. VegOil has a contract with OilSel to supply them 400 barrels of Regular
oil, 250 barrels of High oil, and 500 barrels of Super oil every day.
a. How much money does VegOil need to spend every day on procuring VEG1
and VEG2 to supply the contracted quantities of Regular, High, and Super
oils to OilSel?
b. Suppose the contract also states that if VegOil supplies less than the con-
tracted amount of the various oils, they would pay a penalty of Rs. 168 for
each barrel of shortfall. Under this new condition, what is the cheapest
way in which VegOil can deal with OilSel?
[Answer(s): (a) Rs. 192,750 (b) Rs. 191,750; do not supply Super. ]
Problem 1.6: When a customer asks a bank for a loan, the bank checks to see
if the customer is a good risk for the loan. In order to check this, the bank
runs a check and computes a probability of repayment (called PR). They also
guess a probability of doing business with the customer in future (called PBF).
These probabilities are converted to a continuous scale from 0 through 10 by
multiplying the probabilities by 10. The loan approval decision is based on a
careful appraisal of these scores.
The PR and PBF scores and loan approval decisions in the last 15 applica-
tions are the following. These decisions were based on the experience of an
officer granting the loans.
The bank manager now feels that the approval process can be automated. She
wants a single score that is a weighted sum of the PR and PBF scores, and
would approve the loan if and only if this score exceeds a threshold.
a. Based on the fifteen data points that you have, can you suggest a weighing
of the PR and PBF scores and a convenient threshold that would agree with
the last 15 decisions?
b. What weighing of the scores and threshold will give your model the best
discriminating power?
Problem 1.7: A company that manufactures and sells consumer durables has
noted that the sales of premium television sets can be predicted from general
satisfaction levels of the public at large. At the end of each month, the research
department provides the company an indicator for the next months satisfac-
tion levels. This indicator is a number between 0 and 100, A high value of the
indicator indicates a higher sales level for the next month. The values of the
indicator for the last twelve months and the numbers of premium television
sets sold during the same months are given in the table below.
The management of the company believe that the sales of any given month is
a linear function of the indicator for that month, and want to derive the func-
tion based on the data available. They realize that when they come up with
an equation, there would be a difference between the number of sets actually
sold in a given month and the number of sets that their model would predict
for that month. They figure that a good fit would be a model which minimized
48 CHAPTER 1. FORMULATING LINEAR PROGRAMS
the sum of the deviations between the actual and predicted numbers over all
twelve months. (Notice that the deviation would be non-negative regardless
of whether the prediction exceeded or fell short of the actual sales.)
b. A method called OLS curve fitting minimizes the square of the deviations
between the actual and estimated sales. OLS curve fitting returns the fol-
lowing equation
Compare this equation with the equation you obtain in part (a), and com-
ment on the two.
c. The statistics department of the company sent a memo stating that the
sales figure for month 2 is incorrect, and should read 163 instead of 123.
The OLS equation with the changed data is
What is the corresponding equation that you obtain from your model from
part (a).
d. Another method of finding a good fit is to ensure that the maximum de-
viation between the actual and predicted numbers is as small as possible.
Construct a linear model that achieves this objective. Ignore the change in
data mentioned in part (c).
Problem 1.8: A company has embarked on a new project which is to last three
months. The requirements for researchers for the project in each of the three
months is given below.
Month 1 2 3
Requirement 20 10 30
PROBLEMS 49
The Human Resources department of the company has been entrusted with
the hiring and firing decisions of researchers for the project.
Each researcher working on the project needs to be paid Rs. 20,000 per
month. The cost of hiring a researcher (including search and training costs) is
Rs. 15,000 per person. There is no cost associated with letting a researcher go
(firing) when she is no longer required for the project.
b. Suppose that the contract stipulates that every time a student is at the
pick-up point at the stipulated hour, and is not picked up due to a lack
of available cars, the student is to be treated to refreshments worth Rs. 15
for the wait until the next pick-up three hours later. Under this stipulation,
how should the manager deploy cars? For this question assume that Amar
Travels has only six cars available.
51
52 CHAPTER 2. POST-OPTIMALITY ANALYSIS
Decision Variables
Maximize
Contribution z =70T + 50C
Subject to
T /400 +C /700 ≤ 1 (Stock of wood)
T /500 +C /600 ≤ 1 (Labor capacity)
T ≤ 300 (Stock of reading lamps)
T, C ≥0 (Non-negativity)
Figure 2.1: Linear programming formulation for the example in Section 2.1
your business or markets. Let us assume that this company has full and cor-
rect information about your production capabilities, your inventory, and the
contributions that you obtain from each table and each chair. This scenario
occurs when the acquirer is a dominant player and the target is in a weak po-
sition.
An intuitive approach to determining prices is the following. Let us try to
Warning: This
determine the price of your labor capabilities. We know that with your labor
approach is not
working at full capacity, you make a contribution of Rs. 31,818.18 per day. Now
guaranteed to
let us reduce the labor capacity by 20%. The labor capacity constraint in the
work!
model in Figure 2.1 becomes
while the other constraints remain unchanged. If we solve this changed model,
then we get an optimal contribution of Rs. 27,000.00. This implies that 20% of
your labor force is capable of generating a contribution of Rs. (31, 818.18 −
27, 000.00) = Rs. 4818.18, which in turn implies that the price of your labor re-
source is Rs. 4818.18/0.2 = Rs. 24,090.91. We could follow a similar process for
computing the prices of your daily stock of wood and reading lamps.
There is a problem with this approach. Let us say that we reduce, not 20%
of the labor capacity, but only 10% of it. In that case, the labor capacity con-
2.1. ANOTHER EXAMPLE . . . 53
and the optimal contribution from this changed model is Rs. 29,909.09. From
this data, the price of your labor capacity turns out to be Rs. (31, 818.18 −
29, 909.09)/0.1 = Rs. 19,090.91, which is different from the figure of Rs. 24,090.91
that we had earlier.
Let us understand why this difference occurs. Figure 2.2 shows a portion
of the feasible region for the original problem. Q marks the corner point so-
C
Q
Lamp Availability
350
Labor Capability
300
250
200
Wood Availability
150
100
150 200 250 300 T
lution which is optimal for the linear program in Figure 2.1. Notice that labor
capacity and wood availability are binding for this solution. When the labor
capacity reduces by 10%, the labor capacity constraint shifts and the optimal
solution also changes (see the point Q’ in Figure 2.3). The change is purely
due to the reduced labor capacity, and wood availability and labor capacity
still determine the optimal product mix. Therefore, the loss of contribution in
this case is solely due to the reduction in labor capacity, and the price of la-
bor computed by reducing labor capacity by 10% (i.e., Rs. 19,090.91) is a true
measure of the price of labor at the optimal solution of the original problem.
However, if the labor capacity is reduced by 20%, the feasible region looks
like Figure 2.4. The optimal corner point solution in this case is the point Q”
in this figure. Notice, that with the labor capacity reduced to this level, there
is not enough labor to fully use the wood available, and the number of read-
ing lamps available becomes important. Therefore, the price that we obtained
by reducing the labor capacity by 20% was not the true price of labor capac-
ity at the optimal solution because it included the effect of the new binding
constraint.
54 CHAPTER 2. POST-OPTIMALITY ANALYSIS
350
300
250
200 Q’
150
100
150 200 250 300 T
Figure 2.3: The feasible region and optimum with the labor capacity reduced
by 10%
350
300
250
200
150
Q’’
100
150 200 250 300 T
Figure 2.4: The feasible region and optimum with 20% of labor capacity sold
off
the option of using extremely small increments to compute the prices is not ad-
visable, if a computer is used to compute shadow prices. Computers are finite
precision machines, and dividing very small quantities by very small quantities
leads to large rounding errors.
We call these prices “shadow prices”. They are marginal prices of the re-
What are shadow
sources.
prices?
Notice that each of the three resources are never used in isolation. So for
example, wood can be used in three different ways: (1) it can be used to man-
ufacture a table, (2) it can be used to manufacture a chair, or (3) it can lie
unused. If it is used to manufacture a table, then it is part of a bundle con-
sisting of 1/400-th of the daily stock of wood, 1/500-th of the daily availability
of labor, and 1 reading lamp. This bundle generates Rs.70 in contribution for
your company. So you will sell this bundle to the rival company instead of
56 CHAPTER 2. POST-OPTIMALITY ANALYSIS
producing tables only if the price you get for the bundle is not less than Rs.70.
In other words, you will insist that
If the wood was used to manufacture a chair, it will be part of a bundle consist-
ing of 1/700-th of the daily stock of wood and 1/600-th of the daily availability
of labor. This bundle of resources generates a contribution of Rs.50. So you
will sell this bundle to the rival company instead of producing chairs only if
If it was lying unused, you would settle for any non-negative price for the
wood, i.e., you will insist that
p w ≥ 0.
Labor similarly has three uses; it could be used as (1) a part of a bundle
consisting of 1/400-th of the daily stock of wood, 1/500-th of the daily avail-
ability of labor, and 1 reading lamp required to produce a table, or (2) a part of
a bundle consisting of 1/700-th of the daily stock of wood and 1/600-th of the
daily availability of labor required to produce a chair, or (3) it may be unused.
Using an argument similar to the one above, any price that you will agree for
labor would have to satisfy the conditions
Using a similar argument, you will agree to sell off reading lamps only if
the following conditions were satisfied.
Thus any set of non-negative prices satisfying the conditions for pricing of
bundles used for manufacturing tables and chairs will be fine with you.
Now your rival would want to minimize the amount of money that they
pay you. Remember, that the prices are marginal prices, so the rival will want
to minimize the price they pay for a very small fraction, say ε part of your
resources. The price of this fraction is ε(p w + p l + 300p r ) which your rival
2.2. SHADOW PRICES AND THE DUAL PROGRAM 57
Decision Variables
Minimize
Amount payable z =p w + p l + 300p r
Subject to
p w /400 + p l /500 + p r ≥ 70 (For tables)
p w /700 + p l /600 ≥ 50 (For chairs)
pw , pl , pr ≥ 0 (Non-negativity)
Figure 2.5: Linear programming model developed by the company buying out
your resources
EE We have defined shadow prices here as the price per unit at which the
manufacturer is willing to sell an infinitesimal portion of the resource being
priced. While determining the amount of resource to sell, we ensure that the
change does not alter the set of constraints that are binding at the optimal so-
lution. This is not the only interpretation of shadow prices. We can also define
shadow price as the price per unit that the manufacturer needs to pay to buy an
58 CHAPTER 2. POST-OPTIMALITY ANALYSIS
infinitesimal portion of the resource being priced. These two prices are equal
when the optimal solution is not degenerate. Otherwise there is a problem.
Consider our example in Section 2.1. Here the optimal solution is not de-
generate, since for this two variable problem, only two constraints are binding
at this point. We can easily check that the maximum price you pay to have 1%
more wood is exactly the same as the minimum price that you are willing to
quote for selling 1% of your stock of wood.
In the same problem context, let us say that on average you receive 181 9/11
lamps each day rather than 300. Even in this changed scenario, your optimal
product mix remains unaltered, i.e., each day you produce 181 9/11 tables and
381 9/11 chairs. Assume now that you want to sell some reading lamps. If you
sell reading lamps, then your production plan becomes infeasible, and the op-
timal product mix in such a case would bring less contribution than earlier.
Hence the shadow price of selling reading lamps is non-zero. (It is actually
Rs. 10.00 per reading lamp.) Next assume that you are planning to buy some
reading lamps. If you buy any reading lamps, your original optimal solution
remains unchanged, since the wood and labor availability restrict you from
manufacturing a better mix of tables and chairs. Since your contribution will
not increase with your buying new lamps, you will not be willing to pay any-
thing for buying new reading lamps. Hence the shadow price of buying reading
lamps is zero, which is different from the shadow price we computed earlier.
Different linear program solution packages differ in the way they interpret
Caveat emptor!!
shadow prices. So we need to read the documentation before we interpret the
shadow prices provided in the output of a linear programming solution pack-
age. Some packages output the price of selling an infinitesimal quantity of the
resource, while others output the price of buying that quantity of resource.
The pair of linear programs shown in Figure 2.1 and Figure 2.5 are called
a primal-dual pair, and each of the programs is called a dual of each other.
Either of the two can be called a primal problem, and once a problem has
What are primal
been labeled a primal problem, the other problem in the pair automatically
and dual
becomes its dual.
problems?
The following example describing what is commonly referred to as the diet
problem and its dual illustrates a well-known primal-dual pair of linear pro-
grams.
Example 2.1: An army officer is assigned the task of buying meat, bread, and
fruit in sufficient quantity to feed a garrison. The primary aim of the officer
is to ensure that each person in the garrison has sufficient amount of protein,
carbohydrate, and fat in his diet. A portion of meat costs Rs. 25 and provides
half the daily requirement of protein, one tenth the daily requirement of car-
2.2. SHADOW PRICES AND THE DUAL PROGRAM 59
bohydrates, and one third the daily requirement of fat for a person. A portion
of bread costs Rs. 10 and provides one tenth the daily requirement of pro-
tein and fat, and half the daily requirement of carbohydrates for a person. A
portion of fruit costs Rs. 15 and only provides a quarter of a person’s daily re-
quirement of carbohydrates. The officer wants to minimize the cost of food
for the garrison.
At the same time, a pharmaceutical company is planning to sell nutritional
supplements to the garrison. These supplements come as protein pills, car-
bohydrate pills, and fat pills. Each of the pills contain enough nutrition to
supplement a day’s requirement for a person. The company wants to find out
the maximum price that it can charge for each of these pills from the army
officer.
These two problems together form a primal-dual pair. First consider the
army officer’s problem. He would solve his problem if he finds the minimum
cost at which he can provide a day’s quota of nutrients to one member of the
garrison. If the army officer develops a linear program to solve his problem,
then this program would have decision variables for the number of portions
of meat, fruit and bread that he should buy for each person in the garrison;
and would minimize the cost of buying food portions subject to constraints
which ensure that the person’s daily requirements of protein, carbohydrate,
and fat are met. Such a linear program is given in Figure 2.6.
Next consider the pharmaceutical company’s problem. It wants to maxi-
mize the revenues that it would get by selling the pills to the army officer. So
the linear program that it would solve would have decision variables for the
minimum prices that it would like to quote for the pills, and would maximize
its revenue from supplying one of each type of pills to each member of the gar-
rison subject to the constraint that the price of obtaining the nutrients in one
portion of each type of food does not exceed the price that the army officer
pays for that portion. Hence its model would be the one shown in Figure 2.7.
These two models form a primal-dual pair. Each of the models is a dual of
the other one.
The following points are valid for every primal-dual pair of linear programs.
1. If a primal and a dual problem both admit optimal solutions with finite
Strong law of
objective function values, then the objective function value of an op-
duality.
timal solution to the primal equals the objective function value of an
optimal solution to the dual. This is called the strong law of duality. If
holds even if there are multiple optimal solutions to either of the primal
and dual problems. This is because, even though there may be multi-
60 CHAPTER 2. POST-OPTIMALITY ANALYSIS
Decision Variables
Minimize
Cost per person z =25m + 10b + 15 f
Subject to
m/2 + b/10 ≥ 1 (Protein requirement)
m/10 + b/2 + f /4 ≥ 1 (Carbohydrate requirement)
m/3 + b/10 ≥ 1 (Fat requirement)
m, f , b ≥ 0 (Non-negativity)
Decision Variables
Maximize
Revenues r =p p + p c + p f
Subject to
p p /2 + p c /10 + p f /3 ≤ 25 (For a portion of meat)
p p /10 + p c /2 + p f /10 ≤ 10 (For a portion of bread)
p c /4 ≤ 15 (For a portion of fruit)
pp , pc , p f ≥ 0 (Non-negativity)
4. The shadow prices of all the resources are obtained simultaneously when
using this approach.
5. The shadow price of a particular resource depends not only on the ob-
jective function and the stock of the resource, but also on the stocks of
other resources.
Let us look at the models in Figures 2.1 and 2.5 that form a primal-dual
pair. Ignoring the non-negativity constraints in both the programs, we see
that the coefficients on the right-hand sides of the constraints in each of the
problems form the coefficients of the objective function of the other. We also
note that the matrix of the coefficients of the variables on the left hand side
of both the programs are simply transposes of each other. These observations
are handy when we want to construct the dual to any linear program without
looking at the economic interpretation behind it, as we shall see in the next
section.
EE There is another way to motivate the dual of a linear program that looks
62 CHAPTER 2. POST-OPTIMALITY ANALYSIS
Note that W , L, or R cannot be negative, since they would then invert the
inequalities. Our objective in this program is to make the value of the right
hand side of the inequality (2.1) as small as possible. So we would like to
Minimize W + L + 300R.
For the right hand side of (2.1) to be an upper bound, the coefficients of
T and C on the left hand side of (2.1) should at least be equal to 70 and 50
respectively. We ensure this with the following constraints:
Thus, our model for determining the multipliers for the three constraints which
would minimize the value of the right hand side of the combined constraint is
the linear program shown in Figure 2.8.
Notice that this program is identical to the program that we have in Fig-
ure 2.5 with p w , p l , and p r replaced with W , L, and R.
Every linear program has a unique dual linear program associated with it.
In the next section we will show how to construct the dual in the general case.
Decision Variables
Minimize
Amount payable z =W + L + 300R
Subject to
W /400 + L/500 + R ≥ 70 (For tables)
W /700 + L/600 ≥ 50 (For chairs)
W, L, R ≥ 0 (Non-negativity)
Figure 2.8: Linear programming model to obtain optimal values of the multi-
pliers for the constraints
Recall that the shadow prices of the three resources, that we found by solv-
ing the dual program in Figure 2.5 are Rs. 12727.27, Rs. 19090.91, and Rs. 0.00
for wood, labor, and reading lamps, respectively. Notice that the shadow prices
corresponding to the resources that had no slack are non-zero, while the sha-
dow price corresponding to the resource that had a slack is zero. This is quite
intuitive; for a resource that is being used up completely during production,
you would suffer a loss of contribution if you gave away even a little of the
resource, and would not give it away for free, while if some part of a resource
is not being used during production, then you could part with the unutilized
amount for free. This relation between the slack of a resource at an optimal
solution and its shadow price is formally expressed in terms of the comple-
mentary slackness conditions as follows.
s i × v i⋆ = 0.
1. They are valid only when the primal problem is feasible and has an op-
timal solution. If the primal problem is infeasible, then it does not have
an optimal solution. In this case, computing the slack of any constraint
at an optimal solution is meaningless, and the complementary slack-
ness theorem cannot be applied. If the primal problem is unbounded,
i.e., is feasible but does not have a finite optimum, the dual problem is
infeasible, and does not have an optimal solution. So complementary
slackness cannot be applied.
2. They are valid only for optimal solutions. If a primal solution is a cor-
ner point solution that is not optimal, the dual solution obtained by ap-
plying complementary slackness conditions would result in a solution
that is not feasible for the dual program. This observation leads to an
elegant way of checking whether a corner point solution to a linear pro-
gram is indeed optimal.
Example 2.2: Consider the problem situation given in Section 2.1. Assume
66 CHAPTER 2. POST-OPTIMALITY ANALYSIS
that someone claims that the product mix of 300 tables and 175 chairs is opti-
mal. We will use complementary slackness conditions to refute this claim.
Observe first that the proposed mix is a corner point solution, since at this
solution the wood and reading lamp availability constraints are tight.
Next we will assume that this mix is optimal, so that complementary slack-
ness conditions apply to this solution. Let us then use complementary slack-
ness conditions then to predict some results for the optimal solution to the
dual program shown in Figure 2.5.
1. The slacks for the wood and reading lamp availability constraints are
both zeros, so we cannot say anything about the values of p w and p r
in an optimal solution to the dual. However, since the slack for the la-
bor capacity constraint is positive (its value is 13/120), complementary
slackness conditions allow us to say that the value of p l in an optimal
solution to the dual is zero.
2. Since the dual of the dual program is the primal program, the dual vari-
ables associated with the two constraints in the dual program of Fig-
ure 2.5 are T and C respectively. Since the optimal values of T and C are
both non-zero, we can conclude from complementary slackness condi-
tions that the slacks associated with both the dual constraints are zeros
at the dual optimal solution. Hence at the optimal solution, both the
dual constraints hold as equalities.
⋆
Thus the optimal solution (p w , p l⋆ , p r⋆ ) to the dual problem can be character-
ized as follows
p l⋆ = 0,
⋆
pw /400 + p r⋆ = 70,
⋆
pw /700 = 50, and
⋆ ⋆
pw , pr ≥ 0.
1. p r = 0; and
2. both the constraints in the dual hold as equalities at the optimal solu-
tion to the dual.
p r⋆ = 0,
⋆
pw /400 + p l⋆ /500 = 70,
⋆
pw /700 + p l⋆ /600 = 50, and
⋆
pw , p l⋆ ≥ 0.
2. the reduced costs of all decision variables that have a non-zero value in
an optimal solution to a linear program are zeros; and
2
Note that if the optimal solution to the primal problem is unique, then the optimal solu-
tion to the dual problem is non-degenerate.
2.4. REDUCED COSTS 69
Example 2.4: A company can make three types of mixtures, called mix A,
mix B, and mix C. Each 60g packet of mix A contains 30g of peanuts, 20g of
raisins, and 10g of cashews, and contributes Rs. 4 to profits. Each 60g packet
of mix B contains 20g of peanuts, 30g of raisins, and 10g of cashews, and con-
tributes Rs. 6 to profits. Each 60g packet of mix C contains 20g of peanuts,
10g of raisins and 30g of cashews, and contributes Rs. 5 to profits. The com-
pany can make and seal a total of 2000 packets each day. It gets a daily supply
of 34 kilos of peanuts, 74 kilos of raisins, and 51 kilos of cashews through a
long term contract. Its objective is to maximize its contribution to profits.
Based on a consultant’s advise, the company concentrates on mix B packets
only, and makes 1700 packets each day, which generates a daily contribution
of Rs. 10,200. The company now want to find out what changes if any in the
contributions of mixes A and C would lead to a more balanced product mix.
bers of packets of mix A, mix B, and mix C to be produced each day, her linear
programming model would be the one shown in Figure 2.9.
Decision Variables
Maximize
Contribution z =4x A + 6x B + 5xC
Subject to
30x A + 20x B + 20xC ≤ 34000 (Stock of peanuts)
20x A + 30x B + 10xC ≤ 74000 (Stock of raisins)
10x A + 10x B + 30xC ≤ 51000 (Stock of cashews)
x A + x B + xC ≤ 2000 (Packaging capacity)
x A , x B , xC ≥0 (Non-negativity)
EE Note that while doing sensitivity analysis, we allow only one of the prob-
lem coefficients to change, while others are maintained at their original values.
If more than one coefficient change, then the analysis becomes complicated,
and is beyond the scope of this book.
In the remaining portion of this section, we will illustrate the process of carry-
ing out sensitivity analysis for all these three classes of coefficients. To do so,
we will use the model that we have developed for the problem in Section 2.1,
i.e., for the linear program in Figure 2.1 on page 52.
C C
Wood availability
600 600
Lamp availability
400 400
200 200
Labor capacity
–100 0 100 200 300 400 500 T –100 0 100 200 300 400 500 T
C C
600 600
400 400
200 200
–100 0 100 200 300 400 500 T –100 0 100 200 300 400 500 T
in the objective function rotates the objective function line clockwise, so that
when T = 80, the objective function line through the optimal solution is much
closer to the wood availability constraint than when T = 70. When T = 87 1/2,
the objective function line through the optimal solution coincides with the
wood availability constraint. If the coefficient of T is increased any further,
then the objective function line through the same point passes through the
interior of the feasible region; so that the solution that was previously optimal
no longer remains optimal. At these values of the coefficient of T the adjacent
corner point becomes optimal as is seen in the case where the coefficient of T
is 100 in Figure 2.10. The labor capacity constraint no longer determines the
position of the optimal solution, but the constraint on the availability of read-
ing lamps does. So we can conclude that the coefficient of T can be increased
by a maximum of 87 1/2 − 70 = 17 1/2 without affecting the set of constraints
that determine the optimal solution. So the upper tolerance of the coefficient
of T in the objective function is 17 1/2 units.
If the coefficient of T in the objective function is reduced, then the objec-
2.5. SENSITIVITY ANALYSIS 73
Sensitivity analysis for values on the right hand side of the con-
straints
Assume that the right hand side of the wood availability constraint in the pro-
gram in Figure 2.1 changes from 1 to 1 1/20 to 1 13/140 to 1 3/20. The effect
of these changes is shown in Figure 2.11. Notice that the slope of the objective
function line remains unchanged, since the coefficients in the objective func-
tion are not changed. However, the feasible region increases in size because
of this change.
As the right hand side of the wood availability constraint increases from
1 to 1 1/20, it moves toward the top right corner parallel to the original con-
straint line, and the optimal solution changes, favoring the production of more
tables and fewer chairs. When the right hand side of the constraint increases
to 1 13/140, the wood availability constraint passes through the intersection
of the labor capacity constraint and the reading lamp availability constraint.
At this point the optimal solution to the problem is degenerate. When the
right hand side of the wood availability constraint increases beyond 1 13/140,
to 1 3/20 for example, we see that the wood availability constraint becomes
redundant, and it no longer determines the optimal solution. We see this phe-
nomenon in the bottom left diagram in Figure 2.11. This implies that, if the
the constraints on labor capacity and reading lamp availability remain un-
changed, it does not make sense for you as the manufacturer to increase your
74 CHAPTER 2. POST-OPTIMALITY ANALYSIS
C C
Wood availability
600 600
Lamp availability
400 400
200 200
Labor capacity
–100 0 100 200 300 400 500 T –100 0 100 200 300 400 500 T
C C
600 600
400 400
200 200
–100 0 100 200 300 400 500 T –100 0 100 200 300 400 500 T
daily stock of wood by more than 13/140th of the current stock. If the daily
wood availability reduces, then the wood availability constraint moves toward
the bottom left parallel to the original constraint line. If the right hand side re-
duces by more than 1/7, then the labor capacity constraint is no longer one of
the constraints that determine the optimal solution. Thus the upper tolerance
for the right hand side of the wood availability constraint is 13/140, the lower
tolerance is 1/7, and the tolerance range for this value is [1 − 1/7, 1 + 13/140],
i.e., [6/7, 1 13/140].
We can do a similar analysis for the right hand side of the labor availability
constraint to show that its upper tolerance is 1/6, and its lower tolerance is
13/120. This of course means that the labor capacity constraint and the wood
availability constraint continue to determine the optimal solution as long as
the labor availability constraint remains within 107/120th of the current avail-
2.5. SENSITIVITY ANALYSIS 75
ability and 7/6th of the current availability, while all other constraints in the
problem remain unaltered.
Note that although the set of binding constraints do not change within the
allowable limits of the right hand sides of the constraints, the optimal product
mix changes when the value on the right hand side of a constraint changes.
This is in contrast to the situation when the objective function coefficients
changes.
C C
Wood availability
600 600
Lamp availability
400 400
200 200
Labor capacity
–100 0 100 200 300 400 500 T –100 0 100 200 300 400 500 T
C C
600 600
400 400
200 200
–100 0 100 200 300 400 500 T –100 0 100 200 300 400 500 T
graphical method for linear programs with two decision variables. Sensitiv-
ity analysis for coefficients of linear programs with more than two decision
variables is quite complex, and is beyond our scope. Fortunately, many com-
monly encountered linear program solution software, including Microsoft®
Excel Solver, provide most of these values in their output.
The following points are worth noting when we perform sensitivity analy-
sis, and interpret the results from it.
1. Sensitivity analysis works under the assumption that only the coeffi-
cient under consideration is changed and all other coefficients are held
constant at their initial values. Therefore it is incapable of analyzing the
effect of simultaneous changes in more than one program coefficients.
the optimal solution or its objective function value or both can change.
The only thing that will remain unchanged if the coefficient is within the
tolerance range is the set of constraints that are binding at the optimal
solution.
that in Figure 2.14 the reduced costs of the coefficients of both the decision
variables are zero, since both the decision variables assume non-zero values
in the optimal solution to that problem. The fifth column shows the coeffi-
cients of the decision variables in the objective function in the model. The
last two columns of the table provides the upper and lower tolerance values
for the coefficient of the decision variables in the objective function. See that
the values for the coefficient of T in the original problem, derived on page 72
are the ones shown in Figure 2.14.
The second table in the sensitivity report deals with the constraints. This
table also has seven columns, and as in the previous case, the first three col-
umns define each inequality, and the value the left hand side of the inequality
assumes in the optimal solution to the problem. The fourth column shows the
shadow price for each constraint. In Microsoft® Excel Solver, the shadow price
What shadow
output in the sensitivity report is the rate of increase in the objective function
price does
value when the right hand side of the constraint is increased marginally. It
Microsoft® Excel
is independent of whether the objective is of a maximization type or a mini-
Solver output?
mization type, or whether the constraint is of greater-than type, less-than type
or even an equality. The shadow price in the sensitivity report should thus be
interpreted appropriately. The last two columns in the table show the upper
and lower tolerances for the values on the right hand side of the constraints.
Microsoft® Excel Solver calls them “Allowable Increase” and “Allowable De-
crease” respectively. Notice that the tolerances for the wood availability con-
Microsoft Excel 11.0 Sensitivity Report
Worksheet: [Furniture.xls]Sheet1
Report Created: 4/14/2006 4:33:48 PM
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$2 Amount Table 181.8181818 0 70 17.5 10
$C$2 Amount Chair 381.8181818 0 50 8.333333333 10
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$E$7 Wood Av. LHS 1 12727.27273 1 0.092857143 0.142857143
$E$8 Labor Cap. LHS 1 19090.90909 1 0.166666667 0.108333333
$E$9 Mkt. Cap. Table LHS 181.8181818 0 300 1E+30 118.1818182
Figure 2.14: Solver sensitivity report for the problem in Section 2.1
2.6. POST-OPTIMALITY ANALYSIS USING MICROSOFT® EXCEL SOLVER 79
80 CHAPTER 2. POST-OPTIMALITY ANALYSIS
straint quoted here match the values we obtained on page 74 through graphi-
cal analysis.
EE Notice, that Microsoft® Excel Solver does not output sensitivity analysis
results for the coefficients on the left hand side of the constraint (in)equalities.
However, more advanced linear programming solvers output these values too.
PROBLEMS 81
Problems
Problem 2.1: Consider the following linear program:
Maximize 20x1 + 30x2
Subject to
5x1 + 3x2 ≤ 15
2x1 + 5x2 ≤ 10
x1 , x2 ≥0
c. Represent the dual graphically and find its optimal solution. Check whe-
ther the objective function value of the optimal solution to the primal
equals the objective function value of the optimal solution to the dual.
After each of the changes mentioned in the following parts, plot the fea-
sible regions of the primal and dual programs. Also plot their objective func-
tions through their optimal solutions. Superimpose these figures on the cor-
responding figures for the original problems.
e. Change the right hand side of the second constraint of the primal to 20.
Problem 2.2: As a small tea seller, you blend three different types of tea into
four mixtures that are popular with your customers. Of this the first type of
tea adds color to the tea, the second adds aroma, and the third (which is the
cheapest type) is used primarily to make up volumes. The four mixtures sell
at Rs.100/kg, Rs.125/kg, Rs.175/kg, and Rs.235/kg respectively. The amounts
(in gms) of the three types of tea that go into each kg of each mixture is given
in the table below.
You can sell as much tea that you can blend each day.
Now, at the end of the day, you receive the information that you would
have 20 kg of the first type of tea, 25 kg of the second type of tea, and 70 kg
of the third type of tea available to you for blending tomorrow. You need to
decide on the amounts of each blend that you need to produce. Using only
the graphical method to solve linear programs, can you compute tomorrow’s
blending plan?
[Answer(s): 50 kg of Mix 1 and 25 kg of Mix 2. ]
6u − 2v − 4w − 1x ≤ 21 (Constraint 1)
− 1u − 2v − 1w + 1x ≤ 12 (Constraint 2)
− 5u + 1v + 9w − 1x ≤ 28 (Constraint 3)
6u + 0v + 4w + 1x ≤ 15 (Constraint 4)
2u + 8v + 3w − 5x ≤ 23 (Constraint 5)
The Sensitivity Report obtained from Microsoft Excel on solving this prob-
lem has the following content. The contents of some of the cells have been
replaced with ***.
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$B$2 u *** -19 *** 19 1.00E+30
$C$2 v *** 0 *** 1.00E+30 3
$D$2 w *** -10.625 *** 10.625 1.00E+30
$E$2 x *** 0 *** 1.00E+30 2.65625
Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$F$5 Constraint 1 *** 0 21 1.00E+30 60.5
$F$6 Constraint 2 *** 0 12 1.00E+30 21.5
$F$7 Constraint 3 *** 0 28 1.00E+30 30.75
$F$8 Constraint 4 *** 3.875 15 1.00E+30 15
$F$9 Constraint 5 *** 0.375 23 246 86
a. What is the maximum value that the objective function of the original
problem can reach for a feasible solution?
PROBLEMS 83
d. By how much does the optimal objective function value increase if the
right hand side of the Constraint 4 is increased from 15 to 20?
a. Assume that you have the option of selling off a portion of your daily stock
of pigment. What price would you charge for it? How much pigment
would you be willing to sell off at this price?
b. Assume that you have the option of buying more pigment. What price
would you pay per liter of pigment bought? How much would you buy at
this price?
Problem 2.5: This question is based on the problems given at the end of
Chapter 1. You need to answer the problem that each part refers to before
you can attempt these parts.
a. Consider Problem 1.5. Suppose that you are negotiating the possibility of
increasing the maximum allowable percentage of unsaturated fatty acids
in Super. What would be the maximum price that you would be willing
to pay for effecting this increase? Ignore any penalty clause for this part.
Would the method that you apply in this case generalize to all sorts of
blending problems?
84 CHAPTER 2. POST-OPTIMALITY ANALYSIS
b. Consider part (b) of Problem 1.6. The bank wants to re-evaluate a small
set of decisions that they have taken historically. This re-evaluation is to
ensure that the model that they have come up using their linear program-
ming technique is indeed the model with the best discrimination. Which
loan requests should they re-evaluate?
[Answer(s): (a) Rs. 500 (b) Requests 133, 134, and 140 ]
Problem 2.6: Apples & Peaches (A&P) Canners have three apple and peach-
based products in the market: Choice peach halves, Whole peach nectarines,
and Cooking apples. Choice peach halves and Whole peach nectarines are
both made from the nectarine fruit, a particular type of peach that originated
out of China. A&P has ample supply of the fruits, and can sell as many cases
of the three products as it can produce. A case of Choice peach halves has 4
kilos of fruit, a case of Whole peach nectarine has 3 kilos of fruit, and a case of
Cooking apples has 6 kilos of fruit.
Handling fruits at A&P Canners involve three steps; first the fruits are clean-
ed in the cleaning shed; then they are processed according to specific require-
ments for the products in the processing shed, and finally they are packed in
the packing shed. Each kilo of nectarines requires 3 minutes to clean, while
each kilo of apples needs 2 minutes to clean in the cleaning shed. Process-
ing each kilo of nectarines for Choice peach halves and Whole peach nec-
tarines takes 2 minutes and 2.5 minutes respectively, while processing apples
for Cooking apples takes 1 minute per kilo of apples. The packing activity is
enough to pack 50 cases of any of the products in a given day. For the purpose
of this problem, a typical working day has 8 hours, i.e., 480 minutes. The con-
tributions of the three products to profits are
Choice peach halves: $ 10 per case;
Whole peach nectarines: $ 15 per case; and
Cooking apples: $ 5 per case.
A&P want a product mix that maximizes their contribution. Develop a lin-
ear programming model for them.
a. What is the maximum rate at which they should be willing to pay for extra
capacity in their cleaning shed in $ /minute of cleaning capacity units?
b. What is the maximum rate at which they should be willing to pay for ex-
tra capacity in their processing shed in $ /minute of processing capacity
units?
c. What is the maximum rate at which they should be willing to pay for extra
capacity in their packing shed in $ /minute of packing capacity units?
PROBLEMS 85
Problem 2.7: The VegOil company buys two grades of raw vegetable oils
VEG1 and VEG2, blends and processes them into two intermediate products,
Regular and Super; and supplies them to another company, OilSel. The veg-
etable oils that VegOil obtain have the following active components.
VEG1 VEG2
Unsaturated Fatty Acids 85% 75%
Saturated Fatty Acids 12% 18%
Maximize
Contribution z = − 150V 1 − 170V 2
Subject to
VEG1 Balance: V 1 − V 1R − V 1S = 0
VEG2 Balance: V 2 − V 2R − V 2S = 0
Regular oil Balance: V 1R + V 2R − R = 0
Super oil Balance: V 1S + V 2S − S = 0
Regular oil Contract: −R ≤ −250
Super oil Contract: −S ≤ −300
86 CHAPTER 2. POST-OPTIMALITY ANALYSIS
Solving the model using Microsoft® Excel Solver, they obtain the Sensitivity
report shown on the next page. We have removed some of the entries in the
report and replaced them with letters from A through H, or with ***. Without
using Microsoft Excel Solver, predict the numerical values of the entries that
have been replaced with the letters A, B, C, D, E, F, G, and H?
Adjustible Cells
Final Reduced Objective Allowable Allowable
Name Value Cost Coefficient Increase Decrease
V1 *** A –150 320 20
V2 *** *** –170 20 1.00E+30
V1R 125 *** 0 320 20
V1S 150 *** 0 320 20
V2R 125 *** 0 20 1.00E+30
V2S 150 *** 0 20 1.00E+30
R *** *** 0 160 1.00E+30
S *** *** 0 160 1.00E+30
Constraints
Final Shadow Constraint Allowable Allowable
Name Value Price R.H. Side Increase Decrease
VEG1 Balance *** B 0 1.00E+30 275
VEG2 Balance *** C 0 1.00E+30 275
Regular oil Balance *** *** 0 16.66 0
Super oil Balance *** D 0 8.57 50
Regular oil Contract *** *** –250 250 1.00E+30
Super oil Contract *** E –300 300 1.00E+30
Unsat. Fatty Acid – Regular *** *** 0 0 12.5
Unsat. Fatty Acid – Super F G 0 1.00E+30 9
Sat. Fatty Acid – Regular *** *** 0 1.00E+30 0
Sat. Fatty Acid – Super *** H 0 5.4 9
3.1 Introduction
In this chapter we try to compare different decisions when the outcomes of
the decisions are not completely under the decision maker’s control. In partic-
ular, we consider situations in which the environment of the decision maker
is indifferent to the decision taken by the decision maker. So, the material that
we consider in this chapter does not naturally hold when the decision maker’s
decision is being scrutinized by a competitor, who will take a decision which
will maximize the competitor’s benefit, possibly to the detriment of the origi-
nal decision maker.
Consider for example, a furniture manufacturer who manufactures wood-
en tables and chairs, and whose objective is to maximize the contribution to
profits from these two products. Tables require 3 m2 of wood and 3 labor-
hours to produce and earn a contribution of Rs.1000 per unit. Chairs on the
other hand require 2m2 of wood and 1 labor-hour to produce and earn a con-
tribution of Rs.600 per unit. The manufacturer has a supplier of wood, who
promises to supplies her up to 2000 m2 of wood per month on demand at a
cost of Rs.150 per m2 . In addition to wood, she requires other material, such
as paint, varnish, and fabric to create the tables and chairs. These are abun-
dantly available as long as she orders an adequate quantity well in advance.
She has 10 people working for her on fixed salary, each of whom puts in eight
87
88 CHAPTER 3. COMPARING DECISIONS
hours of labor each working day. She assumes a total of 20 working days in a
month.
If the supplier does indeed supply her with 2000 m2 of wood each month,
and the people turn up for work each day, then she can use a linear program-
ming model to optimize her product mix. This mix is to produce 400 tables
and 400 chairs each month and earns a contribution of Rs.6,30,000. If anyone
suggests an alternate product mix, of say 500 tables and 100 chairs, she can
convince herself that her product mix is better simply by computing the con-
tribution from the other product mix and observing that it is lower than that
for her product mix.
In a realistic scenario, the manufacturer must face uncertainties that are
not resolved at the time of planning. For example, the supplier of wood may
not be able to supply the required amount of wood for her manufacturing
process. She may face absenteeism among her employees. As a simplified
situation, assume that her supplier supplies her with either 2000 m2 of wood
a month, or if the supplier’s stocks are low, only 1500 m2 of wood. In some
months her employees put in 1600 labor-hours per month, and in others when
absenteeism is high they put in 1200 labor hours. Table 3.1 shows the optimal
product mixes for the manufacturer if she knew the conditions that she would
face the following month accurately when determining her product mix.
scenarios. Such a table in which the payoffs for each strategy-scenario pair
What is a payoff
are listed is called a payoff table.
table?
Scenarios
Strategy Prod. Mix Order I II III IV
A (400,400) Tables first Rs.340000 Rs.220000 Rs.265000 Rs.220000
B (400,400) Chairs first Rs.340000 Rs.266667 Rs.248333 Rs.248333
C (133,800) Tables first Rs.313333 Rs.313333 Rs.238333 Rs.238333
D (133,800) Chairs first Rs.313333 Rs.313333 Rs.225000 Rs.225000
E (500, 0) Rs.275000 Rs.220000 Rs.275000 Rs.220000
F (300,300) Tables first Rs.255000 Rs.255000 Rs.255000 Rs.255000
G (300,300) Chairs first Rs.255000 Rs.255000 Rs.255000 Rs.255000
Notice from the payoff table that each strategy is evaluated in terms of not
one but four payoffs, corresponding to the four scenarios that may arise. So
comparing two strategies is not in terms of comparing two numbers, but in
terms of comparing two vectors of numbers. This is not easy; for example,
Strategy A is better off than Strategy B in Scenario 3, but is worse off in Scenar-
ios 2 and 4. So the task of comparing strategies is the task of combining the
entries of the vectors of numbers corresponding to the strategies into single
numbers which can then be compared. While doing this, an idea about the
relative likelihood of the different scenarios is helpful. However, such an idea
may or may not be available. In this context, it is useful to realize that uncer-
tain decision making situations arise in a spectrum. On one end of the spec-
Levels of
trum are those situations in which decision scenarios either occur completely
uncertainty.
at random, or due to processes which have so many contributing factors that
it is not realistic to assume that we will have enough information to ascer-
tain the likelihood of different scenarios. Such decision making situations
are called situations of (deep) uncertainty. Such situations arise for example,
when one wants to predict the weather, say seven days in advance. On the
other end of the spectrum, there are situations in which the random process
giving rise to the scenarios are understood perfectly, and simple probabilistic
methods are useful to determine the likelihood of scenarios. Such situations
occur, for example, when one is betting on the throw of fair dice. These sit-
uations are called situations of stochastic uncertainty or risk. Most business
scenarios fall somewhere in between; some but not all the important deter-
minants of a phenomenon are known, and collecting enough data about the
determinants will allow the decision maker to have a rough idea about the
likelihood of particular scenarios. These are situations in which management
90 CHAPTER 3. COMPARING DECISIONS
tools such as market research become useful. In any scientific endeavor, the
idea is to start from the deep uncertainty end of the spectrum and move the
situation to the risk end of the spectrum through a better understanding of
the scenario and/or data collection.
The techniques used to make decisions about situations in different parts
of the spectrum are different, and are in general a mixture of techniques used
for deep uncertainty and risk. In the remainder of the chapter we explain
some of the techniques used for situations in the two ends of the spectrum.
Scenarios Payoff
Strategy I II III IV assigned
A Rs.340000 Rs.220000 Rs.265000 Rs.220000 Rs.340000
B Rs.340000 Rs.266667 Rs.248333 Rs.248333 Rs.340000
C Rs.313333 Rs.313333 Rs.238333 Rs.238333 Rs.313333
D Rs.313333 Rs.313333 Rs.225000 Rs.225000 Rs.313333
E Rs.275000 Rs.220000 Rs.275000 Rs.220000 Rs.275000
F Rs.255000 Rs.255000 Rs.255000 Rs.255000 Rs.255000
G Rs.255000 Rs.255000 Rs.255000 Rs.255000 Rs.255000
The decision maker then proceeds to choose that strategy for which the
3.2. DECISION MAKING UNDER DEEP UNCERTAINTY 91
payoff that they have assigned is the highest. In this example, they will be
indifferent between choosing either Strategy A or Strategy B.
Over time, decision makers who choose to follow the maximax strategy
can make large payoffs if observed scenarios are favorable in the long run.
However, if they are not, then such decision makers are liable to lose large
payoffs, and unless they have enough money in reserve, can be wiped out of
the market.
Scenarios Payoff
Strategy I II III IV assigned
A Rs.340000 Rs.220000 Rs.265000 Rs.220000 Rs.220000
B Rs.340000 Rs.266667 Rs.248333 Rs.248333 Rs.248333
C Rs.313333 Rs.313333 Rs.238333 Rs.238333 Rs.238333
D Rs.313333 Rs.313333 Rs.225000 Rs.225000 Rs.225000
E Rs.275000 Rs.220000 Rs.275000 Rs.220000 Rs.220000
F Rs.255000 Rs.255000 Rs.255000 Rs.255000 Rs.255000
G Rs.255000 Rs.255000 Rs.255000 Rs.255000 Rs.255000
for which the payoff that they have assigned is the highest. In this example,
they will be indifferent between choosing either Strategy F or Strategy G.
Over time, decision makers who choose to follow the maximin strategy will
make small payoffs in each period. They will tend to avoid any strategy that
yields a negative payoff in the worst case.
92 CHAPTER 3. COMPARING DECISIONS
Scenarios Maximum
Strategy I II III IV Regret
A Rs.0 Rs.93333 Rs.10000 Rs.35000 Rs.93333
B Rs.0 Rs.46666 Rs.26667 Rs.6667 Rs.46666
C Rs.26667 Rs.0 Rs.36667 Rs.16667 Rs.36667
D Rs.26667 Rs.0 Rs.50000 Rs.30000 Rs.50000
E Rs.65000 Rs.93333 Rs.0 Rs.35000 Rs.93333
F Rs.85000 Rs.58333 Rs.20000 Rs.0 Rs.85000
G Rs.85000 Rs.58333 Rs.20000 Rs.0 Rs.85000
For each decision strategy therefore, there are four regret values, one cor-
responding to each scenario. Since the decision maker does not have any
information about the likelihood of any of the scenarios being realized, the
decision maker chooses the largest of these regrets to represent the regret cor-
responding to a particular strategy. This value is shown in the last column
of Table 3.5 and gives the maximum amount by which the payoff from a par-
ticular strategy will be off from the optimal payoff if that strategy is adopted.
3.3. DECISION MAKING UNDER RISK 93
Obviously, the decision maker would like to minimize the maximum regret,
and chooses that strategy for which the value of the maximum regret is the
minimum. In this example therefore, the decision maker will choose Strategy
C if they adopt the min-max regret approach.
If one adopts a decision making approach using the min-max regret strat-
egy then one can incorporate a reason for sub-optimality of a decision which
is not accounted for in the other two approaches. Consider for example the re-
gret associated with Strategy F in Scenario I. In Strategy F the decision maker
decides to produce 300 tables and 300 chairs. In Scenario I, the amounts of
wood and labor available are 2000 m2 and 1600 labor-hours respectively, so
that even after producing the 600 articles, she has 500 m2 of wood and 400
labor-hours remaining unutilized. Her regret in this case is therefore due to
a loss in opportunity to create more tables and chairs. (She cannot produce
more of tables and chairs, since the other material that she needs for further
production, like paint, varnish, and fabric are not available with her.) This op-
portunity loss factor is not incorporated in either the maximax approach or
the maximin approach.
0.4×Rs.340000+0.3×Rs.220000+0.1×Rs.265000+0.2×Rs.220000 = Rs.272500.
94 CHAPTER 3. COMPARING DECISIONS
Similar calculations show that the expected payoffs of the other six strategies
are Rs.290500, Rs.290833, Rs.286833, Rs.247500, Rs.255000, and Rs.255000 re-
spectively. The decision maker chooses the scenario that maximizes expected
payoff, i.e., chooses Strategy C whose expected payoff is Rs.290833.
When taking decision under risk, the most common strategy used is that
of maximizing expected payoffs (or minimizing expected costs for cost mini-
mization problems). A part of the reason for doing so is that expected values
is one of the best known measures for handling uncertain situations, and is
thus well-understood by all parties involved in decision making.
Now the regret for Strategy A under the j -th scenario is (m j −a j ) while that
for Strategy B is (m j − b j ). So the expected regret E R(A) for Strategy A is
k
X k
X
E R(A) = (m j − a j )p j = m j p j − E P (A)
j =1 j =1
Since E P (A) > E P (B), it follows that E R(A) < E R(B) which implies that if the
decision maker’s objective was to minimize expected regret, they would have
chosen Strategy A over Strategy B.
3.3. DECISION MAKING UNDER RISK 95
So we see that the strategy which has the highest expected value has the
lowest expected regret, and hence decisions using the expected value criterion
match those using the expected regret criterion. Since expected values are
easier to understand and explain than expected regrets, the expected regret
criterion is not used in practice.
96 CHAPTER 3. COMPARING DECISIONS
Problems
Problem 3.1: A wholesale shop sells crates of fresh (unprocessed) milk. Each
crate consists of 20 bottles. The shop procures crates at Rs.100 per crate, and
sells them at Rs.180 per crate. From past experience, the shop assesses the
probabilities of the daily demand for milk as follows:
Demand
(crates) Probability
1 0.1
2 0.1
3 0.3
4 0.3
5 0.2
Unprocessed milk is perishable, and milk procured on one day is spoilt the
next day and has no value.
b. If the shop uses the maximax criterion to make decisions, how many crates
of milk should they stock each day? How many crates should they stock if
they use the maximin criterion?
c. If the shop minimizes the maximum regret to make decisions, how many
crates of milk should they stock each day? What would be the value of the
maximum regret for the decision that the shop takes?
d. If the shop uses the expected value criterion to make decisions, how many
crates of milk should they stock each day? What would be the expected
profit for the decision that the shop takes?
[Answer(s): (b) 5 crates, 1 crate (c) 3 crates, Rs. 200 (d) 3 crates, Rs. 186 ]
[Answer(s): (a) Introduce (b) Don’t introduce (c) Introduce, (d) [0.625,1.000]
(e) [10.714, ∞] ]
The company can make widgets by one of the two processes A and B. Pro-
cess A involves a fixed cost of Rs.10,000 and a variable cost of Rs.40 per widget
produced. Process B involves a fixed cost of Rs.16,000 and a variable cost of
Rs.20 per widget produced.
a. Which of the two processes is the better choice for the company if it wants
to minimize expected manufacturing cost?
b. For what probability values will the choice that you suggest in part (a) re-
main the better choice?
Problem 3.4: The Alpha-Omega Company is unsure about its market share
for a particular product. The market share could be 10%, 15%, or 35%. The
company’s initial guess about the chances of the market share being these
values are 0.20, 0.35, and 0.45 respectively. The size of the market is 200. If the
98 CHAPTER 3. COMPARING DECISIONS
a. Write down costs of the two processes under different market share situa-
tions.
b. Which of these two processes should the company use under the expected
value criterion? What would be the expected value of cost incurred?
c. The company is quite sure about the 0.20 probability of their market share
being 10% but are unsure of the other two probability values. Within what
range of probability values for the market share being 15% would their de-
cision in part (b) remain optimal?
c. What is the maximum regret associated with the decision to submit a bid
for Rs.125000?
e. If SciTool wants to use the most likely scenario approach, what decision
should it take?
f. How much payoff (i.e., profit) should SciTool expect if they decide to sub-
mit a bid for Rs.120000?
g. If SciTool wants to minimize the expected regret associated with their de-
cision, what decision should it take? What will be the value of the expected
regret for their decision?
[Answer(s): (b) Don’t bid (c) Rs. 25000 (d) Bid Rs. 115000, Rs. 10000 (e) Bid
Rs. 125000 (f) Rs. 9500 (g) Bid Rs. 115000, Rs. 5450 ]
Option 1: She could distill all the batches of the chemical at a cost of Rs.40
per batch, and thus have no substandard batches sent to the customer.
Option 2: She could use a chemical reagent to test the quality of each batch
at a cost of Rs.20 per batch, and distill only those batches that are classi-
fied by the test as substandard at the cost of Rs.100 per batch. However
this test is inaccurate. While “good” batches never get classified as sub-
standard by the test, 5% of substandard batches get classified as “good”
and are not distilled. These batches when sent to a customer have to be
replaced at a cost of Rs.400 per batch replaced.
Option 3: She could use a specific gravity test which costs Rs.9 per batch,
and distill only those batches that are classified by the test as substan-
dard at the cost of Rs.100 per batch. This test is also not accurate. 10%
of the substandard batches get classified as “good” and have to be re-
placed later (at a cost of Rs.400 per batch). 10% of the good batches get
classified as “substandard” by the test.
4.1 Introduction
Consider the example provided in Section 3.1. In the example, the decision
maker has to make her decision in one time point; the product mix that she
needs to aim for, and whether to produce tables first, or whether to produce
chairs first. In the majority of decision making scenarios, the decision mak-
ing is more complex. It involves making multiple decisions at different points
in time, and decisions made earlier have an effect on the payoffs of decisions
made later. In this chapter we study such multi-stage decision making situa-
tions.
We make two assumptions in this chapter. The first is that these situations
Assumptions.
are of stochastic uncertainty, and each uncertain event is associated with a
probability of encountering it. The second assumption is that we evaluate dif-
ferent strategies of the decision maker in terms of the expected value criterion
described in Section 3.3. Although these assumptions are generally accepted
in practice, it is possible to consider situations in which they are not appro-
priate. The methods for dealing with such violations are not covered in this
chapter.
In order to understand multi-stage decision making processes, consider
the following decision problem faced by the production manager of a com-
pany X. The company produces a product which is seeing large increases in
101
102 CHAPTER 4. DECISION TREES
At the end of the life-cycle of the product, the production manager will
find himself in one of the following scenarios.
Scenario I: No proposal was made, and the production staff worked over-
time. (Additional profit was Rs.5 lakhs.)
4.2. REPRESENTING MULTI-STAGE DECISION PROBLEMS 103
Scenario II: No proposal was made, company Y’s service was used, and com-
pany Y delivered reliably. (Additional profit was Rs.12 lakhs.)
Scenario III: No proposal was made, company Y’s service was used, and com-
pany Y delivered erratically. (Loss of profit was Rs.4 lakhs.)
Scenario IV: A proposal was made and accepted, so that the production fa-
cility was augmented. (Additional profit was Rs.14 lakhs.)
Scenario V: A proposal was made and rejected, and the production staff work-
ed overtime. (Additional profit was Rs.5 lakhs.)
Scenario VI: A proposal was made and rejected, company Y’s service was used,
and company Y delivered reliably. (Additional profit was Rs.10 lakhs.)
Scenario VII: A proposal was made and rejected, company Y’s service was
used, and company Y delivered erratically. (Loss of profit was Rs.5 lakhs.)
Note that every decision scenario will not be observed for each of the de-
cision strategies. For example, if the production manager decides to adopt
strategy B, he will only see one of Scenarios B and C. If we construct a payoff
table for this problem, the table will be
Scenario
Strategy I II III IV V VI VII
A 5
B 12 −4
C 14 5
D 14 10 −5
!
"#$, '()#
!
"#$%& '()#
!
* "#$+ '()#
!
"#$%+ '()#
!
"#$, '()#
!
"#$%- '()#
!
* "#$, '()#
a state at the end of the problem reached by a path (i.e., a realization) from the
left to the right. The payoff to be achieved in the scenario is also marked in the
diagram.
At every junction in the tree (represented by letters from ‘a’ through ‘e’)
there is a possibility of choosing one of multiple realizations. There is how-
ever a difference in the way paths are followed at each junction. In junctions
‘a’ and ‘d’ it is up to the decision maker, the production manager in this case,
to choose which of the paths he wishes to take. In the other three junctions,
4.2. REPRESENTING MULTI-STAGE DECISION PROBLEMS 105
the choice of paths is through a random process, and the decision maker can-
not guide the choice. In the problem situations that we consider, the choice
of paths happen with pre-specified probabilities. If we add these bits of infor-
mation, i.e., the distinction between junctions where the decision maker can
choose paths and where he cannot, and the probabilities with which paths
are chosen at junctions where the decision maker cannot choose the paths,
we obtain an enhanced version of the diagram in Figure 4.1 called a decision
tree. By convention, we represent junctions in which the decision maker can
What is a
choose paths with squares and call them decision nodes, while the other junc-
decision tree?
tions are represented by circles and are called chance nodes or event nodes.
The probabilities of paths being chosen at each chance node is also added to
the diagram to form the decision tree. Figure 4.2 shows the decision tree for
the production manager’s problem.
@24
/A98<609 HIJKLLM
NOPX SITUO
./01234 5 67
89:62;:9 HIJKLLM
Z [ \]^ NOPQR SITUO
2 ?
B118/2=C
./01234 5
Z [ \]_ HIJKLLM
./01234 5 67 V NOPW SITUO
9882<6=
@8/1/72: 67
2118/A9D HIJKLLM
Z [ \]` NOPQW SITUO
@24
/A98<609 HIJKLLM
G
F93D 18/1/72: NOPX SITUO
</ <C9 ;/28D
Z [ \]a ./01234 5 67
D 89:62;:9 HIJKLLM
@8/1/72: 67
89E9=<9D Z [ \]^ NOPQY SITUO
>
B118/2=C
./01234 5
Z [ \]_ HIJKLLM
./01234 5 67 V NOPX SITUO
9882<6=
In the next section we will see how to analyze decision trees and choose an op-
timal decision strategy.
compute the expected payoff at chance node ‘c’ as Rs.(14 × 0.7 + 7 × 0.3) lakhs
or Rs.11.9 lakhs. Having computed the expected payoff at node ‘c’, we can
combine this information with the expected payoff at node ‘b’ and the given
payoff at the other node to ascertain that at node ‘a’, the optimal strategy is
to send the proposal of capacity augmentation to the board. And combining
the optimal decisions at decision nodes ‘a’ and ‘c’, we come to the conclusion
that the optimal strategy for the production manager is strategy C, i.e., to send
in a proposal for capacity augmentation to the board, and in case the board
rejects the proposal, to approach company Y with a subcontracting offer. The
expected payoff for this strategy is Rs.11.9 lakhs.
At this point we should be clear about out interpretation of the expected
payoff value of Rs.11.9 lakhs. This figure is an expected value. So this means
that if the production manager faced the same decision problem a large num-
ber (tending to an infinite number) of times, applied strategy C every time,
and computed the average of all the payoffs he received, the average payoff
would be Rs.111.9 lakhs. Every time he takes the decision, he stands to earn
Rs.14 lakhs with probability 0.7, Rs.10 lakhs with probability 0.3 × 0.8 = 0.24,
and lose Rs.5 lakhs with probability 0.3 × 0.2 = 0.06.
any change in the optimal strategy will be reflected as a change in the opti-
mal decision at one or both of these decision nodes. Now let us suppose that
submitting a proposal of capacity expension to the board remains the opti-
mal decision at node ‘a’ if p ∈ p la , p ha , and approaching company Y remains
£ ¤
the optimal decision at node ‘d’ if p ∈ p ld , p hd . Then the range of p for which
£ ¤
ueecdgnv
dregq yz{|}}~
z
ueecdgnv wdgcl
xiov ecdedfgh
yz{|}}~
bcdedfgh if ckmknokl z
pgeecdgnv s
uf ovk kekco
bgq
djkcoirk yz{|}}~
z
¢ bcdedfgh if
l geecdjkl yz{|}}~
ekco fgqf ovgo
if kccgoin z
t
ueecdgnv wdgcl
xiov ecdedfgh
yz{|}}~
bcdedfgh if ckmknokl z
pegq djkcoirks
an expert states in error that company Y will deliver reliably when it actually
delivers erratically. In such situations, if the production manager follows the
expert, then he makes a monetary loss. The second type of mistake is when
the expert erroneously states that company Y will be erratic in their delivery
when they actually deliver reliably. In this situation, if the production man-
ager follows the expert’s advice, then he will prefer paying overtime to ap-
proaching company Y and will settle for a lower payoff, thus incurring op-
portunity losses. Both these errors clearly do not occur for a perfect expert,
simply because such experts are infallible. These errors are also the reason
why an imperfect expert’s advice cannot be worth more than that of a perfect
expert.
Why should one take advice from an imperfect expert when we know that
an imperfect expert makes mistakes and can advise a decision maker into sit-
uations in which the decision maker suffers monetary or opportunity losses?
One takes such advice because when the imperfect expert is correct in their
112 CHAPTER 4. DECISION TREES
decision, they can prevent a decision maker from taking decisions that lead to
losses. One expects the latter type of situations to be more frequent than situ-
ations in which the expert makes mistakes, and in the expected value sense, a
decision maker is better off with an imperfect expert’s advice than without it.
It is also this reason that suggests that the decision maker follows the expert’s
advice even though there is a chance that the expert had made a mistake in
judgment. The decision tree with the option of asking an imperfect expert is
shown in Figure 4.4. Note that we have not determined the probability with
which such an expert will say that company Y will deliver reliably.
In order to compute the worth of an imperfect expert’s advice, we need to
find out the probability p with which the expert will say that company Y will
deliver reliably. Data on the expert’s past decisions can help us find the value
of p using Bayes’ rule. Consider for instance in our example, we have an expert
who when she says that company Y will deliver reliably is correct 90% of the
time, and when she says that they will deliver erratically is correct 80% of the
time. The joint probability of company Y delivering reliably and the expert
saying that they will is 0.9p and the joint probability of company Y delivering
reliably and the expert saying that they will not is (1 − 0.8)(1 − p). So in terms
of p, the probability that company Y will deliver reliably is 0.9p + 0.2(1 − p) =
0.7p +0.2. We know this value is actually 0.8, so that 0.7p −0.2 = 0.8 or p = 6/7.
This means that such an expert will say that company Y will deliver reliably
6/7-th of the time.
Solving the decision tree we find that the expected payoff if the decision
maker decides to consult the expert is Rs.12.2 lakhs. The optimal strategy for
the production manager in this situation is to ask the expert at node ‘a’ and
submit a proposal to the board at nodes ‘e’, ‘f’, ‘g’, and ‘h’. If the board rejects
the proposal, the production manager should approach company Y if the ex-
pert says that they are reliable, and pay overtime otherwise. In the diagram,
the expert’s erroneous advice causes the production manager to face a possi-
ble monetary loss at chance node ‘k’, and an opportunity loss at chance nodes
‘l’ and ‘m’.
Since the expected payoff with access to the imperfect expert is Rs.12.2
lakhs while that without access to the expert is Rs.11.9 lakhs, the worth of
the expert’s opinion is calculated to be Rs.12.2 lakhs - Rs.11.9 lakhs = Rs.0.3
lakhs. As with EVPI, this figure is an expected payoff figure. In practice, since
What is EVSI?
imperfect information is most often obtained through sampling studies, this
expected value is called Expected Value of Sample Information (EVSI).
PROBLEMS 113
èߦ¬¤° ª§
¯¥¤¤¬¯° £¤¥¦¥§¨© ª§
¬ ¨¦¦¤¥«¬ »¼½¾¿¿À
Ë Ì ÍÎé ÁÂÃÄÉ Æ¼ÇÈÂ
Ë Ì ÍÎÏ
µ
¶¦¦¤¥¨¯² Ñ¥¨¤
Òª°² ¦¤¥¦¥§¨©
Ë Ì ÍÎÐ »¼½¾¿¿À
èߦ¬¤° §¨º§ °²¨° ÁÂÃÄÊ Æ¼ÇÈÂ
³ ª§ ¤¬©ª¨Ñ©¬ £¤¥¦¥§¨© ª§ ¤¬®¬¯°¬
Ú ±¨¦¦¤¥¨¯² ³´
íîïðñðòóòôõ
¨ Ë
¶¦¦¤¥¨¯²
·¥¸¦¨¹º ³ »¼½¾¿¿À
Ô ÁÂÃÉ Æ¼ÇÈÂ
Ë Ì ÍÎê £¤¥¦¥§¨© ª§
Ö ¨¦¦¤¥«¬ »¼½¾¿¿À
èߦ¬¤° ª§
Ò¤¥¹Ø Ë Ì ÍÎÏ ÁÂÃÄÉ Æ¼ÇÈÂ
Ó
¶¦¦¤¥¨¯² Ñ¥¨¤
Òª°² ¦¤¥¦¥§¨©
Ë Ì ÍÎÐ »¼½¾¿¿À
£¤¥¦¥§¨© ª§ ¤¬®¬¯°¬ Ô ÁÂÃÕ Æ¼ÇÈÂ
Ü ±¨¦¦¤¥¨¯² ³´
¶§Þ °²¬ ¬ß¦¬¤°
£¨º
¥«¬¤°ª¸¬ »¼½¾¿¿À
ÁÂÃÕ Æ¼ÇÈÂ
èߦ¬¤° ª§
¯¥¤¤¬¯° £¤¥¦¥§¨© ª§
Ø ¨¦¦¤¥«¬ »¼½¾¿¿À
Ë Ì ÍÎë ÁÂÃÄÉ Æ¼ÇÈÂ
Ë Ì ÍÎÏ
×
¶¦¦¤¥¨¯² Ñ¥¨¤
Òª°² ¦¤¥¦¥§¨©
Ë Ì ÍÎÐ »¼½¾¿¿À
íîïðñðòóòôõ
ö÷Ë £¤¥¦¥§¨© ª§ ¤¬®¬¯°¬ ÁÂÃÕ Æ¼ÇÈÂ
Û ±¦¨º ¥«¬¤°ª¸¬´
èߦ¬¤° §¨º§ °²¨°
³ ª§ ¬¤¤¨°ª¯
£¨º
¥«¬¤°ª¸¬ »¼½¾¿¿À
ÁÂÃÕ Æ¼ÇÈÂ
Ë Ì ÍÎì £¤¥¦¥§¨© ª§
² ¨¦¦¤¥«¬ »¼½¾¿¿À
èߦ¬¤° ª§
Ò¤¥¹Ø Ë Ì ÍÎÏ ÁÂÃÄÉ Æ¼ÇÈÂ
Ù
¶¦¦¤¥¨¯² Ñ¥¨¤
Òª°² ¦¤¥¦¥§¨©
Ë Ì ÍÎÐ »¼½¾¿¿À
£¤¥¦¥§¨© ª§ ¤¬®¬¯°¬ ÁÂÃÕ Æ¼ÇÈÂ
±¦¨º ¥«¬¤°ª¸¬´
Problems
Problem 4.1: A complex airborne navigating system incorporates a sub-ass-
embly which unrolls a map of the flight plan synchronously with the move-
ment of the aeroplane. This sub-assembly is bought on very good terms from
a subcontractor, but is not always in perfect adjustment on delivery. The sub-
assemblies can be readjusted on delivery to guarantee accuracy at a cost of
$220 per sub-assembly. It is not however, possible to distinguish visually those
assemblies that need adjustment.
Alternatively, the sub-assemblies can each be tested electronically to see
if they need adjustment at a cost of $48 per sub-assembly tested. Past expe-
rience shows that about 40% of those supplied are defective; the probability
of the test indicating a bad adjustment when the sub-assembly is faulty is 0.7,
while the probability that the test indicates a good adjustment when the sub-
assembly is properly adjusted is 0.8. If the adjustment is not made and the
sub-assembly is found to be faulty when the system has its final check, the
cost of subsequent rectification will be $600.
Draw up a decision tree to show the alternatives open to the purchaser and
use it to determine his appropriate course of action.
[Answer(s): $ 198.40 ]
Problem 4.2: There is 60% chance that there are oil-bearing rocks under a
piece of land. With current technology, if a region contains oil-bearing rocks,
there is 80% chance that if an oil and gas company drills a well in that region,
they will hit oil. It requires 1 million dollars to drill a well, and the revenue
earned from the oil extracted is 3 million dollars. The oil and gas company
wants to maximize profits, and follows the expected value criterion to decide
whether to drill a well in that piece of land.
a. Should the company drill a well in that piece of land? What is the expected
profit from their best decision?
The company has the option of drilling zero, one, or two wells in that piece of
land. If they decide to drill wells, their decision to drill a second well depends
on the outcome of their drilling the first well.
c. Assume that the company drills a well and the well that they drill hits oil.
How does this fact revise the chance of the presence of oil-bearing rocks
PROBLEMS 115
under that piece of land? How does it affect the chance of the company
hitting oil under that piece of land?
d. Assume that the company drills a well and the well that they drill does
not hit oil. How does this fact revise the chance of the presence of oil-
bearing rocks under that piece of land? How does it affect the chance of
the company hitting oil under that piece of land?
e. Under this policy of deciding on drilling the second well depending on the
result of drilling the first well, what is their expected profit?
[Answer(s): (a) $0.44 million (b) $0.4 million (c) 1.0, 0.8 (d) 0.231, 0.185
(e) $ 1.112 million ]
Problem 4.3: Buoyed by the success of the Bollywood Nights in recent Chaos
events, “Team Chaos” (called TC) has decided to organize a spin-off event at
a venue on campus. For this, they have paid an upcoming Bollywood singer
Rs.5,00,000 to perform at this event. The Institute charges Rs.1,00,000 for hir-
ing out the venue for the event, and the sound crew charges Rs.50,000 for han-
dling the audio requirements.
TC has already printed passes for the general public and is charging Rs.250
per person in the premium category and Rs.100 per person for the general
category. They have decided to have 300 people occupying places in the pre-
mium category, and 1000 people occupying places in the general category. TC
has also taken a decision to sell premium passes to the student community
at a discounted price. They are undecided about whether to charge Rs.100
per pass from students, or to charge Rs.200 per pass. They are also undecided
about whether to keep 100 seats for distribution among the students or to
keep 200 passes. Since students are likely to look for passes at the last mo-
ment, the Team guesses that it can sell only about 30% of the premium passes
that students don’t buy to the general public at Rs.250 per pass. The remaining
passes will remain unsold.
The sale of these passes to the students is dependent on the course load of
the students on the day after the event. If there is an assignment submission
the day after the event, then sales of passes among the students is likely to
be lower. How much lower depends on the nature of the assignment. Keeping
this in mind TC has developed three scenarios regarding the number of passes
they can sell at different prices.
116 CHAPTER 4. DECISION TREES
Ticket price
Scenario Rs.100 Rs.200
Good response 200 100
Medium response 175 50
Poor response 125 25
TC feels that the chance of a good response is 0.4, and that of a medium re-
sponse is 0.5.
a. Draw a decision tree that TC can draw up to decide on the optimal course
of action, assuming that they maximize expected payoffs.
b. What is the decision that the Team will take to maximize their expected
payoff from ticket sales? What is the value of the expected payoff from
ticket sales for their decision?
c. What is the expected value of perfect information about the level of re-
sponse from the students?
[Answer(s): (b) 100 tickets at Rs. 200 per ticket, Rs. 657437.50 (c) Rs. 0.00 ]
JBDS works in the best interest of the farmers (i.e., in a way that minimizes
the “extra” amount per foot that farmers with water bearing wells pay). The
farmers also trust JBDS and even if a well does not yield water, they pay the
base amount of Rs.10 per foot dug for the number of feet that the society digs
in their land. JBDS’s current digging technology does not allow them to dig
further if they encounter the stratum of hard rock after digging up to a depth
of 50 feet.
a. If JBDS were to decide not to dig more than 50 feet under any circum-
stance, what is the “extra” amount per foot that they should charge from
farmers whose wells yield water?
b. If JBDS digs a well in a piece of land and does not find either an aquifer or
a stratum of hard rock at a depth of 50 feet and decide to dig up to 100 feet,
what is the “extra” amount per foot that they should charge from farmers
whose wells yield water?
c. If JBDS digs a well in a piece of land and does not find either an aquifer or
a stratum of hard rock at a depth of 50 feet, should they continue digging
up to 100 feet?
d. Based on the description up to this point, and assuming that JBDS works
in the best interest of the farmers, what is the expected value of the amount
of money that a farmer pays JBDS?
The local government has made a geological test available to JBDS free of
charge. This is a test done on the surface, and it can predict whether or not the
stratum of extremely hard rock is present 50 feet below the surface. This test
is not accurate. In 70% of the cases where a stratum of hard rock is present
at a depth of 50 feet, the test correctly predicts its presence, while in the other
30% of such cases, it predicts that a stratum of hard rock is not present. In 80%
of the cases where no hard rock stratum is present at the depth of 50 feet, the
test correctly predicts the absence of such a stratum. However in 20% of such
cases it predicts the presence of the stratum. JBDS has decided to adopt the
test for every well they consider digging, and also that if the test suggests the
presence of a stratum of hard rock, then they shall not commence drilling a
well at the site.
e. What is the probability that the geological test will say that a stratum of
hard rock is present?
h. Given the imperfect information provided by the test, what would be the
“extra” amount per foot that farmers whose wells yield water?
[Answer(s): (a) Rs. 900.00 (b) Rs. 216.56 (d) Rs.7700.00 (e) 0.38 (f) 0.174
(g) 0.129 (h) Rs. 198.38 (i) Rs. 2343.52 ]
5
CHAPTER
I NTRODUCTION TO S IMULATION
5.1 Introduction
In the first chapter of the text we have classified decision making situations
under uncertainty into two classes. The first is a class of deep uncertainty
where uncertain scenarios occur randomly and in which we have absolutely
no understanding of the factors contributing to the randomness. The sec-
ond class is the class of risky problems in which we assume to have complete
understanding of the factors contributing to the uncertainty, and hence can
develop a theoretical probability distribution of the occurrence of different
scenarios. Decision making techniques for the first class of situations are ob-
viously much weaker than those for the second class of situations. There is a
third class of situations which lies between the two classes. In this third class
of decision making situations, a decision maker knows enough about the sce-
narios to know that they are not absolutely random, but not enough to an-
alyze them fully and come up with a theoretical distribution to predict their
occurrence. This may be because the decision maker knows enough about
the determinants for the occurrences of the scenarios enough to model them
using theoretical distributions, but the interactions are too complex to com-
bine these distributions theoretically to derive a probability distribution of the
individual scenarios. At other times, all that the decision maker has is an em-
pirical distribution of the occurrences of the scenarios, and this empirical dis-
tribution does not quite follow a known distribution. This third class is quite
common in real life. In this chapter we develop a technique called simula-
119
120 CHAPTER 5. SIMULATION
tion to assist decision making in this third class of situations. Our aim is to
have a “black box” model of the decision making situation that allows the de-
cision maker to realize the nature of payoffs that will be obtained for various
decision strategies and hence allow the decision maker to make an informed
choice regarding their decision strategy. It is a practical workaround for com-
plex problems. While it does not provide a complete understanding of the
decision making situation, allows a decision maker to take decisions.
As an example of such a situation, suppose that an object a decision maker
is interested in is being auctioned off. They privately value the object at Rs.50,000.
In the auction, bidders submit sealed bids to the auctioneer. The seller also
supplies the auctioneer a sealed reserve price. If none of the bids exceed the
reserve price then the seller refuses to sell the object. Otherwise, the highest
bidder gets the object at a price which is the maximum of the reserve price and
the price quoted by the second highest bidder. Each bid has to be an integer
multiple of Rs.100, and ties are resolved at random. The decision maker knows
that there are three other bidders for the item. For similar items, the first
bidder submits bids which are uniformly distributed in the range [Rs.45,000,
Rs.55,000]. The second bidder submits bids which follow a triangular distri-
bution in the range [Rs.40,000, Rs.56,000] with a peak at Rs.48,000. The third
submits bids which follow a triangular distribution in the range [Rs.44,000,
Rs.60,000] with a peak at Rs.52,000. For similar items, the reserve prices set by
the seller have followed an empirical distribution given below.
The decision maker must decide on their bid price. The way to do so would
be to generate a set of possible bid prices, find the distribution of payoffs cor-
responding to each of the amounts in the set, and choose the best among the
options. However, there are too many scenarios in this problem for one to
evaluate all of them and decide on the bid price.
To solve this problem, let us consider a method to generate an approxi-
mation of the distribution of payoffs for one among the set of the decision
maker’s possible bid prices. Suppose that they are considering a bid price of
Rs.50,500. Let us construct a scenario for this bid price using our knowledge
of the other bidders and the seller. Suppose the three bidders bid Rs.46,000,
Rs.48,000, and Rs.47,500 respectively, and the seller sets a reserve price of
Rs.49,000. In this scenario, the decision maker’s bid will be the highest, and
5.2. SIMULATING FROM DISCRETE DISTRIBUTIONS 121
i.e., Rs.49,000. So their payoff in this scenario, i.e., the amount by which the
intrinsic value that the decision maker set for the item exceeds the price they
pay for it, is Rs.1000. In another scenario in which the bids of other bidders
are Rs.46,000, Rs.51,000, and Rs.49,500, and the reserve price is Rs.46,000, the
decision maker does not win the bid, and their payoff is 0. If we could con-
struct a large number of such scenarios in which the bids of the other bidders
and the reserve price come from their respective distributions, then we can
construct the relative frequency distribution of the payoffs corresponding to
your bid price. This distribution can then be used as an approximation of the
distribution of payoffs corresponding to the bid price. Once such approxima-
tions are obtained for all bid prices in the decision maker’s consideration set,
then they can choose a best bid price from that set.
Such a process of obtaining approximations of theoretically intractable
quantities is called simulation. In order to perform a simulation, we need
to be able to generate realizations of probability distributions, be they the-
oretical or empirical, discrete or continuous. The remainder of the chapter
describes methods to do so.
x = a + ⌊r (b − a + 1)⌋, (5.1)
3. It is very unlikely that there will be more than one occurrence over an in-
finitesimal part of the interval, i.e., simultaneous occurrences are ruled
out.
From this expression it must be clear that there is no easy expression similar
to that in (5.1) to generate realizations of a Poisson random variable. In Mi-
crosoft Excel, one can use the “Random Number Generation” option in Data
Analysis (available in the Analysis group of the Data tab) to generate the re-
quired number of realizations of a Poisson random variable. Note that we can-
not use the other direct method that we described for binomially distributed
random variables, since the value of k can be indefinitely high.
We now show how this result can be used to compute realizations of random
variables following certain continuous distributions.
F (x) = P (X ≤ x) = 1 − exp(−x/µ).
It is easy to see that the inverse distribution function F −1 (x) for the exponen-
tial distribution is given by
computing the F −1 (x) value. Now, since x ∈ Rec(0, 1), so is (1 − x), and a func-
tion equivalent to F −1 (x) for generating realizations from an exponential dis-
tribution is G(x) = −µ ln(x) where x comes from a Rec(0, 1) distribution. In
Microsoft Excel therefore, realizations from an exponential distribution with
mean µ can be generated by
either = (−µ)⋆LN(1-RAND()), or = −µ⋆LN(RAND()).
Sometimes an exponential distribution is represented in terms of a Pois-
son process. If the mean of a Poisson distribution is λ, then the mean of the
inter-arrival times in the corresponding Poisson process is µ = 1/λ. In such a
case realizations from an exponential distribution with mean µ can be gener-
ated by
either = (−1/λ)⋆LN(1-RAND()), or = (−1/λ)⋆LN(RAND()).
umn and the corresponding F (x) values in the second column. The numbers
in this column are in non-descending order. To generate a realization of the
random variable obeying this distribution, we generate a random number r
from Rec(0,1). If r ≤ F (x1 ) we output x1 as the realization, else we output x j
such that F (x j −1 ) < r ≤ F (x j ). To do this, we add the random number r at the
end of the column containing the F (x) values. We then find the rank of r in
the column containing the F (x) values and r using the Microsoft Excel RANK
function. If the rank returned is k, then the realization is the k-th value in the
table, and can be retrieved using the Microsoft Excel INDEX function.
PROBLEMS 127
Problems
Problem 5.1: Consider the situation in the example in Section 5.1. Develop
a simulation that generates the distribution of the decision maker’s payoff if
they decide on
Which among the three bid prices should the decision maker submit?
Problem 5.3: You have heard that a binomial distribution with parameters n
and p can be approximated by a normal distribution with mean np and vari-
ance npq when n is large. Verify if this is indeed correct if n = 5, p = 0.2; and if
n = 100, p = 0.2.
128 CHAPTER 5. SIMULATION
Problem 5.4: The game of craps requires the player to throw two dice one or
more times until a decision has been reached as to whether they win or lose.
The player wins if the first throw results in a sum of seven or 11 or, alterna-
tively, if the first sum is 4, 5, 6, 8, 9, or 10 and the same sum reappears before a
sum of seven has appeared. Conversely, they lose if the first throw results in a
sum of 2, 3, or 12 or, alternatively, if the first sum is 4, 5, 6, 8, 9, or 10 and a sum
of 7 appears before the first sum reappears. A game is re-started if a result is
not reached after 25 throws.
Problem 5.5: You have been given Rs.10000 to invest in three options. Under
different equally likely scenarios the percentage profits that the three invest-
ments give you the on your investment every year (in increasing order) are:
a. You can invest any part of your Rs.10000 in any way you like for 20 years
among the three options. If you do not invest money in any of the three
options, you can put the money in the bank and earn 1% interest on it
every year. You can change your investment options only at the end of a
year. How will you invest your money?
Next suppose the returns of the three options are correlated, and under five
scenarios the returns are the following.
Problem 5.6: Two types of components (Type A and Type B) are processed
by the same machining shop of a company. Type A components are manu-
factured in Forming Shop I, while Type B components are manufactured in
Forming Shop II which operates independently of Forming Shop I. Forming
Shop I produces Type A components at an average rate of one every 30 min-
utes, while Forming Shop II produces Type B components at an average rate
of one every 40 minutes. Both types of components are sent to the machining
shop as soon as they are produced. The machining shop assigns one operator
to machine both types of components. The operator needs between 20 min-
utes and 30 minutes to machine components of Type A, and between 15 min-
utes and 40 minutes to machine components of Type B. The operator picks up
components for machining on a first come first served basis.
You want to simulate the working of the machining shop operator for 50
jobs. For this, you assume that components of both types are produced through
a Poisson process, and the time taken by the operator to machine the compo-
nents follow a uniform distribution within the given limits.
Problem 5.7: Ajay Bhai’s Repair Shop specializes in repairing Maruti and
Honda cars. The shop has two mechanics. One mechanic only works on
Maruti cars and the other mechanic only works on Honda cars. Currently, two
out of every three cars that come for repairs are Maruti cars. Regardless of the
make, the time required to repair a car has an exponential distribution with a
mean of 0.2 days. The shop’s business has been steadily increasing, especially
for Honda cars. Ajay Bhai projects that, by next year, Maruti cars will arrive
randomly to be repaired at a mean rate of four per day, so the time between
arrivals will have an exponential distribution with a mean of 0.25 days. The
mean arrival rate for Honda cars is projected to be three per day, so the distri-
bution of inter-arrival times will be exponential with a mean of 0.33 days. For
either kind of car, Ajay Bhai would like the average waiting time in the shop
before the repair is completed to be no more than 0.5 days.