Operations Research
Operations Research
i = 1, 2, ., m
xj 0, j = 1, 2, ., n
and express the constraints as a series of linear equations/inequalities.
Identify the objective functions as a linear equation, and state whether the
objective is maximization or minimization.
Maximize Profit
Identify the objective functions as a linear equation, and state whether the
objective is maximization or minimization.
Consider a restaurant that is open seven days a week. Based on past experience, the
number of workers needed on a particular day is given as follows:
Day
M
T
W
Th
Fr
Sa
Su
Number
14
13
15
16
19
18
11
Every worker works five consecutive days, and then takes two days off, repeating this
pattern indefinitely. How can we minimize the number of workers that staff the
restaurant?
Decision Variable: xi: The number of workers who begin their five day shift on
day i.
Objective function: Minimize number of workers which is
Minimize x1 + x2 + x3 + x4 + x5 + x6 + x7
Constraints: number of workers on Monday is given by x1+x4+x5+x7
x1 + x4 + x5 + x7 14
x2 + x5 + x6 + x1 13
x3 + x6 + x7 + x2 15
x4 + x7 + x1 + x3 16
x5 + x1 + x2 + x4 19
x6 + x2 + x3 + x5 18
x7 + x3 + x4 + x6 11
x1 , x 2 , x3 , x4 , x 5 , x6 , x7 0
LP Geometry in two-dimensions:
Geometric procedure for solving a linear programming problem is only suitable for very small
problems. It provides a great deal of insight into the linear programming problem.
Consider the following problem
Minimize cx
Subject to Ax b
x0
Note that the feasible region consists of all vectors x satisfying Ax b and x 0.
Among all such points we wish to find a point with minimal cx value.
Note that points with the same objective z satisfy the equation cx = z, that is,
space)
must be moved parallel to itself in the direction that minimizes
the objective most.
This direction is -c, and hence the plane is moved in the direction -c as much as
possible.( For a maximization problem you move it in the direction c).
Note that as the optimal point x* = (x*1, x*2) is reached, the line c1x1 + c2x2 = z*, where
z*= c1x*1 + c2x*2, cannot be moved farther in the direction c = (-c1,-c2) because this will
lead to only points outside the feasible region.
We therefore conclude that x* is indeed the optimal solution.
If a linear program has a finite optimal solution, then it has an optimal corner (or
extreme) solution.
All the possible cases that may arise for a minimization problem are as follows:
Unique finite optimal solution
Representation theorem:
Let S = {x : Ax b, x 0} be a nonempty polyhedral set. Any point in S can be represented as a
convex combination of its extreme points plus a non-negative combination of its extreme
directions. Let x1, x2, xk denote the extreme points and d1, d2, ., dl denote the extreme
directions of the set S. Then for any x S there exists 1, 2, . , k and 1, 2, , l such that
x = (1x1 + 2x2 + + kxk) + ( 1d1 + 2d2 + + ldl)
where j = 1, j 0, j = 1,2,. k; j 0, j = 1,2,,l.
In general the possible number of basic feasible solutions is bounded by the number of
ways of extracting m columns out of n columns and it is bounded by i.e., there are at
most BFS. Hence there are finite number of BFS.
= CBB-1b.
objective function value z* = c.
=(CB, CN)
Let xB and xN denote the set of basic and non-basic variables for the given basis. We know
where R is the current set of indices of the non-basic variables, N is the matrix of columns of the
non- basic variables and yj = B-1aj . Let z denote the objective function value, we have
The linear programming problem can be rewritten in the non-basic variable space as
Key Result: If (zj - cj) 0 for all j R , then the current basic feasible solution is optimal.
The above test to determine the basic variable that drops out of the basis is called the
Minimum ratio test.
Note: After one iteration of the simplex method, the corresponding columns of the basis in A ,
aB1 , aB2 ,.. , aBr-1 ; ak; aBr+1are linearly independent since yrk 0.
Termination:
In the previous section we discussed a procedure that moves from one basis to an adjacent basis,
by introducing a variable in the basis and removing another variable from the basis. The criteria
for entering and leaving are summarized below:
1. Entering: xk may enter if zk - ck > 0.
2. Leaving: xBr may leave if
Simplex algorithm:
Minimize cT.x
Subject to Ax = b
X0
Initial
Step:
Start with basis B.
Main
Step 1:
Solve BxB = b
Solution xB = B-1b =
Initial BFS is given below
Step 2:
Step 3:
X = =
= 0
Define R = set of indices of non-basic variables.
yj = B-1aj jR
zj = cBTB-1aj
Compute
zj-cj jR
If zj cj 0 jR, then current solution is optimal and the simplex method can be
stopped.
Else, choose
zk ck : max. of zj - cj 0 jR, xk enters the basis.
Note that: if all yik 0, i=1, .., m, then the solution is unbounded.
choose index r of variable to leave by (minimum ratio test)
In the tableau the objective row is referred to as row 0 and remaining rows are rows 1 through m.
The right hand side denotes the values of the basic variables including the objective function.
The basic variables are identified in the far left column. The tableau is given below:
Z
XB
XB
XN
RHS
Row 0
Rows 1 to m
Now, we operate the table and find the optimal solution similar to the earlier simplex algorithm.
We first identify the basic variables and complete the initial tableau. Later, we perform pivoting
which is described below.
In case of minimization problem, we identify the highest value of zj cj column (say zk ck :
max. of zj - cj), thus xk enters the basis. Now, in that column, choose index r (from 1 to m) of
variable to leave by (minimum ratio test)
Thereby, xBr leaves the basis. Divide row r by yrk. For i = 1,,m i r, update the ith row by
adding to it -yik times the new rth row. Update the row zero by adding to it ck - zk times the new
rth row. In this way, we keep updating the table until we get optimal solution, that is all the
values of zj cj 0.
Problems:
1. Feed is manufactured for cattle, sheep, and chickens. This is done by mixing the
following main ingredients: corn, limestone, soybeans, and fish meal. These ingredients
contain the following nutrients: vitamins, protein, calcium, and crude fat. The contents of
the nutrients in each kilogram of the ingredients are given in the table below
Ingredient
Corn
Limestone
Soyabean
Fish meal
Vitamin
8
6
10
4
Protein
10
5
12
8
Calcium
6
10
6
6
Crude fat
8
6
6
9
It is required to produce 10, 6, 8 (metric) tons of cattle feed, sheep feed, and chicken feed.
Amount of the ingredients available are namely, 6 tons of corn, 10 tons of limestone, 4
tons of soybeans, and 5 tons of fish meal. The price per kilogram of these ingredients is
respectively 0.20, 0.12, 0.24 and 0.12. The minimal and maximal units of the various
nutrients that are permitted is summarized for a kilogram of the cattle feed, the sheep
feed, and the chicken feed.
Product
Cattle
Sheep
Chicken
Vitamins
Min
Max
6
4
6
Proteins
Min
Max
6
Calcium
Min
Max
7
Crude fat
Min
Max
4
8
4
6
4
6
Formulate into a linear programming model so that the total cost is minimized.
Soln:
Decision variablesLet Xij be the amount of ingredient i in 1kg of feed j
where, i = 1(corn), 2(limestone), 3(soyabeans), 4(fish meal)
j = 1(cattle), 2(sheep), 3(chicken)
Constraints10000X11 + 6000X12 + 8000X13 6000
10000X21 + 6000X22 + 8000X23 10000
10000X31 + 6000X31 + 8000X33 4000
10000X41 + 6000X42 + 8000X43 5000
Vitamins
6 8X11 + 6X21 + 10X31 + 4X41
6 8X12 + 6X22 + 10X32 + 4X42
4 8X13 + 6X23 + 10X33 + 4X43 6
Proteins
6 10X11 + 5X21 + 12X31 + 8X41
6 10X12 + 5X22 + 12X32 + 8X42
6 10X13 + 5X23 + 12X33 + 8X43
Calcium
7 6X11 + 10X21 + 6X31 + 6X41
6 6X12 + 10X22 + 6X32 + 6X42
6 6X13 + 10X23 + 6X33 + 6X43
Crude fat
4 8X11 + 6X21 + 6X31 + 9X41 8
4 8X12 + 6X22 + 6X32 + 9X42 6
4 8X13 + 6X23 + 6X33 + 9X43 6
Objective functionmin ( a0.2 + b0.12 + c0.24 + d0.12)
where, a = 10000X11 + 6000X12 + 8000X13
b = 10000X21 + 6000X22 + 8000X23
c = 10000X31 + 6000X31 + 8000X33
d = 10000X41 + 6000X42 + 8000X43
2. The company operates three plants, namely A, B, and C. The capacities (in thousands of
square feet) and unit manufacturing costs (in rupees per thousand square feet) of these
plants are shown below:
Plant
A
B
C
Capacity
1000
1200
1400
The product is distributed within 3 marketing regions. Their requirements (in thousands
of square feet) are given in the table below.
Region 1
Region 2
Region 3
900
1000
1500
The transportation costs (in rupees) per thousand square feet from plants to marketing
regions are given in the table below.
Plant
Region 1
Region 2
Region 3
200
300
150
250
400
280
300
175
500
Formulate a linear programming problem to determine the quantities the company should
transport from each plant to each marketing region in order to minimize the total
manufacturing and transportation cost for the year.
Soln:
Decision variableXij = amount (in thousands square feet) to be transported from plant i to region j.
where, i = 1 (A), 2 (B), 3 (C)
j = 1, 2, 3.
ConstraintsX11 + X12 + X13 1000
X21 + X22 + X23 1200
X31 + X32 + X33 1400
X11 + X21 + X31 900
X12 + X22 + X32 1000
X13 + X23 + X33 1500
Objective functionmin (200X11 + 300X12 + 150X13 + 250X21 + 400X22 + 280X23 + 300X31 + 175X32 +
500X33 + 380(X11 + X12 + X13) +400(X21 + X22 + X23) + 360(X31 + X32 + X33))
3. Two types of devices are to be produced from device 3. Device 1 requires 9 hours of
labor and 10 feet of rubber material. The unit profit from Device 1 is Rs. 325. To produce
one device 2, 6 hours of labor and 21 feet of rubber material is required. The unit profit
from device 2 is Rs. 400. There are a total of 200 devices 3, 1600 hours of labor, and
3000 feet of rubber material available. If the profit is to be maximized, then formulate the
above as a linear programming problem.
Soln:
Decision variablesX1 = number of devices 1,
X2 = number of devices 2.
Constraints9X1 + 6X2 1600
10X1 + 21X2 3000
X1 + X2 200
X1, X2 0
Objective functionMax (325X1 + 400X2)
4. A steel manufacturer produces three sizes of beams: small, medium and large. These
beams can be produced on any one of the three machine types: A, B, and C. The length in
feet of the beams that can be produced on the machines per hour are summarized.
Beam
A
B
C
Small
500
400
300
Medium
400
300
200
Large
300
200
100
The hourly operating costs of the machines are Rs. 50, 30 and 25 respectively and each
machine can be used up to 20 hrs per week. Assume that 1000, 700, 650 feet of beams of
different sizes are required weekly. Formulate linear program for this machine scheduling
problem.
Soln:
Decision variablesXij = number of hours required for machine i to produce j type beams.
i, j = 1, 2, 3.
ConstraintsXi1 + Xi2 + Xi3 20, i = 1, 2, 3.
500X11 + 400X21 + 300X31 1000
400X12 + 300X22 + 200X32 700
300X13 + 200X23 + 100X33 100
Objective functionMin (50(X11 + X12 + X13) + 30(X21 + X22 + X23) + 25(X31 + X32 + X33))
5. The following quantities of gasoline, kerosene and jet fuel are produced per barrel of
each type of oil (light and heavy crude oil).
Gasoline
Kerosene
Jet fuel
Light crude oil
0.35
0.45
0.31
0.21
0.33
0.45
The cost per barrel of light and heavy crude oil is 10 and 8 respectively. It is required to
deliver 500000 barrels of gasoline, 300000 barrels of kerosene and 450000 barrels of jet
fuel. Formulate a linear program to find the number of barrels of crude oil and minimizes
the total cost.
Soln:
Decision variablesX1 number of barrels of light crude oil.
X2 number of barrels of heavy crude oil.
Constraints0.35X1 + 0.21X2 500000
0.45X1 + 0.33X2 300000
0.31X1 + 0.45X2 450000
Decision variablesMin (10X1 + 8X2)
6. Consider an iron roll from which sheets of same length but different widths have to be
cut. Let the iron roll be 15cm wide and following sizes should be made from it.
7 cm = 286 numbers
6 cm = 112 numbers
5 cm = 345 numbers
4 cm = 209 numbers
Only one dimension cutting is allowed. Formulate a LP such that wastage of the material
is minimized.
Soln:
Let us now first find out the ways of cutting pattern and find the waste obtained from that
pattern.
[2 0 0 0] means from 15cm wide sheet, two 7cm wide sheet is cut. Waste = 1
[0 2 0 0] means from 15cm wide sheet, two 6cm wide sheet is cut. Waste = 3
[0 0 3 0] means from 15cm wide sheet, three 5cm wide sheet is cut. Waste = 0
[0 0 0 3] means from 15cm wide sheet, three 4cm wide sheet is cut. Waste = 3
[1 1 0 0] means from 15cm wide sheet, one 7cm and one 6cm wide sheet is cut. Waste= 2
[1 0 1 0] means from 15cm wide sheet, one 7cm and one 5cm wide sheet is cut. Waste= 3
[1 0 0 2] means from 15cm wide sheet, one 7cm and two 4cm wide sheet is cut. Waste= 0
[0 1 1 1] means from 15cm wide sheet, one 6cm, 5cm, 4cm wide sheet is cut. Waste = 0
[0 0 2 1] means from 15cm wide sheet, two 5cm and one 4cm wide sheet is cut. Waste= 1
[0 1 0 2] means from 15cm wide sheet, one 6cm and two 4cm wide sheet is cut. Waste= 1
[0 0 1 2] means from 15cm wide sheet, one 5cm and two 4cm wide sheet is cut. Waste= 2
There are 11 patterns possible where the wastage is less than the minimum of the given
sizes to be made.
Decision variables:
Xj = number of seats cut using pattern j.
Constraints:
For getting 7cm sheets,
2X1 + X5 + X6 + X7 = 286
Similarly,
2X2 + X5 + X8 + X10 = 112
3X3 + X6 + X8 + 2X9 + X11 = 345
3X4 + 2X7 + X8 + X9 + 2X10 + 2X11 = 209
Xj 0, j = 1 to 11.
Objective function:
Minimize (X1 + 3X2 + 3X4 + 2X5 + 3X6 + X9 + X10 + 2X11)
7. Game theory problem: two manufacturers A and B are competitors for the same product.
Each wants to maximize their market share and adopt 2 strategies. The gain or pay-off for
A when A adopts i and B adopts strategy j is given by aij. A 22 matrix would like
( 14
2
. During a given time period T, both A and B have to mix their strategies. If
6
A plays strategy 1, then B would play strategy 2 to gain, which A does not want. Each
therefore wants to mix their strategies so that they gain maximum (or the other loses
maximum). So, for time period T, what is the proportion that A plays strategy 1 and 2.
Assume A and B are equally intelligent.
Soln:
Decision variables:
P1 and P2 be the proportions of times A plays strategy 1 and 2 respectively.
Constraints:
P1 + P2 = 1
If B plays strategy 1 all the time, then As gain would be 4P1 P2 .(1)
If B plays strategy 2 all the time, then As gain would be -2P1 + 6P2.(2)
As A and B are equally intelligent, A would try to maximize his profit and B would try to
minimize As profit, thus A would try to maximize the minimum profit allowed by B
(max (min profit)). Let min profit be u, therefore
Max u
But B would allow u to be minimum of (1) and (2).
u 4P1 P2
u -2P1 + 6P2
P1, P2 0 u = unrestricted.
Objective function:
Max u
8. Consider the following problem
Max x1 x2
Subject to x1 + 2x2 0
-3x1 + x2 -3
x1 , x 2 0
a) Sketch the feasible region
b) Solve the problem geometrically
Soln:
a)
b) Since one of the extreme points gives the optimality, it is required to check with
each of the corner points.
With (0, 0), we get the value of objective function to be 0.
With (1, 0), we get the value of objective function to be 1.
With (6/5, 3/5), we get the value of objective function to be 3/5.
As the maximum value of objective function is 1, therefore (x1, x2) = (1, 0).
9. Find the basic feasible solutions of the following LP.
Max x1 + x2
Subject to x1 1
20x1 + x2 100
x1 , x 2 0
Soln:
Let x2, x3 0 be the slack variables.
Therefore,
-x1 + x3 = 1
20x1 + x2 + x4 = 100
We can form 6 types of basis B.
Basis from a1 and a2
B=
0
0
( 1
), B = ( 1
). On calculating B b,
20 1
20 1
-1
-1
we get (x1, x2, x3, x4) = (-1, 120, 0, 0), bfs does not exist as x1 < 0.
Basis from a1 and a3
1/20
. On calculating B-1b,
1/20
we get (x1, x2, x3, x4) = (5, 0, 6, 0), bfs exists.
Basis from a1 and a4
B=
1
( 1
), B = ( 01
20 0
B=
0
1 0
( 1
)
,B =(
). On calculating B b,
20 1
20 1
-1
-1
-1
we get (x1, x2, x3, x4) = (-1, 0, 0, 120), bfs does not exist as x1 < 0.
Basis from a2 and a3
B=
-1
-1
we get (x1, x2, x3, x4) = (0, 100, 1, 0), bfs exists.
Basis from a2 and a4
B=
( 01 10 ), B = ( 01 10 ). On calculating B b,
( 01 01 ), basis does not exist.
( 10 01 ), B =( 10 01 ). On calculating B b,
-1
-1
=b
gives x3 = 6 and x4 = 1.
Now,
z1 c1 = 1
z2 c2 = 3 (this value is more, thus x2 enters the basis.)
since By2 = a2, we get y12 = 3, and y22 = 1.
x4 leaves the basis (by minimum ratio test).
Iteration 2Variable x2 enters the basis and x4 leaves the basis.
Now,
B = [a3, a2] =
B = [a1, a2] =
[ 12 13 ] and N = [a , a ] = [ 10 01 ]
3
By solving the equation BxB = b, we get x1 = 3/5 and x2 = 8/5. Now, on calculating the
values of z3 c3 and z4 c4, it is found that both the values are less than zero. Thus, the
current solution is optimal.
Thus, the optimal solution is
(x1, x2, x3, x4) = (3/5, 8/5, 0, 0) and the value of objective function is (27/5).
11. Solve the following problem using simplex tableau format:
Minimize x1 + x2 4x3
Subject to x1 + x2 + 2x3 9
x1 + x2 x3 2
-x1 + x2 + x3 4
x1 , x 2 , x3 0
Soln:
Let x4, x5, x6 be the slack variables. Then the constraints become the followingx1 + x2 + 2x3 + x4 = 9
x1 + x 2 x3 + x5 = 2
-x1 + x2 + x3 + x6 = 4
Initial basis = [a4, a5, a6] = I
Iteration 1:
Z
x1
x2
x3
x4
x5
x6
RHS
-1
-1
x4
x5
x6
0
0
0
1
1
-1
1
1
1
2
-1
1
1
0
0
0
1
0
0
0
1
9
2
4
x1
x2
x3
x4
x5
x6
Iteration 2:
RHS
-5
-4
-16
x4
x5
x3
0
0
0
3
0
-1
-1
2
1
0
0
1
1
0
0
0
1
0
-2
1
1
1
6
4
Iteration 3:
Z
x1
x2
x3
x4
x5
x6
RHS
-4
-1
-2
-17
x1
x5
x3
0
0
0
1
0
0
-1/3
2
2/3
0
0
1
1/3
0
1/3
0
1
0
-2/3
1
1/3
1/3
6
13/3
This is the optimal tableau since zj cj 0 for all non-basic variables. The optimal
solution is given by
x1 = 1/3, x2 = 0, x3 = 13/3 and z = -17.
12. The starting and current tableaux of a given problem are shown. Find the values of a to h.
Starting tableau:
z
x1
x2
x3
x4
x5
RHS
1
-3
0
0
a
-1
b
2
c
d
1
0
0
1
6
1
Current tableau:
z
x1
x2
x3
x4
x5
RHS
-2/3
-4
0
1
h
3
-1/3
2/3
0
0
e
f
2/3
g
2/3
-1/3
1/3
1/3
Soln:
yj = B-1aj
0
( 1/3
)
1/3 1
0
a
( ef ) = ( 1/3
)
(
)
1
1/3 1
B-1 =
From the current tableau, we come to know that x1 and x5 form basis, hence