Sunteți pe pagina 1din 34

Operations Research 1

1. Introduction
1.1. Definition of Operations Research
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;
Definition: Operations research
Operations research is the application of up to date scientific methods,
techniques by inter-disciplinary teams to problems involving control of organized systems so as to provide solutions which best serve the purposes of

All rights reserved

SMA 2343

the organization as a whole.


Operations Research provides executive departments with a quantitative basis
for decision making regarding the operations under their control.
1.2. Characteristics of Operations Research
Interdisciplinary team approach:- it is developed by a team of scientists drawn
from various disciplines. e.g. mathematicians, statisticians, economists, engineers, etc.
Systems approach:-emphasis is on the overall approach to a system in order to
get the optimum decisions.
Helpful in improving the quality of solutions -Doesnt give perfect answers but
merely gives bad answers to the problems which otherwise have worst answers.
Scientific method:- Operations Research uses techniques of scientific research
Goal Oriented Optimum Solution:- Tries to optimize a well-defined function
subject to given constraints (optimization).
Uses models:- Operations Research uses models built by quantitative measurement of the variables concerning a given problem. -It also derives solutions
from the models.
Requires willing executives:- For experiments of alternative solutions.
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

Operations Research 1
Reduces complexity:- Simplifies the work of executives especially due to prior
experimentations.
Operations Research is therefore both a science and an art.
1.3. Methodology of Operations Research
(a) Problem identification: Recognition that a problem exists is very
important in any management decision-making process, but in
practice its timing may be critical (resolve an existing problem
or to forestall a predicted problem).
(b) Formulating the problem: Once it becomes apparent that a probformulated in terms of;

All rights reserved

SMA 2343

lem exists-and a solution is required-the problem must be explicitly

The perceived boundaries or limits to the problem.


The objectives of the investigation.
The defined roles of those involved in the investigation.
The decision variables making up the problem are within the
control of the decision-maker and which are not.
(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
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

Operations Research 1
(e) Testing the model validity: The solution values of the model, obtained at solutions stage are then tested against actual observations. 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.
(f) Controlling the solution: This step of an O.R establishes control
over the solution by proper feed-back of information on variables
which might have deviated significantly.

All rights reserved

SMA 2343

(g) Implementing the results: Implementing the results constitutes the


last step of an OR study. Because the objective of O.R. is not
merely to produce reports but to improve the performance of systems, the results of the research must be implemented, if they are
acceptable.
The nature of a problem dictates the Operations Research method to be used
among the available ones.
1.4. Some useful definitions
(a) Model: This is a representation or abstraction of the real/actual
object.
(b) Objective function: This is a mathematical function decision to be
optimized.
(c) Constraints: Equations or inequalities representing the restrictions
imposed on the decision variables.
(d) Model formulation: The process of determining the objective function and constraints each expressed in terms of decision variables.
(e) Feasible solution: Set of the decision variables which satisfy all the
constraints.
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

Operations Research 1
2. Classification of Problems in O.R.
Broadly speaking, problems in O.R. can be categorised; Some of the categories
are;
1. Allocation: Allocation problems involve the allocation of resources to
activities in such a manner that some measure of effectiveness is optimized. E.g. Jobs to applicants, Money to investment projects
2. Replacement: Replacement problems are concerned with situations
that arise when some items (such as machines, electric light bulbs, etc.)
need replacement because the same may deteriorate with time or may
break down completely or may become out-of-date due to new develAll rights reserved

SMA 2343

opments. Replacement problems thus occur when one must decide the
optimal time to replace equipment for one reasons or the other.
3. Sequencing: Sequencing problems are the problems concerned with
placing items in a certain sequence or order for service. For instance,
N-jobs requiring different amounts of time on different machines must
each be processed on M-machines in the same order with no passing
between machines, then the question: How should the jobs be ordered
for processing to minimize the total time to process all of the jobs on all
of the machines constitutes an example of a sequencing problem.
4. Routing: Routing problems are problems related to finding the optimal
route from an origin to a destination when a number of alternative routes
are available. For example, a salesman may wish to visit each of Ncities once and only once before returning to his headquarter, then his
problem is: In what order should he visit the cities so that the overall
distance travelled is minimized? Such a problem is referred to as a
routing problem.
5. Inventory: Inventory problems are problems with regard to holding
or storing resources. The decisions required generally entail the determination of how much of a resource to acquire or when to acquire it.
The problem of deciding how much of a certain commodity to hold in
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

Operations Research 1
inventory is one of real concern to business and industrial houses. Inventory problem is the problem to determine the level of inventory that
will optimize the measure of effectiveness.
6. Queuing: Queuing problems or what are known as waiting-line problems are problems that involve waiting for service, Queuing problems
encircle us from the time we rise in the morning until we retire at night
In business world several types of interruptions occur: facilities break
down and require repair, power failures occur, workers or the needed
material do not show up where and when expected. Allocation of facilities Considering such interruptions be done and to do so means solving

All rights reserved

SMA 2343

a queuing problem.
7.

Competitive: arise when two or more people are competing for a


certain resource which may range from an opponents king in a game of
chess to a larger share of the market in business world

8. Search: Search problems are problems concerned with searching for


information that is required to make a certain decision, The problem
concerning exploring for valuable natural resources like oil or some other
mineral is an example of a search problem.
2.1. Operations Research Techniques
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;
(a) Programming (Linear, Non - linear Programming, Dynamic, Heuristic, Integer, Algorithmic etc.)
(b) Queuing theory/waiting line
(c) Inventory Analysis
(d) Network analysis

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

Operations Research 1
(e) Simulation
(f) Game theory
(g) Decision theory

Exercise 1. Read and make some notes on


1. Significance of Operations Research
2. Limitations of Operations research
Begin Quiz

All rights reserved

SMA 2343

Answer each of the following questions before you proceed.


1. (2mks) OR is

because it is developed by math-

ematicians, statisticians, economists, engineers, etc.


2. (2mks)

is the process of determining the objec-

tive function and constraints each expressed in terms of decision variables.


3. (2mks)

is the first of the five steps of an OR

inquiry
4. (2mks) Under which category of OR problems is Decision theory?

End Quiz
Marks:

Correct

Percent:

Comments:

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

Operations Research 1
3. Linear Programming
Linear Programming deals with problems in which linear functions are to be
optimized (maximized or minimized) subject to constraints which are usually
specified by linear inequalities, linear equations and to the condition that all
the variables must assume negative values.
The general formulation of linear programming problems is as follows.
Optimize the objective function
Z = c1 x1 + c2 x2 + ... + cn xn
Subject to the linear constraints

All rights reserved

SMA 2343

a11 x1 + a12 x2 + ...a1n xn {, =, }b1


a21 x1 + a22 x2 + ...a2n xn {, =, }b2
.
.
.
am1 x1 + am2 x2 + ...amn xn {, =, }bm
and to the non-negative condition
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

where the underline denotes a vector and bold denotes a matrix.

Optimal feasible solution


In a linear programming problem a set of the values of the decision variables
x1 , x2 , ...xn that satisfy the linear constraints and the nonnegative condition is
called a feasible solution

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

Operations Research 1
Definition: Optimal feasible solution
Optimal feasible solution is the set of decision variables which is feasible
and optimizes the objective function.
In order to obtain the Optimal feasible solution, we need to have some concepts
from linear algebra.
3.1. Convex analysis
Definition: A line in Rn or n-dimensional space
The set

All rights reserved

SMA 2343

L(x1 , x2 ) = {X|X = x1 + (1 )x2 ,

(0, 1)

That is any point X on the line joining x1 and x2 can be written as


X = x1 + (1 )x2 where is a parameter such that 0 < < 1.
Definition: A Convex set in Rn
The set C in which any line joining two points in C is entirely contained in
C.
That is the point x1 + (1 )x2 is in C given that x1 and x2 are in C.
Diagrams-Examples
Diagrams-Non-Examples

Hyperplane - A hyperplane in Rn is the set


H = {X|a> X = }
where a> is a fixed vector different from zero and is a constant.
A hyperplane divides Rn into two half open spaces.
s1 = {X |a> X > } and s2 = {X |a> X < }

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

Operations Research 1
If H is included in the spaces s1 and s2 , then we have the closed half spaces.
sc1 = {X|a> X } and sc2 = {X|a> X }

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)

All rights reserved

SMA 2343

multiplying both sides by a> gives


a> X = a> X 1 + (1 )a> X 2
+ (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.
Convex polytype - This is a set which is an intersection of a finite number of
closed half-spaces (e.g. For a polygon in R2 . X Y < 0, X 2, Y 0.)
3.2. Convex Combinations
Let x1 , x2 , ..., xn be n points in a convex set ~c Rn , then a point X is said to
n
n
P
P
be a convex combination of xi (i = 1, 2, ..., n)ifx =
i xi where
i = 1
i=1

and i 0 i

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

i=1

Operations Research 1
Theorem 3.2 A set of convex combinations of the points x1 , x2 , ..., xn C
where C in convex is also convex. Let C be the set of all convex combinations
n
P
of x1 , x2 , ..., xn , let Y1 and Y2 be two points in C, then Y1 =
i xi and
Y2 =

n
P

i=1

i xi

i =

i , i 0. Let x0 be any point on the

i =1

i=1

line segment joining Y1 and Y2 , then x0 can be written as x0 = Y1 + (1


)Y2

(0, 1)
x0 = Y1 + (1 )Y2
n
n
P
P
= i xi + (1 ) i xi
i=1

n
P

i=1

(i + (1 )i )xi =

i=1

All rights reserved

i xi

i=1

i = i + (1 )i

SMA 2343

n
P

and (0, 1)

Since i 0, i 0 then i 0 and again


n
P
i=1

n
P

i + (1 )i
P
P
= i +(1 ) i

i =

i=1

=+1=1
Thus x0 =

n
P

i xi

wherei 0and

i=1

n
P

i = 1. the line segment joining Y1 and

i=1

Y2 in C is therefore entirely contained in C and C is convex.

Definition: convex combination


A convex combination of n+1 points is known as n-simplex. i.e. if it has 3
points (non-linear) then it is a 2-simplex

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 )

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

(0, 1)

10

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 .
3
P
x0 =
k xk
k=1

where
1 =
2 = 1
3 = 1 + 1
x0 =

3
P

k xk = 1 x1 + 2 x2 + 3 x3 . Since 0 < < 1and0 < 1 < 1 then

All rights reserved

SMA 2343

k=1

i0 s 0 for all i (i = 1, 2, 3).


Now 1 +2 +2 = +1 +11 +1 = 1 therefore

3
P

k = 1 x0

k=1

is a convex combination of x1 , x2 and x3 .


3.3. Extreme points of a convex set
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
It is not possible to locate two distinct points in or on the above figures(Convex
sets) with the property that the line joining these points will include the extreme points (E) and be included in the convex set.
Theorem 3.3 The convex set of feasible solution of linear programming problem 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
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

11

Operations Research 1
Note that the convex set in a linear programming problem is the constraint
set.
3.4. Optimal solutions to linear programming (LP) problems
In Linear Programming problem we are required to optimize the objective
function
p = C0 X
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
Theorem 3.1 A basic feasible solution of a linear programming problems is
All rights reserved

SMA 2343

an extreme point of the constraint set


3.5. Formulation and solutions to LP problems
Formulation of Linear Programming models is the process of determining the objective function and the set of constraints into a mathematical
model each stated in terms of the decision variables. Solution is then the determination of the optimal feasible solution. This can be done graphically (for
a maximum of 2 decision variables or using simple algorithm.

Graphical method
This involves representing all the constraints on a graph. The region of intersection 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 companys 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 respectively. Then we need to;
Maximize 10x + 50y subject to;
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

12

Operations Research 1
x + y 6 300 (restriction on the hall capacity)
10x + 50y > 2500 (restriction on total collection)
x 100 (restriction on seats for children)
y0

All rights reserved

SMA 2343

Graph

Figure

1:

One

point

at

the

vertex

profit.
At point;, Testing for optimal
A(100, 30), z = 10(100) + 50(30) = 2500

(corner)
solution.

maximizes
At

the
point

B(100, 200), z = 10(100) + 50(200) = 11000


C(300, 0), z = 10(300) + 50(0) = 3000
D(250, 0), z = 10(250) + 50(0) = 2500
The maximum occurs at x = 100, y = 200, the firm should therefore sell 100
seats/tickets for children and 200 for adults in order to make a maximum
profit of Ksh 11,000.

Example. A farmer has 50 of land to on which to plant maize and beans. He
has a workforce of 150 laborers and it takes 4 laborers to work on 1 ha of maize
and 2 laborers to work on 1 ha of beans. He has a capital of $4500 and 1 ha
of maize requires $50 to cultivate (inputs) while 1 ha of beans requires $100.
Suppose that the farmer wishes to maximize the profits and the profit per ha
is $30 for maize and $40 for beans, set up a linear programming problem and
solve it.
Solution

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

13

Operations Research 1
Let x and y be the number of ha on maize an beans respectively then, we
have
Maximize p = 30x + 40y subject to
x + y 50 (Constraint on land)
4x + 2y 150 (Constraint laborers)
50x + 100y 4500 (Constraint on capital)
x, y 0 (Non-negativity condition on decision variables)

All rights reserved

SMA 2343

We can represent the constraints in a graph as follows

Figure
2:
Testing
for
A(0, 0), p = 30(0) + 40(0) = 0,

optimal
solution.
At
point
B(0, 45), p = 30(0) + 40(45) = 1800

C(10, 40), p = 30(10) + 40(40) = 1900 B(25, 25), p = 30(25) + 40(25) = 1750
(37.5, 0), p = 30(37.5) + 40(0) = 1125
The maximum occurs at x = 10, y = 40, The farmer should therefore
cultivate 10 ha of maize and 40 ha of beans order to make a maximum profit
of $1900.

3.6. The simplex method


This is a step by step method which is used to solve linear-programming problems with any given number of decision variables
Method
Set objective function p = 0 and decision variables X to zero (0). (No production).
Move progressively till no more combination can be made. i.e. Each step

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

14

Operations Research 1
should give a better Solution as you increase or decrease the decision variables.
Definition: Slack variable
Slack variable a non-negative variable which when added to a less that or
equal to inequality makes it an equation.
Example.
x+y 7
but
x + y + s1 = 7

All rights reserved

SMA 2343

Then s1 is a slack variable

Definition: Surplus variable


Surplus variable a non-negative variable which when added to a greater
than or equal to inequality makes it an equation.
Example.
x+y 7
but
x + y = s2 + 7
Then s2 is a surplus variable

Let x and

y be the number of ha on maize an beans

respectively then, we have


Maximize p = 30x + 40y subject to
x + y <= 50 (Constraint on land)
4x + 2y <= 150 (Constraint laborers)
50x + 100y <= 4500 (Constraint on capital)
x, y >= 0
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

15

Operations Research 1

which simplifies to;


Maximize p = 30x + 40y subject to;
x + y <= 50
2x + y <= 75
x + 2y <= 90
x, y >= 0
Adding slack variables s1, s2 and s3 and constructing the

All rights reserved

SMA 2343

initial tableau leads to


Tableau #1
Basis x

s1

s2

s3

Solution

s1

50

s2

75

s3

90

-30

-40

This solution Not optimal because there exists -ve values in


p row. Entering variable corresponds to the most negative value
p-row =>y

Maximum y=min(50/1, 75/1, 90/2)=45

from 90/2, which implies that pivot value = 2 and departing


variable is s3
New row z=s3/2
Reducing all the elements of y column to zero using Jordan gauss
computations gives Tableau #2

Tableau #2
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

16

Operations Research 1
Basis x

s1

s2

s3

Solution

s1

1/2

-1/2

s2

3/2

-1/2

30

1/2

1/2

45

-10

20

1800

This solution Not optimal because there exists -ve values in


p row. Entering variable corresponds to the most negative value
in p-row =>x
Maximum x=min(5/(1/2),30/(3/2), 45/(1/2))=10 from 5/(1/2),
which implies that pivot value = 1/2 and departing variable is s4
All rights reserved

SMA 2343

New row z=s1/(1/2)


Reducing all the elements of x column to zero using Jordan gauss
computations gives Tableau #3
Tableau #3
Basis x

s1

s2

s3

Solution

-1

10

s2

-3

15

-1

40

20

10

1900

the corresponding solution is s1=0, s2=15, s3=0, x=10, y=40 and


Max p=1900.
The farmer should cultivate 10 ha of maize 40 ha of beans
in order to make a maximum profit of $1900
Example. A company manufactures two products A and B. The profit per
ton of the two products are $50 and $60 respectively. Both products require
processing in three machines M1 , M2 and M3 . With the following table giving
the details of (Hrs per 1 tonne)
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

17

Operations Research 1
A

B Total available (Hrs) pwk

M1

600

M2

500

M3

800

Assuming that no other constraints, find A and B that maximizes the


weekly profit
Solution: The solution is as follows

All rights reserved

SMA 2343

Maximize p = 50x + 60y subject to


4x +2y

<= 600

3x +4y

<= 500

4x +6y

<= 800

x, y >=0
The final table is #3 given by
Basis x

s1

s2

s3

Solution

2/5

-1/5

140

-3/10

2/5

20

s3

1/5

-8/5

120

14

8200


Practice questions. LPs Formulation and solutions


1. A furniture manufacturer makes two products: chairs and tables. Processing of these products is done on two machines A and B. A chair
requires 2 hours on machine A and 6 hours on machine B. A table requires 5 hours on machine A and no time on machine B. There are 16
hours of time per day available on machine A and 30 hours on machine
B. Profit gained by the manufacturer from a chair and a table is shs 200
and shs 100 respectively. What should be the daily production of each
of the products? (solve it graphically and using simplex method).
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

18

Operations Research 1
2. A company produces two types of leather belts; say A and B. Belt A is
of superior quality and belt B is inferior. Profits on the two are sh40
and shs 30 per belt respectively. Each belt of type A requires twice as
much time as required by a belt of type B. If all belts were of type B, the
company could produce 1,000 belts per day. But the supply of leather
is sufficient only for 800 belts per day. Belt A requires a fancy buckle
and only 400 of them are available per day. For belt B only 700 buckles
are available per day. How should the company manufacture two types
of belts in order to have a maximum overall profit? (solve it graphically
and using simplex method).

All rights reserved

SMA 2343

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
crates of type A as type B. He wants to buy maximum 80 crates of type
A and at least 10 crates of type B. Taking X to be the number of type
A crates and Y that of type B, write down all the inequalities based on
these facts. Show these inequalities on a graph and outline the region
in which (X, Y) must lie. The profit on a crate of type A is Shs. 60
and that of a crate of type B is Shs. 40. Find the number of crates of
each type that he should buy to make maximum profit and calculate this
maximum profit. (solve it graphically and using simplex method).
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).
5. A farmer requires 10, 12 and 12 units of chemicals A, B and C respectively for his garden. A liquid product contains 5, 2 and 1 units of A, B
and C respectively per bottle. A dry product contains 1, 2 and 4 units
of A, B and C per carton while a paste product contains 1, 3 and 1 units
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

19

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 dont 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

All rights reserved

SMA 2343

program and solve it graphically and using simplex method.


7. OHagan Bookworm Booksellers buys books from two publishers. Duffin
House offers a package of 5 mysteries and 5 romance novels for $50, and
Gorman Press offers a package of 5 mysteries and 10 romance novels for
$150. OHagan wants to buy at least 2,500 mysteries and 3,500 romance
novels, and he has promised Gorman (who has influence on the Senate
Textbook Committee) that at least 25% of the total number of packages
he purchases will come from Gorman Press. Formulate the underlying
LP and solve it to determine the number of packages to be ordered from
each publisher in order to minimize the cost and satisfy Gorman? What
will the novels cost him? (Formulate and dont solve)
8. A company is test-marketing one of its new products in a particular
region and intends undertaking an extensive 1 week advertising campaign
to raise consumer awareness about the new product. The firm has an
advertising budget of 500 000 and intends using regional TV, regional
radio and regional newspaper advertising. An advert on TV will cost
50 000 and is expected to reach 300 000 potential customers. For radio
the equivalent figures are 20 000 and 10 000 customer and for the
newspapers 2000 and 50 000 customers. The combination of adverts
on the three forms of media is flexible, although the company wants at
least 2 adverts on TV, 5 on radio and 10 in the newspapers. In addition
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

20

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).
A company publishing textbooks is planning its production of the next book
scheduled to be printed. The book will be published in both paperback and
hardback format. The paperback sells for 10 per copy and costs 5 to produce and market. The hardback sells for 20 and costs 17. Market research
has indicated that total sales of the book are unlikely to exceed 10000 copies.
Of these at least 4000 are expected to be in paperback format with at least

All rights reserved

SMA 2343

2000 hardback. On the other hand, the company does not expect to sell more
than 4000 hardback copies. In addition, there are potential problems involved
in producing the paperback edition. The printing equipment is needed for
other paperback books and is available for printing this book for a period of
only 5000 hours. Each paperback takes 40 minutes to produce.
1. Formulate this problem and solve it assuming the company wishes to
maximize profit.(solve it graphically).
2. Assuming the company wishes to maximize revenue from sales reformulate this problem and solve it and computes the profit the company
would earn. (solve it graphically)
3. The production manager is strongly arguing that production should be
determined by costs. Reformulate the problem in terms of cost minimization solve it . (solve it graphically).
4. Which of the three alternative objective functions do you think is most
appropriate?

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

21

Operations Research 1
Quiz Solve the LP below using dual simplex method
M aximize z = 150x + 250y + 450z
subject to
2x + y + 3z 80
3x + y + 4z 60
x + 2y + 5z 100
x 0, y 0 , z 0
Optimal Solution: p =

; x=

, y=

, z=

NOTE

All rights reserved

SMA 2343

This method of computation is known as Gauss - Jordan row operations.


that is
New pivot row = Current pivot row Pivot element
All other rows:
Newrow = Current row - Pivots column coefficient New Pivot row
The rules for selecting the entering and Departing variables are referred to as
optimality and feasibility conditions.
Definition: Optimality condition
The entering variable (E.V) is the non-basic variable having the largest
negative coefficient in profits row. (ties are broken arbitrarily). Optimum
is reached where all profits row coefficients of non - basic variables are all
positive.

Definition: Feasibility condition


The Departing variable (D.V) is the basic variable associated with the
smallest positive ratio of solution: pivot column elements (ties are arbitrarily broken)
Economic Interpretation
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

22

Operations Research 1
1. If no slack variable do not appear in solution set, then all the resources
have been exhausted.
2. The solution quantity corresponding to si is the amount of resources
which were not utilized/abundant resource.
3. Values at profit row corresponding to Slack variables gives the marginal
value products of the corresponding resources (per unit contribution to
profit). They are also referred to as dual prices and in economics
shadow prices or imputed costs. They represent the worth per unit of a
resource bi i = 1, 2...m.
In the farmers problem. s2 = 15 indicates that (15 2) = 30 laborers
All rights reserved

SMA 2343

will be un utilized.
4. The p row coefficients of s1 , s2 and s3 are 20, 0 and 10 respectively
implying that;
Increasing land by 1 ha increases profit by $20
Increasing the number of employees has no effect on profit
Increasing the number of capital by $1 increases the profit by
$10/50
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.

Simplex Method Algorithm


Step 1 - Determine a starting feasible solution.
Step 2 - Select the E.V using optimality condition. STOP if there is NONE.
Step 3 - Select Departing Variable using feasibility condition
Step 4 - Determine the new basic solution using the appropriate Gauss Jordan computation, Go to Step 2.

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

23

Operations Research 1
Exercise 3. A carpenter makes boxes, tables and chairs. The profit contributions 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. 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 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-

All rights reserved

SMA 2343

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
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.
Example. A certain company produces 3 products A, B C which contributes
a profit of Shs 8, 5 and 10 respectively. The production machine has 400 hrs.
Capacity and each product uses 2, 3 and 1 machine hour respectively. There
are 150 units available of a special component with A using 1 unit and C using
1 Unit per unit. A special allow of 200kg is needed in this period and product
A and C uses 2kg and 4kg per unit. There is a limitation of production of unit
B to not more than 50. Advice the company in order to maximize the profit.
Solution
Let x, y and z be the number of units of products A, B and C to be
produced respectively.
The model is:

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

24

Operations Research 1
Max p = 8x + 5y + 10z
2x + 3y + z 400 (Hours)

S/t

x + z 150 (Special component)


2x + 4z 200 (Alloy)
y 50
x 0,

y 0,

z0

Step 0: Introduce the Slack variables s1 , s2 and s3 and s4 to get:


Max p = 8x + 5y + 10z
S/t

2x + 3y + z + s1 = 400

All rights reserved

SMA 2343

x + z + s2 = 150
2x + 4z + s3 = 200
y + s4 = 50
x 0,

y 0,

z0

The initial solution is


Basis x

x3

s1

s2

s3

s4

Solution

S1

400

S2

150

S3

100

S4

50

10

Proceed and get the solution as x = 100, y = 50, x3 = 0 and Max p = 1050
3.7. Dealing with mixed on decision variables
If in a LP one or more constraint is given as xi k where k is a constant,
make the substitution yi = xi k 0 xi = yi + k.
We then replace xi with yi + k and adjust each constraint and the objective
function appropriately.
Example

JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

25

Operations Research 1
M aximize Z = 5x1 + 3x2 + 4x3
Subject to 3x1 + 12x2 + 6x3 900
6x1 + 6x2 + 3x3 1350
2x1 + 3x2 + 3x3 390
x1 0, x2 20, x3 10
Since x2 and x3 cannot be zero, we let
a = x1 a 0
b = x2 20 b 0
a = x3 10 c 0
Adjusting the LP we get
All rights reserved

SMA 2343

M aximize Z = 5a + 3b + 4c + 100
Subject to 3a + 12b + 6c 900 240 60 = 600
6a + 6b + 3c 1350 120 30 = 1200
2a + 3b + 3c 390 60 30 300
a, b, c 0
which is now solvable using the simplex method. Following the simplex algorithm finally leads to the optimal table as
Basis a

s1

s2

s3

Solution

s1

5
2

1
2

21

50

s2

-1

-2

-1

100

1
2
5
2

150

3
2
7
2

3
2
9
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
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

26

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
Example. Solve the LP below using simplex method
M inimize

z = 20x + 30y

subject to
x + y = 45
3x + 4y 170
12x + 6y 480
All rights reserved

SMA 2343

x 0, y 0
To write it in standard form,we
replace = with and inequalities
negate the objective function.
and solve it in the ordinary way as follows
Solution
Performing the adjustment we get
Maximize z = -20x -30y subject to
x + y <= 45
-x - y

<=-45

3x + 4y <= 170
12x +6y <= 480
x, y >=0
Adding slack variables we get
Maximize z = -20x -30y subject to
x + y + s1

= 45

-x - y +s2

= -45

3x + 4y + s3 = 170
JJ II
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

27

Operations Research 1
12x +6y + s4 = 480
x, y >=0
The first tableau is given by
Tableau #1
Basis

s1

s2

s3

s4

Solution

s1

45

s2

-1

-1

-45

s3

170

s4

12

480

20

30

All rights reserved

SMA 2343

Since all entries in the profit row are +ve, this solution is
optimal. But since s2=-45, the solution is infeasible
The pivot columns are those with -ve entries (column x and y)
to identify the entering variable take the ratios of the z-row
to the elements of the s2-row i.e (20/-1, 30/-1). The E.V is the
one corresponding to the smallest absolute value => x
Max x= min(+ve)(45/1, -45/-1, 170/3, 480/12)=40 from s4-row,
which implies that pivot value = 12
New row x=s4/12
Performing row reduction operations on x column gives
Tableau #2

JJ II
J

J DocDoc I
Back Close

Basis

s1

s2

s3

s4

s1

1/2

-1/12

s2

-1/2

1/12

-5

s3

5/2

-1/4

50

1/2

1/12

40

20

-5/3

-800

JKUAT

c M. Kihoro
J.

Solution

28

Operations Research 1
Since s2=-5, the solution is still infeasible
The pivot column is y and so y enters the solution
with pivot value -1/2
Max y=(-5/(-1/2)=10 (NOTE THAT THE OTHER RATIOS ARE NOT VALID)
New y-row=s2/(-1/2)
Reducing all the elements of y column to zero using Jordan
gauss computations gives

All rights reserved

SMA 2343

Tableau #3
Basis

s1

s2

s3

s4

Solution

S1

-2

-1/6

10

s3

1/6

25

1/6

35

40

5/3

-1000

The optimal and feasible solution is now found to be


x=35, y=10 and minimum z=-1000
Quiz : Solve the LP below using simplex method
M inimize

z = 2x + y

subject to
x+y =4
2x y 3
x 0, y 0
Optimal Solution: p =

JJ II
J

J DocDoc I
Back Close

JKUAT

; x=

, y=

c M. Kihoro
J.

29

Operations Research 1
Solutions to Examples
Exercise 3. The solution is as follows
Let x, y and z be the number of boxes, tables and chairs
to be produce respectively, then
Maximize profit p = 20x + 30y + 10z
subject to

2x + 6y + 2z <=40 (restriction on hours)


3x + (-1)y + (-1)z <=0 (customers restrictions)
0.5x + 1y + 0.4z <=10 (restriction on storage space)
x, y, z >=0

Adding slack variables s1 s2 and s3 and constructing the initial


All rights reserved

SMA 2343

tabuleau leads to
Tableau #1
Basis x

s1

s2

s3

Soln

s1

40

s2

-1

-1

s3

1/2

2/5

10

-20

-30

-10

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
New pivot row y=s1/6. Using the new row to reduce
all other elements pivot column to zero gives
Tableau #2

JJ II
J

J DocDoc I
Back Close

Basis x

s1

s2

s3

Soln

1/3

1/3

1/6

20/3

s2

10/3

-2/3

1/6

20/3

s3

1/6

1/15

-1/6

10/3

-10

200

JKUAT

c M. Kihoro
J.

30

Operations Research 1
Corresponding solution x=0, y=20/3, z=0, p=200 which is not
optimal. Entering variable corresponds to largest -ve value in
p-row =>x.
Maximum x=min((20/3)/(1/3),(20/3)/(10/3),(10/3)/(1/6))=2
corresponding to s2 row. Departing variable is s2,
pivot value =10/3
New row x=s2/(10/3)
Using the new row to reduce all other elements pivot column
to zero gives

All rights reserved

SMA 2343

Tableau #3
Basis x

s1

s2

s3

Soln

2/5

3/20

-1/10

-1/5

1/20

3/10

s3

1/10

-7/40

-1/20

11/2

220

-2

with corresponding solution x=2, y=6, z=0 and p=220 which is


not optimal. Entering variable corresponds to largest -ve
value in p-row =>z
Maximum z=min(6/(2/5), 2/(-1/5), 3/(1/10))=15,
corresponding to y row. Departing variable is y,
pivot value =2/5, New row z=y/(2/5)
Using the new row to reduce all other elements pivot column
to zero gives
Tableau #4

JJ II
J

J DocDoc I
Back Close

Basis x

s1

s2

s3

Soln

5/2

3/8

-1/4

15

1/2

1/8

1/4

s3

-1/4

-17/80

-1/40

3/2

25/4

5/2

250

JKUAT

c M. Kihoro
J.

31

Operations Research 1

which gives the optimal solution as x=5, y=0, z=15 and


optimal p=250.
The carpenter should therefore make 5 boxes, no tables
and 15 chairs in order to maximize his/her profit to

$250
Exercise 3

Exercise 4. Let x, y and z be the number of boxes, tables and chairs to be


produce respectively, then the formulated LP becomes

subject to
All rights reserved

SMA 2343

Maximize p = 20x + 30y + 10z


2x +

6y+

2z

3x + 1y+ 1z
1/2x +

40, (restrictiononhours)
0, (customersrestrictions)

2/5z 10, (restrictiononstoragespace)

1y+

x 0, y 0, z 0
We convert the problem to canonical form by introducing slack variables s1 ,
s2 and s3 to get
Maximize p = 20x + 30y + 10z
subject to
2x +

6y +

2z +s1 = 40,

6x + 1y +

1z +s2 =

0,

2x + 1y + 2/5z +s3 = 10,


x 0, y 0, z 0, s1 0, s2 0, s3 0
The initial tableau is

JJ II
J

J DocDoc I
Back Close

JKUAT

Basis

z s1 s2 s3 Soln

s1

40

s2

s3

1/2

2/5

10

p 20 30 10

c M. Kihoro
J.

32

Operations Research 1
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 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

s1

20 0

40

3 1

7/2 0 (3)/5

10

0 30

All rights reserved

SMA 2343

s3

z s1

p 110 0

20

s2 s3 Soln

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

s1

x 1 0 (1)/5

1/20

3/10

y 0 1

3/20 (1)/10

1/10 (7)/40 (1)/20

220

s3 0 0
p 0 0

2/5
2

s2 s3 Soln

11/2

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 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
J

J DocDoc I
Back Close

JKUAT

c M. Kihoro
J.

33

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

x 1

1/2 0

1/8

1/4

z 0

5/2 1

3/8

(1)/4

15

s3 0 (1)/4 0 (17)/80 (1)/40

3/2

250

p 0

5 0

25/4

s2 s3 Soln

5/2

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.
All rights reserved

SMA 2343

The carpenter should therefore make 5 boxes, no tables and 15 chairs in

JJ II
J

J DocDoc I
Back Close

order to maximize his/her profit to $250

JKUAT

c M. Kihoro
J.

Exercise 4

34

S-ar putea să vă placă și