Operations Research and Decision Making
Operations Research and Decision Making
CHAPTER I
INTRODUCTION
1.1. DEFINITION
Operations Research is defined by many authors in deferent ways
.However, following definition is proposed here.
-Problem is any variation between what was planned and what is actually
have/produced.
1
-Problem solving can be defined as the process of identifying a difference
between some actual and some desired states of affairs and then taking
action to resolve the difference.
Definition
Decision making is the process of selecting or choosing based on some
criteria, the best alternative among alternatives.
2
• Decision under uncertainty
In this situation, we are reasonably sure what will happen when we make a
decision. The information is available & is considered to be reliable & we
know the cause & effect relationships.
Example: If you decide to invest your money in saving account in the
Commercial Bank of Ethiopia, You are certain that you will earn three
percent interest.
Under this situation, one may have factual information, but it may be
incomplete.
Example: If we gamble by tossing a fair coin, the probability that a tail will
turn up is 50%.
3
political situation may be so volatile that even experts cannot predict a
possible change in government.
1. Model development
Model is a representation of real objects/situations
c. Mathematical models
This is also an abstract model. Here a set of relations is represented in the
form of mathematical equations, using symbols to represent various
parameters.
Example:
1. (x + y)2=x2+2xy+y2
4
2. Max.Z=3000x1 +2500x2
Subject to:
2x1+x2 < 40
x1+3x2 < 45
x1 < 12
x1, x2 > 0
Objective Function:
A mathematical statement of the goal of an organization, stated as intent
to maximize or to minimize some important quantity such as profits or
costs.
Constraint:
A restriction on the resources available to a firm (stated in the form of an
inequality or an equation.)
2 x1+x2 < 40 Resource constraints
x1+3x2 < 45 Are constraints
x1 < 12
x1, x2 > 0 x1, x2 > 0 is non-negativity constraint
2. Data presentation
Data represent the values of inputs to the model.
Max.Z=3000x1 +2500x2
Subject to:
2 x1+x2 < 40
x1+3x2 < 45
x1 < 12
x1, x2 > 0
3. Model solution
:Is optimal solution
From the above equation, x1=12, x2=11 and Max.Z= $6350
5
modified at each subsequent solution; till optimal solution is reached.
There are certain criteria laid down to check whether the solution has
become an optimal solution. These trial solutions are called Iterations
and the method is called iterative process. The classical example of trial
and error method is Linear Programming
Then the next step after iteration is model testing and validation.
6
CHAPTER II
LINEAR PROGRAMMING
Diagrammatically,
Scares To be allocated
Resourc to:
e
Resource
constrain
Objectiv Constrain ts
es ts
Non-
negativity
Constraints
Optimization
Maximizatio Minimizatio
n n
LP is a method for choosing the best alternative from a set of feasible
alternatives
To apply LP, the following conditions must be satisfied:
a. Objective Function
:Is the goal or objective of a management, stated as an intent to maximize
or to minimize some important quantity such as profits or costs.
b. Constraints
: Are limitations or restrictions imposed by the problems. And constraints
include:
1. Resourse constraints
7
: Are restrictions that should be clearly identifiable and measurable in
quantitative terms, which arise from limitation of available resources.
2. Non-negativity constraints:
: Are constraints that require the decision variables not to take on negative
values
c. Linearity
The Objective Function and the constraints must be linear in nature in
order to have a Linear Programming Problems (LPP)
d. Feasible alternative
There should be a series of feasible alternative course of action available
to the decision-making determined by resource constraints. Thus, we have
to choose the best alternative
Linear Programming Problems can be solved by using:
i. The Geometric method called” Graphical Method”
ii. The Algebraic method called” Simplex Method”
2.1. FORMULATION OF LP
Decision variables are the variables whose values are unknown and are
searched
The coefficients of the variables in the Objective Function are called the
profit or cost coefficients. They express the rate at which the value of the
Objective Function increases or decreases by including in the solution one
unit of each of the decision variables.
The coefficients of the constraints’ variables are called the input- output
coefficients that indicate the rate at which the given resources are
depleted or utilized.
Example:
8
Max.Z =50 X 1+80 X 2
St :
X 1+2 X 2≤32
X 1+2 X 2≤82
X 1 , X 2 ≥0
A Maximization Problem
==>Maximize Z with inequalities of constraints in < form
Example: Consider two models of color TV sets; Model A and B, are
produced by a company to maximize profit. The profit realized is $300
from A and $250 from set B. The limitations are
a. availability of only 40hrs of labor each day in the production
department.
b. a daily availability of only 45 hrs on machine time
c. ability to sale 12 set of model A.
How many sets of each model will be produced each day so that the total
profit will be as large as possible?
Machine hr. 1 3 45
Marketing 1 0 12
hr.
Profit $300
9
$250
Solution
1. Formulation of mathematical modeling of LPP
Max Z=300X1 +250X2
St:
2X1 +X2< 40
X1 +3X2< 45 LPP Model
X1 < 12
X1, X2 >0
2. Convert constraints inequalities into equalities
2X1 +X2 = 40
X1 +3X2= 45
X1 = 12
3. Draw the graph by intercepts
2X1 +X2 = 40 ==> (0, 40) and (20, 0)
X1 +3X2= 45==> (0, 15) and (45, 0)
X1 = 12==> (12, 0)
X1, X2 =0
2X1 +X2 =
X2
40
X1=
X1 +X2 = 45
40 0 X1=12
15 B
Corners Coordinates
MaxZ=300 X1 +250X2
A (0, 0) $0
B (0, 15) $3750
10
C (12, 11) $6350
D (12, 0) $3600
Interpretation:
12 units of product A and 11 units of product B should be produced so that
the total profit will be $6350.
Exercise:
A manufacturer of light weight mountain tents makes two types of tents,
REGULAR tent and SUPER tent. Each REGULAR tent requires 1 labor-
hour from the cutting department and 3labor-hours from the assembly
department. Each SUPER tent requires 2 labor-hours from the cutting
department and 4 labor-hours from the assembly department .The
maximum labor hours available per week in the cutting department and
the assembly department are 32 and 84 respectively. Moreover, the
distributor, because of demand, will not take more than 12 SUPER tents
per week. The manufacturer sales each REGULAR tents for $160 and
costs$110 per tent to make. Where as SUPER tent ales for $210 per tent
and costs $130 per tent to make.
Required:
A. Formulate the mathematical model of the problem
B. Using the graphic method, determine how many of each tent the
company should manufacture each tent the company should
manufacture each week so as to maximize its profit?
C. What is this maximum profit assuming that all the tents manufactured
in each week are sold in that week?
Solution
_____________________________________________________________________
Labor hours per tent
Department REGULAR (X 1) SUPER(X2) Maximum labor-
hours available per week
_____________________________________________________________________
Cutting department 1 2 32
Assembly department 3 4 84
Selling price per tent $160 $210
Cost per tent $110 $130
Profit per tent $50 $80
11
*The distributor will not take more than 12 SUPER tents per week. Thus,
the manufacturer should not produce more than 12 SUPER tents per week.
Let X1 =The No of REGULAR tents produced per week.
X2 =The No of SUPER tents produced per week.
X1 and X2 are called the decision variables
Max.Z = 50 X 1+80 X 2
St :
X 1+2 X 2≤ 32
……….Cutting department constraint
LPP Model
3 X 1+4 X 2≤……….Assembly
84 department constraint
X 2 ≤12 ……….Demand constraint
X1, X 2 ≥0
……….Non-negativity constraints
Interpretation:
The manufacturer should produce and sale 20 REGULAR tents and 6
SUPERS tents to get a maximum weekly profit of $1480.
B Minimization Problem
==>Minimize Z with inequalities of constraints in > form
Example:
Suppose that a machine shop has two different types of machines;
machine 1 and machine 2, which can be used to make a single product
.These
X machines vary in the amount of product produced per hr., in the
2 X
amount of labor
1 used and in the cost of operation.
21 =0
Assume that at least a certain amount of product must be produced and
that we would like to utilize at least the regular labor force. How much
should we utilize each machine in order to utilize total costs and still meets
the16requirement?
B (0, 12)
C(8,12) D (20, 6) X2 12
Feasible
Region =0
X1
A(0,0) E (28, 0) 32
Solution
________________________________________________________________
Resource used
Machine 1 (X1) Machine (X2) Minimum required
hours
_____________________________________________________________________
Min.Z = 25 X 1+30 X 2
St :
20 X 1+15 X 2≥100 LPP Model
2 X 1+3 X 2≥15
X1, X 2 ≥0
Constraint equation:
20X1 +15X2=100 ==> (0, 20/3) and (5, 0)
2X1+3X2=15 ==> (0, 5) and (7.5, 0)
X1 X2> 0
X2
X1
A (0, 20/3) =0
Feasible
Region
B (2.5, 3.33)
X2
=0
X1
5 C (7.5, 0)
13
______________________________________________________________________________________________
Corners Coordinates MinZ=25 X1 + 30X2
A (0, 20/3) 200
Exercise:
A company owns two flour mills (A and B) which have different production
capacities for HIGH, MEDIUM and LOW grade flour. This company has
entered contract supply flour to a firm every week with 12, 8, and 24
quintals of HIGH, MEDIUM and LOW grade respectively. It costs the Co.
$1000 and $800 per day to run mill A and mill B respectively. On a day,
mill A produces 6, 2, and 4 quintals of HIGH, MEDIUM and LOW grade
flour respectively.
Mill B produces 2, 2 and 12 quintals of HIGH, MEDIUM and LOW grade
flour respectively. How many days per week should each mill be operated
in order to meet the contract order most economically standardize? Solve
graphically.
Solution:
No of days per week of
Minimum flour in
Mil A (X1) Mill B(X2) quintals
HIGH Capacity (in quintal) 6 2
12
MEDIUM Capacity (in quintal) 2 2
8
LOW Capacity (in quintal) 4 12
24
$1000 $800
St :
6 X 1+2 X 2≥12
2 X 1+2 X 2≥ 8
4 X 1 +12 X 2 ≥ 24
X1, X 2 ≥0
Constraint equation:
14
6 X 1+2 X 2= 12
2 X 1+2 X 2= 8 (0, 6), (2, 0)
4 X 1 + 12 X 2 = 24 (0, 4), (4, 0)
X1, X 2 = 0 (0, 2), (6, 0)
Corners MinZ=$1000 X1 +
800X2
(0, 6) $4800
(1, 3) $3400
(3, 1) $3800
(6, 0) $6000
X1 =1
X2=3 and
MinZ= $3400
X2
X1
6
=0 6X1+2 X2=12
2X1+2 X2=8
4 FR
4X1+12
(1, 3)
X2=24
(3, 1)
X2
=0 X1
2 4 6
Note:
-In maximization problems, our point of interest is looking the furthest
point from the origin.
-In minimization problems, our point of interest is looking the point nearest
to the origin.
15
1. Redundant Constraint
If a constraint when plotted on a graph doesn’t form part of the
boundary making the feasible region of the problem that constraint is
said to be redundant.
Example:
A firm is engaged in producing two products A and B .Each unit of
product A requires 2Kg of raw material and 4 labor-hrs for processing.
Where as each unit of product B requires 3Kg of raw materials and 3hrs
of labor. Every unit of product A needs 4hrs to packaging and every unit
of product B needs 3.5hrs for packaging. Every week the firm has
availability of 60Kg of raw material, 96 labor-hours and 105 hrs I the
packaging department.
[
16
1 unit of product A sold yields $40 profit and 1 unit of B sod yields $35
profit.
Required:
a. Formulate this problem as a LPP
b. Find the optimal solution
Solution
__________________________________________________________________
Products Resource
available
Resources A B per
week
_____________________________________________________________________
Raw materials (Kg) 2 3 60
Labor (hr) 4 3 96
Packaging (hr) 4 3.5 105
Profit per unit $40 $35
Max.Z = 40 X 1+35 X 2
St :
2 X 1+3 X 2≤ 60
4 X 1+3 X 2≤ 96
4 X 1 +3.5 X 2 ≤105
X1, X 2 ≥0
17
X2
(0, 32)
(0, 30)
Packaging: 4X1 +3.5X2 =
(0, 20) C (18,8)
105 Raw material: 2X1 +3X2 =
FR
60
X1
A (0, 0) D (24, 0) (26, 0) (30, 0)
Interpretation:
The company should produce and sale 18 units of product A and 8 units of
product B per week so as to get a maximum profit of 1000.
By this production plan the entire raw material will be consumed.
2X1 +3X2 <60
2(18) +3(8) =60
60=60==> N o idle or unused raw material
4X1 +3X2 <96
4(18) +3(8) <96
96=96 ==>the entire labor hour will be consumed
4X1 +3.5X2 <105
100<105==>There is to be idle or unused capacity of 5hrs in the
packaging department.
Note:
The packaging hour’s constraint does not form part of the boundary
making the feasible region. Thus, this constraint is of no consequence and
18
is therefore, redundant. The inclusion or exclusion of a redundant
constraint does not affect the optimal solution of the problem.
Example:
The information given below is for the products A and B.
_____________________________________________________________________
Machine hours per week Maximum available
Department Product A Product B
per week
_____________________________________________________________________
Cutting 3 6 900
Assembly 1 1 200
Profit per unit $8 $16
_____________________________________________________________________
Assume that the company has a marketing constraint on selling products B
and therefore it can sale a maximum of 125units of this product.
Required:
a. Formulate the LPP of this problem
b. Find the optimal solution
Solution:
Let X1 =The No of units f product A produced per week
X2 =The No of units f product B produced per week
a. The LPP Model of the problem is:
Max.Z = 8 X 1+16 X 2
St :
X2
3 X 1+6 X 2≤ 900
(0, 200) X +X ≤ 200
1 2
X 2 ≤125
X1, X 2 ≥0
(0,150)
B (0, 125)
X1=0 D (100,100)
19
A (0, 0)
C (50, 125) X2=125 Marketing equation
Cutting: 3X1+6X2=900
FR X2=0
X1
E (200, 0) (300,0)
Interpretation:
Both C and D are optimal solutions. Any point on the line segment CD will
also lead to the same optimal solution.
==>Multiple optimal solutions provide more choices for management to
reach their objectives.
3. Infeasible Solution
A solution is called feasible if it satisfies all the constraints and the
constraints and non-negativity condition. However, it is sometimes
possible that the constraints may be inconsistent so that there is no
feasible solution to the problem. Such a situation is called infeasibility.
Example:
MaxZ=20X1+30X2
St:
2X1+X2< 40
X2 4X1+X2< 60
X1=0
X1 > 30
(0, 60) X1, X2 > 0 X1=30
Solution:
(0, 40)
20
X2=0
X1
4X1+X2=
60
2X1+X2=
40
Note:
-In the above graph, there is no common point in the shaded area.
-All constraints cannot be satisfied simultaneously and there is no feasible
solution to the problem.
4. Mix of constraints
Example:
ABC Gasoline Company has two refineries with different production
capacities. Refinery A can produce 4,000gallons per day of SUPER
UNLEADD GASOLINE, 2000 gallons per day of REGULAR UNLEADED
GASOLINE and 1000 gallons per day of LEADED GASOLINE. On the other
hand, refinery B can produce 1000 gallons per day of SUPER UNLEADED,
3000 gallons per day of REGULAR UNLEADED and 4,000 gallons per day
of LEADED.
The cost of running refinery A is $1500 per day and refinery B is $2400 per
day.
Required:
a. Formulate this problem as a LPP
b. Determine the number of days the gasoline company should operate
each refinery in order to meet the terms of the above contract most
economical.(i.e. At a minimum running cost)
21
c. Which grade of gasoline would be over produced?
Solution:
____________________________________________________________________
_
Production per day (in gallons) Contract with an automobile
manufacturer
Grade of gasoline A B
_____________________________________________________________________
MinZ=1500X1+2400X2
St:
4000X1+1000X2>24000
2000X1+3000X2>42000
1000X1+2000X2> 36000
X1 < 14
X2< 14
X1, X2 > 0
==>T o simplify the problem divide by 1000 the constraints
MinZ=1500X1+2400X2
St:
4X1+1X2>24
2X1+3X2>42
X1+4X2 > 36
X1 < 14
X2< 14
22
X1, X2 > 0
________________________________________________________________
Corners Coordinates MaxZ=1500X1 + 2400X2
A (2.5, 4) $37350
B (14, 14) 54600
C (14, 5.5) 34200
D (12, 6) 32400
E (3, 12) 33300
_________________________________________________________________
Interpretation:
The oil company should operate refinery A for 12 days and refinery B for 6
days at a minimum operating cost of $32,400.
c. Is there any over production
SUG: 4000X1+1000X2>24000
4000(12) +1000(6)>24000
54000 > 24000
Therefore, 30,000 gallons over production
RUG: 2000X1+3000X2>42000
2000(12) +3000(6)>42000
42000 > 42000
Therefore, there is no over production of RUG
LG: 1000X1+4000X2>36000
1000(12) +1000(6)>36000
36000 > 36000
23
There fore, No over production of LG
5. Unbounded Solution
When the value of decision variables in LP is permitted to increase
infinitely without violating the feasibility condition, then the solution is said
to be unbounded .Here, the objective function value can also be increased
infinitely. However, an unbounded feasible region may yield some definite
value of the objective function.
Example:
Use the graphical method to solve the following LPP.
1. Max.Z=3X1+4X2
St:
X1-X2<-1==> -X1+X2>1 since the quantity solution is
positive
-X1+X2<0
X1, X2 > 0
X2 X1-X2 =-
1
X1+X2
=0
1 Unbounded
Feasible Region
X1
Fig: Unbounded Solution
2. Max.Z=3X1+2X2
St:
X1-X2<1
X2 X1+X2<3
X1, X2 > 0
A(0,3) Unbounded
Feasible Region
X1-X2=1
B (2, 1)
X1+X2=3 24
X1
Note here that the two corners of the region are A(0,3) and .B(2,1).The
value of MaxZ(A)=6 and MaxZ(B)=8. But there exist number of points in
the shaded region for which the value of the objective function is more
than 8.For example, the point (10, 12) lies in the region and the function
value at this point is 70 which is more than 8.
Remark:
An unbounded solution does not mean that there is no solution to the
given LPP, but implies that there exits an infinite number of solutions.
Exercise:
Use graphical method to solve the following LPP.
1. Max.Z=7/4X1+3/2X2 2. Max.Z=3X1+2X2
St: St:
8 X1+5X2 < 320 -2X1+3X2 < 9
4X1+5X2 < 20 X1-5X2 > -20
X1 > 15 X1, X2 > 0
X2> 10
X1, X2 > 0
Answer: No feasible solution Answer: Unbounded
solution
3. Max.Z=3X1+2X2 4.Max.Z=X1+X2
St: St:
X1-X2 < 1 X1+X2 < 1
X1+X2> 3 -3X1+X2> 3
X1, X2> 2 X1, X2> 0
Answer: Unbounded solution Answer: Unbounded
solution
5. Max.Z=6X1-4X2 6.Max.Z=X1+1/2X2
St: St:
25
2X1+4X2 < 4 3X 1+3X2 < 12
4X1+8X2> 16
5X1 < 10
X1, X2 > 0 X 1 + X2
>8
Answer: Infeasible solution -X 1 + X2 >
4
X1, X2 > 0
Answer: Infeasible
solution
Exercise
I. Solve the following LP problems using the graphical method.
1. Max.Z=15X1-10X2 2.Max.Z=2X1+X2
St: St:
4X1+6X2 < 360 X1+2X2 < 10
3X1+0X2< 180 X 1 +X2
<6
0X1+5X2< 280 X1 - X 2 < 2
X1, X2 > 0 X1 -2X2
<1
Answer: X1=60 , X2 =20 X1, X2 >0
and Max.Z=1,100 Answer: X 1=4, X2 =2
and
Max.Z=10
3. Max.Z=10X1+15X2 4.Min.Z=3X1+2X2
St: St:
2X1+X2 < 26 5X1+X2 > 10
2X1+4X2< 56
X1 +X2 > 6
-X1+X2< 5 X1 + 4 X2 > 12
X1, X2 > 0
X1, X2 >0
Answer: X1=4 , X2 =2
Answer:X1=1,X2=5 and
Max.Z=230 and Min.Z=13
5. Min.Z=-X1+2X2 6.Min.Z=20X1+10X2
St: St:
26
-X1+3X2 < 26 X1+2X2 <40
X1 +X2 < 6 3X1 + 4 X2 > 30
X1-X2< 2 4X1+ 3X2> 60
X1, X2 > 0 X1, X2 >0
Answer:X1=2 , X2 =0 Answer:X1=6,X2=12
and Min.Z=-2 and Min.Z=240
27
IV.A person 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 jar. A dry product contains 1, 2 and 4 units of A,
B and C per carton. If the liquid product sells for $3 per jar and the dry
product sells $2 per carton, how many of each should be purchased in
order to minimize cost and meet the requirement?
Answer: 1 Unit of liquid, 5 units of dry product and Min.Z=$13
CHAPTER III
SIMPLEX METHOD
INTRODUCTION
The graphical method to solving LPPs provides fundamental concepts for
fully understanding the LP process. However, the graphical method can
handle problems involving only two decision variables (say X1 and X2).
Note:
The simplex method starts with a corner that is in the solution space or
feasible region and moves to another corner I the solution space improving
the value of the objective function each time until optimal solution is
reached at the optimal corner.
Matrices
Different types of matrices:
1. Row matrix
A matrix which has exactly one row
Example:
(1 2 3 4 ) ==>1x 4 matrixes
2. Column matrix
28
A matrix which has exactly one column
Example:
5
==> 3x1 Matrix
6
3. Square matrix
A matrix in which the No of rows (m) = the No of columns (n)
Example:
1 2
==> 2x2 square Matrix
3 4
0 0
==> 3x2 Zero Matrix
0 0
0 0
5. Diagonal Matrix
The elements aij (i=j) are called diagonal elements of a square matrix.
Example:
1 2 3
The diagonal elements are: a11=1, a22=5 and
a33=9 4 5 6
7 8 9
1 0 0 0 0 0 0
0 5 0 ; and
0 5 0 0
0 0 9
29
6. Identity Matrix
A diagonal matrix whose diagonal elements are all equal to 1(unity)
Example:
1 0
Is an identity matrix
Example:
Solve the problem using the simplex approach
Max.Z=300x1 +250x2
Subject to:
2x1 + x2 < 40 (Labor )
x1+3x2 < 45 (Machine)
x1 < 12 (Marketing)
x1, x2 > 0
Solution
Step 1
Formulate LPP Model
Step 2
Standardize the problem
i.e Convert constraint inequality into equality form by introducing a
variable called Slack variable.
30
Slack Variables:
A slack variable(s) is added to the left hand side of a < constraint to covert
the constraint inequality in to equality. The value of the slack variable
shows unused resource.
A slake variable emerges when the LPP is a maximization problem.
31
0 +0s1 +0 s2+ s3= 12
s3= 12 – Unused Marketing hrs.
Therefore, Max.Z=300x1 +250x2 + 0 s1 +0 s2+ 0 s3
=300(0) +250(0) + 0(40) +0(45) + 0(12)
=0
Note:
In general, whenever there are n variables and m constraints (excluding
the non-negativity), where m is less than n (m<n), n-m variables must be
set equal to zero before the solution can be solved algebraically.
a. Basic variables are variables with non-zero solution values.
Or: basic variables are variables that are in the basic solution. Basic
variables have 0 values in the Cj-Zj row.
b. Non-basic variables are variables with zero solution values.
Or: non-basic variables are variables that are out of the solution.
==>n=5 variables (x1 , x2, s1, s2, and s3) and m=3 constraints (Labor,
machine and marketing constraints), excluding non-negativity.
[
Therefore, n-m=5-3=2 variables(x1 and x2) are set equal to zero in the 1 st
simplex tableau. These are non-basic variables. 3 Variables (s1, s2, and s3)
are basic variables (in the 1 st simplex tableau) because they have non-zero
solution values.
Step 4
Real or decision
variables
Slack variables
Profit per
column
Solution
Basic or
quantity column
columns
Solution
Gross
32 Profit
row
Net Profit
row
1 3 0 1
0 S2 45
0
1 0 0 0 R3
0 S3 12
1
0 0 0 0
Zj 0
0
Cj - 300 250 0 0
Zj 0
Step 5:
Choose the “incoming” or “entering” variables
Note:
The entering variable is the variable that has the most positive value in
the Cj - Zj row also called as indicator row. Or the entering variable is
the variable that has the highest contribution to profit per unit.
a. X1 in our case is the entering variable
b. The column associated with the entering variable is called key or
pivot column ( X1 column in our case )
Step 6
Choose the “leaving “or “outgoing” variable
==> In this step, we determine the variable that will leave the solution for
X1 (or entering variable)
Note:
• The row with the minimum or lowest positive (non-negative)
replacement ratio shows the variable to leave the solution.
Note: RR>0
• The variable leaving the solution is called leaving variable or outgoing
variable.
• The row associated with the leaving variable is called key or pivot row
(s3 column in our case)
• The element that lies at the intersection of the pivot column and pivot
row is called pivot element(No 1 in our case)
33
Step 7
Repeat step 3-5 till optimum basic feasible solution is obtained.
Or: repeat step 3-5 till no positive value occurs in the Cj - Zj row.
Note:
• Divide each element of the pivot row by the pivot element to find new
values in the key or pivot row.
• Perform row operations to make all other entries for the pivot
column equal to zero.
2nd simplex tableau
300 250 0 0
Cj
0
X1 X2 S1 S2
SV Q
S3
0 1 1 0
0 S1 16 R’1=R1-2R3
-2
0 3 0 1
0 S2 33 R’2=R2-R3
-1
30 1 0 0 0
X1 12 R’3=R3
0 1 1
300 0 0 0
Zj 3600
300
Cj - 0 250 0 0
Zj -300
3rd simplex tableau
300 250 0 0
Cj
0
X1 X2 S1 S2
SV Q
S3
0 0 1 -1/3
0 S1 5
-5/3
25 0 1 0 1/3
X2 11
0 -1/3
30 1 0 0 0
X1 12
0 1
300 250 0 250/3
Zj 6350
650/3
Cj - 0 0 0 -250/3
Zj - 650/3
34
R’’1=R’1-R’2
R’’2=R2/3
R’’3=R’3
Exercise:
A Juice Company has available two kinds of food Juices: Orange Juice and
Grape Juice. The company produces two types of punches: Punch A and
Punch B. One bottle of punch A requires 20 liters of Orange Juice and 5
liters of Grape Juice.1 Bottle of punch B requires 10 liters of Orange Juice
and 15 liters of Grape Juice.
From each of bottle of Punch A a profit of $4 is made and from each bottle
of Punch B a profit of $3 is made .Suppose that the company has 230 liters
of Orange Juice and 120 liters of Grape Juice available
Required:
a. Formulate this problem as a LPP
b. How many bottles of Punch A and Punch B the company should produce
in order to maximize profit? (Using the simplex method)
c. What is this maximum profit?
Solution:
Juice needed for one bottle of
Juice Punch A Punch B Juice Available
_____________________________________________________________________
Orange Juice (lt) 20 10 230
Grape Juice (lt) 5 15 120
Profit per tent $4 $3
___________________________________________________________________________________
35
Let X1= the No of bottles of punch A produced.
X2= the No of bottles of punch B produced.
• LPP Model
Max Z=4X1 +3X2
St:
20X1 +10X2 < 230 Orange Constraint
5X1 +15X2 < 120 Grape Constraint
X1, X2 > 0 Non-negativity constraint
• Standard form
Max.Z=4x1 +3x2 + 0 s1 +0 s2+ 0 s3
St:
20 x1+3x2 + s1 +0 s2 = 230 Standard form
5x1+15x2 +0s1 + s2+ = 120
x1 , x2 , s1 , s2, >0
Where, s1 =Unused orange juice
s2 =Unused grape juice
4 3 0
Cj
0
X1 X2 S1
SV Q
S2
20 10 1
0 S1 230
0
5 15 0
0 S2 120
1
0 0 0
Zj 0
0
Cj - 4 3 0
Zj 0
36
2nd simplex tableau
4 3 0
Cj
0
X1 X2 S1
SV Q
S2
1 1/2 1/20 11.
4 X1
0 5
0 25/2 -1/4 62.
0 S2
1 5
4 2 1/5
Zj 46
0
Cj - 0 1 -1/5
Zj 0
Exercise:
Solve the following LPPs using the simplex method
1. Max.Z=3x1 +5x2 2. Max.Z=20x1 +10x2
Subject to: Subject to:
x2 < 6 5x1+4x2 < 250
3x1+2x2 < 18 2x1+5x2 < 150
x1, x2 >0 x1 , x 2 >0
Answer: Answer:
x1=2, x2 =6, s1 =0 , s2=0 and MaxZ=$36 x1=50, x2 =0, s1 =0 ,
s2=50 and MaxZ=$1,000
38
Surplus variable is subtracted from a > constraint in the
process of converting the constraint to standard form.
Neither the slack nor the surplus is negative value. They must
be positive or zero.
Example:
1. 2x1+x2 < 40 ==>is a constraint inequality
x1= 12 and x2= 11==> 2x1+x2+s = 40 ==>2(12)+11+s = 40
==> s=5 unused resource
2. 5x1+3x2 < 45
x1= 12 and x2= 11==> 5x1+3x2+s = 45 ==>5(12)+3(11)+s = 45
Note:
Type of constraint To put into standard form
< --------------------------------------------- Add a slack variable
= ---------------------------------------------Add an artificial variable
> ---------------------- Subtract a surplus variable and add artificial
variable
1. Big M-method
/Charnes Penalty Method/
39
The Big-M Method is a method which is used in removing artificial variables
from the basis .In this method; we assign coefficients to artificial variables,
undesirable from the objective function point of view. If objective function
Z is to be minimized, then a very large positive price (called penalty) is
assigned to each artificial variable. Similarly, if Z is to be maximized, then
a very large negative price (also called penalty) is assigned to each of
these variables.
40
x1, x2 , s1, s2 ,A1 ,A2 > 0
Step 2
Initial simplex tableau
The initial basic feasible solution is obtained by setting x 1= x2= s1= s2=0
No production, x1= x2= s1=0==>20(0) +15(0) - 0+A1 = 100 ==> A1 = 100
x1= x2= s2=0==>0(0)+3(0) - 0+A2 =15==> A2 = 15
25 30 0 0
Cj
M M
X1 X2 S1 S2 RR
SV Q
A1 A2
20 15 -1 0 1
M A1 100
0
2 3 0 -1 0 15/2=7.5
M A2 15
1
22M 18M -M -M M 115
Zj
M M
25 -22M 30- 18M M M
Cj - Zj
0 0
100/20=5
Note:
Once an artificial variable has left the basis, it has served its purpose
and can therefore be removed from the simplex tableau. An artificial
variable is never considered for re-entry into the basis.
41
25 30 0 0
Cj
M
X1 X2 S1 S2
SV Q
A2
R’1=R1/20
1 3/4 -1/20 0
25 X1 5
0
R’2=R2-2 R’
0 3/2 1/10 -1
M A2 5
1
25 75/4+3/2M -5/4+1/10M -M 125+5
Zj
M M
0 45/4-3/2M 5/4-1/10 M M
Cj - Zj
0
25 30 0
Cj
0
X1 X2 S1
SV Q
S2
1 0 -1/10 R’’1=R’1-3/4 R’’2
25 X1 5/2
1/2
0 1 1/15 R’’2=R’2/3/2
30 X2 10/3
-2/3
25 30 -1/2
Zj 162.5
-15/2
0 0 1/2
Cj - Zj
15/2
42
Cj - Zj > 0==>Optimal solution is reached
X1=5/2
X2=10/3 and MinZ=162.5
Note:
As long as an “A” variable is available in the solution variable column, the
solution is infeasible.
43
Initial Simplex tableau
5 3 0 0
Cj
M M
RR
X1 X2 S1 S2 A1
SV Q
A2 6
0 S1 2 4 1 0 0 12
0 5
M A1 2 2 0 0 1 10
2
0
M A2 5 2 0 -1 0 10
1
Zj 7M 4M 0 M M 20 M
M
Cj - 5 -7M 3- 4M 0 -M
0 0
Zj
5 3 0 0
Cj
M
X1 X2 S1 S2
SV Q
A1
0 16/5 1 2/5
0 S1 8
0
0 6/5 0 2/5
M A1 6
1
1 2/5 0 -1/5
5 X1 2
0
5M 6/5M +2 0 2/5M -1 10+6
Zj
M M
Cj - 0 -6/5M +1 0
Zj -2/5M+1 0
44
RR
2.5
5 3 0 0
Cj
M
X1 X2 S1 S2 RR
SV Q
A1
20
0 1 5/16 1/8
3 X2 2.5
0 12
0 0 -3/8 1/4
M A1 3 -
1
0 0 -1/8 -1/4
5 X1 1
0
5 3 -3/8M +5/6 M/4- 12.5+3
Zj
7/8 M M
Cj - 0 0 3/8M -5/6
Zj -M/4+7/8 0
45
4th Simplex tableau
5 3 0
Cj
0
X1 X2 S1
SV Q
S2
0 1 1/2
3 X2 1
0
0 0 -3/2
0 S2 12
1
0 0 -1/2
5 X1 4
0
5 3 -1
Zj 23
0
Cj - 0 0 1
Zj 0
Solution
46
2 1 3 0
Cj
-M
X1 X2 X3 S1 RR
SV Q
A1
1 1 2 1 2.5
0 S1 5
0
2 3 4 0 3
-M A1 12
1
-2M -3M -4M 0
Zj -12 M
-M
Cj - 2M+2 3M+1 4M+3 0
Zj 0
47
Cj 2 1 3 0
SV X1 X2 X3 S1 Q
A1
3 X3 1/2 1/2 1 1 5
0
-M A1 2 3 4 0 12
1
Zj 3/2 -M +3/2 3 2M+3/2 -2M+15/2
-M
Cj - 1/22 M-1/2 0 -2M-3/2
0
Zj
RR
Cj 2 1 3 0
SV X1 X2 X3 S1 Q RR
6
3 X3 1/2 0 1 3/2 1.5
1 X2 0 1 0 -2 2 Not defined
48
4th simplex tableau
2 1 3
Cj
0
X1 X2 X3
SV Q
S1
1 0 2
3 X1 3
3
0 1 0
1 X2 2
-2
2 1 4
Zj 8
4
Cj - 0 0 -1
Zj -4
49
x1, x2 >0
Ans: x1=450/13, x2 =210/13 and Min Z=$540
Note:
To get an initial feasible solution
50
3. = (Artificial) Yes
1. Mixed constraints
Example
Max Z=6x1 +8x2
Subject to:
x2 < 4
x1+ x2 = 9
6x1+ 2x2 >24
x1, x2 >0
• Standard form
Max.Z=6x1 +8x2 + 0 s1 +0 s2+ 0 s3-M A2- M A3
St:
x2 + s 1 =4
x1+ x2 + A2 =9
Standard form
6x1+2x2 - s3 + A3 =24
All Variables >0
51
6 8 0 0
Cj
-M -M
X1 X2 S1 S3 A2
SV Q
A3
0 1 1 0 0
0 S1 4
0
1 1 0 0
-M A2 9
1 0
6 2 0 -1
-M A3 4
0 1
-7M -3M 0 +M
Zj 24
-M -M
7M +6 3M+8 0 -M
Cj - Z j
0 0
Note:
For the initial basis, use artificial variables for constraints that have them.
Otherwise, use a constraint slack variable. Hence, surplus variables will
not appear in an initial solution.
52
Example:
If the equation is max Z:
Cj
X1 X2 S1
SV Q
S3
Zj
Cj - 5 2 5
Zj 0
3. Infeasibility
A situation with no feasible solution may exist if the problem was
formulated improperly.
Infeasibility comes about when there is no solution that satisfies all of the
problem’s constraints.
53
Example:
Minimization case
5 8 0 0
Cj
M
X1 X2 S1 S2
SV Q
A2
1 1 -2 3
5 X1 200
0
0 1 1 2
8 X2 100
0
0 0 0 -1
M A2 20
1
5 8 -2 31-M 1,800+200
Zj
M M
0 0 2 M-31
Cj - Z j
0
Even though all Cj - Zj are positive or 0(i.e the criterion for an optimal
solution in a minimization case), no feasible solution is possible because
an artificial variable (A2) remains in the solution mix.
4. Unbounded Solutions
No finite solution may exist in problems that are not bounded .This means
that a variable can be infinitely large without violating a constraint.
54
The procedure in unbounded solution is to divide each quantity column
number by the corresponding pivot column number. The row with the
smallest positive ratio is replaced. But if the entire ratios turn out to be
negative or undefined, it indicates that the problem is unbounded.
Example:
Maximization case
6 9 0
Cj
0
X1 X2 S1 RR
SV Q
S2
30/-1=-30
-1 1 2 Unacceptable
9 X2 30
0 RRs
-2 0 -1 10/-2=-5
0 S2 10
1
-9 9 18
Zj 270
0
Cj - Z j 15 0 -18
0
Pivot Column
55
The solution in the above case is not optimal because not all Cj - Zj entries
are 0 or negative, as required in a maximization problem. The next
variable to enter the solution should be X1.To determine which variable will
leave the solution, we examine the ratios of the quantity column numbers
to their corresponding numbers in the X1 or pivot column. Since both pivot
column numbers are negative, an unbounded solution is indicated.
5. Degeneracy
/Tie for leaving basic variable (key row)/
If there is a tie for the smallest ratio, this is a signal tat degeneracy exists.
Degeneracy can occur right in the first (initial tableau).This normally
happens when the number of constraints is less than the number of
variables in the objective function. Problem can be overcome by trial and
error method.
5 8 2 0
Cj
0 0
X1 X2 X3 S1
SV Q
S2 S3 RR
1/4 1 1 -2
8 X2 10
10/1/4=40
0 0
4 0 1/3 -1 20/4=5 Tie for the smallest
0 S2 20
ratio
1 0 indicates degeneracy.
2 0 2 2/5 10/2=5
0 S3 10
0 1
2 8 8 16
Zj 80
0 0
Cj - Z j 3 0 -6 -16
0 0
56
One simple way of dealing with the issue is to select either row (S2 or S3 in
this case) arbitrary. If we are unlucky and cycling does occur, we simply go
back and select the other row.
Remark
When there is a tie between a slack and artificial variable to leave the
basis, the preference shall be given to artificial variable to leave the basis
and there is no need to apply the procedure for resolving such cases.
Example:
Maximization problem
3 2 0
Cj
0
X1 X2 S1
SV Q
S2
3/2 1 1
2 X2 6
0
1 0 1/2
0 S2 3
1
3 2 2
Zj 12
0
Cj - Z j 0 0 -2
0
57
MaxZ=3X1+2X2
X1=0, X2=6, S2=3 and MaxZ=12 or: X1=3, X2=3/2 and MaxZ=12
Exercise:
1. Solve the following LPP by the simplex algorithm
Min Z=6x1 +8x2
Subject to:
x1+ 2x2 > 80
3x1+ x2 > 75
x1, x2 >0
What are the values of the basic variables at each iteration?
Which are the non-basic variables at each iteration?
Ans:X1=14, X2=33, and
MinZ=221
2. At the 3rd iteration of a particular LP maximization problem, the
following tableau is established:
58
Cj
X1 X2 X3 S1
SV Q
S2 S3
0 1 1 -2
5 X3 5
0 0
1 -3 0 0
6 X1 12
0 1
0 2 0 1
0 S2 10
1 -1
6 -13 5 5
Zj 97
0 21
Cj - Z j 0 16 0 -5
0 -21
What special condition exists as you improves the profit and move to the
next iteration? Proceed to solve the problem for optimal solution
Ans: Degeneracy; X1=27, X2=5, X3=0, and
MaxZ=$177
3. Covert the following constraints and objective function into the standard
form for use in the simplex method
Min Z=4x1 +x2
Subject to:
3x1+ x2 = 3
4x1+ 3x2 > 6
x1+ 2x2 < 3
x1, x2 >0
59
Answer:
Min.Z=4x1 +x2 + 0 s1 +0 s2+ M A1+M A3
St:
3x1+ x2 + A1 =3
4x1+ 3x2 -s1 +A2 =6
x1+ 2x2 + s2 =3
All Variables >0
4. Solve the following LPP using simplex method
MaxZ=9x1 +7x2
Subject to:
2x1+ x2 < 40
x1+ 3x2 < 30
x1, x2 >0
Ans: X1=18, X2=4, and MaxZ=$190
5. Solve the following LPP to show that it has alterative optimal solutions.
a. MaxZ=6x1 +3x2 Ans: i. X1=4, X2=0, and MaxZ=24
Subject to: ii.X1=5/2, X2=3, and MaxZ=24
2x1+ x2 < 8
3 x1+ 3x2 < 18
x2 < 3
x1, x2 >0
b MinZ=2x1 +8x2 Ans: i. X1=32/6, X2=10/6, and MinZ=24
Subject to: ii.X1=12, X2=0, and MinZ=24
5x1+ x2 > 10
2x1+ 2x2 > 14
x1+ 4x2 > 14
x1, x2 >0
6. Solve the following LPP to show that it has unbounded solution.
a. MaxZ=-2x1 +3x2
Subject to:
x1 <5
2 x1-3x2 < 6
x1, x2 >0
b. MaxZ=3x1 +6x2
60
Subject to:
3x1+ 4x2 > 12
-2x1+ x2 < 4
x1, x2 >0
7. Solve the following LPP to show that it has no feasible solution.
a. MaxZ=-2x1 +3x2 Ans: X1=2, X2=0, A1=2 and MaxZ=4-
2M
Subject to:
x1 - x2 > 4
x1+ x2 < 6
x1 <2
x1, x2 > 0
b. MaxZ=3x1 +3x2 Ans: X1=0, X2=2, A2=2 and MaxZ=4-4M
Subject to:
2x1+ x2 < 2
3x1 + 4x2 > 12
x1, x2 >0
Assignment 1
61
1. A workshop prepared two articles A and B .The time required at
different stages and profit per unit are shown below. Formulate
the LP model
2. A farmer use his land to produce rice and wheat .Labor required
Work Profit per
Cutting Machine Packing
center product unit($)
A 2 1 1 50
B 1 2 0.5 60
Total capacity 80 100 50
per acre and profit per acre given below. Formulate the LP model
Rice X 2 100
Wheat Y 3/2 60
Total 200 300
62
In addition, because of demand, a maximum of 4 units of container
K units of be produced. Obtain the optimal solution using graphical
method.
4. Personal Mini Warehouses is planning to expand its successful Orlando
business into Tampa. In doing so, the company must determine how
many storage rooms of each size to build. Its objective and constrains
follow:
Total resource
Resource K L
available
Material(Kg/u 1 2 10Kg
nit)
Labor(Hr/unit) 6 6 36Hr
Profit 4 5
MinZ=24X1+28X2
Subject to :
5X1+4X2<2000
X1 >80
63
X1 + X2>3000
X2>100
X1 , X2> 0
Assignment 2
Solve the following LPP by simplex method
1. Max.Z=4X1+3X2 2. Max.Z=2X1+3X2
Subject to: Subject to:
X1+2X2<10 7X1+4X2<28
4X1 +3X2<24 7X1
+12X2<52
X1 , X2> 0 X1 ,
X2> 0
3. Max.Z=3X1+5X2
Subject to:
3X1+2X2<18
X1 <4
X1 , X2 > 0
4. Max.Z=3X1+2X2 +3X3 5. Max.Z=5X1-
2X2+3X3
Subject to: Subject to:
2X1+X2+X3<2
2X1+2X2-X3 >2
64
3X1 +4X2-X3>8 3X2-
4X3>3
X1 , X2, X3> 0
X1+3X3<5
X1 , X2 ,X3> 0
6. Max.Z=X1+X2
Subject to:
2X1+X2>4
X1+7X2>7
X1+X2>0
X1 , X2 > 0
65
are added in the given LP problem to convert it into standard
form for two reasons:
i. to convert an inequality to have a standard form of
an LP model, and
ii. to get an initial feasible solution represented by the
columns of an identity matrix.
The summery of the extra variables needed to add in the given LP problem
to convert it into standard form is given below:
Table
2. Test of optimality
i. If all Cj - Zj < 0, then the basic feasible solution is optimal (Maximization
case)
ii. If all Cj - Zj > 0, then the basic feasible solution is optimal (Minimization
case)
3. Variable to enter the basis
i. A variable that has the most positive value in the C j - Zj row
(Maximization case)
ii. A variable that has the highest negative value in the C j - Zj row
(Minimization case)
4. Variable to leave the basis
The row with the non-negative and minimum replacement ratio
(For both maximization and minimization cases
i.e: RR > 0
66
CHAPTER IV
SENSATIVITY ANALYSIS AND DUALITY
67
The two sensitivity analysis approaches are:
I. Trial and error approach and
II. Analytical approach
Note:
Instead of resolving the entire problem as a new problem with new
parameters, we may take the original optimal solution table as an initial
solution table for the purpose of knowing ranges both lower and upper
within which a parameter may assume value.
68
x1, x2 , x3 > 0
X2 S1 S2 Non-basic variables
Cj - Zj row -0.842 -0.311 -0.067
X1 row 1.053 0.067 0
Cj - Zj row
X1 row -0.8 -4.64 -∞
Solution:
Analysis of basic decision variables
The analysis will be conducted on products on X1 and X3 which are in
the basic solution. Divide each Cj - Zj row entry for variables not in the
solution (for instance, by X2, S1 and S2 values) by the associated
variable aij from X1or X3 row.
I. Analysis of X1
69
Steps:
a. Take the Cj - Zj row of the optimal solution of the non-basic
variables
b. Take the X1 row of the non-basic variables
c. Cj - Zj row
X1 row
Upper Limit
The smallest positive number in the Cj - Zj row tells how much the
profit X1
of X1 can be increased before the solution is changed.
Lower Limit
The largest negative number closest (negative amount closest to 0)
II. Analysis of X2
X2 S1 S2
Cj - Zj row -0.842 -0.311 -0.067 Non-basic variables
X3 row 0.67 -0.022 0.067
Cj - Zj row
X1 row -1.26 14.13 -1
70
=1+ (14.13) =15.13 X1
row
Note: Cj (for X3) =5(Look in the OF of the LP problem)
Therefore, the range of optimality for the coefficient of X3 is 0 < Cj (for X3) <
15.13 (The coefficient of X3 in the objective function can change between 0
and 15.13 without changing the optimal solution mix X 1=10, X3=1.8 and
S3=15.12).However, this change will change only the optimal value of the
objective function(i.e.MaxZ will change)
Exercise:
Max.Z=50x1 +120x2
Subject to:
2 x1+4x2 < 80
3x1+x2< 60
x1, x2 > 0
Determine the range of optimality for the coefficient of the basic variables.
Optimal Solution
Cj
X1 X2 S1
SV Q
S2
5 X1 1/2 1 1/4 20
0
5/2 0 -1/4
1 S2 40
1
60 120 30
Zj $2,400
0
$-10 $0 $-30
Cj - Zj
$0
Ans: The range of optimality for X2’s profit coefficient is: $100 < Cj
(for X2) < ∞
Cj(new)>Zj
71
The range of insignificance is the range over which Cj rates for non-
basic variables can vary without causing a change in the optimal solution
mix (variable) is called the range of insignificance.
Example:
Max.Z=5x1 +4.5x2 +x3
Subject to:
15 x1+15.8x2 < 150
5x1+6.4x2+15x3 < 77
2.8x2+11.8x3 < 36
x1, x2 , x3 > 0
Solution
72
Thus, ∞< Cj(new for X2)< 5.342 is the range of insignificance for X2.
Cj (new for X2) can vary with in the given range without causing a change
in the optimal solution mix(X1=10, X1=0, X3=1.8, S1= S2=0 and
S3=15.12).
Shadow prices:
==>How much should a firm be willing to pay to make additional
resources available?
Shadow prices signify the change in the optimal value of the objective
function for 1 unit increases in the value of the RHS of the constraint that
represent the availability of scarce resources.
RHS ranging is the range over which shadow prices remain valid.
Example:
Max.Z=3x1+4x2
Subject to:
3 x1+5x2 < 15
2x1 + x2 < 8
x2 < 2
x1, x2 > 0
73
1 0 -0.143 0.714
3 X1 3.57
0
0 0 -0.286 0.428
0 S3 1.143
1
0 1 0.286 -0.428
4 X2 0.857
0
0 0 -0.714 -0.428
Cj - Zj
0
Required:
1. Determine the shadow price for each constraint
2. Determine the RHS ranges over which the shadow prices are valid
74
Lower Limit=b2-the smallest positive number in the Q/ S2 column
=8-(2.67)=5.33
Therefore, 5.33< b1< 10 (The range of resource 2 over which the shadow
price $0.428 per unit is valid).
Q S3
Q/ S3
3.57 0
-
1.143 1
1.143
0.857 0
-
Exercise:
1. Max.Z=50x1+40x2
Subject to:
3 x1+5x2 < 150 (Assembly time)
x2 < 20 (Portable display)
8x1 + 5x2 < 300 (Warehouse space)
x1, x2 > 0
75
The final simplex tableau is:
50 40 0 0
Cj
0
X1 X2 S1 S2
SV Q
S3
0 1 8/25 0
40 X2 12
-3/25
0 0 -8/25 1
0 S2 8
3/25
1 0 -5/25 0
50 X1 30
5/25
50 40 14/5 0
Zj 1980
26/5
0 0 -14/5 0
Cj - Zj
-26/5
Determine the shadow prices for the three constraints for the High Tech
Co.
Answer:
The Zj values for the three slack variables are 14/5, 0 and 26/5,
respectively.
Thus, the shadow price for the assembly time constraint is 14/5(i.e.1
additional assembly time over the existing 150 is $2.8)
T he shadow price for the portable display constraint is 0.
T he shadow price for the Warehouse space constraint is26.5
Therefore, we see that obtaining more warehouse space will have the
biggest positive impact on High Tech’s profit.
Note:
With a greater than or equal to constraint, the value of the shadow price
will be less than or equal to zero because a 1 unit increase in the value of
the RHS cannot be helpful; it makes it more difficult to satisfy the
constraint. As a result, for a maximization problem the optimal value of the
objective function can be expected to decrease when the RHS side of a
greater than or equal to constraint is increased.
2. Solve the following LPP using simplex method. A firm that manufactures
both lawn mowers and snow blowers:
X1 =the number of lawn mowers
X2 =the number of snow blowers
76
Max.Z=$30x1+$80x2
Subject to:
2 x1+4x2 < 1000 Labor hours available
6x1 + 2x2 < 1,200lb of steel available
x2 < 20 snow blower engine available
x1, x2 > 0
a. What is the best product mix? What is the optimal profit?
Answer:
x1=100, x2=200 and profit =$19,000
b. What are the shadow prices? When the optimal solution has been
reached, which resource has the highest marginal value?
Answer:
The shadow price for 1 additional labor=$15
The shadow price for 1 additional pound of steel=0
The shadow price for 1 additional snow blowers engine made
available =$20
Thus, snow blower engine have the highest marginal value at the
optimal solution.
c. Over what range in each of the RHS values are these shadows valid?
Answer:
The shadow price for labor hours is valid from 800 hours to
1,066.66 hours
The shadow price for pounds of steel is valid from 1,000pounds up
to an infinite number of pounds
The shadow price for snow blower engines ranges from 180
engines up to 250 engines
d. What are the ranges over which the objective function coefficients can
vary for each of the two decision variables?
Answer:
With out changing the current solution mix, the profit coefficient
for the mowers can range from $0 to 40, while the coefficient for
the blowers can range from $60 to infinity.
4.3. DUALITY
Every LPP has another LPP associated with it, which is called its dual.
The first way of starting a linear problem is called the primal of the
problem. The second way of starting the same problem is called the
dual. The optimal solutions for the primal and the dual are equivalent,
but they are derived through alternative procedures.
77
Note:
• The dual contains economic information useful to management, and
it may also be easier to solve, in terms of less computation, than the
primal problem.
• Corresponding to every LPP, there is another LPP.
• The given problem is called the primal.
• The related problem to the given problem is known as the dual.
• The dual of a dual is the primal
• If the primal has optimal solution ,the dual will have optimal solution
• If the primal has no optimal solution, the dual will not have optimal
solution.
• Whether we follow the dual or primal system, the optimal solution
will remain equal.
Table
Primal-Dual Relationship
Primal Dual
Objective is minimization Objective is maximization and vice
versa
> type constraints < type constraints
No of columns No of rows
No of rows No of columns
No of decision variables No of constraints
No of constraints No of decision variables
Coefficient of Object function RHS value
RHS value Coefficient of Object function
Duality Advantage
1. The dual form provides an alternative form
2. The dual reduces the computational difficulties associated with some
formulation
3. The dual provides an important economic interpretation concerning the
value of scars resources used.
Example:
78
Write the duals to the following problems
a. Max.Z=5x1+6x2
Subject to:
2x1+3x2 < 3000 (Labor constraint)
5x1 + 7x2 < 1000 (Machine constraint)
x1 + x2 < 5000 (Market constraint)
x1, x2 > 0
Solution
Represent primal in the conventional table as follows
Dual variables x1 x2 Constraints
u1 2 3 < 3000
u2 5 7 < 1000
u3 1 1 < 500
MaxZ 5 6
By referring the above table, dual for this can be stated as:
2u1+5u2 + u3> 5
3u1+7u2 + u3> 6
u1, u2 , u3> 0
Note:
1. For maximizing, all constraints must be brought to “<” form
2. For minimizing, all constraints must be brought to “>” form
3. If they are not, use multiplication factor -1
4. “=” is an intersection of “>” and “< “
b. Max.Z=60x1+50x2
Subject to:
2x1+4x2 < 80
3x1 + 2x2 < 60
x1 < 15
2x2 < 36
x1, x2 > 0
Solution
Primal is represented in the table as follows:
79
u3 1 0 < 15
u4 0 2 < 36
MaxZ 60 50
2u1+3u2 + u3 > 60
4u1+2u2 + u4 > 50
u1, u2 , u3, u4 >0
Solution
Rule:
1. For a maximization primal with all < type constraints there
exists a minimization dual problem with all > type
constraints and vice versa. Thus, the inequality sign is
reversed in all the constraints except the non-negativity
conditions.
2. Transform the < type constraint to a > type constraint by
multiplying the constraint by -1.
3. Write the = type constraint equivalent to two constraints of
the type > and <.
The standard primal LPP so obtained is:
Min.Z=x1+2x2
Subject to:
-2x1-4x2 > -160
x1 - x2 > 30
80
-x1 + x2 > -30
x1 > 10
x1, x 2 > 0
Let u1, u2 , u3, and u4 be the dual variables corresponding to
the four constraints in given order, then the dual of the given primal
problem can be formulated as follows:
MaxZ*=-160 u1+30 u2-30 u3+10
St:
-2u1+ u2- u3+ u4 < 1
-4u1- u2+ u3 <2
u1, u2 , u3, u4 >0
Let u= u2-u3, then the above dual problem reduces to the form:
81
__________________________________________________________________
Machine Product Available Hours
A B
I 30 20 300
II 5 10 110
Profit/unit ($) 6 8
__________________________________________________________________
The total time available is 300hrs and 110hrs on machine I and II
respectively .Product A and B contribute $6 and $8 per unit
respectively.
i. Formulate the LPP model for the primal and determine the optimal
solution using simplex method.
ii. Formulate the LPP model for the dual and determine the optimal
solution from the final primal simplex tableau
Solution
Let X1=No of units of product A produced
X2=No of units of product B produced
Max.Z= 6X1+ 8X2
Subject to:
30 X1+ 20X2 <300
5 X1+ 10X2 <110
X1 , X2 > 0
The final simplex tableau is:
6 8 0
Cj
0
X1 X2 S1
SV Q
S2
1 0 -1/20
6 X1 4
-1/10
0 1 1/10
8 X2 9
3/20
6 8 ½
Zj 96
6/10
0 0 -1/2
Cj - Zj
-6/10
The optimal solution is:
X1=4 units of product A produced
X2=9 units of product B produced and Max.Z= $96
ii. Let u1=Cost of one hour on machine I
82
u2=Cost of one hour on machine I
MinZ*=300 u1+ 110u2
St:
30u1+ 5u2> 6
20u1+ 5u2 >8
u1, u2 > 0
NOTE:
The value in the Cj - Zj row under columns of the slack /surplus variables
with change in sign give directly the optimal values of the dual/primal
basic variables.
Therefore,
uj=-(Cj - Zj)
Note: The column s1 corresponds to u1 and the column s2 corresponds
to u2
u1=-$(-1/2) per hr on machine I
u2=-$(-6/10) per hr on machine II
MaxZ=MinZ*=$96(Total minimum cost)
Note: The dual variables uj are also called as the shadow prices
g. Max.Z= 300X1+ 250X2
Subject to:
2 X1+ X2 <40
X1+ 3X2 <45
X1 <12
X1 , X2 > 0
The final primal solution is:
300 250 0 0
Cj
0
X1 X2 S1 S2
SV Q
S3
0 0 1 -1/3
0 S1 5
-5/3
0 1 0 1/3
250 X2 11
-1/3
1 0 0 0
300 X1 12
1
300 250 0 250/3
Zj 6350
650/3
0 0 0 -250/3
Cj - Zj
-650/3
Required:
83
I. What are the solution of the dual variables (i.e. Shadow prices) u1, u2 and
u3?
II. What is the optimal dual cost?
Solution:
I. Note: The column s1 corresponds to u1, s2 to u2 and s3 to u3.
uj=-(Cj - Zj)
Therefore, u1=0, u2 =250/3 and u3=650/3
II. Min Z*=$6350
Exercise
Write the dual of the following primal LP problems
1. Min.Z=3x1-2x2 +4x3
St: 5. Min.Z=8x1+3x2
3x1+5x2 +4x3> 7 St:
6x1 + x2 +3x3> 4 x1-6x2 > 2
7x1 -2x2 - x3 < 10 5x1 + 7x2 =-4
4x1 +7x2 - 2x3> 2 x1, x2 > 0
6. Min.Z=3x1+x2 +x3-x4
x1, x2 ,x3 > 0
St:
2x1-x2 +3x3 +x4 =1
2. Max.Z= 2x1+5x2 +6x3
x1 + x2 -x3 +x4 =3
St:
x1, x2 ,x3 ,x4 > 0
5x1+6x2 -x3 < 3
-2x1 + x2 +4x3< 4
x1 -5 x2 +3x3< 1
-3x1 -2x2 +7x3 < 6
x1, x2 ,x3 > 0
3. Min.Z=7x1+3x2 +8x3
St:
8x1+2x2 +x3> 3
3x1 + 6x2 +4x3> 4
4x1 +x2 + 5x3 > 1
x1 +5x2 +2x3 > 7
x1, x2 ,x3 > 0
4. Max.Z= 2x1+3x2 +x3
St:
4x1+3x2 +x3 = 6
x1+2x2 +5x3=4
x1, x2 ,x3 > 0
84
ASSIGNMENT III
1. A manufacturer of toys makes two types of toys: A and B. Processing
of these two toys is done on two machines X and Y. The toy A requires
two hours on machine X and six hours on machine Y. Toy B requires
fours on machine X and five hours on machine Y. here are sixteen hours
of time per day available on machine X and thirty hours on machine Y.
The profit obtained on both the toys is same, i.e. $5 per toy.
a. What should be the daily production of each of the two toys?
b. Formulate the primal and the dual LPP model
c. Find the optimal solution for the dual LPP
d. Relate the dual optimal solution to the primal optimal solution
e. Give the proper interpretation to the primal and the dual solutions.
2. A company produces P, Q and R from three raw materials A, B and
C. One unit of P requires 2 units of A and 3 of B .Product Q requires 2
units of B and 5 of C. one unit of R requires 3 units of A, 2 units of B and
4 units of C. Company has 8 units of material A, 10 units of material B
and 15 units of material C available to it. Profit per unit of products P, Q
and R are $3, $5 and $4 respectively.
a. Formulate the problem mathematically
b. How many units of each product should be produced to maximize
profit?
c. Write the DUAL problem
85
3. The 3rd and final simplex tableau for the LPP is:
Max.Z= 200x1+200x2
St:
2x1+x2 < 8
x1+3x2 <9
x 1, x2 > 0
$200 $200 $0
Cj
$0
X1 X2 S1
SV Q
S2
$200 X1 1 0 3/5 3
-1/5
0 1 -1/5
250 X2 2
2/5
$200 $200 $80
Zj $1,000
$40
0 0 -$80
Cj - Zj
-$40
What are the solutions of the dual variables, u1, u2 and u3? What is the
optimal dual cost?
CHAPTER V
DISTRIBUTION MODELS
One important application of linear programming has been in the area of
the physical distribution (transportation) of resources, from one place to
another, to meet a specific set of requirement.
86
Consider a corporation engaged in the manufacture of products. Most of
such big corporations are of “multiple-product” and “multi-unit”
organizations having production units situated at different places. Items
are produced for sales. Sales take place at different markets which are,
again located at different places. It is not feasible to co-locate production
and market. Markets are located away from the manufacturing places.
Hence products are sent to factory warehouses set up near market outlets.
Cost of product consists of production cost and distribution cost.
87
4. Close down warehouses which are found costly and uneconomical .
Step 1:
Formulate the problem and set up in the matrix form
The formulation of the problem is similar to the linear programming. Here
the objective function is the total transportation cost and the constraints
are the supply and demand available at each source and destination
respectively.
Step 2:
Obtain an initial basic feasible solution
88
m=3 origins and n=4 destinations ==>m+n-1=3+4 -1=6 (i.e. the
transportation model should have 6 occupied cells).
Note:
The number of occupied cells < m+n-1==> degenerate solution
Step 3:
Test the initial solution for optimality
If the current solution is optimal, then stop. Otherwise, determine the new
improved solution.
Step 4:
Repeat step 3 until an optimal solution is reached
Example
Suppose that a firm has three factories /sources of supply/ & four
warehouses
/point of demand/. The firm's production capacity at the three factories,
the demand for the four distribution centers located at various regions &
the cost of shipping each unit from the factories to the warehouses
through each route is given as follows:
Destinations (dd) =j
Origin Factory
(Supply) W1 W2 W3 W4 Capacity =i
Br.3 7 6
F1 2 5000
7 2 3 6000
F2 5
2 4 5
F3 5 2500
Requirements of
the 400
Warehouses 6000 2000 1500 13500
0
( Units of demand)
89
i. Express the following transportation problem as an LPP
Solution
Let xij =The amount of commodity to be transported form source i (i
=1,2,3 ) to destination j( j= 1,2,3,4).
Then the objective function of the problem (minimization of the total
transportation cost) can be formulated as:
Origin
Destination centers
(Sources of Supply) (Point of
demand centers)
3
F1 50000 W1 6000
2
6 7
7
5
F2 6000 W2 4000
2
3
90
2 5 W3 2000
4
5
F3 2500 W4 1500
This LPP has 12 shipping routes. The objective is to identify the minimum
cost route (Least cost route).
The NWCM gets its name because the starting point for the allocation
process is the Upper Left-hand (Northwest) corner of the transportation
table. Therefore, allocate to the Northwest corner as many units as
possible.
2. Subtract from the row supply & from the column demand the amount
allocated
3. If the column demand is now zero, move to the cell next to the right, if
the row supply is zero, move down to the cell in the next row.
If both are zero, move first to the next cell on the right then down one
cell.
4. Once a cell is identified as per step (3), it becomes a northwest cell.
Allocate to it an amount as per step (1)
5. Repeat, the above steps (1) - (4) until all the remaining supply and
demand is gone.
91
Example:
1) Consider the following transportation problem:
To Store
Store 1 Store 2 Store 3 Supply
From 4
Plant 1 19 30 50 10
7
70 30 40 60
Plant 2 9
40 8 70 20
Plant 3 18
5 8 7 14 34
Demand
5 8 7 14 34
Demand
The total transportation cost of the initial feasible solution derived by the
NWCM is:
92
Route Unit Per unit Total
From To Shipped X cost ( $) = Cost ( $)
Plant 1 Store 1 5 19 95
plant 1 Store 2 2 30 60
Plant 2 Store 3 6 30 180
Plant 2 Store 4 3 40 120
Plant 3 Store 4 4 70 280
Plant 3 Store 4 14 20 280
Total Cost= $ 1015
Note: NWCM does not consider the cost factor for allocation.
Exercise:
1. Determine an initial basic feasible solution to the following
transportation problem using NWCM. Compute the total cost for this
solution
Destination
A B C Supply
S1 2 7 14 5
S2
3 3 1 8
S3 5 4 7 7
S4 1 6 2 14
Deman 7 9 18
d
Answer: X11=5, X21=2, X22=6, X32=3, X33=4, X43=4, and Total cost =$102
Note:
1. Total Supply= Total demand ===> Balanced TP
2. Total Supply ≠ total demand ===> Unbalanced TP
3. Convert the unbalanced TP into a balanced TP by using dummy
destination/dummy source.
* If total Supply > Total demand, then create a fictitious or artificial
destination called dummy destination
i.e: total Supply > Total demand===> Add dummy column
93
- Add a dummy row
Note: the cost of “shipments” to the dummy is usually set at zero ==>
No real cost
Example
Develop an initial feasible solution using NWCM
Table: Unbalanced transportation table
R S T Supply
A 1 2 3 100
4 1 5 110
B
Deman 80 120 60 210
260
d
Solution:
R S T Supply
1 2 3
A 100
80 20
4 1 5
B 110
100 10
Dumm 0 0 0
50 50
y
Deman
80 120 60 260
d
Assignment
94
Consider that Harley's Sand & Gravel Pit has contracted to provide
topsoil for three residential housing developments. Topsoil can be supplied
form three different “farms" as follows:
_______________________________________________________________
Weekly Capacity
Farm (Cubic Yards)
A 100
B 200
C 200
_____________________________________________________________
____
_______________________________________________________________
Required
Develop the initial feasible solution using NWCM & compute the total cost
for this solution.
95
It begins a solution by sequentially assigning to the ratios or cells with the
minimum cost as many units as possible. The first allocation be made
to the cell with the lowest cost (the highest profit in a maximization
case)
The Least- Cost Method yields not only an initial feasible solution but
also one that is close to optimal in small problems.
Example
1.Suppose that a firm has three factories / sources of supply /& four
warehouses/point of demand/ .The firm's production capacity at the three
factories, the demand for the four destination centers located at various
regions & the cost of shipping each unit from the factories to the
warehouses through each route is given as follows:
Destinations
Factory
W1 W2 W3 W4 Capacity
F1 3 2 7 6 5000
F2 7 5 2 3 6000
F3 2 5 4 5 2500
Demand 6000 4000 2000 1500 13500
Required:
a. Develop an initial feasible solution using NWCM & Compute the total
cost
b. Develop an initial feasible solution using least-cost method & compute
the total cost.
Solution:
Initial feasible solution
Factory
W1 W2 W3 W4 Capacity
3 2 7 6
F1 5000
5000
Factory 7 5 2 3
F2 1000 4000 1000 6000
2 5 4 5
F3 2500
1000 1500
Demand 6000 4000 2000 1500 13500
96
m= 3, n =4 ==> 3+4 -1 =6 occupied cells (Feasible)
b.
Factory
W1 W2 W3 W4 Capacity
3 2 7 6
F1 1000 4000 5000
7 5 2 3
F2 2500 2000 1500 6000
2 5 4 5
F3 2500
2500
Demand 6000 4000 2000 1500 13500
97
Routes Units Unit Total
From Shipped Cost =Cost
To X 3 $ 3000
F1 1000 2 8000
W1 4000 7 17500
F1 2500 2 4000
W2 2000 3 45000
F2 1500 2 5000
W1 2500 Total transportation =$42,000
F2 cost
W3
F2
W4
F3
W1
2. Develop the initial feasible solution for the following TP using the least-
cost method (LCM)
Destination
Source D E F G Supply
A 1 5 3 4 100
B 4 2 2 5 60
C 3 1 2 4 120
deman
70 50 100 60 280
d
Solution
The 1st allocation be made to the cell with the least-cost. Cells AD & CD
both have the lowest cost f $1. Cell AD is selected 1 st because more units
can be allocated to it (70) than to cell CE (50).
98
Cell CF is filled in 1st since a larger quantity (120-50-70) can be placed
there. Then, the remaining requirement of 30 for column F is allocated to
cell BF & source B's supply is reduced to 30.
Solution
99
R S T Suppl
y
A 1 2 3 100
80 10 10
B 4 1 5 110
110
Dummy 0 0 0 50
50
Deman 80 120 60
d
Exercise
Three garment plants are available for monthly education of four styles of
men's shirts. The capacities of the three plants are 45,000, 93,000 and
60,000 shirts. The number of shirts required in style "a" through "d" are
28,000, 65,000, 35,000 & 70,000, respectively. The profits, in $ per shirt,
at each plant for each style are shown below.
Table: The garment plants' profit.
STYLE a b c d
PLANT
1 8 12 -2 6
2 13 4 3 10
3 0 7 11 8
How many shirts of each type to produce in each plant so that profit is
maximized?
100
A B C D Supply
S1 1 5 3 3 34
S2 3 3 1 2 15
S3 0 2 2 4 12
S4 2 7 2 4 19
deman 21 25 17 17
d
Source
In this method allocation are made so that the penalty cost is minimized.
The advantage of this method is that it gives an initial solution which is
nearer to an optimal solution or is the optimal solution itself.
VAM determines the penalty for not using the minimum cost routes,
where the objective is to avoid large penalties so that the penalty from
not using the routes is minimized.
The steps in VAM are as follows:
1. Calculate penalties for each row (column) by taking the smallest &
the next smallest unit transportation cost in the same row (column)
This difference indicates the penalty or extra cost which has to be
paid if one fails to allocate to the cell with the minimum unit transportation
cost
101
2. Select the row or column with the largest penalty & allocate as much
unit as possible in the cell having the least cost in the selected row or
column satisfying the conditions.
If there is a tie in the values of penalties, then t can be broken by
selecting the cell where maximum allocation can be made.
3. Adjust the supply & demand & cross out the satisfied row or column
If a row or column is satisfied simultaneously, only one of them is
crossed out & the remaining row (column) is assigned a zero supply
(demand) .Any row or column with zero supply or demand should not be
used in computing future penalties.
4. Repeat step 1 to 3 until the entire available supply at various sources &
demand at various destinations are satisfied.
Example:
1. Determine an initial basic feasible solution to the following
transportation problem using VAM.
Warehouse
Row difference or Row penalty
A B C D Suppl or opportunity cost
y 2 0 - - -
Factory F1 2 2 0 4
5 20 25
2 2 2 2 5
F2 5 9 8 3
25
15 5 5 1 2 2 - -
F3 6 4 3 2
10
10
Deman 20 15 20 5 60
d
Column difference 3 2 3
1
or Column penalty
or opportunity cost 3 2 -
1
1 5 -
1
5
m= 3, n=4- ==> 3+4-1 =6 Occupied 9 (feasible)
cells -
102
2. A dairy firm has three plants located in different regions. The daily milk
production at each plant is as follows:
Plant 1: 6 million liters.
Plant 2: 1 million liters, &
Plant 3: 10 million liters
Each day the firm must fulfill the needs of its four distribution centers.
Minimum requirement at each center is as follows.
Distribution center 1: 7 million liters
" " 2: 5 " "
" " 3: 3 " "
" " 4: 2 " "
Cost of shipping one million liters form each plant to each distribution
center is given in the following table in hundreds of dollar.
Distribution Center
D1 D2 D3 D4
P1 2 3 11 7
P2 1 0 6 1
P3 5 8 15 9
Plant
Column
Penalty
7 5 3 2
103
1 3 5 6
3 5 4 2
3 - 4 2
5 - 15 9
Assignment
1. Determine an initial basic feasible solution to the following
transportation problem by VAM
Destination
D1 D2 D3 D4 Suppl
y
S1 21 16 15 3 11
Sourc S2 17 18 14 13 13
e S3 32 27 18 41 19
Deman 6 10 12 15
d
104
2. Determine an initial feasible solution to the following transportation
problem using
a. NWCM
b. LCM, &
c. VAM
Destination
D1 D2 D3 D4 Suppl
y
A 11 13 17 14 250
Sourc B 16 18 14 10 300
e C 21 24 13 10 400
Dema 200 225 275 250
nd
105
optimality must be non-degenerate i.e the no of occupied cells must be
m+n-1.
The Procedure for testing optimality is analogous to that of the simplex
method. A distinction is made between basic variables, those associated
with occupied cells & non-basic variables, those associated with the
empty cells.
For each empty cell, the effect of changing it to an occupied cell is
examined. If any of these changes are favorable, the solution is not
optimal & a new solution must be designed. A favorable change means an
increase in the value of the objective function in maximization problems or
a decrease in minimization problems.
A. Stepping-stone method
The Stepping-stone method is an iterative technique for moving from
an initial feasible solution to an optimal solution in transportation
problems.
106
4. Begin with a plus (+) sign at the unused cell, place alternative (-) signs
and plus signs on each corner square of the closed path just traced.
i.e At each turn of the loop ( the loop may cross over itself at
times), plus and minus signs are alternately placed in the cells, starting
with a + sign in an empty cell.
5. There must be exactly one cell with a + sign and exactly one cell
with a - sign in any row or column in which the loop turns.
6. An even no of at least four cells must participate in a loop and the
occupied cells can be visited once and only once.
7. Repeat steps 1 to 4 until an improvement index has been calculated for
all unused squares (cells). If all indices computed are greater than or
equal to zero, an optimal solution has been reached. If not, it is possible
to improve the current solution and decrease total shipping costs.
Note:
In a non-degenerate problem, there is only one possible way of drawing
the loop for each empty cell.
• Analysis of test:
Check all the empty cells and select for improvement the one
with the largest improvement potential.
107
In a minimization case, the incoming cell is located by
identifying the most negative cell evaluator.
Note:
• A cell evaluator of 0 indicates the existence of another solution just
as good as the current solution. Thus, in the final solution, if cell
evaluators of 0 exist, this indicates the existence of multiple
optimal solutions.
• If two or more cells have the same value, then either may be
selected.
• If two or more of the "losing" cells contain the same no of units,
both will become empty simultaneously and a “degenerate"
solution will result.
• For the minimization case; when one or more cell evaluators are
negatives, the cell with the largest negative should be brought
into solution because that route has the largest potential for
improvement per unit.
• The loop starts and ends at the selected unoccupied cell. Every
corner element of the loop must be an occupied cell.
Example:
1. Use NWCM to find initial feasible solution and test the solution for
optimality.
Proje Proje Proje ss
Farm
ct ct ct
A B C
F 4 2 8 10
1
0
F 5 1 9 20
2
108
0
F 7 6 3 20
3
0
d 50 150 300 50
d
0
Solution
Initial feasible solution
109
Table: Test of optimality
Unoccupied cells Cell evaluators
(F2 ,A) +5-4+2-1=+2
(F1 ,C) +8-9+1-2=-2
(F3 ,A) +7-4+2-1+9-3=+10
(F3 ,B) +6-1+9-3=+11
-
F2 5 1 9 200
100 + 100-
F3 7 6 3 200
200
Dd 50 150 300 500
The + Signs in the path indicate units to be added, the - signs indicate
units to be subtracted. The limit on subtraction is the smallest quantity
in a negative position along the cell path. There are two quantities in
negative positions, 50 and 100. Because 50 is the smaller quantity, that
amount will be shifted in the following manner: Subtract 50 units from
each cell on the path with a - sign and add 50 units to the quantity of each
cell with a + sign in it.
With each iteration (new solution), it is necessary to evaluate the empty
cells to see if further improvements is possible.
110
The distribution plan after reallocation of 50 units is:
A B C ss
F1 4 2 8 100
50 50
F2 5 1 9 200
150 50
F3 7 6 200
3
200
dd 50 150 300 500
Table: Test of optimality
Unoccupied cells Cell evaluators
(F1 ,B) +2 -8+9-1 =+2
21
dd 80 120 60 0
260
a. Obtain the basic feasible solution using VAM
b. Obtain the optimal solution
c. What is the optimal shipping cost?
Solution:
a. Initial feasible solution
To
R S T ss
From
Opportunity cost
1 2 3 100
A 1 1 1 1
80 10 10
4 1 5 110
B 110 3 3 - -
Dum 0 0 0 50 0 - - -
my
dd 80 120 60 260
111
Opportunity 1 1 3
3 1 2
cost 1 2
3
1 2 -
Note: Include the dummy cells to select the opportunity cost under VAM
problems.
b. Test of optimality.
Table: Test of optimality
+4-1+2-1= +4
(B,R)
+5-1+2-3= +3
(B,T)
+0-1+3-0= +2
(D,R)
+0-2+3-0= +1
(D,S)
Since none of the cell evaluators is negative, the above feasible
solution is optimal.
Thus, accordingly the distribution is as follows
A Supplies 80 units to warehouse R
B Supplies 10 units to warehouse S
C Supplies 10 units to warehouse T
B Supplies 110 units to warehouse S
Exercise:
Consider the following transportation problem
A 12 20 15 50
warehouses
B 9 11 4 15
C
20 14 8 55
Deman 25 50 45 120
d
112
b. Evaluate the solution using the stepping-stone method. Is the
solution optimal? Explain.
c. What is the total cost for the optimal solution?
MODI provides a new means of finding the unused route with the largest
negative improvement index. Once the largest index is identified, we are
required to trace only one closed path. Just as with the stepping-stone
approach, this path helps to determine the maximum N o of units that can
be shipped via the best unused route.
113
4. Solve the problem as you did using the stepping-stone method.
i.e. construct a closed path (or loop) for the unoccupied cell with
largest negative opportunity cost. Start the close path with the
selected unoccupied cell and mark a plus sign (+) and in this cell,
trace a path along the rows (or columns) to an occupied cell,
mark the corner with minus sign (-) and continue down the
column (or row) to an occupied cell and mark the corner with
plus sign (+) and minus sign (-) alternatively. Close the path
back to the selected unoccupied call.
Locate the smallest quantity allocated to a cell marked with a
minus sign. Allocate this value to the selected unoccupied cell
and add it to other occupied cells marked with plus signs and
subtract it from the occupied cells marked with minus signs.
Note:
Any initial feasible solution will do: NWCM, VAM Solution, or any
arbitrary assignment.
The stepping- stone method is efficient for small sized
transportation problems. For larger problems, however, the MODI
method is recommended.
Example:
1. Obtain an optimal solution to the transportation problem by MODI
method given below:
Farm 1 4 2 8 100
Farm 2 5 1 9 200
7 6 3 200
Farm 3
Deman 50 150 300 500
d
114
Solution
Note:
Both the MODI and the stepping - stone method will yields the same
values.
Remark:
Conventionally, we begin by assigning a value of zero as the index for
row 1 (U1=0). Once row index has been established, it will enable us to
compute column index numbers for all occupied cells in that row. Similarly,
once a column index number has been determined, index numbers for all
rows corresponding to occupied cells in that column can be determined.
Deman
50 500
150 300
d
115
To determine Cij , use the occupied cells.
Cij= Ui + Vj
==>C11= U1 +V1==>4=0+ V1==> V1=4 , U1=0 by convention
==>C12= U1 +V2==>2=0 +V2==> V1=2
==>C22= U2 +V2==>1= U2+ 0==> U2=-1
==>C23= U2 +V3==>9= -1+V3==> V3=10
==>C33= U3 +V3==>3= U3+10 ==> U3= -7
Note:
Cij≠ Ui + Vj (For unoccupied cells)
For instance, from the above information, C32 ≠ U3 + V2==>6≠-
7+2
In this case, we found hat cell (1, 3) had an evaluation of -2, which
represented an improvement potential of and $ 2 per unit. Hence, an
improved solution is possible.
116
Proje Projec Projec
ct t t Supply
No 1 No 2 No 3
Farm 1
4 2 8 100
50 50
5 1 9 200
Farm 2
100 100
7 6 3 200
Farm 3
200
Deman
50 500
150 300
d
Deman
50 500
150 300
d
Cij= Ui + Vj
==>C11= U1 +V1==>4=0+ V1==> V1=4 , U1=0 by convention
117
==>C13= U1 +V3==>8=0 +V3==> V3=8
==>C23= U2 +V3==>1= U2+ 0==> U2=1
==>C22= U2 +V2==>1= 1+V2==> V2= 0
==>C33= U3 +V3==>3= U3+8 ==> U3= -5
Table: Test of optimality
118
Assignment
1. Obtain an optimal solution to the transportation problem by MODI
method given below.
Suppl
D1 D2 D3 D3
y
19 30 50 10 7
Farm 1
Farm 2
70 30 40 60 9
40 8 70 20 18
Farm 3
Deman
5 34
8 7 14
d
Ware a b c d
house:
No of 15 16 12 13
units:
119
And the customer’s requirements are:
Customer: A B C
No of 18 20 18
units:
The table below shows the costs of transporting one unit from
warehouse to customer.
A b c d
8 9 6 3
A
6 11 5 10
B
3 8 7 9
C
Distributio
Retail outlets
n center
A B C D
E
X
55 30 40 50 40
35 30 100 45 60
Y
40 60 95 35 30
Z
120
Determine the optimal distribution to minimize the cost of
transportation.
D E F G
A 42 48 38 37
40 49 52 51
B
From
39 38 40 43
C
121
2. During improvement (or at any stage while moving to
wards optimal solution.
To resolve degeneracy, we processed by allocating a very small quantity
close to zero to one or more unoccupied cell so as to get m+n-1
Insert ε when it is able to create a closed loop for each occupied cell.
The purpose of epsilon/delta is to enable evaluation of the remaining
empty cells. The choice of location for the epsilon/delta can be some what
tricky: some empty cells may be unsuitable if they do not enable
evaluations of remaining empty cells. Not all choices would be acceptable.
Actually, the No of epsilon/deltas needed will equal the difference between
the No of completed cells and m+n-1.Howerver; you will only be exposed
to the most common case in which one more completed cell is needed.
The epsilon/delta cannot be placed in a cell which later turns out to be in a
negative position of a cell path involved in reallocation because
epsilon/delta will be the “smallest quantity a negative position “ and
shifting that minute quantity around the cell path will leave the solution
virtually unchanged. Consequently, a certain amount of trial and error may
be necessary before a satisfactory location can be identified for
epsilon/delta.
Example
1. Solve the following transportation problem.
Suppl
1 2
y
1 3 3
50
2 4 6 30
Deman
50 30 80
d
122
Solution:
Using NWCM and MODI, the initial solution is:
Suppl Ui
1 2
y
3 3 U 1=
1 50
50 ε 0
4 6 U 2=
2 30
30 3
Deman
50 30 80
d
Vj V1=3 V2=3
Cij= Ui + Vj
==>C11= U1 +V1==>3=0+ V1==> V1=3, U1=0 by convention
==>C12= U1 +V2==>3=0 +V2==> V2=3
==>C22= U2 +V2==>6= U2+3==> U2= 3
==>C33= U3 +V3==>3= U3+8 ==> U3= -5
Note: m=2 and n=2==>2+2-1=3==>Occupied cells=2< 3
(Degeneracy)
Table: Test of optimality
123
Suppl Ui
1 2
y
3 3
U 1=
1 50 30 50
0
4 6 U 2=
2 30
30 1
Deman
50 30 80
d
Vj V1=3 V2=3
Cij= Ui + Vj
==>C11=U1+V1==>3=0+V1==>V1=3, U1=0 by convention
==>C21= U2+V1==>4= U2+3==> U2=3
==>C12= U1 +V2==>3= 0+ V2==> V2= 3
Exercise
XYZ Tobacco Company purchases tobacco and stores in warehouses
located in the following four cities.
124
city D 60
The following railroad shipping costs per tone (in hundred dollars) have been
determined:
Warehous L p Q
e location
A 7 10 5
B 12 9 4
C 7 3 11
D 9 5 7
125
number of activities so as to minimize total costs or total time or maximize
total profit of allocation.
Remark:
• The AP is considered as a special TP in which the supply at each source
and the demand at each destination are always one unit.
• Since the supply and demand are always equal to one unit in each row
and column, there is no need to write them in the assignment table.
Example:
Service costs of different team assignment ($ in thousands)
Table: The assignment
Zone table
Servic Z1 Z2 Z3 Zone
e Servi
S1
Team 20 15 31 ce
====> Team
S2 17 16 33
S3 18 19 27
126
Z1 Z2 Z3 Suppl
y
S1 20 15 31 1
S2 17 16 33 1
S3 18 19 27 1
Dema
1 1 1
nd
127
solution without having to make a direct comparison of every solution. It
works on the principle of reducing the given cost matrix (the
principle of matrix reduction) to a matrix of opportunity costs,
which means that by subtracting and adding appropriate numbers in the
cost table or matrix ,we can reduce the problem to a matrix of
opportunity costs.
128
Draw the lines by trial and error but always try to cover two or
more zeros with one line.
b. Count the number of the lines
If the number of lines equals either the number of rows or
columns in the table, an optimal assignment can be made. If
the number of lines is less than the number of rows or
columns, an improvement is possible (we proceed to step 4).
If more than one optimal solution exists, a trial-and –error approach can be
used to find all possible combination assignments in the zero cells.
Example:
1. A computer center has three programmers. The center wants three
application programs to be developed. The head of the computer center,
after studying carefully the programs to be developed, estimate the
computer time in minutes required by the experts for the application
programs as follows:
129
Programs
Programmers
(Estimated time in
minute)
A B
1 120 100 80
2 80 90 110
3 110 140 120
Assign the programmers to the programs in such a way that the total
computer time is minimum.
Solution:
Steps 1 and 2:
a. Perform row reduction
The minimum time element in row 1, 2, and 3 is 80, 80 and 110
respectively. Subtract those elements from all elements in there respective
row. The reduced time matrix is:
Table: After row reduction
A B
-80 1 40 20 0
-80 2 0 10 30
-110 3 0 30 10
b. Column reduction
Since column B has no one ‘0’, perform also column reduction. The
minimum time element in columns A, B and C is 0, 10 and 0 respectively.
Subtract these elements from all elements in their respective column to
get the reduced time matrix.
Table: After column reduction
A B
1 40 10 0
2 0 0 30
3 0 20 10
130
a. Draw the minimum number of horizontal and /or vertical lines necessary
to cover all zero times (costs).
Table: Test of optimal assignment
A B
1 40 10 0
2 0 0 30
3 0 20 10
A B
1 40 10
2 3 30
3 1
0
0 10
0
0
0
Note:
In optimal assignment, start with row/column having one zero and
cancel the alternative zeros(x)
131
2. A department has five employees with five jobs to be performed .The
time (in hours) each man will take to perform each job is given in the
effectiveness matrix.
Employees
I II III IV V
A 10 5 13 15 16
B 3 9 18 13 6
C 10 7 2 2 2
7 11 9 7 12
Jobs
7 9 10 4 12
E
Solution:
Table: After row reduction
I II III IV V
-5 A 5 0 8 10 11
-3 B 0 6 15 10 3
-2 C 8 5 0 0 0
0 5 2 0 5
-7 D
3 5 6 0 8
-4 E
132
a. Select the smallest entry (element) among all uncovered elements
by the lines and subtract it from all entries in the uncovered cells.
b. Add the same smallest entry to those cells in which lines
intersect (cells with two lines them).
c. Cells with one line through them are unchanged to the improved
table.
I II III IV V
A 7 0 8 12 11
B 0 4 13 10 1
C 10 5 0 2 0
0 2 0 0 2
D
3 3 4 0 6
E
133
I II III IV V
A 7 8 12 11
B 4 13 10 1
0
C 10 5 2
D 0 2 2
0
E 3 3 4 6
0
0
0 0
E IV 4
134
Table: After row reduction Table:
After column reduction
A B C A B
-15 1 5 0 16 1 5 0 7
-16 2 1 0 17 2 1 0 8
-18 3 0 1 9 3 0 1 0
A B
1 4 0 6
2 0 0 7
3 0 2 0
A B C
1 6
4
0
2 7
0 0
3 2
0 0
135
Job Machine Cost(in $)
1 B 15000
2 A 17000
3 C 27000
Total optimal assignment=$59000
Example:
136
1. Given this final assignment table, identify two optimal solutions.
Machine
(Estimated time in
minute)
1 2
A 4 0 0
Job B 0 3 2
C 1 0 0
Solution
The first assignment must be B-1, because B-1 is the only 0 that appears
in a single row or column. Having made that assignment, there are two
choices for the remaining two rows, and two choices for the remaining two
columns. This results in two possible solutions, as shown:
Machine Machine
(Estimated time in (Estimated time in
minute) minute)
1 2 1 2
A 4 0 0 A 4 0 0
Job B 0 3 2 Job B 0 3 2
C 0
1 0
C 1
0 0 0 0
3 58 56 64 6
62 60 67 7
8
4
0
Required:
a. Determine the minimum-cost assignment for this problem
b. What is the total cost for the optimal assignment?
c. Is there an alternative optimal assignment? What is it? Calculate the
total cost for the alternate optimal assignment.
137
Solution:
Table: After row reduction Table: After column
reduction
A B D
A B D 1 4 16 5 0
1 6 16 11 0 2 1 0 0 2
2 3 0 6 2 3 0 0 2 1
3 2 0 8 1
1
2
1
2 4 0 0 1
4 2 0 7 0
0
A B D
1 4 16 5
2 1 2
3 2 0
1
0 0 1
2
4 1
0 0 0
a. Optimal Assignment 0 0 b.
Operator Machine Cost(in $)
4 A 62
3 B 56
2 C 58
1 D 64
Total cost =$240
c. Yes!
Alternative optimal assignment
Operator Machine Cost(in $)
1 D 64
2 C 58
3 A 58
4 B 60
Total cost=$240
138
problem may be solved by converting the given maximization problem into
a minimization problem by the following procedure:
i. Find the largest profit coefficient in the entire.
ii. Subtract each entry in the original table from the largest
profit coefficient.
The transformed assignment problem so obtained can be solved by
using the Hungarian method.
Example
1. A company has four territories open, and four salesmen available for
an assignment. The territories are not equally rich in their sales potential.
Based on the past performance, the following table shows the annual
sales (in $) that can be generated by each salesman in each territory.
Find the optimal assignment and the maximum expected total sales.
Territory
I II III IV
A 42 35 28 21
B 30 25 20 15
Salesmen
C 30 25 20 15
D 24 20 16 12
Solution:
139
I II III IV
A 0 2 4 7
B 0 0 0 1
C 0 0 0 1
D 2 1 0 0
Assignment set I
Assignment set II
___________________________________
_________________________________
Salesman Territory Sales($) Salesman Territory Sales($)
A I 42 A I 42
B III 20 B II 25
C II 25 C III 20
D IV 12 D IV 12
Total= $ 99 Total= $ 99
___________________________________ _________________________________
Exercise
Five salesmen are to be assigned to five territories. Based on the past
performance, the following table shows the annual sales man in each
territory. Find the optional assignment.
T1 T2 T3 T4 T5
S1 26 14 10 12 9
S2 31 27 30 14 16
S3 15 18 16 25 30
S4 17 12 21 30 25
S5 20 19 25 16 10
140
Example
MEGA printing press, a publisher headquartered in Addis Ababa, wants
to assign three recently hired college graduates, Marta, Bakcha and
Hirut to regional sales districts in Mekelle, Bahir Dare, and DireDawa.
But the firm also has an opening in Gambela and would send one of the
three there if it were more economical than a move to Mekelle, Bahir
Dar and Dire Dawa. It will cost Br. 1,000 to relocate Marta to Gambela,
Br. 800 to relocate Baklcha there, and Br. 1,500 to move Hirut. What is
the optimal assignment of personnel to offices?
Offic
e Mekelle Bahir Dare Dire Dawa
Hire
Marta Br.800 Br 1,100 Br 1,200
Bekcha Br. 500 Br 1,600 Br 1,300
Hirut Br. 500 Br 1,000 Br 2,300
Solution
To balance the problem, we add a dummy row (person) with a zero
relocation cost to each city.
City
C1 C2 C3 C4(Gambe
la)
P1 800 1,100 1,200 1,000
P2 500 1,600 1,300 800
Person P3 500 1,000 2,300 1,500
Dummy 0 0 0 0
C1 C2 C3 C4
C1 C2 C3 C4
P1 0 300 400 200
P1 100 0 100 0
P2 0 1,100 800 300
P2 0 700 400 0
P3 0 500 1800 1000
P3 0 100 1400 700
Dummy 0 0 0 0
Dummy 400 0 0 100
Thus, an optimal assignment can be made at zero cells (squares).
Person City
Dummy(No person) Dire Dawa
Hirut Mekelle
Bekcha Gambela
Cost =Br.(0+500+800+1,100)=Br.2,400
D. Restrictions on Assignments
141
In certain instances, it may happen that a particular match or pairing may
be either undesirable or otherwise unacceptable. For example, an
employee may not have the skills necessary to perform a particular job or
a machine may not be equipped to handle a particular operation. In such
cases, the cost of performing that particular activity by a particular
resource is considered to be very large (written as M or ∞ ) so as to
prohibit the entry of this pair of employee-job into the final solution. When
such a restriction is present, a letter (M) is often placed in the table in the
position that would represent a paring. Analysis is performed as usual
except the M is ignored throughout the analysis. That is, M is not used in
any reductions, nor is any value added to it or subtracted from it during
the course of the analysis.
Example
1. In the modification of a plant layout of a factory four new machines
M1, M2, M3 and M4 are to be installed in a machine shop. There are five
vacant places A, B, C, D and E available. Because of limited space,
machine M2 can not be placed at C and M3 cannot be placed at A. the
cost of placing of machine at place i (in $) is shown below.
Location
A B C D E
M1 9 11 15 10 11
Machine M2 12 9 - 10 9
M3 - 11 14 11 7
M4 14 8 12 7 8
A B C D E
M1 9 11 15 10 11
M2 12 9 M 10 9
M3 M 11 14 11 7
M4 14 8 12 7 8
M5 0 0 0 0 0
142
Table: Optimal assignment
A B C D E
M1 0
2 6 1 2
3 M 1
M2 0 0
M3 M 4 7 4
01
M4 7 1 5
0
M5
0 0 0 0 0
The total minimum cost ($) and optimal assignments made are as
follows:
M1 A 9
M2 B 9
M3 E 7
M4 D 7
M5 (Dummy) C 0
Total = $32
143
Exercise:
1. A car rental company has one car at each of five depots a, b, c, d and
e. A customer in each of the five towns A, B, C, D and E requires a car.
The distance in (in kilometers) between the depots and towns where the
customers are, is given in the following distance matrix:
Depots
a b c d e
A 160 130 175 190 200
B 135 120 130 160 175
C 140 110 155 170 185
D 50 50 90 80 110
E 55 35 70 80 105
Towns
144
a b c d e
A 8 2 X 5 4
B 10 9 2 8 4
Pilot
C 5 4 9 6 X
D 3 6 2 8 7
E 5 6 10 4 3
145