1. Introduction
There have been various definitions for Operations Research (O.R.) like applied
decision making, quantitative common sense, making of economic decision, etc.
Here we pick one of the most appropriate;
JJ II
JKUAT
J.
c M. Kihoro 1
J I
J DocDoc I
Back Close
Operations Research 1
(c) Constructing the model: This step involves constructing the model
or the mathematical expressions describing inter-relations of all
variables and parameters in the study. The model must include an
objective function which defines the measure of effectiveness of the
system and the constraints or the restrictions.
(d) Deriving the solution: This involves finding the optimal values
of the controlled (independent) variables that produce the best
performance of the system for specified values of the uncontrolled
(dependent) variables. An optimum solution is determined on the
basis of the various equations of the model satisfying the given
constraints and optimizing the objective function.
JJ II
JKUAT
J.
c M. Kihoro 2
J I
J DocDoc I
Back Close
Operations Research 1
(e) Testing the model validity: The solution values of the model, ob-
tained at solutions stage are then tested against actual observa-
tions. In other words, effort is made to test the validity of the
model used. A model is supposed to be valid if it can give reliable
prediction of the performance of the system represented through
the model. In effect, performance of the model must be compared
with the policy or procedure that it is meant to replace.
(e) Feasible solution: Set of the decision variables which satisfy all the
constraints.
JJ II
JKUAT
J.
c M. Kihoro 3
J I
J DocDoc I
Back Close
Operations Research 1
Mathematical models have been constructed for the above categorized O.R.
problems and methods for solving the models are available in many cases.
Such methods are usually termed as O.R. techniques. Some of the important
O.R. techniques often used by decision-makers in modern times are;
(e) Simulation
Begin Quiz
Answer each of the following questions before you proceed.
End Quiz
Marks: Correct Percent:
Comments:
JJ II
JKUAT
J.
c M. Kihoro 6
J I
J DocDoc I
Back Close
Operations Research 1
3. Linear Programming
Z = c1 x1 + c2 x2 + ... + cn xn
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, ...xn ≥ 0
There are many problems in engineering management and social sciences that
can be formulated this way.
In matrix form we can write as
~
Optimize Z = ~c> X ~
subject to AX{≤, ~
=, ≥}B, ~ ≥ 0.
X
JJ II
JKUAT
J.
c M. Kihoro 7
J I
J DocDoc I
Back Close
Operations Research 1
In order to obtain the Optimal feasible solution, we need to have some concepts
from linear algebra.
H = {X|a> X = β}
⇒ If H is included in the spaces s1 and s2 , then we have the closed half spaces.
Example. Show that a closed half space sc1 = {X|a> X ≥ β} is a convex set.
Let X 1 and X 2 be two points in sc1 then a> X 1 ≥ β and a> X 2 ≥ β
then any point X on the segment joining x1 and x2 is given by
X = λX 1 + (1 − λ)X 2 λ ∈ (0, 1)
≥ λβ + (1 − λ)β
a> X ≥ λβ + β − λβ
⇒ a> X ≥ β
which is a member of sc1 . Since X 1 and X 2 were arbitrarily chosen, the set
sc1 is a convex set.
Theorem 3.1 The intersection (null set) of convex sets is also convex. Let
x1 and x2 be two points in C = c1 ∩ c2 ... ∩ cn (Ci is a convex set i). Since Ci
is convex for all i, then the line segment joining x1 and x2 is entirely in set Ci
for all i. This line is entirely in C ⇒ C.
JJ II
JKUAT
J.
c M. Kihoro 9
J I
J DocDoc I
Back Close
Operations Research 1
⇒ x0 = λY1 + (1 − λ)Y2
Pn n
P
= λ αi xi + (1 − λ) βi xi
i=1 i=1
n
P n
P
= (λαi + (1 − λ)βi )xi = θi xi
i=1 i=1
θi = λαi + (1 − λ)βi and λ ∈ (0, 1)
SMA 2343
All rights reserved
Example. Prove that any point inside the triangle is a convex combination
of x1 , x2 andx3 Let x0 be any point inside the triangle. By definition x0 =
λx1 + (1 − λ)Y λ ∈ (0, 1)
But
Y = λx2 + (1 − λ)x3 (on line x2 , x3 ) λ ∈ (0, 1)
JJ II
JKUAT
J.
c M. Kihoro 10
J I
J DocDoc I
Back Close
Operations Research 1
Therefore
x0 = λx1 + (1 − λ)[x1 x2 + (1 − λ1 )x3 ]
= λx1 + λ1 x2 + (1 − λ1 )x3 − λλ1 x2 − (1 − λ1 )x3
= λx1 + (λ − λλ1 )x2 + (1 − λ1 − λ + λλ1 )x3 .
P3
x0 = α k xk
k=1
where
α1 = λ
α2 = λ − λλ1
α3 = λ − λ1 − λ + λλ1
3
P
x0 = αk xk = α1 x1 + α2 x2 + α3 x3 . Since 0 < λ < 1and0 < λ1 < 1 then
k=1
αi0 s ≥ 0 for all i (i = 1, 2, 3).
SMA 2343
All rights reserved
3
P
Now α1 +α2 +α2 = λ+λ−λλ1 +1−λ1 −λ+λλ1 = 1 therefore α k = 1 ⇒ x0
k=1
is a convex combination of x1 , x2 and x3 .
Let C be a convex set. A point Z is an extreme point in C if and only if its not
possible to find points X and Y in C such thatZ = λX+(1−λ)Y λ∈
(0, 1).
We note that the extreme points are actually the vertices or corner points.
Example
Consider the figure
figure
Theorem 3.3 The convex set of feasible solution of linear programming prob-
lem has at least one extreme point and at most a finite number of extreme points.
The objective function is optimized at one of the extreme points.
JJ II
JKUAT
J.
c M. Kihoro 11
J I
J DocDoc I
Back Close
Operations Research 1
Note that the convex set in a linear programming problem is the constraint
set.
under a constants set. Suppose that R is the constraint set of the given
problem, then the optional solution is an extreme point of R
• Graphical method
This involves representing all the constraints on a graph. The region of inter-
section represents the feasible region and by theorem (3.1), one of the extreme
points gives the optimal solution.
Example. The manager of a theatre which has a capacity of 300 seats sells
tickets to children and adults at Shs.10 and Shs.50 respectively. To cover his
rental expenses, he has to take at least Shs. 2500 for each show.
It is the company’s policy to have at least 100 seats spared for children.
Formulate this problem for profit maximization and solve it graphically.
Solution: Let x and y be the number of 10/= and 50/= seats occupied respec-
tively. Then we need to;
JJ II
JKUAT
J.
c M. Kihoro 13
J I
J DocDoc I
Back Close
Operations Research 1
JJ II
JKUAT
J.
c M. Kihoro 14
J I
J DocDoc I
Back Close
Operations Research 1
should give a better Solution as you increase or decrease the decision vari-
ables.
but
x + y + s1 = 7
but
x + y = s2 + 7
x, y >= 0
Tableau #1
Basis x y s1 s2 s3 p Solution
s1 1 1 1 0 0 0 50
s2 2 1 0 1 0 0 75
s3 1 2 0 0 1 0 90
p -30 -40 0 0 0 1 0
Tableau #2
JJ II
JKUAT
J.
c M. Kihoro 16
J I
J DocDoc I
Back Close
Operations Research 1
Basis x y s1 s2 s3 p Solution
s1 1/2 0 1 0 -1/2 0 5
s2 3/2 0 0 1 -1/2 0 30
y 1/2 1 0 0 1/2 0 45
p -10 0 0 0 20 1 1800
Tableau #3
Basis x y s1 s2 s3 p Solution
x 1 0 2 0 -1 0 10
s2 0 0 -3 1 1 0 15
y 0 1 -1 0 1 0 40
p 0 0 20 0 10 1 1900
x, y >=0
Basis x y s1 s2 s3 p Solution
x 1 0 2/5 -1/5 0 0 140
y 0 1 -3/10 2/5 0 0 20
s3 0 0 1/5 -8/5 1 0 120
p 0 0 2 14 0 1 8200
3. The manager of a hotel has sufficient money to buy a total of 100 crates
of soft drink of types A and B. He wants to buy at least twice as many
SMA 2343
All rights reserved
4. A chemical firm has 160 litres of solution A, 110 litres of solution B and
150 litres of solution C. To prepare a bottle of syrup X, 200ml of solution
A, 100ml of solution B and 100ml of solution C are needed. For a bottle
of syrup Y, 100ml of A, 200ml of B and 300ml of C are needed. Syrup
X sells at Shs. 60 per bottle and Syrup Y sells at Shs. 100 per bottle.
How many bottles of each type of Syrup should the firm make in order
to obtain the maximum amount of money? (solve it graphically).
JJ II
JKUAT
J.
c M. Kihoro 19
J I
J DocDoc I
Back Close
Operations Research 1
of A, B and C per jar. If the liquid product sells at shs 30 per bottle,
the dry product sells at shs 20 per carton and the paste product at Ksh
25 per jar, How many of each should he purchase in order to minimize
the cost and meet the requirements? (Formulate and don’t solve).
6. A farmer has 70 hectares of land available for growing maize and beans.
The cost of growing 1 ha of maize is $30 and the cost for growing 1 ha
of beans is $20 and the farmer has only $1800 available. The labor per
ha is 2 man days for maize and 4 man days for beans and a total of
240 man days of labour are available. If he makes a profit of $800 for 1
ha of beans and $700 for 1 ha of maize, formulate the underlying linear
program and solve it graphically and using simplex method.
SMA 2343
All rights reserved
JJ II
JKUAT
J.
c M. Kihoro 20
J I
J DocDoc I
Back Close
Operations Research 1
the number of newspaper adverts must be no more than 2.5 times the
number of combined radio and TV adverts.Formulate the problem if the
company wishes to maximize the number of customers exposed to the
advertising campaign. (solve it graphically).
JJ II
JKUAT
J.
c M. Kihoro 21
J I
J DocDoc I
Back Close
Operations Research 1
Optimal Solution: p = ; x= , y= , z=
NOTE
This method of computation is known as Gauss - Jordan row operations.
that is
SMA 2343
All rights reserved
The rules for selecting the entering and Departing variables are referred to as
optimality and feasibility conditions.
Economic Interpretation
JJ II
JKUAT
J.
c M. Kihoro 22
J I
J DocDoc I
Back Close
Operations Research 1
1. If no slack variable do not appear in solution set, then all the resources
have been exhausted.
The farmer should not pay more than $20 for every additional 1 ha hired.
It would not make sense to put more money in form of capital.
Step 2 - Select the E.V using optimality condition. STOP if there is NONE.
Step 4 - Determine the new basic solution using the appropriate Gauss -
Jordan computation, Go to Step 2.
JJ II
JKUAT
J.
c M. Kihoro 23
J I
J DocDoc I
Back Close
Operations Research 1
Exercise 3. A carpenter makes boxes, tables and chairs. The profit contri-
butions of the three products are $20, $30 and $10 respectively. The carpenter
can afford to spend up to 40 hours per week working and takes two hours to
make a box, six hours to make a table and two hours to make a chair. Cus-
tomer demand requires that he makes at most a third as many boxes as the
total number of chairs and tables. The storage space available is 10 m2 and a
box requires 0.5 m2 , a table takes up 1 m2 and a chair 0.4 m2 . Formulate this
problem as a linear programming problem for profit maximization and solve
it using simplex method.
Exercise 4. A carpenter makes boxes, tables and chairs. The profit contri-
butions of the three products are $20, $30 and $10 respectively. The carpenter
can afford to spend up to 40 hours per week working and takes 2 hours to
SMA 2343
All rights reserved
make a box, 6 hours to make a table and 2 hours to make a chair. Customer
demand requires that he makes at most a third as many boxes as the total
number of chairs and tables. The storage space available is 10 m2 and a box
requires 1/2 m2 , a table takes up 1 m2 and a chair 2/5 m2 . Formulate this
problem as a linear programming problem for profit maximization and solve
it using simplex method.
JJ II
JKUAT
J.
c M. Kihoro 24
J I
J DocDoc I
Back Close
Operations Research 1
Max p = 8x + 5y + 10z
x ≥ 0, y ≥ 0, z≥0
S/t 2x + 3y + z + s1 = 400
x + z + s2 = 150
SMA 2343
All rights reserved
2x + 4z + s3 = 200
y + s4 = 50
x ≥ 0, y ≥ 0, z≥0
The initial solution is
Basis x y x3 s1 s2 s3 s4 Solution
S1 2 3 1 1 0 0 1 400
S2 1 0 1 0 1 0 0 150
S3 1 0 2 0 0 1 0 100
S4 0 1 0 0 0 0 1 50
p 8 5 10 0 0 0 0 0
Proceed and get the solution as x = 100, y = 50, x3 = 0 and Max p = 1050
JJ II
JKUAT
J.
c M. Kihoro 25
J I
J DocDoc I
Back Close
Operations Research 1
Basis a b c s1 s2 s3 Solution
5 1
s1 0 2 2
1 0 − 21 50
s2 0 -1 -2 0 1 -1 100
3 3 1
a 1 2 2
0 0 2
150
9 7 5
Z 0 2 2
0 0 2
850
With the corresponding solution being a = 150, b = 0, c = 0 and maximum Z
= 750.
But under the initial conditions the optimal solution should be x1 = 150, x2
= 20, x3 = 10 with max Z = 850.
3.8. Minimization
For LPs which are not in standard form, the Simplex Method cannot be used
right away, because the initial point (the origin) is infeasible. It is advisable
to solve LPs when they are of the form
JJ II
JKUAT
J.
c M. Kihoro 26
J I
J DocDoc I
Back Close
Operations Research 1
Maximize Z = C 0 X subject to
AX ≤ b, X ≥ 0
If this is not, the case we need to transform the original problem to take
this standard form before we use ordinary simplex method
JJ II
JKUAT
J.
c M. Kihoro 27
J I
J DocDoc I
Back Close
Operations Research 1
Tableau #1
Basis x y s1 s2 s3 s4 z Solution
s1 1 1 1 0 0 0 0 45
s2 -1 -1 0 1 0 0 0 -45
s3 3 4 0 0 1 0 0 170
s4 12 6 0 0 0 1 0 480
z 20 30 0 0 0 0 1 0
Since all entries in the profit row are +ve, this solution is
SMA 2343
All rights reserved
The pivot columns are those with -ve entries (column x and y)
Tableau #2
Basis x y s1 s2 s3 s4 z Solution
s1 0 1/2 1 0 0 -1/12 0 5
s2 0 -1/2 0 1 0 1/12 0 -5
s3 0 5/2 0 0 1 -1/4 0 50
x 1 1/2 0 0 0 1/12 0 40
z 0 20 0 0 0 -5/3 1 -800
JJ II
JKUAT
J.
c M. Kihoro 28
J I
J DocDoc I
Back Close
Operations Research 1
Tableau #3
Basis x y s1 s2 s3 s4 z Solution
S1 0 0 1 1 0 0 0 0
y 0 1 0 -2 0 -1/6 0 10
SMA 2343
All rights reserved
s3 0 0 0 5 1 1/6 0 25
x 1 0 0 1 0 1/6 0 35
z 0 0 0 40 0 5/3 1 -1000
The optimal and feasible solution is now found to be
x=35, y=10 and minimum z=-1000
M inimize z = 2x + y
subject to
x+y =4
2x − y ≥ 3
x ≥ 0, y ≥ 0
Optimal Solution: p = ; x= , y=
JJ II
JKUAT
J.
c M. Kihoro 29
J I
J DocDoc I
Back Close
Operations Research 1
Solutions to Examples
Basis x y z s1 s2 s3 p Soln
s1 2 6 2 1 0 0 0 40
s2 3 -1 -1 0 1 0 0 0
s3 1/2 1 2/5 0 0 1 0 10
p -20 -30 -10 0 0 0 1 0
This solution Not optimal
Entering variable corresponds to largest -ve value in
p-row =>y Maximum y=min( 40/6, 0/-1, 10/1)=20/3,
Departing variable is s1, pivot value =6
Tableau #2
Basis x y z s1 s2 s3 p Soln
y 1/3 1 1/3 1/6 0 0 0 20/3
s2 10/3 0 -2/3 1/6 1 0 0 20/3
s3 1/6 0 1/15 -1/6 0 1 0 10/3
p -10 0 5 0 0 1 1 200
JJ II
JKUAT
J.
c M. Kihoro 30
J I
J DocDoc I
Back Close
Operations Research 1
Tableau #3
Basis x y z s1 s2 s3 p Soln
SMA 2343
All rights reserved
Tableau #4
Basis x y z s1 s2 s3 p Soln
z 0 5/2 1 3/8 -1/4 0 0 15
x 1 1/2 0 1/8 1/4 0 0 5
s3 0 -1/4 0 -17/80 -1/40 1 0 3/2
p 0 5 0 25/4 5/2 0 1 250
JJ II
JKUAT
J.
c M. Kihoro 31
J I
J DocDoc I
Back Close
Operations Research 1
Exercise 3
Basis x y z s1 s2 s3 Soln
s1 2 6 2 1 0 0 40
s2 3 −1 −1 0 1 0 0
s3 1/2 1 2/5 0 0 1 10
p −20 −30 −10 0 0 0 0
JJ II
JKUAT
J.
c M. Kihoro 32
J I
J DocDoc I
Back Close
Operations Research 1
This solution not optimal because there exists -ve values in the last row. En-
tering variable corresponds to the most negative value this row which in this
case is y
Maximum y = min( 40 , 0 , 10 ) = 0 which implies that pivot value = -1 and
6 −1 1
departing variable is s2 , New row y = s2 / − 1.
Performing row operations using the pivot row to reduce all the elements
of y column to zero leads to the following table.
Basis x y z s1 s2 s3 Soln
s1 20 0 −4 1 6 0 40
y −3 1 1 0 −1 0 0
s3 7/2 0 (−3)/5 0 1 1 10
p −110 0 20 0 −30 0 0
SMA 2343
All rights reserved
This solution not optimal because there exists -ve values in the last row.
Entering variable corresponds to the most negative value this row which in
this case is x.
Maximum x = min( 40 , 0 , 10 ) = 2 which implies that pivot value = 20
20 −3 7/2
and departing variable is s1 , New row x = s1 /20.
Performing row operations using the pivot row to reduce all the elements
of x column to zero leads to the following table.
Basis x y z s1 s2 s3 Soln
x 1 0 (−1)/5 1/20 3/10 0 2
y 0 1 2/5 3/20 (−1)/10 0 6
s3 0 0 1/10 (−7)/40 (−1)/20 1 3
p 0 0 −2 11/2 3 0 220
This solution not optimal because there exists -ve values in the last row. En-
tering variable corresponds to the most negative value this row which in this
case is z
2 6 3
Maximum z = min( (−1)/5 , 2/5 , 1/10 ) = 15 which implies that pivot value =
2/5 and departing variable is y, New row z = y/2/5.
JJ II
JKUAT
J.
c M. Kihoro 33
J I
J DocDoc I
Back Close
Operations Research 1
Performing row operations using the pivot row to reduce all the elements
of z column to zero leads to the following table.
Basis x y z s1 s2 s3 Soln
x 1 1/2 0 1/8 1/4 0 5
z 0 5/2 1 3/8 (−1)/4 0 15
s3 0 (−1)/4 0 (−17)/80 (−1)/40 1 3/2
p 0 5 0 25/4 5/2 0 250
Since all entries in the last row are negative, this table gives the optimal
solution as; x = 5, z = 15, s3 = 3/2 with a maximum objective function value
of p = 250.
The carpenter should therefore make 5 boxes, no tables and 15 chairs in
SMA 2343
All rights reserved
JJ II
JKUAT
J.
c M. Kihoro 34
J I
J DocDoc I
Back Close