mca m II

MODULE II
DUALITY IN LINEAR PROGRAMMING
Every LPP (called the primal)is associated with another LPP(called its
dual).Either of the problem can be considered as primal with the other one as dual.
Formation of dual problems:For formulating dual problem, first we bring the problem in the canonical form.
Then
1) Change the objective function of maximization in the primal into
minimization one in the dual and vice versa.
2) The number of variable in the primal will be the number of constraints in the
dual problem and vice versa.
3) The cost coefficients 𝐢1 , 𝐢2 … 𝐢𝑛 in the objective function of the primal will be
the RHS constant of the constraints in the dual and vice versa.
4) In forming the constraints for the dual ,we consider the transpose of the body
matrix of the primal problem.
5) The variables in both problems are non-negative.
6) If the variable in the primal is unrestricted in sign, then the corresponding
constraint in the dual will be an equation and vice versa.
Definition of the dual problem:Let the primal problem be
Max 𝑧 = 𝐢1 π‘₯1 + 𝐢2 π‘₯2 + β‹― + 𝐢𝑛 π‘₯𝑛 Subject to
π‘Ž11 π‘₯1 + π‘Ž12 π‘₯2 + β‹― + π‘Ž1𝑛 π‘₯𝑛 ≀ 𝑏1
π‘Ž21 π‘₯1 + π‘Ž22 π‘₯2 + β‹― + π‘Ž2𝑛 π‘₯𝑛 ≀ 𝑏2
…………………………
π‘Žπ‘š1 π‘₯1 + π‘Žπ‘š2 π‘₯2 + β‹― + π‘Žπ‘šπ‘› π‘₯𝑛 ≀ π‘π‘š
Module 2
Page 1
π‘₯1 , π‘₯2 , … π‘₯𝑛 β‰₯ 0.
The dual problem be defined as
Min 𝑧 β€² = 𝑏1 𝑦1 + 𝑏2 𝑦2 + β‹― + π‘π‘š π‘¦π‘š Subject to
π‘Ž11 𝑦1 + π‘Ž21 𝑦2 + β‹― + π‘Žπ‘š1 π‘¦π‘š β‰₯ 𝐢1
π‘Ž12 𝑦1 + π‘Ž22 𝑦2 + β‹― + π‘Žπ‘š2 π‘¦π‘š β‰₯ 𝐢2
…………………………
π‘Ž1𝑛 𝑦1 + π‘Ž2𝑛 𝑦2 + β‹― + π‘Žπ‘šπ‘› π‘¦π‘š ≀ 𝐢𝑛
𝑦1 , 𝑦2 , … π‘¦π‘š β‰₯ 0.
Where 𝑦1 , 𝑦2 , … π‘¦π‘š are called dual variables.
Module 2
Page 2
Problems:1)Write the dual of the following primal problem
Max Z = π‘₯1 + 2π‘₯2 + π‘₯3
Subject to π‘₯1 + 2π‘₯2 βˆ’ π‘₯3 ≀ 2
βˆ’2π‘₯1 + π‘₯2 βˆ’ 5π‘₯3 β‰₯ βˆ’6
4π‘₯1 + π‘₯2 + π‘₯3 ≀ 6
π‘₯1 , π‘₯2 , π‘₯3 β‰₯ 0
Canonical form is
Max Z = π‘₯1 + 2π‘₯2 + π‘₯3
Subject to π‘₯1 + 2π‘₯2 βˆ’ π‘₯3 ≀ 2
2π‘₯1 βˆ’ π‘₯2 + 5π‘₯3 ≀ 6
4π‘₯1 + π‘₯2 + π‘₯3 ≀ 6
π‘₯1 , π‘₯2 , π‘₯3 β‰₯ 0
Dual problem is
Min Z ’ = 2𝑦1 + 6𝑦2 + 6𝑦3
Subject to 2𝑦1 + 2𝑦2 + 4𝑦3 β‰₯ 1
𝑦1 βˆ’ 𝑦2 + 𝑦3 β‰₯ 2
βˆ’π‘¦1 + 5𝑦2 + 𝑦3 β‰₯ 1
𝑦1 , 𝑦2 , 𝑦3 β‰₯ 0
2) Find the dual of the following LPP
Max Z =3π‘₯1 βˆ’ π‘₯2 + π‘₯3
Subject to 4π‘₯1 βˆ’ π‘₯2 ≀ 8
8π‘₯1 + π‘₯2 + 3π‘₯3 β‰₯ 12
5π‘₯1 βˆ’ 6π‘₯3 ≀ 13
π‘₯1 , π‘₯2 , π‘₯3 β‰₯ 0
Canonical form is
Max Z =3π‘₯1 βˆ’ π‘₯2 + π‘₯3
Subject to 4π‘₯1 βˆ’ π‘₯2 ≀ 8
Module 2
Page 3
βˆ’8π‘₯1 βˆ’ π‘₯2 βˆ’ 3π‘₯3 ≀ βˆ’12
5π‘₯1 + 0π‘₯2 βˆ’ 6π‘₯3 ≀ 13
π‘₯1 , π‘₯2 , π‘₯3 β‰₯ 0
Dual problem is
Min Z ’ = 8𝑦1 βˆ’ 12𝑦2 + 13𝑦3
Subject to 4𝑦1 βˆ’ 8𝑦2 + 5𝑦3 β‰₯ 3
βˆ’π‘¦1 βˆ’ 𝑦2 β‰₯ βˆ’1
βˆ’3𝑦1 βˆ’ 6𝑦3 β‰₯ 1
𝑦1 , 𝑦2 , 𝑦3 β‰₯ 0
3)Find the dual of the following LPP
Min Z =2π‘₯2 + 5π‘₯3
Subject to π‘₯1 + π‘₯2 β‰₯ 2
2π‘₯1 + π‘₯2 + 6π‘₯3 ≀ 6
π‘₯1 βˆ’ π‘₯2 + 3π‘₯3 = 4
π‘₯1 , π‘₯2 , π‘₯3 β‰₯ 0
Canonical form is
Min Z =0π‘₯1 + 2π‘₯2 + 5π‘₯3
Subject to π‘₯1 + π‘₯2 + π‘₯3 β‰₯ 2
βˆ’2π‘₯1 βˆ’ π‘₯2 βˆ’ 6π‘₯3 β‰₯ βˆ’6
π‘₯1 βˆ’ π‘₯2 + 3π‘₯3 β‰₯ 4
βˆ’π‘₯1 + π‘₯2 βˆ’ 3π‘₯3 β‰₯ βˆ’4
π‘₯1 , π‘₯2 , π‘₯3 β‰₯ 0
Dual problem is
Max Z ’ = 2𝑦1 βˆ’ 6𝑦2 + 4𝑦 β€² 3 βˆ’ 4𝑦′′3
Subject to 𝑦1 βˆ’ 2𝑦2 + 𝑦 β€² 3 βˆ’ 𝑦′′3 ≀ 0
𝑦1 βˆ’ 𝑦2 βˆ’ 𝑦′3 + 𝑦′′3 ≀ 2
βˆ’6𝑦2 + 3𝑦′3 βˆ’ 3𝑦′′3 ≀ 5
𝑦1 , 𝑦2 , 𝑦′3 , 𝑦′′3 β‰₯ 0
Module 2
Page 4
ie, Max Z ’ = 2𝑦1 βˆ’ 6𝑦2 + 4(𝑦 β€² 3 βˆ’ 𝑦 β€²β€² 3 )
Subject to 𝑦1 βˆ’ 2𝑦2 + (𝑦 β€² 3 βˆ’ 𝑦 β€²β€² 3 ) ≀ 0
𝑦1 βˆ’ 𝑦2 βˆ’ (𝑦 β€² 3 βˆ’ 𝑦′′3 ≀ 2
βˆ’6𝑦2 + 3(𝑦′3 βˆ’ 𝑦 β€²β€² 3 ) ≀ 5
𝑦1 , 𝑦2 , 𝑦′3 , 𝑦′′3 β‰₯ 0
Max Z ’ = 2𝑦1 βˆ’ 6𝑦2 + 4𝑦3
Subject to 𝑦1 βˆ’ 2𝑦2 + 𝑦3 ≀ 0
𝑦1 βˆ’ 𝑦2 βˆ’ 𝑦3 ≀ 2
βˆ’6𝑦2 + 3𝑦3 ≀ 5
𝑦1 , 𝑦2 β‰₯ 0, 𝑦3 is unrestricted.
4) Find the dual of the following LPP
Max Z =x+3y
Subject to 2π‘₯ + 3𝑦 β‰₯ 4
3π‘₯ + 4𝑦 = 5
π‘₯, 𝑦 β‰₯ 0
Canonical form is Max Z = x+2y’-2y’’
Subject to -2x-3y’+3y’’≀ βˆ’4
3x+4y’-4y’’≀ 5
-3x-4y’+4y’’≀ βˆ’5
x,y’,y’’β‰₯ 0
Dual problem is
Min Z ’ = βˆ’4𝑦1 + 5𝑦′2 βˆ’ 5𝑦 β€²β€² 2
Subject to βˆ’2𝑦1 + 3𝑦 β€² 2 βˆ’ 3𝑦 β€²β€² 2 β‰₯ 1
βˆ’3𝑦1 + 4𝑦′2 βˆ’ 4𝑦′′2 β‰₯ 2
βˆ’3𝑦1 βˆ’ 4𝑦 β€² 2 + 4𝑦 β€²β€² 2 β‰₯ βˆ’2
𝑦1 , 𝑦′2 , 𝑦′′2 β‰₯ 0
Module 2
Page 5
ie, Min Z ’ = βˆ’4𝑦1 + 5(𝑦′2 βˆ’ 5𝑦 β€²β€² 2 )
Subject to βˆ’2𝑦1 + 3(𝑦 β€² 2 βˆ’ 𝑦 β€²β€² 2 ) β‰₯ 1
βˆ’3𝑦1 + 4(𝑦′2 βˆ’ 𝑦′′2) β‰₯ 2
βˆ’3𝑦1 βˆ’ 4(𝑦 β€² 2 βˆ’ 𝑦 β€²β€² 2 ) β‰₯ βˆ’2
𝑦1 , 𝑦′2 , 𝑦′′2 β‰₯ 0
ie, ie, Min Z ’ = βˆ’4𝑦1 + 5𝑦2
Subject to βˆ’2𝑦1 + 3𝑦2 β‰₯ 1
βˆ’3𝑦1 + 4𝑦2 β‰₯ 2
βˆ’3𝑦1 βˆ’ 4𝑦2 β‰₯ βˆ’2
𝑦1 β‰₯ 0, 𝑦2 is unrestricted.
Home work:1) Find the dual of the following LPP
Min Z=4π‘₯1 + 5π‘₯2 βˆ’ 3π‘₯3
Subject to π‘₯1 + π‘₯2 + π‘₯3 = 22
3π‘₯1 + 5π‘₯2 βˆ’ 2π‘₯3 ≀ 65
π‘₯1 + 7π‘₯2 + 4π‘₯3 β‰₯ 120
π‘₯1 , π‘₯2 β‰₯ 0 π‘₯3 is unrestricted.
Duality Method:1) Write down the dual of the following LPP and solve it. Also write the solution
of the primal.
Max Z= 4π‘₯1 + 2π‘₯2
Subject to π‘₯1 + π‘₯2 β‰₯ 3
π‘₯1 βˆ’ π‘₯2 β‰₯ 2
π‘₯1 , π‘₯2 β‰₯ 0
Canonical form is
Max Z= 4π‘₯1 + 2π‘₯2
Subject to - π‘₯1 βˆ’ π‘₯2 ≀ βˆ’3
- π‘₯1 + π‘₯2 ≀ βˆ’2
π‘₯1 , π‘₯2 β‰₯ 0
Module 2
Page 6
Its dual problem is
Min Z ’= βˆ’3𝑦1 βˆ’ 2𝑦2
Subject to - 𝑦1 βˆ’ 𝑦2 β‰₯ 4
βˆ’π‘¦1 + 𝑦2 β‰₯ 2
𝑦1 , 𝑦2 β‰₯ 0
Max Z’ = 3𝑦1 + 2𝑦2 + 0𝑆1 + 0𝑆2 βˆ’ 𝑀𝐴1 βˆ’ 𝑀𝐴2
Subject to - 𝑦1 βˆ’ 𝑦2 βˆ’ 𝑆1 + 𝐴1 = 4
βˆ’π‘¦1 + 𝑦2 βˆ’ 𝑆2 + 𝐴2 = 2
Initial BFS is 𝐴1 = 4, 𝐴2 = 2
Cj
XB
4
2
3
y1
-1
-1
2M
2M-3
2
y2
-1
1
0
-2↑
0
S1
-1
0
M
M
0
S2
0
-1
M
M
-M
A1
1
0
-M
0
-M
A2
0
1β†’
-M
0
Cj
XB
6
2
3
y1
-2
-1
2M-2
2M-5
2
y2
0
1
2
0
0
S1
-1
0
M
M
0
S2
-1
-1
M-2
M-2
-M
A1
1
0
M-2
0
-M
A2
-
CB
Basis
-M
A1
-M
A2
Zj
Zj-Cj
A2 leaves and 𝑦2 π‘’π‘›π‘‘π‘’π‘Ÿπ‘ .
CB
-M
2
Zj
Zj-Cj
Basis
A1
y2
Here all Zj-Cj β‰₯ 0 ,so optimal solution is obtained. Here the artificial variable A1
appears in the basis at positive level. So,the dual problem has no basic feasible
solution and the primal problem also has no basic feasible solution.
2) Apply the principle of duality to solve the LPP
Min Z= 2π‘₯1 + 2π‘₯2
Subject to 2π‘₯1 + 4π‘₯2 β‰₯ 1
π‘₯1 + 2π‘₯2 β‰₯ 1
Module 2
Page 7
2π‘₯1 + π‘₯2 β‰₯ 1
π‘₯1 , π‘₯2 β‰₯0.Also read the solution of the primal.
Its dual is
Max Z ’ = 𝑦1 + 𝑦2 + 𝑦3
Subject to 2𝑦1 + 𝑦2 + 2𝑦3 ≀ 2
4𝑦1 + 2𝑦2 + 𝑦3 ≀ 2
𝑦1 , 𝑦2, 𝑦3 β‰₯ 0
Max Z ’ = 𝑦1 + 𝑦2 + 𝑦3 + 0𝑆1 + 0𝑆2
Subject to 2𝑦1 + 𝑦2 + 2𝑦3 + 𝑆1 = 2
4𝑦1 + 2𝑦2 + 𝑦3 +𝑆2 = 2
𝑦1 , 𝑦2, 𝑦3 β‰₯ 0
Initial BFS is 𝑆1 = 2, 𝑆2 = 2
Cj
1
1
1
0
0
Min
𝑋𝐡
𝑦1>0
CB
0
0
Zj
Zj-Cj
Basis
S1
S2
XB
2
2
y1
2
4
0
-1↑
y2
1
2
0
-1
y3
2
1
0
-1
S1
1
0
0
0
S2
0
1β†’
0
0
1
1
1
0
0
2
1/2
S2 leaves and y1 enters
Cj
Min
𝑋𝐡
𝑦1>0
CB
0
0
Zj
Zj-Cj
Module 2
Basis
S1
y1
XB
1
1/2
y1
0
1
1
0
y2
0
1/2
1/2
-1/2
y3
3/2
1/4
1/4
-3/4↑
S1
1
0
0
0
S2
-1/2
1/4
1/4
1/4
2/3β†’
2
Page 8
CB
0
0
Zj
Zj-Cj
CB
0
0
Zj
Zj-Cj
Basis
y3
y1
Cj
XB
2/3
1/3
1
y1
0
1
1
0
1
y2
0
1/2
1/2
-1/2↑
1
y3
1
0
1
0
0
S1
2/3
-1/6
1/2
1/2
0
S2
-1/3
1/3β†’
0
0
Basis
y3
y2
Cj
XB
2/3
2/3
1
y1
0
2
2
1
1
y2
0
1
1
0
1
y3
1
0
1
0
0
S1
2/3
-1/3
1/3
1/3
0
S2
-1/3
2/3
1/3
1/3
All Zj-Cjβ‰₯ 0, π‘†π‘œ π‘œπ‘π‘‘π‘–π‘šπ‘Žπ‘™ π‘ π‘œπ‘™π‘’π‘‘π‘–π‘œπ‘› 𝑖𝑠 obtained .Max Z ’= 4/3
1
2
3
3
Solution of the primal problem is π‘₯1 = , π‘₯2 =
Min Z=4/3
Home work:Solve by applying duality theory
a) Min Z = π‘₯1 βˆ’π‘₯2 + π‘₯3
Subject to π‘₯1 βˆ’ π‘₯3 β‰₯ 4
π‘₯1 βˆ’ π‘₯2 + 2π‘₯3 β‰₯ 3
π‘₯1 , π‘₯2 , π‘₯3 β‰₯ 0
b) Max Z = 3π‘₯1 + 2π‘₯2
Subject to π‘₯1 + π‘₯2 β‰₯ 1
π‘₯1 + π‘₯2 ≀ 7
π‘₯1 + 2π‘₯2 ≀ 10
π‘₯1 , π‘₯2 β‰₯ 0
Module 2
Page 9
Dual Simplex Method:The dual simplex method is very similar to the regular simplex method, the only
difference lies in the criterion used for selecting a variable to enter the basis and to
leave the basis. In dual simplex method ,we first select the variable to leave the
basis and then the variable to enter the basis.
Dual simplex Algorithm:Step1:- Convert the problem to maximization form if it is initially in the
minimization form.
Step 2:-Convert β‰₯ type constraints if any to ≀ type by multiplying both sides by-1.
Step 3 :- Express the problem in standard form by introducing slack variables.
Obtain the initial basic solution ,display this solution in the simplex table.
Step 4:- Test the nature of Zj-Cj.
Case1:- If all Zj-Cj β‰₯ 0 and all XBi β‰₯ 0 then the current solution is an optimum
feasible solution.
Case 2:- If all Zj-Cj β‰₯ 0 and at least one XBi < 0 then the current solution is not
optimum basic feasible solution. In this case go to next step.
Case 3:- If any Zj-Cj<0 then the method fails.
Step 5:- In this step we find the leaving variable which is the basic variable
corresponding to the most negative value of XBi .Let xk be the leaving variable,
,ie,XBk = min{XBi,XBi<0.}
To find the leaving variable entering the basis,we compute the ratio between
Zj-Cj row and the key row.ie, compute {
π‘π‘—βˆ’πΆπ‘—
π‘Žπ‘–π‘˜
, π‘Žπ‘–π‘˜ < 0}.The entering variable is
the one having the maximum ratio. If there is no such ratio with negative
denominator, then the problem does not have a feasible solution.
Step 6:- Convert the leading element to unity and all other element of key column
to zero to get an improved solution.
Step 7:- Repeat steps (4) & (5) until either an optimum BFS is attained or till
indication of no feasible solution is obtained.
Module 2
Page 10
1) Use dual simplex method to solve the following LPP
Max Z = -3π‘₯1 βˆ’ π‘₯2
Subject to the constraints π‘₯1 βˆ’ π‘₯2 β‰₯ 1
2π‘₯1 + 3π‘₯2 β‰₯ 2
π‘₯1 , π‘₯2 β‰₯ 0
Max Z = -3π‘₯1 βˆ’ π‘₯2
Subject to the constraints βˆ’π‘₯1 + π‘₯2 ≀ βˆ’1
βˆ’2π‘₯1 βˆ’ 3π‘₯2 ≀ βˆ’2
π‘₯1 , π‘₯2 β‰₯ 0
Max Z = -3π‘₯1 βˆ’ π‘₯2 + 0𝑆1 + 0𝑆2
Subject to the constraints βˆ’π‘₯1 + π‘₯2 + 𝑆1 = βˆ’1
βˆ’2π‘₯1 βˆ’ 3π‘₯2 + 𝑆2 = βˆ’2
π‘₯1 , π‘₯2 β‰₯ 0
Cj
-3
-1
0
0
CB
Basis
XB
x1
x2
S1
S2
0
S1
-1
-1
1
1
0
0
S2
-2
-2
-3
0
1β†’
Zj
0
0
0
0
Zj-Cj
3
1
0
0
Max
-3/2
-1/3↑
π‘π‘—βˆ’πΆπ‘—
𝑆2 <0
CB
0
-1
Zj
Zj-Cj
Max
Basis
S1
x2
Cj
XB
-1/3
2/3
-3
x1
-1/3
2/3
-2/3
7/3
-7
-1
x2
0
1
-1
0
0
S1
1
0
0
0
0
S2
-1/3β†’
-1/3
1/3
1/3
-1↑
π‘π‘—βˆ’πΆπ‘—
𝑆1 <0
Module 2
Page 11
CB
0
-1
Zj
Zj-Cj
Basis
S2
x2
Cj
XB
1
1
-3
x1
1
1
-1
2
-1
x2
0
1
-1
0
0
S1
-3
-1
1
1
0
S2
1
0
0
0
All Zj-Cjβ‰₯ 0 and all XBi’s are positive .So optimum solution is obtained.
x1 =0 and x2= 1 .∴ π‘€π‘Žπ‘₯ 𝑍 = βˆ’1
2) Use dual simplex method to solve the following LPP
Min Z = 5π‘₯1 + 6π‘₯2
Subject to the constraints π‘₯1 + π‘₯2 β‰₯ 2
4π‘₯1 + π‘₯2 β‰₯ 4
π‘₯1 , π‘₯2 β‰₯ 0
Max Z’ = -5π‘₯1 βˆ’ 6π‘₯2
Subject to the constraints βˆ’π‘₯1 βˆ’ π‘₯2 ≀ βˆ’2
βˆ’4π‘₯1 βˆ’ π‘₯2 ≀ βˆ’4
π‘₯1 , π‘₯2 β‰₯ 0
Max Z’ = -5π‘₯1 βˆ’ 6π‘₯2 +0𝑆1 + 0𝑆2
Subject to the constraints βˆ’π‘₯1 βˆ’ π‘₯2 + 𝑆1 = βˆ’2
βˆ’4π‘₯1 βˆ’ π‘₯2 + 𝑆2 = βˆ’4
π‘₯1 , π‘₯2 β‰₯ 0
CB
0
0
Zj
Zj-Cj
Max
Basis
S1
S2
Cj
XB
-2
-4
-5
x1
-1
-4
0
5
-5/4↑
-6
x2
-1
-1
0
6
-6
0
S1
1
0
0
0
0
S2
0
1β†’
0
0
π‘π‘—βˆ’πΆπ‘—
𝑆2 <0
Module 2
Page 12
CB
0
-5
Zj
Zj-Cj
Max
Basis
S1
x1
Cj
XB
-1
1
-5
x1
0
1
-5
0
-6
x2
-3/4
1/4
-5/4
19/4
-19/3
0
S1
1
0
0
0
0
S2
-1/4β†’
-1/4
5/4
5/4
-5↑
Basis
S2
x1
Cj
XB
4
2
-5
x1
0
1
-5
0
-6
x2
3
1
-5
1
0
S1
-4
-1
5
5
0
S2
1
0
0
0
π‘π‘—βˆ’πΆπ‘—
𝑆1 <0
CB
0
-5
Zj
Zj-Cj
All Zj-Cjβ‰₯ 0 and all XBi’s are positive .So optimum solution is obtained.
x1 =2 and x2= 0 .∴ π‘€π‘Žπ‘₯ 𝑍 = βˆ’10 and min Z =10
3) Use dual simplex method to solve the following LPP
Max Z = -3π‘₯1 βˆ’ 2π‘₯2
Subject to the constraints π‘₯1 + π‘₯2 β‰₯ 1
π‘₯1 + π‘₯2 ≀ 7
π‘₯1 + 2π‘₯2 β‰₯ 10
π‘₯2 ≀ 3
π‘₯1 , π‘₯2 β‰₯ 0
Module 2
Page 13
TRANSPORTATION PROBLEM
Transportation problem is a special kind of LPP in which the objective is to
transport various quantities of a single homogeneous commodity that are initially
stored at various origins to different destinations in such a way that the
transportation cost is minimum.
Let m be the no. of sources and n be the no. of destinations ,ai be the supply at
the source I ,bj be the demand at the destination j,Cij be the cost of transportation
per unit from the source I to the destination j,Xij be the number of units to be
transported from the source i to destination j.
In the tabular form it is written as
Destinations
Destinations
Sources
O1
O2
O3
……
Om
Demand
D1
D2
D3
………..
Dn
Supply
C11
C21
C31
……
Cm1
b1
C12
C22
C32
…..
Cm2
b2
C13
C23
C33
…..
Cm3
b3
……….
…………
…………
……….
………
C1n
C2n
C3n
a1
a2
a3
Cmn
bn
am
The linear programming model representing the transportation problem is
given by ,
𝑛
Minimize Z = βˆ‘π‘š
𝑖=1 βˆ‘π‘—=1 𝐢𝑖𝑗𝑋𝑖𝑗
Subject to the constraints βˆ‘π‘›π‘—=1 𝑋𝑖𝑗 = π‘Žπ‘– , 𝑖 = 1,2,3 … π‘š
βˆ‘π‘š
𝑖=1 𝑋𝑖𝑗 = 𝑏𝑗, 𝑗 = 1,2,3, … 𝑛.
Xijβ‰₯ 0 π‘“π‘œπ‘Ÿ 𝑖, 𝑗.
Module 2
Page 14
Types of Transportation problem.
i) Balanced transportation problem.
If the sum of the supplies of all the sources is equal to the sum of the demands
of all the destinations, then the problem is termed as balanced transportation
𝑛
problem. This may be represented by the relation βˆ‘π‘š
𝑖=1 π‘Žπ‘– = βˆ‘π‘—=1 𝑏𝑗
ii) ) Unbalanced transportation problem.
If the sum of the supplies of all the sources is not equal to the sum of the
demands of all the destinations, then the problem is termed as unbalanced
𝑛
transportation problem. This may be represented by the relation βˆ‘π‘š
𝑖=1 π‘Žπ‘– β‰  βˆ‘π‘—=1 𝑏𝑗
Feasible solution:- Any set of nonnegative allocations (Xij>0)which satisfies the
row and column sum is called a feasible solution.
Basic feasible solution:-A feasible solution is called a basic feasible solution if the
number of non-negative allocations is equal to m+n-1 where m is the number of
rows ,n is the no. of columns in a transportation table.
Non degenerate BFS:- Any feasible solution to at transportation problem
containing m origins and n destinations is said to be non degenerate,if it contains
(m+n-1) occupied cells and each allocation is in independent positions.
The allocations are said to be in independent positions ,if it is impossible to
form a closed path .Closed path means by allocating horizontal and vertical lines
and all the corner cells are occupied.
Degenerate BFS:- If a BFS contains less than (m+n-1) nonnegative allocations ,it
is said to be degenerate.
Optimal solution:- Optimal solution is a feasible solution which minimizes the
total cost.
The solution of a transportation problem can be obtained in two stages, namely
initial solution and optimum solution.
Initial solution can be obtained by using any one of the three methods
Module 2
Page 15
1. North West Corner rule.(NWCR)
2. Least cost method or matrix minima method.
3. Vogel’s approximation method(VAM)
VAM is preferred over the other two methods, since the initial BFS
obtained by this method is either optimal or very close to the optimal
solution.
The cells in the transportation table can be classified as occupied cells
and unoccupied cells. The allocated cells in the transportation table are
called occupied cells and empty cells in a transportation table are called
unoccupied cells.
The improved solution of the initial BFS is called optimal solution which
is the second stage of solution that can be obtained by MODI method.
MODI(Modified Distribution method).
North West Corner Rule :Step I:- Starting with the cell at the upper left corner of the transportation
matrix we allocate as much as possible so that either the capacity of the first
row is exhausted or the destination requirement of the first column is
satisfied.ie,X11 = min{a1,b1) .
Step 2:- If b1>a1 , we move down vertically to the second row and make the
second allocation of magnitude π‘₯22 = min(π‘Ž2, 𝑏1 βˆ’ π‘₯11 ) in the cell (2,1).
If b1 < a1 ,move horizontally to the second column and make the
second allocation of magnitude π‘₯12 = π‘šπ‘–π‘›(π‘Ž1 , π‘₯11 βˆ’ 𝑏1 ) in the cell (1,2).
If b1 = a1 there is a tie for the second allocation we make the second
allocation of magnitude
π‘₯12 = π‘šπ‘–π‘›(π‘Ž1 βˆ’ π‘Ž1 , 𝑏1 ) = 0 in the cell (1,2).
π‘œπ‘Ÿ π‘₯21 = π‘šπ‘–π‘›(π‘Ž2 , 𝑏1 βˆ’ 𝑏1 ) = 0 in the cell (2,1).
Step 3:- Repeat step (1) & (2) , moving down towards the lower right corner
of the transportation table until all the rim requirements are satisfied.
Least cost method or matrix minima method:Step 1:- Determine the smallest cost in the cost matrix of the transportation
table. Let it be Cij. Allocate π‘₯𝑖𝑗 = min(π‘Žπ‘– , 𝑏𝑗 ) in the cell(i,j).
Step 2:- If π‘₯𝑖𝑗 = π‘Žπ‘– cross off the ith row of the transportation table and decrease
𝑏𝑗 𝑏𝑦 π‘Žπ‘– .Then go to step 3.
Module 2
Page 16
If π‘₯𝑖𝑗 = 𝑏𝑗 cross off the jth column of the transportation table and decrease
π‘Žπ‘– 𝑏𝑦 𝑏𝑗 .Then go to step 3.
If π‘₯𝑖𝑗 = 𝑏𝑗 = π‘Žπ‘– cross off either the ith row or the jth column of the
transportation table but not both.
Step 3:- Repeat steps (1) & (2) for the resulting reduced transportation table
until all the rim requirements are satisfied. Whenever the minimum cost is not
unique, make an arbitrary choice among the minima.
Vogel’s approximation method(VAM):Step 1:- Find the penalty cost, namely the difference between the smallest and
next smallest costs in each row and column.
Step 2:- Among the penalties as found in step(1),choose the maximum penalty.
.If this maximum penalty is more than one(ie,if there is a tie)choose any one
arbitrarily.
Step 3:- In the selected row or column as by step(2) find out the cell having the
least cost. Allocate to this cell as much as possible depending on the capacity
and rim requirements.
Step 4:- Delete the row or column which is fully exhausted. Again compute
the column and row penalties for the reduced transportation table and then go
to step (2).Repeat the procedure until all the rim requirements are satisfied.
Note:- If the column is exhausted ,then there is a change in the row penalty and
vice versa.
Optimization of the BFS:After finding an initial BFS the next task is to optimize it. First we have to check
whether the BFS obtained is optimal or not. If not we have to find another BFS
giving better (lesser) transportation cost. The following is an elegant and most
widely used method for the same.
MODIFIED DISTRIBUTION METHOD Or MODI METHOD Or
U-V METHOD:Different Steps:1. Prepare a transportation array of cost coefficients with each cost
coefficients Cij written at the right bottom corner in a small box inside the
(i,j)th cell. Leave an additional row for Ui and an additional row for Vj
whose values are to be determined.
Module 2
Page 17
2. Find out a BFS as already discussed and write the values of basic variable at
the top left corner of the corresponding cell and encircle them.
3. Consider this as the current BFS . Compute the values of U1,U2,…,Um for
the rows O1, O2,…,Om and V1,V2,…,Vn for the columns D1,D2,…,Dn so that
for each cell of basic variables we have Cij = Ui+Vj.
Since there are m+n-1 basic variables we get (m+n-1) such equations and
we have m+n values to be evaluated. So we may put zero value for one of
them arbitrary and then compute the values of others. The values of Ui may
be written in the additional column and values of Vj in the additional row.
4. Now compute values of Μ…Μ…Μ…Μ…
𝐢𝑖𝑗 = 𝐢𝑖𝑗 βˆ’ π‘ˆπ‘– βˆ’ 𝑉𝑗 for every cell of non basic
variable. They may be called relative cost coefficients or penalties of the
corresponding cell.
5. Check whether all Μ…Μ…Μ…Μ…
𝐢𝑖𝑗 are non-negative, the BFS is optimal. If yes go to
step 9 . Otherwise go to step 6.
6. The BFS is not optimal. Hence search for a better BFS. For this purpose,
identify the cell with the most negative (least) penalty cost Μ…Μ…Μ…Μ…
𝐢𝑖𝑗 . Let Μ…Μ…Μ…Μ…
πΆπ‘Ÿπ‘  be
the least (most negative) . Decide that xrs is to enter the basis . The value of
the objective function will decrease when xrs is increased. We may assign
the maximum positive value for xrs so that the constraints are not violated.
7. Suppose we assign xrs=0.Consider a loop of cells consisting of this cell of
entering variable and cells of some of the basic variables [ A loop of cells
so that starting from one cell we may jump alternately through rows and
columns from one cell to another and get back to the starting cell, visiting
the intermediate cells exactly once].
Then it may note that Ɵ is to be subtracted and added alternately in
values of basic variables in the cell of the loop, So that the constraint
equations are not violated. Determine Ɵ so that one basic variable becomes
zero(ie, non-negative) and the other basic variables being non negative.
Put this value Ɵ for xrs and revise the values of other basic variables in the
loop accordingly. Then we get a new BFS.
8. Consider the new BFS as current BFS and go to step 3.
9. The current BFS gives the optimal solution. Optimal value of the objective
function is βˆ‘ 𝐢𝑖𝑗 𝑋𝑖𝑗 where the summation is over basic cells.
Module 2
Page 18
Degeneracy in TP:In a TP , if the number of non-negative independent allocations is less
than (m+n -1), where m is the number of origins (rows) and n is the number of
destinations(columns) there exists a degeneracy .This may occur either at the initial
stage or at the subsequent iteration.
To resolve degeneracy, we adopt the following steps
1. Among the empty cell, we choose an empty cell having the least cost which
is of an independent position. If this cell is more than one, choose any one
arbitrarily.
2. To the cell as chosen in step (1) we allocate a small positive quantity πœ€ > 0.
The cells containing πœ€ are treated like other occupied cells and
degeneracy is removed by adding one (more) accordingly. For this modified
solution, we adopt the steps involved in MODI method till an optimum
solution is obtained.
Maximization case in TP:In this the objective function is to maximize the total profit for which the
profit matrix is given. For this, first we have to convert the maximization problem
into minimization by subtracting all the elements from the highest element in the
given transportation table. This modified minimization problem can be solved in
the usual manner.
Problems:1. Consider the following TP involving 3 resources and 3 destinations.
Develop a LP model.
Destination
Source
1
2
3
Demand
Module 2
1
20
10
25
200
2
10
12
30
400
3
15
9
18
400
Supply
200
300
500
1000
Page 19
Let Xij be the number of units to be transported from thr source i to the destination
j ,where i = 1,2,…,m and j = 1,2,…n. An LP model of this problem is
Min Z =20𝑋11 + 10𝑋12 + 15𝑋13 + 10𝑋21 + 12𝑋22 + 9𝑋23 + 25𝑋31 + 30𝑋32 + 18𝑋33
Subject to the constraints
𝑋11 + 𝑋12 + 𝑋13 ≀ 200,
𝑋21 + 𝑋22 + 𝑋23 ≀ 300,
𝑋31 + 𝑋32 + 𝑋33 ≀ 500,
𝑋11 + 𝑋21 + 𝑋31 β‰₯ 200,
𝑋12 + 𝑋22 + 𝑋32 β‰₯ 400,
𝑋13 + 𝑋23 + 𝑋33 β‰₯ 400,
𝑋𝑖𝑗 β‰₯ 0, 𝑖 = 1,2,3 π‘Žπ‘›π‘‘ 𝑗 = 1,2,3.
2. Convert the following TP in to a balanced one
Destination
Source
1
2
3
Demand
1
30
35
20
300
2
50
70
45
200
3
15
20
60
400
Supply
300
200
500
900/1000
Here βˆ‘ π‘Žπ‘– β‰  βˆ‘ 𝑏𝑗 . Hence it is an unbalanced TP. Since βˆ‘ 𝑏𝑗 < βˆ‘ π‘Žπ‘– , a dummy
source βˆ‘ π‘Žπ‘– βˆ’ βˆ‘ 𝑏𝑗 is included to supply the excess demand.
The cost coefficients in the dully destination are assumed as zeros. The TP is
modified by including a dummy destination with a demand of 100 units.
Module 2
Page 20
Destination
Source
1
30
35
20
300
1
2
3
Demand
2
50
70
45
200
3
15
20
60
400
4
0
0
0
100
Supply
300
200
500
1000
3. Find the initial BFS to the TP given below, by north west corner rule
Destination
Origins
D1
2
3
5
1
7
O1
O2
O3
O4
Demand
D1
O1
D2
7
3
4
6
9
D2
D3
4
1
7
2
18
D3
Supply
5
5
2
7
4
O2
8
3
3
1
O3
7
5
4
7
O4
14
1
Demand
Module 2
Supply
5
8
7
14
7
6
9
2
18
Page 21
D1
O2
D2
D3
Supply
8
2
3
1
O3
7
5
4
7
O4
14
1
Demand
6
2
9
D2
O2
2
6
18
D3
3
Supply
6
1
O3
7
4
7
O4
14
6
Demand
O3
2
9
18
D2
D3
Supply
3
4
7
7
6
2
14
O4
Demand
3
18
D3
O3
O4
Demand
Module 2
Supply
4
14
7
4
2
14
18
Page 22
The different allocations made to the cells are
D1
O1
D2
7
4
8
6
2
O3
3
3
4
O4
1
7
4
7
14
14
6
Demand
Supply
5
5
2
O2
D3
7
9
2
18
Total transportation cost = (5x2)+(2x3)+(6x3)+(3x4)+(4x7)+(14x2)= 102
4. Find the initial BFS to the TP given below, by lowest cost entry method
Destination
Origins
Module 2
F1
F2
F3
F4
Demand
W1
2
3
5
1
7
W2
7
3
4
6
9
W3
4
1
7
2
18
Supply
5
8
7
14
Page 23
The different allocations made to the cells are
W1
F1
W2
W3
2
2
7
F2
3
4
8
8
3
F3
1
7
7
5
F4
7
Demand
4
1
6
7
14
7
2
7
9
18
W1
W2
W3
F1
2
2
7
F2
3
8
8
F3
1
7
7
5
Demand
Supply
5
4
3
F4
Supply
5
7
4
1
7
6
9
7
14
7
2
18
Total transportation cost = (2x7)+(3x4)+(8x1)+(7x4)+(7x1)+(7x2) = 83
5. Find the initial BFS to the TP given below, by VAM
Destination
Origins
Module 2
O1
O2
O3
Demand
D1
11
16
21
200
D2
13
18
24
225
D3
17
14
13
275
D4
14
10
10
250
Supply
250
300
400
950
Page 24
D1
O1
D2
D3
D4
11
200
11
13
17
18
14
Demand
Diff.
D2
O1
24
225
(5)
D3
13
275
(1)
D4
50
13
17
14
Demand
Diff.
D2
O2
175
0
18
13
275
(1)
10
250
(0)
D3
D4
14
Demand
Diff.
Module 2
13
275
(1)
(3)
10
250
(0)
950
Supply
50
Diff.
(1)
300
(4)
400
(3)
Supply
300
Diff.
(4)
400
(3)
10
O3
24
175
(6)
400
10
O3
24
225
(5)
(4)
14
O2
18
300
10
O3
21
200
(5)
Diff.
(2)
14
O2
16
Supply
250
10
250
(0)
Page 25
D3
D4
O2
14
125
0
Demand
Diff.
275
0
Demand
125
275
13 1 0
125
D3
D4
Supply
250
50
11
O2
13
17
175
16
18
14
300
24
225
10
400
125
275
21
200
14
125
O3
Demand
Supply
400
10
D2
11
200
(3)
D4
D1
O1
400
(4)
10
250
(0)
D3
O3
Diff.
10
O3
13
275
(1)
Suppl
y
125
13
275
10
250
950
Total cost = (200x11)+(50x13)+(175x18)+(125x10)+(275x13)+(125x10)=12075
6. Solve the following TP
From
Module 2
F1
F2
F3
F4
Require
ment
W1
3
2
7
2
40
To
W2
4
10
11
1
6
W3
6
1
20
9
8
W4
8
5
40
14
18
W5
9
8
3
16
6
Availability
20
30
15
13
Page 26
The initial BFS is
W1
F1
20
00
F2
W2
3
4
4
0
0
9
F3
0
70
0
0
F4
bj
W3
10
7
W4
6
8
0
0
1
11
20
W5
8
18
00
2
0
0
1
40
9
6
8
9
30
5
40
6
2
0
ai
20
14
18
8
15
6
0
0
3
13
16
6
Here number of occupied cells is (m+n-1) = 8 ,so the problem is a nondegenerate one.
W1
F1
F2
F3
F4
bj
20
00
W2
3
4
0
0
9
0
70
0
0
7
2
40
2
2
2
9
2
2
25
2
22
2
6 22
2
2
02
2
02
2
2
W3
4
10
11
1
2
0
6
Here all βˆ†π‘— = [𝐢𝑖𝑗 βˆ’ (π‘ˆπ‘– + 𝑉𝑗 )]
optimal solution is obtained.
4
2
8
2
0
2
0 14 2
2 2
8 2
2
2
2
2
values2
W4
W5
ai
20
2
10
8
9
2
30
18 2
10
1 00 2
5
8
15
2
6
30
20
40 0
3
2
2
13
2
0 18
9
9
14
22 16
2
8
18
226
2
22
2
2
are positive.
2 So the BFS is optimum and
6
the
Total cost = 267.
7.
Module 2
Page 27