Post on 02-Jun-2018
transcript
8/10/2019 Sma 2343 Introd
1/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
1. Introduction
1.1. Definition of Operations Research
There have been various definitions for Operations Research (O.R.) like applieddecision 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 or-
ganized systems so as to provide solutions which best serve the purposes of
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, engi-
neers, 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 perfectanswers but
merely givesbadanswers 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 measure-
ment of the variables concerning a given problem. -It also derives solutions
from the models.
Requires willing executives:- For experiments of alternative solutions.
JKUAT cJ. M. Kihoro 1
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
2/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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 prob-
lem exists-and a solution is required-the problem must be explicitlyformulated in terms of;
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.
JKUAT cJ. M. Kihoro 2
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
3/34
SMA2343
Allrightsreserved
DocDoc
ck 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.
(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.
(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 sys-
tems, 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 func-
tion and constraints each expressed in terms of decision variables.
(e) Feasible solution: Set of the decision variables which satisfy all the
constraints.
JKUAT cJ. M. Kihoro 3
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
4/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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 opti-
mized. 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 devel-
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 allof 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 N-
cities 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 deter-
mination 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
JKUAT cJ. M. Kihoro 4
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
5/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
inventory is one of real concern to business and industrial houses. In-
ventory 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 prob-
lems 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 facili-
ties Considering such interruptions be done and to do so means solving
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, Heuris-
tic, Integer, Algorithmic etc.)
(b) Queuing theory/waiting line
(c) Inventory Analysis
(d) Network analysis
JKUAT cJ. M. Kihoro 5
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
6/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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
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: Percent:
Comments:
JKUAT cJ. M. Kihoro 6
Correct
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
7/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
3. Linear Programming
Linear Programming deals with problems in which linear functions are to be
optimized(maximized or minimized) subject to constraintswhich 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=c1x1+c2x2+...+cnxn
Subject to the linear constraints
a11x1+a12x2+...a1nxn{, =,}b1
a21x1+a22x2+...a2nxn{, =,}b2
.
.
.
am1x1+am2x2+...amnxn{, =,}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
OptimizeZ=c X subject to A X{, =,}B, X0.
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,...xnthat satisfy the linear constraints and the nonnegative condition is
called a feasible solution
JKUAT cJ. M. Kihoro 7
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
8/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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
L(x1, x2) ={X|X=x1+ (1 )x2, (0, 1)
That is any point X on the line joining x1 andx2 can be written as
X=x1+ (1 )x2 whereis a parameter such that 0 < } and s2 = {X
|aX < }
JKUAT cJ. M. Kihoro 8
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
9/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
IfHis included in the spaces s1and s2, then we have the closed half spaces.
sc1 = {X|aX} and sc2 = {X|a
X}
Example. Show that a closed half space sc1 ={X|aX} is a convex set.
LetX1 and X2 be two points in sc1 thena
X1 and aX2
then any point X on the segment joining x1 and x2 is given by
X=X1+ (1 )X2 (0, 1)
multiplying both sides bya gives
aX = aX1+ (1 )aX2
+ (1 )
aX +
aX
which is a member ofsc1. SinceX1 andX2 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 andx2 be two points in C=c1 c2... cn (Ci is a convex set i). SinceCi
is convex for all i, then the line segment joiningx1 andx2 is entirely in setCi
for all i. This line is entirely inC 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
8/10/2019 Sma 2343 Introd
10/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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. LetCbe the set of all convex combinations
of x1, x2,...,xn, let Y1 and Y2 be two points in C, then Y1 =n
i=1
ixi and
Y2 =n
i=1
ixi
i=
i =1 i, i 0. Letx0 be any point on the
line segment joining Y1 and Y2, then x0 can be written as x0 = Y1 + (1
)Y2 (0, 1)
x0 = Y1+ (1 )Y2
=n
i=1
ixi+ (1 )n
i=1
ixi
=n
i=1
(i+ (1 )i)xi =n
i=1
ixi
i= i+ (1 )i and (0, 1)
Sincei 0, i 0 theni 0 and again
n
i=1
i=n
i=1
i+ (1 )i
=
i+(1 )
i
=+ 1 = 1
Thusx0 =n
i=1
ixi wherei 0andn
i=1
i= 1. the line segment joiningY1 and
Y2 inCis therefore entirely contained inC andC 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, x2andx3 Let x0 be any point inside the triangle. By definition x0 =
x1+ (1 )Y (0, 1)
But
Y =x2+ (1 )x3(on linex2, x3) (0, 1)
JKUAT cJ. M. Kihoro 10
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
11/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
Therefore
x0= x1+ (1 )[x1x2+ (1 1)x3]
=x1+1x2+ (1 1)x3 1x2 (1 1)x3
=x1+ ( 1)x2+ (1 1 +1)x3.
x0=3
k=1
kxk
where1 =
2 = 1
3 = 1 +1
x0 =3
k=1
kxk = 1x1+ 2x2+ 3x3. Since 0 < < 1and0 < 1 < 1 then
is 0 for all i (i = 1, 2, 3).
Now1+2+2= +1+11+1 = 1 therefore3
k=1
k = 1 x0
is a convex combination ofx1, x2 andx3.
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 ex-
treme points (E) and be included in the convex set.
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.
JKUAT cJ. M. Kihoro 11
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
12/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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= CX
under a constants set. Suppose that R is the constraint set of the given
problem, then the optional solution is an extreme point ofR
Theorem 3.1 A basic feasible solution of a linear programming problems is
an extreme point of the constraint set
3.5. Formulation and solutions to LP problems
Formulation of Linear Programming models is the process of deter-
mining the objective function and the set of constraints into a mathematical
model each stated in terms of the decision variables. Solution is then the de-
termination 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 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 companys policy to have at least 100 seats spared for children.Formulate this problem for profit maximization and solve it graphically.
Solution: Letx and y be the number of 10/= and 50/= seats occupied respec-
tively. Then we need to;
Maximize 10x+ 50y subject to;
JKUAT cJ. M. Kihoro 12
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
13/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
x+y 300 (restriction on the hall capacity)
10x+ 50y 2500 (restriction on total collection)
x 100 (restriction on seats for children)
y 0
Graph
Figure 1: One point at the vertex (corner) maximizes the
profit. At point;, Testing for optimal solution. At point
A(100, 30), z= 10(100) + 50(30) = 2500
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 100seats/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
JKUAT cJ. M. Kihoro 13
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
14/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
Let x andy be the number of ha on maize an beans respectively then, we
have
Maximizep = 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)
We can represent the constraints in a graph as follows
Figure 2: Testing for optimal solution. At point
A(0, 0), p= 30(0) + 40(0) = 0, 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) = 1125The 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 prob-
lems with any given number of decision variables
Method
Set objective function p = 0 and decision variables X to zero (0). (No pro-
duction).
Move progressively till no more combination can be made. i.e. Each step
JKUAT cJ. M. Kihoro 14
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
15/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
should give a better Solution as you increase or decrease the decision vari-
ables.
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
Thens1 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
Thens2 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
8/10/2019 Sma 2343 Introd
16/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
which simplifies to;
Maximize p = 30x + 40y subject to;
x + y < = 5 0
2 x + y < = 7 5
x + 2y = 0
Adding slack variables s1, s2 and s3 and constructing the
initial tableau leads to
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
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 gausscomputations gives Tableau #2
Tableau #2
JKUAT cJ. M. Kihoro 16
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
17/34
SMA2343
Allrightsreserved
DocDoc
ck 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
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
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 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
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 andM3. With the following table giving
the details of (Hrs per 1 tonne)
JKUAT cJ. M. Kihoro 17
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
18/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
A B Total available (Hrs) pwk
M1 4 2 600
M2 3 4 500
M3 4 6 800
Assuming that no other constraints, find A and B that maximizes the
weekly profit
Solution: The solution is as follows
Maximize p = 50x + 60y subject to
4x +2y
8/10/2019 Sma 2343 Introd
19/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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).
3. The manager of a hotel has sufficient money to buy a total of 100 cratesof 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 respec-
tively 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
JKUAT cJ. M. Kihoro 19
http://www.jkuat.ac.ke/elearning/http://lastpage/http://prevpage/http://nextpage/http://gobackdoc/http://goforwarddoc/http://goforwarddoc/http://goback/http://close/http://close/http://goback/http://goforwarddoc/http://gobackdoc/http://nextpage/http://prevpage/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
20/34
SMA2343
Allrightsreserved
DocDoc
ck 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 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
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 of500 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
JKUAT cJ. M. Kihoro 20
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
21/34
SMA2343
Allrightsreserved
DocDoc
ck 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).
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 pro-
duce 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
2000 hardback. On the other hand, the company does not expect to sell morethan 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 refor-mulate 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 mini-
mization solve it . (solve it graphically).
4. Which of the three alternative objective functions do you think is most
appropriate?
JKUAT cJ. M. Kihoro 21
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
22/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
QuizSolve the LP below using dual simplex method
Maximize z= 150x+ 250y+ 450z
subject to2x+y+ 3z80
3x+y+ 4z60
x+ 2y+ 5z100
x 0, y 0 , z 0
Optimal Solution: p= ; x= , y= , z=
NOTE
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 conditionThe Departing variable (D.V) is the basic variable associated with the
smallest positive ratio of solution: pivot column elements (ties are arbi-
trarily broken)
Economic Interpretation
JKUAT cJ. M. Kihoro 22
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
23/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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 resourceswhich 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
resourcebi i = 1, 2...m.
In the farmers problem. s2 = 15 indicates that (15 2) = 30 laborers
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.
JKUAT cJ. M. Kihoro 23
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
24/34
SMA2343
Allrightsreserved
DocDoc
ck 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 carpentercan 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:
JKUAT cJ. M. Kihoro 24
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
25/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
Maxp= 8x+ 5y+ 10z
S/t 2x + 3y + z 400 (Hours)
x + z 150 (Special component)2x + 4z200 (Alloy)
y 50
x 0, y 0, z 0
Step 0: Introduce the Slack variables s1,s2 ands3 ands4 to get:
Maxp = 8x+ 5y+ 10z
S/t 2x+ 3y+z+s1= 400
x+z+s2= 150
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 asx = 100,y = 50,x3= 0 and Maxp = 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 replacexiwithyi+kand adjust each constraint and the objective
function appropriately.
Example
JKUAT cJ. M. Kihoro 25
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
26/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
Maximize Z= 5x1+ 3x2+ 4x3
Subject to 3x1+ 12x2+ 6x3 900
6x1+ 6x2+ 3x3 1350
2x1+ 3x2+ 3x3 390
x1 0, x2 20, x3 10
Sincex2 andx3 cannot be zero, we let
a= x1 a 0
b= x2 20 b 0
a= x3 10c 0
Adjusting the LP we get
Maximize 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 algo-
rithm finally leads to the optimal table as
Basis a b c s1 s2 s3 Solutions1 0
52
12
1 0 12
50
s2 0 -1 -2 0 1 -1 100
a 1 32
32
0 0 12
150
Z 0 92
72
0 0 52
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
JKUAT cJ. M. Kihoro 26
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
27/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
MaximizeZ=CXsubject to
AXb, X0
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
Minimize z= 20x+ 30y
subject to
x+y= 45
3x+ 4y 170
12x+ 6y 480
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 < = 4 5
-x - y
8/10/2019 Sma 2343 Introd
28/34
SMA2343
Allrightsreserved
DocDoc
ck Close
Operations Research 1
12x +6y + s4 = 480
x, y >=0
The first tableau is given by
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
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
Basis x y s1 s2 s3 s4 z Solution
s1 0 1/2 1 0 0 -1/12 0 5s2 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
JKUAT cJ. M. Kihoro 28
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
29/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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
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
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
Quiz: Solve the LP below using simplex method
Minimize z = 2x+y
subject to
x+y = 4
2x y 3
x 0, y 0
Optimal Solution: p= ; x= , y=
JKUAT cJ. M. Kihoro 29
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
30/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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
8/10/2019 Sma 2343 Introd
31/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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
Tableau #3
Basis x y z s1 s2 s3 p Soln
y 0 1 2/5 3/20 -1/10 0 0 6
x 1 0 -1/5 1/20 3/10 0 0 2
s3 0 0 1/10 -7/40 -1/20 1 0 3
p 0 0 -2 11/2 3 0 1 220
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
Basis x y z s1 s2 s3 p Solnz 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
JKUAT cJ. M. Kihoro 31
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
32/34
SMA2343
Allrightsreserved
DocDoc
ck Close
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 zbe the number of boxes, tables and chairs to be
produce respectively, then the formulated LP becomes
Maximizep = 20x+ 30y+ 10z
subject to
2x + 6y+ 2z 40, (restrictiononhours)
3x + 1y+ 1z 0, (customersrestrictions)
1/2x + 1y+ 2/5z 10, (restrictiononstoragespace)
x 0, y 0, z 0
We convert the problem to canonical form by introducing slack variables s1,
s2 and s3 to get
Maximizep = 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
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
JKUAT cJ. M. Kihoro 32
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
33/34
SMA2343
Allrightsreserved
DocDoc
ck 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(406, 01
, 101) = 0 which implies that pivot value = -1 and
departing variable is s2, New row y = s2/ 1.
Performing row operations using the pivot row to reduce all the elements
ofy 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 10p 110 0 20 0 30 0 0
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(4020 , 03
, 107/2) = 2 which implies that pivot value = 20
and departing variable is s1, New rowx= s1/20.
Performing row operations using the pivot row to reduce all the elements
ofx 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 thiscase is z
Maximum z= min( 2(1)/5
, 62/5
, 31/10
) = 15 which implies that pivot value =
2/5 and departing variable is y , New row z= y/2/5.
JKUAT cJ. M. Kihoro 33
http://www.jkuat.ac.ke/elearning/http://lastpage/http://close/http://close/http://lastpage/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/8/10/2019 Sma 2343 Introd
34/34
SMA2343
Allrightsreserved
Operations Research 1
Performing row operations using the pivot row to reduce all the elements
ofzcolumn to zero leads to the following table.
Basis x y z s1 s2 s3 Solnx 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
ofp = 250.
The carpenter should therefore make 5 boxes, no tables and 15 chairs in
order to maximize his/her profit to $250 Exercise 4
http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/http://www.jkuat.ac.ke/elearning/