Professional Documents
Culture Documents
NTPC
NTPC
NTPC
Study Material
i
C ONTENTS
Contents iii
iii
CHAPTER
1
F ORMULATING AND S OLVING L INEAR
P ROGRAMS
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.
sections of this chapter we will briefly outline a tool to solve these problems.
A mathematical programming formulation for a practical problem con-
sists of three parts.
Mathematical
In the first part, we identify decisions that are to be taken in the decision
programming
making schenario and code them using variables called “decision variables”.
terminology.
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
program?
1.2. FORMULATION OF MATHEMATICAL PROGRAMS 5
objective function and all the constraints are linear is called a “linear pro-
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.
The problem described in Section 1.1 can be expressed as a linear pro-
gramming model. The decision that you need to make in the problem is to
determine the number of tables and chairs that you to manufacture every day
in your unit. Let us represent that decision in terms of two variables: T de-
noting the number of tables that you want to manufacture each day, and C
denoting the number of chairs. These two variables are the decision variables
in this model.The vector (T,C ) is a generic solution to the problem. The con-
tribution from a solution is given by the objective function z = 70T +50C , and
the objective of model is to maximize the value of z. There are several con-
straining factors that restrict your manufacturing possibilities.
• 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
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
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:
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.
1.2. FORMULATION OF MATHEMATICAL PROGRAMS 7
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:
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
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-
2
If you are using Microsoft Excel Solver, it allows you to define and solve models with up to
200 variables. With Premier Solver add-in from Frontline Systems, models with 2000 variables
can be solved efficiently. Solvers associated with GAMS, AMPL, etc. can handle millions of
variables.
1.2. FORMULATION OF MATHEMATICAL PROGRAMS 9
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)
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.
10 CHAPTER 1. FORMULATING LINEAR PROGRAMS
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.
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)
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.
We begin by stating the obvious fact that a solution to a linear program can
be expressed as a vector of the values attained by the decision variables in the
solution. For example, if we represent solutions in the example in Section 1.1
using a vector whose first component represents the number of tables manu-
factured and the second component represents the number of chairs manu-
factured, then Mix A would be represented by the vector (300, 175). This kind
of representation allows us to represent feasible solutions to linear programs
with two decision variables on an X-Y plot, thus allowing a geometrical solu-
tion method for such problems. We will see this method in Section 1.5.
Let us look at the representation of the set of feasible solutions, commonly
called the “feasible region”, to linear programs. It will be easy to visualize the
set in problems with two decision variables; so we will choose the problem
Section 1.1 as an illustration. We depict the two decision variables along two
axes on a plane, the horizontal axis representing the variable T , and the ver-
tical axes representing the variable C . Note that it is also perfectly all right
to represent C on the horizontal axis and T on the vertical axis. The non-
negativity constraints restrict us to the first quadrant. Plotting the other in-
equalities in the set of constraints mentioned in the previous section yields
the set of feasible solutions shown in Figure 1.4, in which the shaded region
denotes the set of feasible solutions to the problem, and the lines mark the
boundaries of each of the constraints.
C
800
Wood Availability
600
Market Capacity
400
Feasible
200 Solutions
Labor Capability
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.,
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
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
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
cannot be
optimal.
1.3. PROPERTIES OF LINEAR PROGRAMS 15
800
600
Direction of
400 improvement
200
A
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.
section, we deal with some of these situations. Needless to say, this list is not
exhaustive.
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.
5
The portion under emphasis in each of the examples indicates the condition that is of
interest in the section.
18 CHAPTER 1. FORMULATING LINEAR PROGRAMS
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.
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.
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)
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
various levels of delivery x when the stipulated minimum quantity of delivery
is 5 units, and the penalty is Rs. 10 per unit of shortfall is graphically shown in
Figure 1.8.
If the quantity assured is a and the penalty paid for not meeting the stipu-
lation is c per unit of shortfall, then the amount of penalty to be paid when the
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.
20 CHAPTER 1. FORMULATING LINEAR PROGRAMS
50
40
30
20
10
0 1 2 3 4 5 6 7 x
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
1.4. SELECTED SITUATIONS . . . 21
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 .
According to the problem description, 1200 liters of milk is available each
day on average. So we specify the following constraint in our model:
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.
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)
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.
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-
1.4. SELECTED SITUATIONS . . . 23
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-
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%
24 CHAPTER 1. FORMULATING LINEAR PROGRAMS
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.
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:
T + N + B ≤ 10.
Billboard advertisements are required to have at most 30% of the budget allo-
cated (not the budget used) to them, while newspaper advertisements should
make up at least 25% of the budget. These conditions give rise to the following
two constraints:
B ≤3 and
N ≥ 2.5.
T − 2B = 0.
However, since they are willing to accept minor deviations, these deviations can
be factored in using the following two additional variables:
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)
T − 2B − δ+ + δ− = 0.
The value of k would be chosen to reflect how much deviation would be toler-
ated.
Hence the model that the media planner needs to solve to arrive at the
allocation of budget is shown in Figure 1.10.
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
26 CHAPTER 1. FORMULATING LINEAR PROGRAMS
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
1.4. SELECTED SITUATIONS . . . 27
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 ,
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
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)
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
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.
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)
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.
30 CHAPTER 1. FORMULATING LINEAR PROGRAMS
Example 1.7: Chotamota Construction Company (CCC) has two small ware-
houses at Ambapur and Belapur, which need to supply cement to two build-
1.4. SELECTED SITUATIONS . . . 31
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
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 .
32 CHAPTER 1. FORMULATING LINEAR PROGRAMS
TR = 5x AR + 8xBR .
We need the following decision variable to indicate the time required to meet
all demands:
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.
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.
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)
two decision variables. It is based on the fact that the feasible region of a linear
program with two decision variables can be depicted to scale on paper, and
that at least one optimal solution of any linear program is at a corner point.
Two closely related graphical methods are known, and we will describe both
of them in the following paragraphs.
In the first method, we draw the feasible region for the linear program, and
note down the solutions corresponding to the corner points. We then com-
pute the values of the objective function for all the corner point solutions and
output the solution for which the objective function value is the best (i.e., the
maximum for maximization problems, and the minimum for minimization
problems) as an optimal solution.
Consider for example, the problem described in Section 1.1. The feasible
region for the problem is shown in Figure 1.14. The solutions correspond-
ing to the corner points of the feasible region, and the objective function val-
ues at each corner point solution are shown in Table 1.1. Since our objec-
34 CHAPTER 1. FORMULATING LINEAR PROGRAMS
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
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
800
600
400
200
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.
As mentioned earlier, both variants of the graphical method work when a
linear program has two decision variables. However most problems that oc-
cur in practice are much larger; often with thousands to millions of decision
variables. Clearly graphical methods do not work in such situations. There,
one uses computer algorithms to obtain optimal solutions. Traditional algo-
rithms, like the simplex method work by jumping from corner point to corner
point until an optimal solution is found. Newer methods, like interior point or
barrier methods work on slightly different principles. The exact descriptions
of these algorithms are beyond the scope of this book. So for the remainder of
this section, we will use Microsoft® Excel to solve linear programs.
Linear programs can be solved in Microsoft® Excel using its Solver add-
6 Using Microsoft®
in. Before invoking Solver, we need to create a worksheet with data that
Excel Solver.
6
Solver is not normally included in the default installation of Microsoft Office; to check
36 CHAPTER 1. FORMULATING LINEAR PROGRAMS
Solver can use. For our example from Section 1.1, we can set up the work-
sheet as shown in Figure 1.16. Two cells B2 and C2 have been used to store
the final values of the decision variables T and C. In cells B3 and C3, we have
entered the contribution per table and chair respectively. The cell C4 has a
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
if it is loaded on your computer, open Microsoft Excel and check the drop down menu under
Tools. If Solver does not appear in the menu, then you have to separately install it. To do so,
go to Tools→Add-ins. . . , check the box next to Solver Add-in and click OK. Solver should load
and appear on the drop down menu under Tools the next time you look for it. (You may need
the Microsoft® Office CD during the installation process.)
1.5. SOLVING LINEAR PROGRAMS 37
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
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.
straints” 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
1.6. ADDITIONAL TERMINOLOGY 39
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.
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
40 CHAPTER 1. FORMULATING LINEAR PROGRAMS
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-
able and T is a non-basic variable corresponding to the corner point
solution at P.
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
program above changes the feasible region, while constraint 3 is clearly
redundant. In practice it is hard to identify which constraint is redun-
dant.
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
Maximize
z = c1 x1 + c2 x2 + · · · + cn xn
Subject to
a 11 x 1 + a 12 x 2 + · · · + a 1 j x j + · · · + a 1n x n ≤ b 1
a 21 x 1 + a 22 x 2 + · · · + a 2 j x j + · · · + a 2n x n ≤ b 2
.. .. ..
. . .
ai 1 x1 + ai 2 x2 + · · · + ai j x j + · · · + ai n xn ≤ bi
.. .. ..
. . .
a m1 x 1 + a m2 x 2 + · · · + a m j x j + · · · + a mn x n ≤ b m
x1 , x2 , . . . , xn ≥ 0
2
Other standard forms are possible, and different texts use different standard forms.
However, all standard forms can be converted to each other quite easily.
2.3. HOW TO CONSTRUCT THE DUAL MECHANICALLY 65
Then we can construct the dual of this program using the following three
Getting a dual
steps.
program from a
Step 1: For each constraint in the primal, we define a non-negative dual vari- standard primal
able. The dual variable associated with the i th constraint is called v i . program.
There will be m such variables in the dual.
Step 2: For each variable in the primal, we write a constraint in the dual. The
dual constraint corresponding to the j th variable in the primal is
a1j v 1 + a2j v 2 + · · · + ai j v j + · · · + am j v m ≥ c j .
Step 3: Using the right hand sides of the primal constraints, we construct the
dual objective function
b1 v 1 + b2 v 2 + · · · + bi v i + · · · + bm v m .
Using these three steps described above, the dual of the linear program
shown above is the following.
Minimize
w = b1 v 1 + b2 v 2 + · · · + bi v i + · · · + bm v m
Subject to
a 11 v 1 + a 21 v 2 + · · · + a i 1 v i + · · · + a m1 v m ≥ c 1
a 12 v 1 + a 22 v 2 + · · · + a i 2 v i + · · · + a m2 v m ≥ c 2
.. .. ..
. . .
a1 j v 1 + a2 j v 2 + · · · + ai j v i + · · · + am j v m ≥ c j
.. .. ..
. . .
a 1n v 1 + a 2n v 2 + · · · + a i n v i + · · · + a mn v m ≥ c n
v 1, v 2, . . . , v m ≥ 0
Applying the same three steps to this dual program, we can obtain its dual.
If we do so, we will see that it is identical to the primal program. We formally
state this fact as follows.
This statement justifies our earlier assertion that there is nothing sacrosanct
about the primal problem: if one designates the dual as the primal problem,
then the primal problem becomes the dual.
Let us now illustrate the process of writing the dual of a linear program in
standard form with an example.
Example 2.2: Suppose we want to write the dual of the following linear pro-
gram:
Maximize
z = 2x 1 − 3x 2 − x 4
Subject to
3x 1 − 2x 3 + x 4 ≤ 9
2x 1 − x 2 − 4x 4 ≤ −5
4x 2 + 7x 3 ≤ 6
x1, x2 , x3 , x4 ≥ 0
In this linear program, certain terms are missing from both the objective
function as well as from the left hand sides of the constraints. In such sit-
uations, it is good to rewrite the model with these terms included with zero
coefficients. Once we do this, the model becomes:
Maximize
z = 2x 1 − 3x 2 + 0x 3 − x 4
Subject to
3x 1 + 0x 2 − 2x 3 + x 4 ≤ 9
2x 1 − x 2 + 0x 3 − 4x 4 ≤ −5
0x 1 + 4x 2 + 7x 3 + 0x 4 ≤ 6
x1, x2 , x3 , x4 ≥ 0
Once we have the primal problem in this form, it is easy to apply the three
rules stated earlier in this section to obtain the dual program as:
Minimize
w = 9v 1 − 5v 2 + 6v 3
Subject to
3v 1 + 2v 2 + 0v 3 ≥ 2
0v 1 − v 2 + 4v 3 ≥ −3
− 2v 1 + 0v 2 + 7v 3 ≥ 0
v 1 − 4v 2 + 0v 3 ≥ −1
v 1, v 2, v 3 ≥ 0
2.3. HOW TO CONSTRUCT THE DUAL MECHANICALLY 67
Now we can remove the zero coefficient terms from the dual formulation, and
report it as:
Minimize
w = 9v 1 − 5v 2 + 6v 3
Subject to
3v 1 + 2v 2 ≥ 2
− v 2 + 4v 3 ≥ −3
− 2v 1 + 7v 3 ≥ 0
v 1 − 4v 2 ≥ −1
v 1, v 2, v 3 ≥ 0
Let us now consider primal linear programs which are not in the standard
Handling
form. We will demonstrate how we can transform such programs into linear
non-standard
programs in the standard form. Once they are in the standard form, we can
primal linear
construct their dual programs using the three rules that we have stated earlier
programs.
in this section.
There are five ways in which linear programs can deviate from the stan-
dard form. We list these five cases below, and describe methods to convert
such deviations into standard form.
the corresponding term in the second constraint, but whose signs are
different. This means that the two constraints would look like the fol-
lowing:
a1 v 1 + a2 v 2 + · · · + am v m ≥ c and
−a1 v 1 − a2 v 2 − · · · − am v m ≥ −c.
a1 v 1 + a2 v 2 + · · · + am v m = c.
We can use this fact to skip the step of replacing an unrestricted vari-
able with two non-negative variables and directly make use of the
following rule:
a1 x1 + a2 x2 + · · · + an xn = b
a1 x1 + a2 x2 + · · · + an xn ≤ b and
a1 x1 + a2 x2 + · · · + an xn ≥ b,
a1 x1 + a2 x2 + · · · + an xn ≤ b and
−a1 x1 − a2 x2 − · · · − an xn ≤ −b.
Notice that the coefficient in each term in the first constraint is equal
in magnitude and opposite in sign to the coefficient in the corre-
sponding term in the second constraint, including the right hand
sides. Let v i and v i +1 be the dual variables associated with these
2.3. HOW TO CONSTRUCT THE DUAL MECHANICALLY 69
two constraints when we are writing the dual for this program. In
the dual, the term involving b in the objective function would then
b(v i − v i +1 ). Similarly, in each of the n constraints in the dual, the
terms involving v i and v i +1 would be of the form a j (v i −v i +1 ). There-
fore, in the dual, we can replace the non-negative variables v i and
v i +1 with a single unrestricted variable v = v i − v i +1 .
Thus, similar to case 2, we can skip the step of splitting the equality
constraint into two inequalities, and use the following rule:
We now illustrate the process of writing the dual of a linear program that is
not in standard form.
Example 2.3: Suppose we want to write the dual of the following linear pro-
gram:
Minimize
z = 2x 1 + 3x 2 + 5x 3
Subject to
3x 1 + 2x 2 + 4x 3 ≥ 5
x 1 + 5x 2 + 9x 3 ≤ 19
2x 1 + 6x 2 + 5x 3 = 14
x1 ≥ 0
x2 ≤ 0
x3 unrestricted
We first convert this program into standard form. Notice that x2 is a non-
positive variable, so we will replace it in the program with −x2′ where x2′ is
a non-negative variable, as discussed in Case 1. Also notice that x3 is unre-
stricted in sign. So following the method described in Case 2, we replace it
with (x3′ − x3′′ ) where x3′ and x3′′ are both non-negative. The first constraint is of
70 CHAPTER 2. POST-OPTIMALITY ANALYSIS
as described in Case 3. Using our newly defined variables we rewrite this con-
straint as
as described in Case 5.
So the linear program in this example, when converted to standard form
is the following:
Maximize
z = −2x 1 + 3x 2′ − 5x 3′ + 5x 3′′
Subject to
− 3x 1 + 2x 2′ − 4x 3′ + 4x 3′′ ≤ − 5
x 1 − 5x 2′ + 9x 3′ − 9x 3′′ ≤ 19
2x 1 − 6x 2′ + 5x 3′ − 5x 3′′ ≤ 14
− 2x 1 + 6x 2′ − 5x 3′ + 5x 3′′ ≤ −14
x 1 , x 2′ , x 3′ , x 3′′ ≥ 0
Since this linear program is in standard form, its dual program is easy to con-
struct. We define dual variables v 1, . . . , v 4 corresponding to the four constraints
in the primal in standard form, and derive dual constraints corresponding to
2.3. HOW TO CONSTRUCT THE DUAL MECHANICALLY 71
Minimize
w = −5v 1 + 19v 2 + 14v 3 − 14v 4
Subject to
− 3v 1 + v 2 + 2v 3 − 2v 4 ≥ −2
2v 1 − 5v 2 − 6v 3 + 6v 4 ≥ 3
− 4v 1 + 9v 2 + 5v 3 − 5v 4 ≥ −5
4v 1 − 9v 2 − 5v 3 + 5v 4 ≥ 5
v 1, v 2, v 3, v 4 ≥ 0
Notice that the third and the fourth constraint can be combined to form the
constraint
4v 1 − 9v 2 − 5v 3 + 5v 4 = 5.
Recall that these two constraints arose from the primal variables x3′ and x3′′ ,
which in turn arose from the unrestricted variable x3 in the original primal
formulation. Thus, in the end, we find that the constraint in the dual cor-
responding to the unrestricted variable in the primal program is an equality
constraint. This illustrates the rule that we stated while discussing Case 2 on
page 68.
Since the coefficients of v 3 and v 4 in the objective function and in all the
constraints are equal in magnitude and opposite in sign, we can combine the
two terms in the objective function and in each of the constraints involving
v 3 and v 4 to a single term involving (v 3 − v 4 ), and then replace (v 3 − v 4 ) with
an unrestricted variable v . Recall that these variables arose from the two con-
straints that were obtained by splitting an equality constraint. So as we dis-
cussed in Case 4 on page 69, an equality constraint in the primal program
leads to an unrestricted variable in the dual program.
So the dual of the primal problem in this example is the following:
Minimize
w = −5v 1 + 19v 2 + 14v
Subject to
− 3v 1 + v 2 + 2v≥ −2
2x 1 − 5v 2 − 6v ≥ 3
4x 1 − 9v 2 − 5v = 5
v 1, v 2 ≥ 0
v unrestricted
72 CHAPTER 2. POST-OPTIMALITY ANALYSIS
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.4: Consider the problem situation given in Section 2.1. Assume
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
74 CHAPTER 2. POST-OPTIMALITY ANALYSIS
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.
2.5. REDUCED COSTS 75
p r⋆ = 0,
⋆
pw /400 + p l⋆ /500 = 70,
⋆
pw /700 + p l⋆ /600 = 50, and
⋆
pw , p l⋆ ≥ 0.
If the optimal solution is unique3 then reduced cost of variables with zero
values in the optimal solution would have different signs depending on whe-
ther the linear program has a minimization objective or a maximization ob-
jective. If a variable has a zero value in a unique optimal solution in a linear
program with minimization objective, then its objective function coefficient
is too big, and needs to be reduced by a strictly positive amount for it to be
at a non-zero value in an optimal solution. So reduced costs of non-basic
variables in a linear program with a unique optimal solution to a minimiza-
tion problem are strictly positive. On the other hand, in a linear program with
maximization objective which has a unique optimal solution, a decision vari-
able has zero value if its coefficient in the objective function is too small. In
such cases the coefficient of this variable in the objective function needs to be
increased by a strictly positive amount for it to attain a non-zero value in an
optimal solution. An increase can be considered to be a decrease by a nega-
tive quantity, so that the reduced cost of a decision variable with zero value in
a unique optimal solution to a linear program with maximization objective is
strictly negative.
If there are multiple optimal solution for a linear program, then it is pos-
sible for both the value of a decision variable and its reduced cost to be zeros.
For example, in a linear program with two non-negative decision variables x1
and x2 , a objective of minimizing x1 + x2 , and a single constraint x1 + x2 ≥ 1,
an optimal solution is (x1 , x2 ) = (1, 0), but the reduced cost of x2 is zero, since
(x1 , x2 ) = (0, 1) is also optimal. To summarize,
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
3
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.5. REDUCED COSTS 77
Example 2.6: 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.
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
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-
tive function line rotates in the counter-clockwise direction. Using an analysis
very similar to that above, we can conclude that the maximum allowable de-
crease in the coefficient of T before the set of constraints determining the op-
timal solution changes is 10 units, when the objective function line through
the optimal solution coincides with the labor capacity constraint. If the de-
crease in the coefficient of T is by more than 10 units, then the labor capac-
ity constraint and the C-axis corresponding to the non-negativity constraint
C ≥ 0 determine the position of the optimal solution. Hence the lower toler-
2.6. SENSITIVITY ANALYSIS 81
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
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].
82 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
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-
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.
2.6. SENSITIVITY ANALYSIS 83
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
coefficient of C is 1/625. When the coefficient becomes 1/600, the wood avail-
ability constraint meets the C axis at the point where the labor capacity con-
straint meets it. At this point, the optimal solution becomes degenerate. This
is shown in the bottom left diagram of Figure 2.12. If the coefficient of C in the
wood availability constraint increases further, then the labor capacity con-
straint becomes redundant, and no longer determines the optimal product
mix; see the bottom right diagram of Figure 2.12. Hence the maximum allow-
able increase in the coefficient of C in the wood availability constraint is 1/600
– 1/700 = 1/4200, which means that the upper tolerance for this coefficient is
1/4200.
If the coefficient of C decreases, the wood availability constraint rotates
in a clockwise direction pivoting around the point where it meets the T axis.
When the amount of decrease is by more than 3/5600, it becomes redundant
and the labor capacity and reading lamp availability constraint determine the
optimal product mix. Hence the lower tolerance for this coefficient is 3/5600.
Here too, although the binding constraints do not change within the al-
lowable limits, the optimal product mix changes when one of the coefficient
on the left hand side of a constraint changes. This is again in contrast to the
situation when the objective function coefficients changes.
The discussion above shows us how to perform sensitivity analysis by the
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.
analysis results on that sheet. It calls this worksheet the Sensitivity Report.
As an illustration, we have shown the sensitivity report corresponding to the
problem in Section 2.1 in Figure 2.14.
The sensitivity report in Microsoft® Excel Solver has two tables, one la-
beled “Adjustable Cells” dealing with the objective function coefficients, and
the other labeled “Constraints” dealing with values on the right hand side
of the constraint (in)equalities. The first table has seven columns. The first
and second columns describe the position of the decision variable (called ad-
justable cell in Solver parlance) and its name, and the third column specifies
its value in the optimal solution. The fourth column reports the reduced cost
of the coefficient of that decision variable in the objective function. Notice
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 80
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-
straint quoted here match the values we obtained on page 81 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.
2.7. POST-OPTIMALITY ANALYSIS USING MICROSOFT® EXCEL SOLVER 87
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
88 CHAPTER 2. POST-OPTIMALITY ANALYSIS
Problems
Problem 2.1: Formulate the dual of the following linear program
Maximize 20x1 + 30x2 + 25x3 + 40x4
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.3: 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 ***.
90 CHAPTER 2. POST-OPTIMALITY ANALYSIS
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?
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.6: 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?
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.7: 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
92 CHAPTER 2. POST-OPTIMALITY ANALYSIS
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?
Problem 2.8: 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%
Decision Variables
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
Unsat. Fatty Acid–Regular: 0.85V 1R + 0.75V 2R − 0.8R ≤ 0
Unsat. Fatty Acid–Super: 0.85V 1S + 0.75V 2S − 0.83S ≤ 0
Sat. Fatty Acid–Regular: −0.12V 1R − 0.18V 2R + 0.15R ≤ 0
Sat. Fatty Acid–Super: −0.12V 1S − 0.18V 2S + 0.15S ≤ 0
Non-negativity: V 1,V 2,V 1R,V 1S,V 2R,V 2S, R, S ≥ 0
Solving the model using Microsoft® Excel Solver, they obtain the Sensitiv-
ity 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?
94 CHAPTER 2. POST-OPTIMALITY ANALYSIS
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
K C
G D
J E
F B
250m
95
96 CHAPTER 3. NETWORKS
to scale. The gray colored areas represent housing complexes, and the white
colored areas represent roads. We are interested in the interconnections be-
tween ten points in the area, marked A, . . . , K in the area.
The network of roads in Figure 3.1 can be expressed schematically using
the diagram in Figure 3.2. The circles labeled from A through K in Figure 3.2
C K
H
D
A B G
F E
denote the points from A through K in Figure 3.1, and the lines represent di-
rect road connections between pairs of points. Notice that in this representa-
tion, we are not concerned about geographical accuracy, rather, we are con-
cerned only about representing the connections between the nine points ac-
curately. We call such representations graphs. The labeled circles are referred
What is a graph?
to as nodes or vertices, and the lines between pairs of nodes are called edges or
links. Formally stated, a graph G = (V, E ) is an ordered pair of a set of nodes V ,
and a set of edges E , where each element in E connects two nodes in V . The
labels on the nodes are required to be unique.
Sometimes, we may be interested not only about the interconnections be-
tween the points, but also about the distances between them. In such cases,
we add numbers next to the edges to denote the the distance between the
points that the edge connects. For example, in Figure 3.3, for each edge in the
graph of Figure 3.2, we have marked the distances in the layout between the
two nodes that the edge connects. These numbers are called the lengths, or
in appropriate situations, costs of the edges. Lengths and costs are interpreta-
tions of weights on edges. When our purpose through the edges is to compute
distances between points, we refer to the weights as lengths. When edges rep-
resent possible conduits through which material or information flows, then
3.1. WHAT IS A NETWORK? 97
500
C K
1400
300
1100 H
D
500
A 300 B G
500 200
500
1100 J
300 800
F E
weights on edges are called costs, and are interpreted as the amount of re-
sources required to send one unit of material or information along the con-
duit. A graph with weights attached to edges is called a weighted graph.
What is a
Let us now make a modification in the plan shown in Figure 3.1. Assume
weighted graph?
that all the road segments in this plan have been converted to one-way roads.
The direction of traffic along the road segments are as shown in Figure 3.4.
The representations in Figures 3.2 and 3.3 are no longer adequate in repre-
senting this changed scenario, because the edges in those representations do
not tell us which direction of traversal along the corresponding road segment
is allowed, and which direction is forbidden. Thus we introduce the concept
of directed edges or arcs in our representations. An arc is represented by an
What is an arc?
arrow connecting two nodes. The node which is adjacent to the arrow-head
is called the head of the arc, and the other node is called its tail. Traversal is
allowed from the tail of the arc to the head but not the other way around. A
graph in which all connections between nodes are arcs (i.e., graphs with arcs
but no edges) are called directed graphs or digraphs. The layout in Figure 3.4
What is a
is represented in Figure 3.5 as a weighted digraph.
digraph?
Next let us introduce another complication in the layout. Assume that all
the road segments in the area are still one-way, but the road segments from
points D to G and from E to J can handle a maximum of 5 cars per hour, while
the road segment from A to C through B can handle 20 cars per hour. All other
road segments can handle 10 cars per hour. If we have to include this infor-
mation in our schematic diagram, then the weights on each of the arcs in Fig-
ure 3.5 no longer remains a single number, but becomes an ordered pair. The
98 CHAPTER 3. NETWORKS
K C
G D
J E
F B
250m
500
C K
1400
300
1100 H
D
500
A 300 B G
500 200
500
1100 J
300 800
F E
first number of the pair denotes the length of the segment, while the second
number denotes its capacity. The representation then looks like Figure 3.6.
Such a weighted digraph in which the weights on arcs are ordered pairs, the
first element of which represents the length of an arc and the second element
represents its capacity is called a network. In other words, a network is a col-
What is a
network?
3.1. WHAT IS A NETWORK? 99
(500,10)
C K
(1400,10)
(300,10)
(1100,20) H
D
(500,5)
A (300,20) B G
(500,10) (200,10)
(500,10) (1100,10) J
F (300,10) E (800,5)
lection of nodes and arcs connecting the nodes. Arcs have lengths (or costs)
and capacities associated with them, while nodes only have unique labels. It
is not necessary that both lengths (or costs) and capacities of arcs are of in-
terest for all networks. If one of them is not, then it can be dropped from the
representation.
We now introduce some frequently occurring terminology regarding net-
works — source and destination nodes, flows along the network, paths in the
network, and cycles. In a problem defined on a network, we either want to find
a way of reaching from a point in the network to another, or we want to send
some material from one point in the network to another. Both these prob-
lems can be converted to the problem of sending material from one point of
the network to another. This flow of material is referred to as flow in the net-
What is flow?
work. The node in the network representing the point from which we want the
start is called the source node, while the node corresponding to the point that
What are source
we want to reach is called the destination node. For example, if we want to go
and destination
from point A to point C in the layout in Figure 3.4, then node A in the network
nodes?
in Figure 3.6 is the source node, while the point C in the same network is the
destination node. Ways to reach a destination node from a source node are
called paths in the network. For example in Figure 3.6, if A is the source node
What are paths
and C is the destination node, we may describe a path as going from A to B to
and cycles?
C, or from A through B, F, E, D, and K, in that order, and then to C. These paths
are communicated by mentioning the nodes from the source to the destina-
tion in the order of their traversal. So the first path is represented as ABC and
the second one as ABFEDKC. A path for which the source node is the same
100 CHAPTER 3. NETWORKS
as the destination node is called a cycle. There are no cycles in the network
in Figure 3.6, but if the direction of travel allowed from B to C in the layout
in Figure 3.4 is reversed, it would lead to the cycle BFEDCKB. The length of a
path or a cycle (or in appropriate situations, its cost) is the sum of the lengths
(or costs respectively) of all the arcs in it.
Networks can be used to represent a wide variety of problems, many of
which are not concerned with physical layouts. In Example 3.1 we show the
representation of a manpower planning scenario in the form of a network.
40 40 Both from
E F K L
market
10
20 55 55 One from
C D I J
market
20
10
10
70 70 None from
S A B G H T market
Month 1 Month 2
outlay outlay
another department. This cost is Rs. (20, 000 + 35, 000) = Rs. 55,000. Zero cost
arcs are shown as broken lines in the representation to eliminate clutter. We
have dropped arc capacities from our representation since they are not mean-
ingful in this problem context.
xi j ≤ ui j .
If an arc in the network does not have a finite capacity, then its capacity con-
straint is of the form
xi j ≤ ∞.
x pk + x qk + xr k = xks + xkt .
Rearranging the terms to obtain a constant on the right hand side of the con-
straint, we get
… p
s …
… q k
t …
… r
Notice that node balance constraints in networks are necessarily equality con-
straints.
which for node k in the network of Figure 3.8 would take the form
xks + xkt − x pk − x qk − xr k = 0.
These two forms are equivalent, but in order to maintain readability of the
model, it is better to follow one of these two conventions for all node balance
constraints in a formulation.
The form of the node balance constraint changes slightly if the node is a
source node or a destination node. For example, if node k in the network of
Figure 3.8 is a source node with an inflow of f units, then equation (3.1) would
be written as
x pk + x qk + xr k − xks − xkt = − f .
x pk + x qk + xr k − xks − xkt = f .
104 CHAPTER 3. NETWORKS
Example 3.2: Consider the layout in Figure 3.4 on page 98. A car rental com-
pany has its office at point A in this layout. It has received a requisition for 20
vehicles to be sent to point H within an hour, and wants to find out how to
route the vehicles to H from A.
The network representation of the layout is shown in Figure 3.6 on page 99.
In order to find a routing for the vehicles, we need to solve a network flow
problem, where a unit of flow represents a vehicle. Nodes A and H in this
network represents the source node and destination nodes respectively. The
inflow into A and the outflow out of H are both 20 units.
To describe this network in a mathematical program, we define decision
variables denoting flows on all the arcs in the network. Hence we have the
following decision variables:
There are 12 such decision variables representing the 12 arcs in the network.
Next we define the capacity constraints. As mentioned earlier, these con-
straints ensure that the flow on an arc does not exceed its capacity. For exam-
ple, the capacity on arc (A,B) is 20 units. Hence the capacity constraint for this
arc is represented by the constraint
x AB ≤ 20.
−x AB = −20.
Node H is the destination node. It has two incoming arcs, and no arc going
out from it. The outflow from node H is 20 units. Hence its node balance
constraint looks like
x J H + xK H = 20.
3.3. FORMULATING NON-STANDARD REPRESENTATIONS 105
We can construct the node balance constraints for the other eight nodes of
the network in a similar manner. For example, node D has one incoming arc,
(E,D), and two outgoing arcs, (D,G) and (D,K). Hence its node balance con-
straint looks like
xE D − xDG − xDK = 0.
Decision Variables
Constraints
x AB , x BC , x B F , x DG ,
x DK , x ED , x E J , x F E ,
x F J , x J H , x KC , x K H ≥ 0 (Non-negativity)
lowing two examples show how the assignment of capacities to such arcs vary
depending on the problem situation.
A D
A D
15 7
P
P
14
Q Q
8 19
C B C B
Layout of an area Its mixed graph representation
Figure 3.10: A road and bridge network
graph representation shows the capacities of the various arcs and edges. Their
lengths are immaterial here, and have not been shown in Figure 3.10.
The only issue in creating a network out of the mixed graph is the handling
of the edge between P and Q. As discussed in this section, we replace the edge
by two arcs, PQ representing the flow from P to Q, and QP, representing the flow
from Q to P, as shown in Figure 3.11. The maximum flow on each of PQ and QP
1
As in Chapter 1, the portion under emphasis indicates the condition that is of interest in
the section.
108 CHAPTER 3. NETWORKS
A D
15 7
14
8 19
C B
cannot exceed the capacity of the bridge. However, there is a stronger relation
between the two; their sum cannot exceed 14. Therefore, if we represent the flow
on each arc (i , j ) by xi j , the capacity constraint on edge PQ is
Example 3.4: A bank has two branches, labeled A and B, in a rural location
that is not very well-connected to the main branch. These branches handle
demands from farmers in the area. Farmers can both deposit and demand
large sums of money, and each branch’s reserves may not be sufficient to dis-
burse all demands on a particular day. Hence the two branches can borrow
from each other to tide over temporary cash flow problems. However, the
bank has stipulated that the two branches cannot have a net daily transaction
of more than Rs. 100,000.
A mixed graph representation of the situation is shown in Figure 3.13. No-
tice that there are no costs associated with any of the transactions, and there
are no capacity restrictions except for the inter-branch transaction limit. The
usual way of dealing with an edge in a mixed graph is to replace it with a pair
of arcs. We do this to convert the mixed graph of Figure 3.13 to the network of
Figure 3.14.
3.3. FORMULATING NON-STANDARD REPRESENTATIONS 109
Decision Variables
Constraints
x AP , xCQ , x P D , xQB ,
x PQ , xQP ≥ 0 (Non-negativity)
We next handle the issue of assigning capacity restrictions on the new arcs
introduced. As usual, let non-negative decision variables xi j denote the money
flow from branch i to branch j . Notice that the bank’s stipulation does not limit
the amount of money sent from one branch to another. They only stipulate an
upper limit to the net daily transaction amount. Therefore, the individual arcs
(A,B) and (B,A) have no capacity constraints associated with them. However,
since the net daily transaction cannot exceed Rs. 100,000, x AB and xB A needs to
110 CHAPTER 3. NETWORKS
Ai Bi
100000
A B
Ao Bo
Ai Bi
A 100000 B
Ao Bo
|x AB − xB A | ≤ 100000.
This is not a linear constraint, but we can linearize it by replacing it with the
following two constraints:
x AB − xB A ≤ 100000, and
xB A − x AB ≤ 100000.
This pair of constraints acts as the capacity constraints on (A,B) and (B,A). We
leave the complete description of the network model as an exercise to the
reader.
that model the costs, capacities, and directional properties of the nodes. The
following example illustrates the way in which this is done.
A
(4,150) (6,40)
S (1,100) D
(3,70) (2,150)
B
(4,120)
The costs and capacities of the road connections and the toll booth at Be-
lapur are marked in the figure. Due to the toll booth at Belapur, node B in
Figure 3.15 has a cost and a capacity. To convert this graph into a network, we
therefore represent node B as two nodes Bi and Bo with an arc connecting Bi to
112 CHAPTER 3. NETWORKS
Bo . This arc represents the toll booth, so it has a cost of Rs. 5 per car passing
through it, and a capacity of 120 cars per hour. After this change the road net-
work looks like the network in Figure 3.16. Using mathematical programming,
A
(4,150) (6,40)
S (1,100) D
(3,70) (2,150)
(4,120)
Bi Bo
Decision Variables
Constraints
x S A , x SB i , x AB i , x AD ,
xBi Bo , xBo D ≥ 0 (Non-negativity)
the outflows out of the destination nodes. Our objective is to route the flows
from the source nodes to the destination nodes along the network, so that
none of the arc capacities are violated, and the flows are sent from the source
nodes to the destination nodes at minimum cost. A solution to the problem
specifies the amount of flow along each of the arcs in the network, such that
the required amounts of flow go out of the source nodes into the network, and
the required amounts of flow reach the destination nodes.
This problem lends itself very naturally to be solved using linear program-
ming. To do so, we define one non-negative decision variable for each arc in
the network. This variable denotes the amount of flow along that arc in an
optimal solution to the problem. The total cost of sending flows along the
P
network is (i ,j )∈A ci j xi j , so that the objective of the linear program is to
X
Minimize ci j xi j .
(i ,j )∈A
The constraints in the model describe the network. So, as discussed on page 102,
we add capacity constraints, node balance constraints, and non-negativity
constraints to complete the formulation. The general form of a minimum cost
flow problem formulation is shown in Figure 3.18.
We illustrate the formulation process for a minimum cost flow problem in
the example below.
Example 3.6: Consider the network shown in Figure 3.19. As per our conven-
tion, for each arc, we mention the cost of the arc followed by its capacity. Let
A and B be the source nodes in the network, with inflows of 15 units and 10
units respectively. Let C and E be the destination nodes with outflows of 13
units and 12 units respectively. We would like to route the flows from A and
B to C and E on the network, without violating any of the arc capacities, and
such that the total cost of routing the flows is minimum.
To formulate this problem, we define the following non-negative variables:
x AB : Flow on arc (A,B);
x AC : Flow on arc (A,C);
xBC : Flow on arc (B,C);
xBD : Flow on arc (B,D);
xC D : Flow on arc (C,D);
xC E : Flow on arc (C,E); and
xDE : Flow on arc (D,E).
The total cost of sending flows along the network is 6x AB + 3x AC + 2xBC +
5xBD + 10xC D + 7xC E + 4xDE , so that the objective of the program is to
Minimize 6x AB + 3x AC + 2xBC + 5xBD + 10xC D + 7xC E + 4xDE .
3.4. COMMON NETWORK FLOW PROBLEMS 115
Decision Variables
Minimize
X
m X
n
Total cost z = ci j xi j
i =1 j =1
Subject to
xi j ≤ c i j (Capacity constraint for arc (i , j ))
There is a capacity constraint corresponding to each arc
in the network
X
n X
n
xi j − x j k = − f s (Node balance constraint for a source
i =1 k=1
node s with inflow f s )
X
n X
n
xi j − xjk = f t (Node balance constraint for a destination
i =1 k=1
node t with outflow f t )
X
n X
n
xi j − xjk= 0 (Node balance constraint for node j which
i =1 k=1
is neither a source nor a destination)
There is a node balance constraint corresponding to each
node in the network
xi j ≥ 0 (Non-negativity)
There is a non-negativity constraint corresponding to each
arc in the network
The first set of constraints in the model is the set of capacity constraints.
As an example of capacity constraints, the one for the arc (A,B) is
x AB ≤ 15.
There are six more such constraints for each of the other arcs in the network.
116 CHAPTER 3. NETWORKS
Flow = 13
(3,10)
Flow = 15 A C (7,20)
(2,5)
(6,15) (10,9) E Flow = 12
(5,17) (4,18)
Flow = 10 B D
The second set of constraints contains five node balance constraints, one
for each of the five nodes in the network. As an example, the node balance
constraint for node B is
The last set of constraints are the non-negativity constraints for the deci-
sion variables.
Combining all the above, a linear programming formulation for the mini-
mum cost flow problem described in this example is as shown in Figure 3.20.
An optimal solution to the problem is: z = 174, x AB = xBC = 5, x AC = xBD =
xDE = 10, xC E = 2, and xC D = 0. This means that it is optimal to route flows
as shown in Figure 3.21. The arcs marked as solid lines carry the flows written
next to them in the figure, while the arcs shown in broken lines do not carry
any flow. The total cost of this routing of flows is 174 units.
We have so far assumed that our minimum cost flow problems are bal-
anced, i.e., the sum of the inflows into the network equals the sum of outflows
from the network. This may not be true in general. Minimum cost flow prob-
lems in which the total inflow is not equal to the total outflow are called non-
balanced or unbalanced minimum cost flow problems. Such problems can
however be converted into balanced minimum cost flow problems by adding
dummy nodes to the network.
Consider for example that in the network in Figure 3.19, the inflows at A
and B are 15 units and 10 units, but the outflow at E is only 20 units. This
causes an imbalance where the total inflow exceeds the total outflow. In this
case, we balance the problem by adding a dummy node, say X, stipulating out-
flow at X as the difference between the sum of inflows and the sum of outflows,
and adding zero cost and infinite capacity arcs from both the source nodes to
the dummy node (see Figure 3.22; the new arcs are shown with broken lines).
3.4. COMMON NETWORK FLOW PROBLEMS 117
Decision Variables
Minimize
Flow cost z =6x AB + 3x AC + 2x BC + 5x B D + 10xC D + 7xC E + 4x DE
Subject to
x AB ≤ 15 (Capacity constraint on (A,B))
x AC ≤ 10 (Capacity constraint on (A,C))
x BC ≤ 5 (Capacity constraint on (B,C))
xB D ≤ 17 (Capacity constraint on (B,D))
xC D ≤ 9 (Capacity constraint on (C,D))
xC E ≤ 20 (Capacity constraint on (C,E))
x DE ≤ 18 (Capacity constraint on (D,E))
x AB , x AC , x BC , x B D ,
xC D , xC E , x DE ≥ 0 (Non-negativity)
Figure 3.20: Linear programming formulation of the minimum cost flow prob-
lem of Example 3.6
118 CHAPTER 3. NETWORKS
Flow = 13
10
Flow = 15 A C
2
5 5 E Flow = 12
10 10
Flow = 10 B D
Figure 3.21: An optimal solution to the minimum cost flow problem in Exam-
ple 6
(3,10)
Flow = 15 A C (7,20)
(2,5)
Flow = 5 X (6,15) (10,9) E Flow = 20
(5,17) (4,18)
Flow = 10 B D
the problem, at least one of the two arcs will have a non-zero flow. If an arc has
a non-zero flow f in an optimal solution, then it means that f units of flow are
not sent from the corresponding source node to the destination nodes.
Consider next that in the network in Figure 3.19, the inflows into A and
B are 15 units and 10 units, and the outflows at C and E are 18 units each.
This is a situation when the outflow from the destination nodes exceed the
inflow into the source nodes. In this case we add a dummy node, say X, to
the network, and connect it to both the destination nodes through arcs with
zero costs and infinite capacities (see Figure 3.23; the new arcs are shown with
broken lines). The inflow at node X is assumed to be (18 + 18) − (15 + 10) = 11
units. On solving the problem, at least one of the two arcs will have a non-zero
flow. If an arc has a non-zero flow f in an optimal solution, then it means that
f units of flow are not sent to the corresponding destination node from any of
the source nodes.
The transportation problem is a special case of the minimum cost flow
The
problem. A typical setup of this problem is as follows. A company has to sup-
transportation
ply its demand locations material from its supply locations. It has m supply
problem.
3.4. COMMON NETWORK FLOW PROBLEMS 119
Flow = 20
X Flow = 11
(3,10)
Flow = 15 A C (7,20)
(2,5)
(6,15) (10,9) E Flow = 20
(5,17) (4,18)
Flow = 10 B D
D1 D2 Dj Dn Stock
W1 c11 c12 ··· c1j ··· c1n s1
W2 c21 c22 ··· c2j ··· c2n s2
.. .. .. .. .. .. .. ..
. . . . . . . .
Wi ci 1 ci 2 ··· ci j ··· ci n si
.. .. .. .. .. .. .. ..
. . . . . . . .
Wm cm1 cm2 · · · cm j · · · cmn s1
Demand d 1 d2 · · · d j · · · dn
c11
Flow = s1 W1 D1 Flow = d1
c12 c21
c1n
c22
Flow = s2 W2 D2 Flow = d2
c2n
. .
. .
. .
cm1
cm2
cmn
Flow = sm Wm Dn Flow = dn
Networks like the one in Figure 3.24 are called complete bipartite networks.
In such networks, the set of nodes can be divided into two mutually exclusive
and collectively exhaustive sets, such that no arc exists between any two nodes
in the same set, and for any two nodes i and j where i belongs to the first set
and j belongs to the second set, there exists an arc from i to j , but not from j
to i .
Let us now look at the modeling of the transportation problem as a linear
program. As in any other network flow problem, we define one non-negative
decision variable xi j for each arc (i , j ) in the network, representing the amount
of material sent along that arc. The objective function is the total cost of trans-
P Pn
portation, which is c11 x11 + c12 x12 + · · · + cmn xmn , i.e., m
i =1 j =1 c i j x i j , so that
the objective in the model is to
X
m X
n
Minimize ci j xi j .
i =1 j =1
Since the arcs have no capacity restrictions, the capacity constraints normally
encountered in formulations of minimum cost flow problems are not seen
in formulations of transportation problems. We however include the node
3.4. COMMON NETWORK FLOW PROBLEMS 121
X
n
− xi j = −s i ,
j =1
X
n
xi j = si .
j =1
X
m
xi j = d j .
i =1
Example 3.7: A logistics company needs to supply the demands for widgets
at three client locations C, D, and E from two warehouses located at A and B.
Warehouses A and B have 500 and 300 widgets in stock respectively. The client
requires 250 widgets at location C, 400 widgets at location D, and 150 widgets
at location E. A matrix of the costs of sending a widget from a warehouse to a
client locations is given below.
C D E
A Rs. 12 Rs. 5 Rs. 7
B Rs. 2 Rs. 16 Rs. 9
The company wants to develop a model to compute the distribution plan such
the transportation costs for the supply operation is minimized.
This is clearly a situation where we need to formulate a transportation
model. A network representation of the problem is shown in Figure 3.26. The
nodes A and B represent the warehouse locations, and the nodes C, D, and E
represent the client locations. We define non-negative decision variables x AC ,
xBC , x AD , xBD , x AE , and xBE to correspond to the flows from the warehouses
at A and B to the client locations at C, D, and E. The total transportation cost
122 CHAPTER 3. NETWORKS
Decision Variables
x 11 : Flow from W1 to D 1 ;
x 12 : Flow from W1 to D 2 ;
..
.
x mn : Flow from Wm to D n .
Minimize
X
m X
n
Transportation cost z = ci j xi j
i =1 j =1
Subject to
Xn
x i j = s i (Supply constraint for node Wi )
j =1
X
m
x i j = d j (Demand constraint for node D j )
i =1
There are n such constraints corresponding to nodes D 1 , . . . , D m
xi j ≥ 0 (Non-negativity)
There are mn such constraints corresponding to i = 1, . . . , m and
j = 1, . . . , n
Each warehouse has a supply constraint. For example, the supply constraint
for the warehouse at A is given by
x AC + x AD + x AE = 500.
Similarly, each client location has a demand constraint. The demand con-
straint for the client location at C is given by
x AC + xBC = 250.
3.4. COMMON NETWORK FLOW PROBLEMS 123
C Flow = 250
12
Flow = 500 A 5 2
16 D Flow = 400
Flow = 300 B 7
9
E Flow = 150
Warehouse Client
The supply constraint at B and the demand constraints at C, D, and E are all
equalities. Adding them up, we get:
(xBC + xBD + xBE ) + (x AC + xBC ) + (x AD +xBD ) + (x AE + xBE )
= 300 + 250 + 400 + 150,
which when simplified yields
Decision Variables
Minimize
Transportation cost z =12x AC + 5x AD + 7x AE + 2x BC + 16x B D + 9x B E
Subject to
x AC + x AD + x AE = 500 (Supply constraint for warehouse A)
x BC + x B D + x B E = 300 (Supply constraint for warehouse B)
x AC , x AD , x AE ,
x BC , x B D , x B E ≥ 0 (Non-negativity)
x AC + x AD + x AE = 500,
As with general minimum cost flow problems, we can also convert non-
balanced transportation problems into balanced problems by adding dummy
nodes, as was mentioned in the discussion on page 116. If the total supply
3.4. COMMON NETWORK FLOW PROBLEMS 125
Example 3.8: Consider the problem faced by the logistics company that was
described in Example 3.7. Due to a sudden increase in the population at lo-
cation E, client location E now has a demand of 250 widgets instead of 150.
The costs of transporting widgets remain unchanged, as do the stocks at the
warehouses. Since the demand for widgets had increased but not its supply, it
is clear that some of the demands for widgets will not be met. The company
wants to find out how to distribute all the widgets in its stock to minimize cost
under the new demand scenario.
The total stock of widgets in the logistics company is 500+300 = 800, while
the total demand is 250 + 400 + 250 = 900. So there is an excess demand for
100 widgets. This imbalance can be taken care of by adding a dummy ware-
house with a stock of 100 widgets, and connecting it to all the demand nodes
by infinite capacity arcs with zero costs. Adding this warehouse balances the
problem. The network representation of the problem after the addition of
the dummy warehouse (node X), and connecting it to all demand locations
through infinite capacity zero cost arcs (shown with broken lines) is shown
in Figure 3.28. It is left to the reader to formulate the problem as a linear
C Flow = 250
12
Flow = 500 A X Flow = 100
5 2
16 D Flow = 400
Flow = 300 B 7
9
E Flow = 250
Warehouse Client
lem is z = 3650, x AD = 400, x AE = 100, xBC = 250, xBE = 50, x X E = 100, and
x AC = xBD = x XC = x X D = 0. This means that the optimal transportation plan
is identical to that in Example 3.7, and the new demand at client location E is
left unfulfiled.
Apart from the obvious application of routing material along physical net-
works, transportation problems also find managerial applications in design-
ing repair and maintenance schedules. We illustrate one such situation in the
example below.
tal supply exceeds total demand, the problem is not balanced, and we add a
dummy demand node (labeled X) with demand of (17+5+3)−(5+3+7+2) = 8
units to balance it.
Finally we need to create arcs for the possible flows. E can supply all the
four demand nodes. So we create arcs from E to D1 through D4. The cost of
each of the arcs is Rs. 200, the market price of each component. R3 can supply
only the demands for the third and fourth month, i.e., D3 and D4; while R4
can supply only the demand for the fourth month, i.e., D4. The cost of each of
these arcs is Rs. 100, which is the cost of repairing a component in the repair
shop. As usual, all the arcs from the supply nodes to the dummy demand node
are zero cost arcs.
D1 Flow = 5
200
200
Flow = 17 E D2 Flow = 3
200
R3 100 D3
Flow = 5 Flow = 7
200
100
R4 100 D4 Flow = 2
Flow = 3
X Flow = 8
D1 D2 D3 D4 X Capacity
E 200 200 200 200 0 17
R3 M M 100 100 0 5
R4 M M M 100 0 3
Demand 5 3 7 2 8
Given the network or the tabular format it is easy to formulation the problem
as a transportation problem. Check that the budget allocation required for an
optimal solution to the problem is Rs. 2700. In the optimal solution, the first
two month’s demands are met by the external market. Two of the units re-
quired for the third month are bought from the external market and five units
are supplied by the repair shop from the parts that were sent for repair in the
first month. The whole of the fourth month’s demand is met by parts sent to
the repair shop in the second month. At the end of the four months, the repair
shop has one unit ready for future use.
Decision Variables
x i j : Flow along arc (i , j ) for all arcs in the augmented network including
the back arc (t,s).
Maximize
Flow along the back arc z =x t s
Subject to
xi j ≤ u i j (Capacity constraint for arc (i , j ))
There is a capacity constraint corresponding to each arc
in the network
X
n X
n
xi j − x j k = 0 (Node balance constraint for node j )
i =1 k=1
There is a node balance constraint corresponding to each
node in the network
xi j ≥ 0 (Non-negativity)
There is a non-negativity constraint corresponding to each
arc in the network
Figure 3.30: First linear programming formulation of the maximum flow prob-
lem
at the destination node. But this is precisely what we achieve in the second
formulation by adding the decision variable x for inflow into the source node
(and outflow from the destination node), and maximizing its value. The first
formulation is more widely used in practice.
We will now illustrate the formulations using the following example.
Example 3.10: Consider the network shown in Figure 3.19 on page 116. Recall
that in this network the costs ci j and capacities s i j for each node (i , j ) are
shown as the pair (ci j , s i j ) next to the arc. Let us suppose that we want to find
out how much flow we can send from node A to node E along this network.
In the first formulation, we add a back arc from the destination node E to
the source node A. This augmented network is shown in Figure 3.31. We then
infinite
10
A C
20
15 5 9 E
17 18
B D
Maximize xE A
The usual capacity constraints and node balance constraints define the net-
work in Figure 3.31. The capacity on the back arc is infinite, hence we do
not include any capacity constraint for this arc. The complete formulation is
shown in Figure3.33 on page 132.
For the second formulation we define a non-negative decision variable xi j
for each arc (i , j ) in the network. Further we define a non-negative decision
variable x denoting the external flow into the source node A and the exter-
nal flow out of the destination node E. Our objective in this formulation is to
maximize the external flow, i.e., to
Maximize x.
3.4. COMMON NETWORK FLOW PROBLEMS 131
The capacity constraints in the formulation ensure that the flow along any
arc does not exceed its capacity. For example, the capacity constraint corre-
sponding to arc (A,B) is
x AB ≤ 15.
The node balance constraints ensure that the total flow into each node equals
the total flow out of the node. For the source node A, this constraint thus is
x − x AB − x AC = 0.
xC E + xDE − x = 0.
x AB − xBC − xBD = 0.
Finally, non-negativity constraints force the decision variables not to take neg-
ative values in an optimal solution. Therefore, the second linear programming
formulation for the problem is the one shown in Figure 3.34 on page 133.
Notice that the two formulations are almost identical, the only difference
being that what appears as xE A in the first formulation appears as x in the
second.
An optimal solution to this problem is that a maximum of 25 units of flow
can be sent along the network from A to E. One possible routing for this flow is
shown in Figure 3.32. The arcs marked with solid lines carry the flows written
25
10
A C
10
15 E
15 15
B D
next to them, and the arcs marked with broken lines do not carry any flow in
132 CHAPTER 3. NETWORKS
Decision Variables
Maximize
Flow on the back arc z =x E A
Subject to
x AB ≤ 15 (Capacity constraint on (A,B))
x AC ≤ 10 (Capacity constraint on (A,C))
x BC ≤ 5 (Capacity constraint on (B,C))
xB D ≤ 17 (Capacity constraint on (B,D))
xC D ≤ 9 (Capacity constraint on (C,D))
xC E ≤ 20 (Capacity constraint on (C,E))
x DE ≤ 18 (Capacity constraint on (D,E))
x E A − x AB − x AC = 0 (Node balance at A)
x AB − x BC − x B D = 0 (Node balance at B)
x AC + x BC − xC D − xC E = 0 (Node balance at C)
x B D + xC D − x DE = 0 (Node balance at D)
xC E + x DE − x E A = 0 (Node balance at E)
x AB , x AC , x BC , x B D ,
xC D , xC E , x DE , x E A ≥ 0 (Non-negativity)
Figure 3.33: First linear programming formulation of the maximum flow prob-
lem of Example 3.10
3.4. COMMON NETWORK FLOW PROBLEMS 133
Decision Variables
Maximize
External flow into A z =x
Subject to
x AB ≤ 15 (Capacity constraint on (A,B))
x AC ≤ 10 (Capacity constraint on (A,C))
x BC ≤ 5 (Capacity constraint on (B,C))
xB D ≤ 17 (Capacity constraint on (B,D))
xC D ≤ 9 (Capacity constraint on (C,D))
xC E ≤ 20 (Capacity constraint on (C,E))
x DE ≤ 18 (Capacity constraint on (D,E))
x − x AB − x AC = 0 (Node balance at A)
x AB − x BC − x B D = 0 (Node balance at B)
x AC + x BC − xC D − xC E = 0 (Node balance at C)
x B D + xC D − x DE = 0 (Node balance at D)
xC E + x DE − x = 0 (Node balance at E)
x AB , x AC , x BC , x B D ,
xC D , xC E , x DE , x ≥ 0 (Non-negativity)
this solution. Note that there are other possible ways of routing this flow.
EE The maximum flow along a network depends on the source and sink
nodes specified in the problem. For example, the maximum flow from A to E
along the network in Figure 3.19 is 25 units, while the maximum flow from B
to E along the same network is only 22 units.
Example 3.11: Consider the network shown in Figure 3.19 on page 116 once
more. Let us assume that we can use both nodes A and B as source nodes,
and both C and E as destination nodes. We would like to know the maximum
amount of flow that we can route along the network under these conditions.
Since there are more than one source and destination nodes, we first cre-
ate a dummy source node S and a dummy destination node T for the network.
We then connect S to the source nodes A and B using infinite capacity arcs. We
also connect the destination nodes C and E to T using infinite capacity arcs.
The network in Figure 3.19 augmented in this manner looks like the network
in in Figure 3.35.
T
infinite
10
A C infinite
infinite 20
S 15 5 9 E
infinite 17 18
B D
The maximum flow problem from S to T can now be solved using either of
the two linear programming formulations. Check that the maximum amount
3.4. COMMON NETWORK FLOW PROBLEMS 135
of flow that can be sent along this network is 32 units. The routing of flows is
shown in Figure 3.36. The arcs marked with solid lines carry the flows written
15
10
10 A C
17
5 E
22 17 17
B D
next to them, and the arcs marked with broken lines do not carry any flow in
this solution.
It is easy to see that the flow would be along a minimum cost path, which
corresponds to the shortest path in the original problem. The formulation of
the problem when interpreted as a minimum cost flow problem is shown in
Figure 3.37.
Decision Variables
Minimize
X
m X
n
Flow cost (i.e., path length) z = l i j xi j
i =1 j =1
Subject to
Xn X
n
xi s − x sk = −1 (Node balance constraint for source node s)
i =1 k=1
X n Xn
xi t − x t k = 1 (Node balance constraint for destination
i =1 k=1
node t )
X
n X
n
xi j − x j k = 0 (Node balance constraint for node j ∉ {s, t })
i =1 k=1
There is a node balance constraint corresponding to each
node in the network
xi j ≥ 0 (Non-negativity)
There is a non-negativity constraint corresponding to each
arc in the network
Example 3.12: Consider the layout in Figure 3.4 on page 98. Let us find the
shortest path from point A in this layout to point H. The network representa-
tion of this layout is given in Figure 3.6 on page 99. We will develop the linear
programming formulation described earlier in this section. Let us interpret
the lengths of the different road segments in Figure 3.4 as costs of the cor-
responding arcs in the network in Figure 3.6, and try to find the route that a
3.4. COMMON NETWORK FLOW PROBLEMS 137
unit flow from A to H will take in the network if we aim to minimize the cost
of sending it along the network. We ignore the capacities of the arcs in this
problem.
We define the following 12 non-negative decision variables in our model:
Our aim is to minimize the cost of transmitting the flow, hence we express
our objective as
−x AB = −1,
xC H + xDH + x J H = 1.
For other nodes, for example node F, the node balance constraint is
xBF − xF E − xF J = 0.
Decision Variables
Minimize
Total cost z =300x AB + 1100x BC + 500x B F + 1900xC H +
800x DC + 500x DG + 1700x D H + 500x ED +
800x E J + 300x F E + 1100x F J + 200x J H
Subject to
− x AB = −1 (Node balance at A)
x AB − x BC − x B F = 0 (Node balance at B)
x BC + x DC − xC H = 0 (Node balance at C)
x ED − x DC − x DG − x D H = 0 (Node balance at D)
x F E − x ED − x E J = 0 (Node balance at E)
xB F − xF E − xF J = 0 (Node balance at F)
x DG = 0 (Node balance at G)
xC H + x D H + x J H = 1 (Node balance at H)
xE J + xF J − x J H = 0 (Node balance at J)
x AB , x BC , x B F , xC H ,
x DC , x DG , x D H , x ED ,
xE J , xF E , xF J , x J H ≥ 0 (Non-negativity)
shortest paths in the network. See for example, that along the path ABFEJH
suggested by the optimal solution obtained in Example 3.12, one can take the
route up to point F, and then instead of following FEJ, one could use the arc
(F,J) to reach J. Both FEJ and FJ are 1100 meters long, so that both the paths
ABFEJH and ABFJH are optimal. Now interpreting the lengths as costs, the
linear program is free to route the unit flow through the two paths at any
3.5. REPRESENTING NETWORKS IN MICROSOFT® EXCEL SOLVER 139
are also coded in a matrix form. We define a n × n square matrix called FLOW.
This matrix is shown in Figure 3.40. The element in the i th row and j th col-
umn of this matrix represents the flow on the arc (i , j ) in the network. Cells
G17 through G21 and B22 through F22 contain calculated values, whose pur-
3.5. REPRESENTING NETWORKS IN MICROSOFT® EXCEL SOLVER 141
1. It is easy to find the total inflow and outflow at each node. The total in-
flow into a node is done by summing up the values in the columns of
the FLOW matrix. For example, in Figure 3.40, cells G17 through G21
store the outflows from nodes A through E into the network, and cells
B22 through F22 store the inflows into nodes A through E from the net-
work. Once inflows and outflows are thus obtained, it is easy to write
down the node balance constraints at each node.
2. The relative positions of the various attributes of each arc are the same
in all three matrices. Hence computing objective functions and input-
ing capacity constraints become very easy. In case of cost minimization
problems on the network in Figure 3.19, the objective function is writ-
ten as
=SUMPRODUCT($B$2:$F$6, $B$17:$F$21),
and the capacity constraints are input as
$B$17:$F$21 ≤ $B$9:$F$13.
kth entry denotes the capacity of the kth arc in the network. The node arc
representation of the network in Figure 3.19 is shown in Figure 3.41.
Figure 3.41: Node arc matrix representation of the network in Figure 3.19
The decision variables representing flows along the various arcs in the net-
work are declared as a vector FLOW of size m in this representation. As usual,
the kth entry in this vector denotes the flow along the kth arc. This is shown
in Figure 3.42. The net outflows at nodes A through E in the network in Fig-
ure 3.19 are calculated in cells I2 through I6 using the formula shown in those
cells in Figure 3.42. These are used to input the node balance constraints in
the network. The objective function for a cost minimization objective in the
network in Figure 3.19 is calculated as
=SUMPRODUCT($B$7:$H$7,$B$10:$H$10)
in this representation, and the capacity constraints are represented as
$B$10:$H$10 ≤ $B$8:$H$8.
3.5. REPRESENTING NETWORKS IN MICROSOFT® EXCEL SOLVER 143
Figure 3.42: Model in the node arc matrix representation of the network in
Figure 3.19
144 CHAPTER 3. NETWORKS
3.6 Problems
Problem 3.1: The road network between seven towns numbered 1 through 7
is given in the figure below. The numbers next to each link (representing road
connections) denote the length of the road in kilometers. Assume that it costs
Rs.4 per kilometer in fuel costs to travel on these roads.
3
2 3
10 9
5
B 7 7
4
1 4
A C
6 4
8
5 5 6
a. What is the minimum amount that the driver of a car must pay for fuel to
travel from city 1 to city 7 along this network?
b. Observe that your solution does not make use of the road between cities 2
and 3, even though this is the shortest link in the network. Why?
c. How does your answer in part (a) change if the road between cities 4 and
6 is declared one-way from city 6 to city 4?
d. The authorities have decided that they would put up a toll-booth either at
point A along the link between cities 1 and 4, or at point B along the link
between cities 3 and 6, or at point C along the link between cities 6 and 7.
At which of these three places can they expect to collect the maximum toll
fee per car?
of the city in front of the GrabAll representative. He said that the phone com-
pany had 11 access points in the region, marked A through K in the map above,
and showed the connectivity the phone company provided between them,
depicted by lines in the map. He further showed the manager of GrabAll the
data on the available capacity and cost in $1000 per gigabit of information
transferred per second (Gbps) for each of the connections. For instance, the
connection between A and B had 12 Gbps capacity that GrabAll could lease,
and it would cost GrabAll $4000 per Gbps per month.
J
(15, 4)
(25, 2)
(8, 10) E
(8, 12)
A B (9, 5)
(12, 4)
(5, 2) (12, 8)
(4, 15) (7, 5) D
(10, 3) H (2, 15)
C (7, 3)
(8, 7) I
(10, 2)
G (9, 2)
F (5, 3)
K (3, 1)
a. What is the cheapest way of sending data from the store at E to the systems
department?
b. Assuming that funds were not an issue, at what rate could the store at E
send data to the systems department?
c. Assuming that funds were not an issue, at what rate (in Gbps) could Gra-
bAll send data from all its stores to its systems department using the net-
work? How much would it cost?
d. If GrabAll had allocated $60,000 per month for data collection, what is the
maximum amount of data that it could hope to transmit from all three
outlets through the network?
Problem 3.3: The road map of a region is provided in the map below. The
circles in the map denote cities, while the lines denote highway connections
in the region. Goods can be carried on highways, but there is a stipulation of
the maximum load that can be carried in each highway segment in the region
in 100 tons per hour. For example, the highway segment between G and B can
carry a maximum of 1200 tons of goods per hour.
146 CHAPTER 3. NETWORKS
2
60
60
12 15
G B
7 8 10 10
60 5 20 6 10 60
F A C H
16 7 12 12
15
60 19 13 60
1 E D
a. Assuming that no other traffic is using the highway, compute the maxi-
mum weight of goods that can be transported from point 1 to point 2 using
the highway network.
b. Due to an accident, the route between A and C has been declared one-way
from C to A. Does this declaration affect your answer in part (a)?
c. There is a tollbooth set up in city D. This effectively means that not more
than 2000 tons can pass through city D per hour. How does this affect
your solution in part (a)? (Do not assume the one-way street condition of
part (b).)
d. What happens to the solution in part (a) if only 1500 tons can pass through
city D per hour?
Problem 3.4: The road network in a particular city is given in the figure be-
low. The points A through M denote important centers in the city, the links
denote direct road connections between the centers, and the numbers next
to the links denote the length of the road segment represented by the link in
kilometers.
A milk vending company has four bottling plants in locations A, B, C, and
D. The capacities of the plants are 2000 liters/day, 2500 liters/day, 1500 li-
ters/day, and 3500 liters/day respectively. The company needs to send milk
to outlets located at E, F, G, and H using the road network. The demands at
the four outlets are 1000 liters/day, 4000 liters/day, 2500 liters/day, and 2000
liters/day respectively. The milk is supplied in refrigerated trucks, and the
truckers charge Re.1 per kilogram per kilometer traveled in trucks.
3.6. PROBLEMS 147
B
3.0
2.5
1.0
I
A 3.0 2.0
F 1.0
2.0 2.5 H
1.0
1.5 K
0.7
2.0 G 2.5
4.0 E 1.8 2.2
3.5 1.5
C
J
2.5
2.0
2.5 M
D 2.0
L
a. Find a solution to the distribution problem, i.e., how should trucks move
from the four plants A, B, C, and D, to the four outlets E, F, G, and H, so that
the transportation cost is the minimum.
b. It is known that that the road segment between A and E would be under re-
pair, and hence would not be available for transportation purposes. What
is the cost implication of this unavailability?
c. Since milk is a perishable commodity, the company wants to make sure
that no truck travels a very large distance. How should the company model
this problem so that the maximum distance traveled by a truck is (i) 5 kilo-
meters, (ii) 5.5 kilometers? What are the routes used in a solution to these
problems? (Ignore the situation described in part (b) of the problem.)
d. It has been seen that unpleasant situations arise regarding the unloading
of trucks if trucks from different bottling plants deliver at the same out-
let. The company is willing to pay extra for transportation costs if such
unpleasant situations could be avoided. What would you advise the com-
pany in this regard?
D1 D2 D3 D4 D5 D6
W1 19 20 15 14 30 30
W2 27 11 11 15 12 11
W3 16 22 15 17 29 11
W4 24 30 25 15 29 24
W5 27 15 23 20 21 19
The capacities of W1, W2, . . . , W5 are 600, 500, 700, 200, and 400 boxes per
month respectively, while the demand for widgets at the six demand points
D1, D2, . . . , D6 are 350, 250, 200, 250, 350, and 300 boxes per month respec-
tively.
a. What is the monthly transportation cost that ABC incur to supply the wid-
gets?
b. ABC feels that five warehouses are not required to meet PQR’s demand.
They want to reduce the number of warehouses they use to 3, while mak-
ing sure that PQR’s demands are met. What are the cost implications of
this decision?
c. A real-estate agent has approached ABC with a proposal to rent two ware-
houses (called, say, W6 and W7). W6 has a monthly capacity of 400 boxes
and would attract a monthly rent of Rs.2500, while W7 has a monthly ca-
pacity of 300 boxes and would attract a monthly rent of Rs.3500. If ABC
rented both warehouses, then the real estate agent is willing to consider
a 10% discount on the total rent. ABC has figured out the cost of trans-
porting a widget from a W6 and W7 to all demand points (in Rs. per box).
These data is given in the table below.
D1 D2 D3 D4 D5 D6
W6 10 32 25 33 11 32
W7 12 33 33 34 5 29
What decision should ABC take regarding these two warehouses? (Ignore
the discussion in part (b) of the problem.)
Problem 3.6: An agency deals with four currencies: Indian Rupees (INR),
Euros, British Pounds (GBP), and US Dollars (USD). On a particular day, the
exchange rates between these currencies (correct to the third decimal place)
were the following.
3.6. PROBLEMS 149
Problem 3.7: The figure below shows a railway network connecting five sta-
tions labeled 1 through 5. The numbers next to the links are the capacities (in
tons/day) of the respective rail links.
2
3
15
8
1 3 4 4 5
4
7
7
3
You have a factory at Station 5 which requires 20 tons of a raw material avail-
able at Station A. You buy the material at Station A, and transport it to Station
5 at your own cost through the railway network.
a. What is the maximum amount of material that you can send from Station
1 to Station 5 per day along this network? Answer this by formulating a
maximum flow problem on this network.
b. It is known that there is a pilferage problem along links 1–2, 2–5, and 3–5.
20% of all material sent through links 1–2 and 3–5 are pilfered, while 30%
of all material sent through link 2–5 are pilfered. Given this problem how
much material can Station 5 possibly receive from Station 1 per day?
Problem 3.8: Jeetu has been assigned the responsibility of choosing the of-
fice tennis team to play a rival organization’s team next Friday. There are six
regular players in Jeetu’s office: Ajay, Bijoy, Chandra, Deepak, Eshwar, and
150 CHAPTER 3. NETWORKS
Fazal. Of these, Jeetu needs to pick two players to play in two singles, and an-
other two players to play a doubles match.After careful consideration, Jeetu
has come up with four skills on which he wants to evaluate the players, fore-
hand play, backhand play, stamina, and team sense. On a scale of 1 to 10 (with
1 as the worst), he rates the six players thus.
Since he knows the members of the other organization’s team, Jeetu also has
devised an ideal skill level requirement for his team. The minimum skill levels
that he feels would be necessary for the matches are given in the following
table.
The five towns are connected to each other by a highway system. Each
town has two connection points with each of the highways that pass next to
it. The highway system is depicted in Figure 3.43.
The distances between points in different towns along the highway is given
below.
The product manager of the company now wants to extend his product and
integrate the route planning of all five towns within one single software. This
software is to be implemented Microsoft® Excel using Solver as the optimizer.
(Note that Microsoft® Excel Solver can handle up to 200 decision variables
in a linear model.) Using it, a user should be able to input two centers, not
necessarily in the same town, and obtain a quickest route between the two.
3.6. PROBLEMS 153
A2 A3
C3
C
C8
B13 B7
B
B14 B5
D4 E7
D E
D5 E6
a. What would be your design for the model behind the software? (We are
interested in the mathematical model, and not the interface.)
b. Using your model, find the quickest route between centers A8 and D7.
c. A driver wants to start from C9, pick up a passenger from E3 and reach the
airport located in D7. What is the minimum time in which she can do that?
What route needs to be followed?