Unit 2 Lecturer Notes of Linear Programming of or by DR
Unit 2 Lecturer Notes of Linear Programming of or by DR
In order to develop a general solutions for LPP having more than 2 variables the LPP
must be put in the standard form.
The ideas conveyed by the graphical LP solution lay the foundation for the development
of the algebraic simplex method.
The simplex method is developed by G.B Dantzig is an iterative procedure for solving
linear programming problem expressed in standard form. In addition to this simplex
method requires constraint equations to be expressed as a canonical system form which a
basic feasible solution can be readily obtained
The solutions of any LPP by simplex algorithm the existence of an IBFS is always
assumed, the following steps help to reach an optimum solution of an LPP.
1
Procedure for Maximization
Step 1 write the given LPP in standard form
Step 2 check whether the objective function of the given LPP is to be Maximized or
minimized if its to be minimized then we convert it into a problem of maximizing using
the result.
Min z = - Max Z or ( -Z )
Step 3 check whether all bi (i=123…..m0 are non-negative. if anyone bi is –VE, then
multiply the corresponding in equation of the constraint by -1.
Step 4 Convert all the in equations of the constraint into equations by introducing slack or
surplus variable in the constraints. Put these costs equal to zero in objective cost.
Step 5 Obtain an IBFS to problem in the form identity matrix form in canonical form
1 0 0 and put it in the 1st column of simples table.
010
001
Step 7 if there are more than one –ve (Zj – Cj) then choose the most –ve of them then it
will become key column
i)if all the no’s in the key column is –ve then there is an unbounded solutions to the given
problem
ii)if at least one Xm >0 (m =123…n) then the corresponding vector Xm >=0 (m=1,2,3…n)
then the corresponding vector Xm entry the basis of solution column
2
Step 8 compute the ratios = solutions column no / key column no.
And choose the minimum of them. Let the minimum of these ratios be the key row these
variable in the basic variable column of the key row will become the leaving element or
variable.
Step 9 using the below relation to find new no of other than key row and new no for key
row also
Step 10 go to step5 and repeat the computational procedure until either an optimum
solutions is obtained or there is an indication of an unbounded solution.
Note : case 1 in case of a tie for entering basis vector. i.e., there are 2 or more Zj – Cj
which are equal and at the same time the highest –ve values then arbitrary selection of
any one of them will not alter optimality.
Case 2 in case of a tie for the leaving variable i.e., there are 2 or more min ratio column
i.e., (solution no / key column no) which are equal and greater than zero then arbitrary
select any one of them will not alter optimality. But, if the tied ratios are zeros then
charnes method of penalty should be followed.
3
Problem 1:
Use simplex method to solve the given LPP
Max Z =5x1 + 3x2
STC
x1 + x2 <= 2
5x1 + 2x2 <= 10
3x1 + 8x2 <= 12
x1, x2 >= 0
Solution:
Step 1: Since the problem is maximization problem all the constraint are <= type and the
requirements are +ve. This satisfies the simplex method procedure.
Step 2: since all the constraints are <= type we introduce the slack variables for all the
constraints as x3 >=0, x4 >=0, x5 >=0 for the I II and III constraint
4
Step 5 : since, considering sub-matrix from the matrix are which form basic variables for
the starting table of simplex
(1 0 0) (0 1 0) (0 0 1) are linearly independent column vectors of A.
Therefore, the sub Matrix is
100
B= 010
001
The corresponding variables of the sub matrix is (x3, x4 ,x5) and these variables are the
basic variables for the starting iteration of the simplex problem and there obvious initial
basic feasible solutions are (x3, x4 ,x5) = (2, 10, 12)
5 3 0 0 0
Basic Profit / soluti x2 x3 x4 x5 Min Ratio =
Variable ( Unit on x1 soln. no /key
Leaving
B V) (P/U) column No.
variable
0 2 1 1 1 0 0 2/1 = 2
xx34 0 10 5 2 0 1 0 10/5 = 2
x5 0 12 3 8 0 0 1 12/3 = 4
Max Z= =0x1 =0x1 =0x1 =0x0 =0x0
0x2+0x10 +0x5 +0x2 +0x0 +0x1 +0x0
+0x12 +0x3 +0x8 +0x0 +0x0 +0x1
-5 -3 -0 -0 -0
-5 -3 0 0 0
5
5 3 0 0 0
Basic Profit / solution x1 x2 x3 x4 x5 Min Ratio
Variable ( Unit = soln. no
B V) (P/U) /key
column
No.
x1 5 2 1 1 1 0 0
x4 0 0 0 -3 -5 1 0
x5 0 6 0 5 -3 0 1
Max Z= =5x1+ =5x1+0 =5x1 =5x0+ =5x0+
5x2+0x0+0x6 0x0 x-3 +0x-5 0x1+0 0x0+0
=10 +0x0- +0x5 -3 + 0x-3 - x0-0 x1-0
5 0
0 2 5 0 0
New Numbers for Key row other than key rows new no is
Soln.= old no / Key element found by using the following
= 2/ =2 formulae
x1 = 1/1 = 1 New No=old element – PCE*NPRE
x2 = 1/1 = 1 for x4 row new no are
x3 = 1/1 = 1 Soln. = 10-5*2= 0
x4 = 0/1 = 0 x1 = 5-5*1 = 0
x5 = 0/1 = 0 x2 = 2-5*1 = -3
x3 = 0-5*1 = -5
x4 = 1-5*0 =1
x5 = 0 -5*0 =0
for x5 row the new no are
Soln. = 12-3*2 =6
x1 =3-3*1 = 0
x2 = 8-3*1 = 5
x3 = 0-3*1 = -3
x4 = 0-3*0 = 0
x5 = 1 -3*0 = 1
6
Since, the given problems net evaluation row is +ve, then given problem as attained the
optimum
Problem no 2
Solve the given problem by simplex method
Max Z =107x1 + x2 +2 x3
STC
14x1 + x2 - 6x3 +3x4 =7
16x1 + 1/2x2 -6x3 <= 5
16x1 - 8x2 - x3 <= 0
x1, x2, x3, x4 >= 0
Solutions:
In the given problem the objective function is MaxZ and it has only three variables.
The I constraint is of standard form already slack variable is introduced as x4 >= 0 and
the value should be one but, it is having 3 due this it should be divided by three for enter
equation on both sides and II & III constraint are of <= type so we introduce x5 >= 0 x6
>= 0 as slack variable.
Then the given problem can be rewritten as
Max Z =107x1 + x2 +2 x3+ 0x4 +0 x5 +0 x6
STC
14/3x1 + 1/3 x2 – 6/3x3 +3/3x4 = 7/3
16x1 + 1/2x2 - 6x3+ x5 =5
16x1 - 8x2 - x3 + x6 =0
x1,x2,x3,x4 x5 x6 >= 0
7
The matrix form
Max Z= (107, 1, 2, 0, 0, 0) (x1, x2, x3, x4 ,x5, x6)
STC
14/3 1/3 -2 1 0 0 x1
16 1/2 -6 0 1 0 x2 7/3
16 -1 -1 0 0 1 x3 = 5
x4 0
x5
x6
x1,x2,x3,x4 x5 x6 >= 0
8
First Table 1:
107 1 2 0 0 0
Basic Profit Solu x1 x2 x3 x4 x5 x6 Min ratio
variable /unit tion =Soln. no/ Pivot
(B.V) P/U column no
x1 107 0.5 1 3/14 1 3/14 0 0
x5 0 -3 0 -41/14 -22 -48/14 1 0
x6 0 -8 0 -62/14 - 17 -48/14 0 1
Max Z = 107 =(1x107 =(107x3 = (107 x =(107x3 =(107 =(107x0
x 0.5 + 0 x -3 +0x0 /14 + 0 x 1+0x- /14 + 0 x x 0 +0 + 0x0
+0 x -8 = 0 +0x0) -41/14 + 22 + 0 -48/14 x 1+ 0 +0x1) -
-107 0x- x-17) -2 +0x- x 0) - 0
62/14) - 48/14) 0
1 -0
Max Z=53.5 0 +ve +ve +ve +ve 0
New Numbers for Key row other than key rows new no is
Soln.= old no / Key element found by using the following
= 7/3/ 14/3 =0.5 formulae
x1 = 14/3 / 14/3 = 1 New No=old element – PCE*NPRE
x2 = 1/14/3 = 3/14 for x5 row new no are
x3 = -6 / 14/3 = 1 Soln. = 5-16*0.5= -3
x4 = 1/14/3 = 3/14 x1 = 16-16*1 = 0
x5 = 0/14/3 = 0 x2 = 1/2-16*3/14 = -41/14
x6 = 0/14/3 = 0 x3 = -6-16*1 = -22
for x6 row the new no are x4 = 0-16*3/14= - 48/14
Soln. = 0-16*0.5 = -8 x5 = 1 -16*0 =1
x1 =16-16*1 = 0 x6 = 0 -16*0 =0
x2 = -1-16*3/14 = -62/14
x3 = -1-16*1 = -17
x4 = 0-16*3/14 = -48/14
x5 = 0 -16*0 =0
x6 = 1 -16*0 =1
9
Since, all the NER is positive then given problem is optimal
Therefore, x1 = 0.5, x2= 0, x3= 0, x4= 0, x5= - 3, x6= - 8
Max Z = 107*0.5 + 1*0 +2*0+ 0*0 +0*-3 +0* -8
= 53.5
Problem 3:
10
Matrix form
Starting table 4 5 9 11 0 0 0
variable unit
x5 0 7 1 1 1 1 1 0 0 7/1
x6 0 120 7 5 3 2 0 1 0 120/2
x7 0 100 3 5 10 15 0 0 1 100/15
+0x100
11
BIG M Method or Methods of Penalties
Whenever the objective function is MinZ and when all or some of the constraints are of
>= type or = type. We introduce surplus variable and a artificial variable to LHS of the
constraint when it is necessary to complete the identity matrix I.
The general practice is to assign the letter M as the cost in a minimization problem, and –
M as the profit in the maximization problem with assumption that M is a very large
positive number to the artificial variables in the objective function.
The method of solving a LPP in which a high penalty cost has been assigned to the
artificial variables is known as the method of penalties or BIG m Method.
Procedures
Step1: At any iteration of the usual simplex method can arise any one of the following
three cases:
Case b) if at least one vector corresponding to some artificial variable, in the basis is
basic variable column at the zero level i.e., corresponding entry in solution column is
zero and the co-efficient of m in each net evaluation Zj - Cj is non negative.
12
Case c) if at least one artificial vector is in the basis Yb but, not at zero level i.e., the
corresponding entry in Xb is non zero. Also co-efficient of M in each net evaluation Zj -
Cj is non negative.
In the case, the given LPP does not possess an optimum basic feasible solution. Since, M
is involved in the objective function. In such case, the given problem has a pseudo
optimum basic feasible solution.
Step 2: application of simplex method is continued until either an optimum basic feasible
solution is obtained or there is an indication of the existence of an unbounded solution to
the given LPP.
Note: while applying simplex method, whenever a vector corresponding to some artificial
variable happens to leave the basis, we drop that vector and omit all the entries
corresponding to that vector from the simplex table.
Problem 1:
Solve the give LPP by BIG M Method
Max Z =3x1 - x2
STC
2x1 + x2 >= 2
x1 + 3x2 <= 3
8x2 <= 4
x1, x2 >= 0
Since, the given problem is max z and the I constraint is >= type we introduce surplus
variable as x3 >= 0, and a artificial variable as x4 >= 0, the II & III constraint are of <=
type, so we introduce x5 >= 0 , x6 >= 0 .
13
The standard of the given LPP as follow as.
Max Z =3x1 - x2 +0x3 -M x4+0 x5+ 0x6
STC
2x1 + x2 - x3+ x4 =2
x1 + 3x2 + x5 =3
x2 + x 6 =4
x1,x2,x3, x4 x5,x6 >= 0
The Matrix form
Max Z= (3,-1, 0,-M, 0, 0) (x1,x2, x3, x4 x5,x6 )
STC
2 1 -1 1 0 0 x1 2
1 3 0 0 1 0 x2 = 3
0 1 0 0 0 1 x3 4
x4
x5
x6
14
Starting table: 3 -1 0 -M 0 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
x4 -M 2 2 1 -1 1 0 0 2/2=1
x5 0 3 1 3 0 0 1 0 3/1=3
x6 0 4 0 8 0 0 0 1 4/0=∞
MaxZ= =-mx2+ =- =-mx- =- =- =-
-mx2+0x3 0x1+0x4 mx1+0x 1+0x0 mx1+0x mx0+0 mx0+0x
+0x4=-2m -3= - 3+0x0- +0x0- 0+0x0-)- x1+0x 0+0x1-
2m-3 (-1)= - 0= m m)=0 0-0=0 0=0
m+1
3 -1 0 -M 0 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
x1 3 1 1 ½ -1/2 1/2 0 0 1/-1/2=-
2
x5 0 2 0 5/2 1/2 -1/2 1 0 2/1/2=4
x6 0 4 0 1 0 0 0 1 4/0=∞
MaxZ=3x1+0x2+0 =3x1+0 3x1/2+0 =3x- =3x1/2+ =3x0+ =3x0+0
x4=3 x0+0x0 x5/2+0x 1/2+0x ox- 0x1+0 x0+0x1-
–3 1-(-1) 1/2+0x 1/2+0x0 x0-0 0
0-0 – (-M)
0 5/2 -3/2 3/2+m 0 0
15
New Number for Key row is
New no for key row =old element/pivot element
Soln= 2/2=1, x1 =2/2=1, x2 =1/2, x3 = -1/2, x4 =1/2, x5 =0/2=0, x6 =0/2=0
Other than key row new no. = old element - PCE*NPRE
Soln= 3-1*1=2, x1 =1-1*1=0, x2 =3-1*1/2=5/2, x3 =0-1*-1/2=1/2, x4 =0-1*1/2=-1/2, x5
=1-1*0=1, x6 =0-1*0=0
For x6 new no are
Soln= 4-0*1=4, x1 =0-0*1=0, x2 =8-0*1/2=8, x3 =0-0*-1/2=0, x4 =0-0*1/2=0, x5 =0-
0*0=0, x6 =1-0*0=1
3 -1 0 -M 0 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
x1 3 3 1 3 0 0 1 0
x3 0 4 0 5 1 -1 2 0
x6 0 4 0 1 0 0 0 1
Max Z =3x1+0 =3x3+0 =3x0+ 3x0+0x- =3x1+ =0x3+0
=3x3+0x4+0x4=9 x0+0x0- x5+0x1- 0x1+0 1+0x0-(- 0x2+0 x0+0x1-
3 (-1) x0-0 M) x0-0 0
0 10 0 M 3 0
16
Since all the NER is +ve and at zero level which is optimum.
This problem is of case A, which means no artificial vector appears at the optimal table
and therefore, the given problem as attained the optimality.
x1=3,x2 =0, x3 =4, x4 =0, x5 =0x6 =4 substitute this values in the objection function.
Max Z =3x3 - 0 +0x4 –Mx0+0x0+ 0x4 = 9
Problem:2
Solve the given problem by charnes penalty method
Max Z =3x1 + 2x2
STC
2x1 + x2 <= 2
3x1 +4x2 >= 12
x1, x2 >= 0
Solution:
Since, the given problem is max z
The I constraint is <= type we introduce slack variable as x3 >= 0 and the II constraint is
of >= type we introduce surplus variable as x4>= 0 and a artificial variable as x5 >= 0. In
the constraint the value of artificial variable will be 1 and in the objective function is –M.
Therefore, the standard form of the problem
Max Z =3x1 +2x2 +0x3 +0 x4-M x5
STC
2x1 + x2 + x3 = 2
3x1 + 4x2 - x4 + x5 = 12
x1,x2,x3, x4 x5 >= 0
The Matrix form
Max Z= (3,2, 0,0,-M) (x1,x2, x3, x4 x5 )
STC
2 1 1 0 0 2
3 4 0 -1 1 = 12
x1,x2,x3, x4 x5 >= 0
17
1 0
0 1
Canonical system. The basic variable (x3,x5) and their obvious solution
(2,12)
Starting table: 3 2 0 0 -M
Basic Profit / solution x1 x2 x3 x4 x5 Min
Variable unit ratios
x3 0 2 2 1 1 0 0 2/1=2
x5 -M 12 3 4 0 -1 1 12/4=3
Max Z=0x2+-mx12 =0x2+- =0x1+- =0x1+ =0 x 0 =0x0+
mx3-3 mx4-2 -mx0- +- mx-1- -m x1-
0 0 (-m)
-12m -3m-3 -4m-2 0 m 0
Starting table: 3 2 0 0 -M
Basic Profit / solution x1 x2 x3 x4 x5 Min
Variable unit ratios
x2 2 2 2 1 1 0 0
x5 -m 4 -5 0 -4 -1 1
Maxz= 2x2+-mx4 5m+1 0 4m+2 m 0
18
Problem:3
Solution:
Since, the given problem is max z
The I constraint is <= type we introduce slack variable as x4 >= 0 and the II constraint is
of >= type we introduce surplus variable as x5>= 0 and a artificial variable as x6 >= 0.
In the constraint the value of artificial variable will be 1 and in the objective function is –
M. Therefore, the standard form of the problem.
19
Starting table: 3 2 3 0 0 -M
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
X4 0 2 2 1 1 1 0 0 2/1=2
x6 -M 8 3 4 2 0 -1 1 8/4=2
=0x2+- =0x1+- =0x1+ =0 x 1 =0x0+ =0x0+-
mx3-3 mx4-2 -mx2- +- mx0- -m x- mx1-(-
3 0 1- 0 m)
-3m-3 -4m-2 -2m-3 0 m 0
Starting table: 3 2 0 0 0 -M
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
x2 2 2 2 1 1 1 0 0
x6 -m 0 -5 0 -2 -4 -1 1
maxZ=2x2+- 5m+1 1 2m+1 4m+2 m 0
mx0=4
x1 =0 x2 =2 x3 =0 x4 =0 x5 =0 x6 =0
Max Z =3x1 +2x2 +3x3 +0 x4+0 x5-M x6
=3*0+2*2+3*0+0*0+0*0-M*0
=4
20
Problem No : 4
Problem No 5
Solve the given LPP
Min Z = 4x1 + x2
STC
3x1 + 2x2 = 3
4x1 +3x2 >= 6
x1 +2x2 <= 4
x1, x2 >=0
The I constraint is already in standard form, only artificial variable is added as x3 >= 0
and II constraint is of >= type we introduce
x4 > = 0 as surplus variable and an artificial variable as x5 > = 0 and third constraint is of
<= type we introduce x6 > = 0 as slack variable.
Then, the given LPP is in standard form
Min Z = 4x1 + x2+ Mx3+ 0x4+ Mx5+ 0x6 converting MinZ= -Z
or
Max Z = -4x1 - x2- Mx3- 0x4- Mx5- 0x6
STC
3x1 + 2x2 + x3 = 3
4x1 +3x2 -x4+x5 = 6
x1 +2x2+ x6 = 4
x1,x2,x3,x4,x5,x6 > = 0
21
The matrix form
Max Z = (-4, -1, -M, 0, -M, 0) (x1,x2,x3,x4,x5,x6 )
STC
3 2 1 0 0 0 x1
4 3 0 -1 1 0 x2 3
1 2 0 0 0 1 x3 = 6
x4 4
x5
x6
Starting table: -4 -1 -m 0 -m 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
X3 -m 3 3 2 1 0 0 0 3/3=1
x5 -m 6 4 3 0 -1 1 0 6/4=1.5
x6 0 4 1 2 0 0 0 1 4/1
Max z= -9m -7m+4 -5m+1 0 m 0 0
Starting table: -4 -1 -m 0 -m 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
X1 -4 1 1 2/3 1/3 0 0 0 3/2
x5 -m 2 0 1/3 -4/3 -1 1 0 6
x6 0 3 0 4/3 -1/3 0 0 1 9/4
Max z= -4-2m 0 .-5-m /3 4m-4 /3 m 0 0
22
Starting table: -4 -1 -m 0 -m 0
Basic Profit / solution x1 x2 x3 x4 x5 x6 Min
Variable unit ratios
X2 -1 3/2 3/2 1 1/2 0 0 0
x5 -m 3/2 -1/2 0 -2 -1 1 0
x6 0 1 -2 0 -3 0 0 1
Max z= -3/2-3/2m 5+m/2 0 -1/2+2m m 0 0
Problem 6
Solution:
The I constraint is of <= type so add x4 >= 0 as slack variable, II constraint is of >= type
so we introduce x5 >= 0 as surplus variable and x6 >= 0 as artificial variable and III
constraint is already a standard form and right side is –ve. So it should be multiplied by -
1 both sides of the equation and x7 >= 0 as artificial variable and the standard form of the
given LPP is written below.
Min Z = -3x1 +x2 + x3 + 0x4 +m x5 + x6 +m x7
STC
x1 +-2x2+ x3 + x4 = 11
-4x1 +x2+ 2x3 + x5 + x6 =3
-2x1 + x3 + x7 =1
x1, x2, x3, x4 x5 x6 x7 >= 0
23
The matrix form
Min z = (-3,1,1,0,M,1,M) (x1, x2, x3, x4 x5 x6 x7 )
STC
1 –2 1 1 0 0 0 x1
-4 1 2 0 -1 1 0 x2
-2 0 1 0 0 0 1 x3 11
x4 = 3
x5 1
x6
x7
x1, x2, x3, x4 x5 x6 x7 >= 0
Starting table: -3 1 1 0 m 1 m
Basic Profit / solution x1 x2 x3 x4 x5 x6 x7 Min
Variable unit ratios
X4 0 11 1 -2 1 1 0 0 0 11/1
X6 M 3 -4 1 2 0 -1 1 0 3/2
x7 M 1 -2 0 1 0 0 0 1 1/1
MaxZ=0x11+3xM+ -3+6m 1-m 1-3m 0 2m 1-m 0
1xm=4m
24
First table: -3 1 1 0 m 1 m
Basic Profit / solution x1 x2 x3 x4 x5 x6 x7 Min
Variable unit ratios
X4 0 10 3 -2 0 1 0 0 -1 10/-2= -
ve
X6 M 1 0 1 0 0 -1 1 -2 1/1=1
X3 1 1 -2 0 1 0 0 0 1 1/0=0
Min Z= 0x10 + -3- 1-(0x- 1- 0- m- =1- m -(0x-
mx1 +1x1 =1+m (0x3+m 2+mx1+ (0x0+mx0 (0x1 (0x0+ (0x0+ 1+mx-
x0+1x- 1x0)=1- +1x1) = 0 +mx mx-1 mx1+1 2+1x1)
2) m 0+1x + x0) = = 3m-1
= -1 0)= 1x0)= 1-m
0 2m
The values of key row remain the same because 1 is the key element
New nos for other than key rows i.e X4
Soln= 11-1*1=10 X5,Soln= 3-2*1=1
x1= 1-1*-2 =3 x1= -4-2*-2= 0
x2= -2-1*0=-2 x2= 1-2*0=1
x3=1-1*1=0 x3= 2-2*1=0
x4=1-1*0=1 x4= 0 -2*0=0
x5=0-1*0=0 x5= -1-2*0=-1
x6=0-1*0=0 x6= 1-2*0=1
x7=0-1*1=-1 x7=0-2*1=-2
25
Third table: -3 1 1 0 m 1 m
Basic Profit / Solution x1 x2 x3 x4 x5 x6 x7 Min
Variable unit ratios
X4 0 12 3 0 0 1 2 -2 -5 12/3
X2 1 1 0 1 0 0 1 -1 -2 1/0
X3 1 1 -2 0 1 0 0 0 1 1/-2
-1 0 0 0 m-1 1 m+1
Fourth table: -3 1 1 0 m 1 m
Basic Profit / Solution x1 x2 x3 x4 x5 x6 x7 Min
Variable unit ratios
X1 -3 4 1 0 0 1/3 2/3 -2/3 -5/3
X2 1 1 0 1 0 0 1 -1 -2
X3 1 9 0 0 1 2/3 4/3 -4/5 -7/3
0 0 0 1/3 m-1/3 1/3 m-2/3
26
Duality Theory
The linear programming model we develop for a situation is referred to as the primal
problem. The dual problem can be derived directly from the primal problem.
Comparing the primal and the dual problems, we observe the following relationships.
1. The objective function coefficients of the primal problem have become the right-
hand side constants of the dual. Similarly, the right-hand side constants of the
primal have become the cost coefficients of the dual
2. The inequalities have been reversed in the constraints
3. The objective is changed from maximization in primal to minimization in dual
4. Each column in the primal correspondence to a constraint (row) in the dual. Thus,
the number of dual constraints is equal to the number of primal variables.
5. Each constraint (row) in the primal corresponds to a column in the dual. Hence,
there is one dual variable for every primal constraints
6. The dual of the dual is the primal problem.
7. if the primal constraints >= the dual constraints will be <= & vice versa
Duality is an extremely important and interesting feature of linear programming. The
various useful aspects of this property are
i) If the primal problem contains a large no of rows constraints and smaller no of columns
variables computational procedure can be considerably reduced by converting it into dual
and then solving it.
ii) It gives additional information as to how the optimal solution changes as a result of the
changes in the coefficients and the formulation of its problem.
iii) Calculations of the dual checks the accuracy of the primal solution
iv) This indicates that fairly close relationships exist between LP and theory of games
27
Primal Problem Dual Problem
Max Z = CX Min Z = bY
STC STC
Ax<=b Ay>=c
x>=0 y>=0
Max Z = CX Min Z = bY
STC ex: STC
Ax=b x1+x2<=2 Ay>=c
x>=0 -x1-x2<=-2 Y is unrestricted in sign
Max Z = CX Min Z = bY
STC STC
Ax=b Ay=c
X is unrestricted in sign y is unrestricted in sign
Note: it is not necessary that only the Max problem be taken as the primal problem we
can as well consider the minimization LPP as the primal
Formulation of dual to the primal problem
28
Problem no 1
Write the dual of the primal problem
Max Z = 3x1 +5x2
STC
2x1 +6x2 <= 50
3x1 +2x2 < = 35
5x1 - 3x2 <= 10
x2 <= 20
x1, x2, x3 >= 0
To write dual for the above primal, since the primal as 4 constraints the dual will have 4
variables as y1 y2 y3 y4 then dual for the primal will be as follows.
29
Solution:
The given problem is minimization type and all the constraint should be >= type. In the
given problem third constraint is <= type so we must convert constraint to >= type by
multiply both side of the constraint by -1, we get
-7x1 +2 x3 +x3 > = - 10
Then given the problem can be written restated
Then dual of the given problem is as follows and the dual variables are y1 ,y2 ,y3,y4 y4
30
Problem 3
Obtain the dual problem of the following LPP
Max Z = 2x1 +5x2 +6x3
STC
5x1 +6x2-4 x3 <=3
-2x1 +x2+ 4x3 <=4
x1 -5 x2 +3x3 <=1
-3x1 -3x2+7 x3 <= 6
x1, x2, x3 >= 0
Also, verify that the dual of the dual problem is the primal problem
The given primal can be restated in the matrix form
Max Z = (2,5,6) (x1, x2, x3 )
STC
5 6 -4 x1 3
-2 1 4 x2 <= 4
1 -5 3 x3 1
-3 -3 7 6
The dual of the above primal can be written as and the dual variables are (y1 ,y2 ,y3,y4 )
Min w= (y1 ,y2 ,y3,y4 ) (3.4.1.6)
STC
5 -2 1 -3 y1 2
6 1 -5 3 y2 = 5
-4 4 3 7 y3 6
y4
y1 ,y2 ,y3,y4>= 0
31
Now, we can restate this dual problem as follows
Max w = (-3.-4.-1.-6) (y1 ,y2 ,y3,y4 )
5 -2 1 -3 y1 -2
6 1 -5 -3 y2 = -5
(-1) -4 4 3 -7 y3 -6
y4
y1 ,y2 ,y3,y4>= 0
MaxZ = (-1) Minz
The dual problem in this form looks like the primal problem and this we may write down
the dual of this dual problem .
MinZ= (-2,-5, -6) (x1, x2, x3 )
STC
5 6 -4 x1 -3
-2 1 4 x2 <= -4
1 -5 3 x3 -1
(-1) -3 -3 7 -6
x1, x2, x3 >= 0
32
Problem 4
Construct the dual of the primal problem
Max Z = 3x1 +17x2 +4x3
STC
x1 - x 2 + x3 >=3
-3x1 +2x3 <=1
x1, x2, x3 >= 0
Problem 5
Construct the dual of the following primal
Max Z = x1 -2x2 +3x3
STC
-2x1 + x2 +3 x3 =2
2x1 + 3x2 +4 x3 =1
x1, x2, x3 >= 0
The given problem is 2nd variety in the duality and it is in the form of Max Z, then the
constraint in the standard form can be written as -2x1 + x2 +3 x3 <= 2
2x1 - x2 -3 x3 <= -2
and
2x1 + 3x2 +4 x3 <=1
-2x1 -3x2 - 4 x3 <= -1
Then, given primal can restated as
Max Z = x1 -2x2 +3x3
STC
-2x1 + x2 +3 x3 <= 2
2x1 - x2 -3 x3 <= -2
2x1 + 3x2 +4 x3 <=1
-2x1 -3x2 - 4 x3 <= -1
x1, x2, x3 >= 0
The dual of the above primal is written as and its dual variables are y1, y2, y3
33
Min W = 2y1 -2y2 +y3 -y4
STC
-2y1 +2y2 +2y3 -2y4 >= 1
y1 -y2 + 3y3 -3 y4 >= -2
3y1 -3y2 + 4y3 -4 y4 >= 3
y1, y2, y3 y4 >= 0
Problem 6
Write the dual of the given LPP
Max Z = 3x1 + x2 +2x3 -2x4
STC
2x1 - x2 +3 x3 +x4 =1
x1 + x2 - x3 +x4 = -3
x1, x2 >= 0, x3 & x4 are unrestricted in sign
Problem 7
Write the dual of the following LPP
Min Z = 2x1 +3x2 +4x3
STC
2x1 + 3x2 +5 x3 >= 2
3x1 + x2 +7 x3 =2
x1 + 4x2 + x3 <=5
x1, x2, >= 0 x3 are is unrestricted in sign
34
Use duality to solve the following LPP
Max Z = 3x1 +2x2
STC I constraint
2x1 + x2 <= 5 the points are (5/2,5)
x1 + x2 <= 3 (3,3)
x1, x2 >= 0
II constraint
I constraint
II constraint
35
Max Z = 2y1 +5y2
STC
y1 <=4
y2 <=3
y1 +y2<=6
y1, y2 >= 0
Using duality theory solve the following LPP by simplex method
Max Z = x1 +6x2
STC
x1 + x 2 >= 2
x1 + x 2 <=3
x1, x2 >= 0
The given problem is max Z so all the constraint should be <= type. In this problem I
constraint is of >= type so we converting by multiply b -1 both sides of the constraint the
resulting will be as
-x1 - x2 <= -2
Then, the given LPP is restated as
Max Z = x1 +6x2
STC
-x1 - x2 <= -2
x1 + x 2 <=3
x1, x2 >= 0
The dual of the above LPP will be as
Min Z = 2y1 +3y2
STC
-y1 + y2 >= 1
-y1 + y2 >=6
x1, x2 >= 0
Solving the dual using Big M method
36
Dual simplex method
Dual simplex method applies to problems which start with dual feasible solns. The
objective function may be either in the maximization form or in the minimization form.
After introducing the slack variables, if any right-hand side element is –ve and if the
optimality condition is satisfied.
Repeat the procedure until either an optimum feasible solution has been obtained or there
is an indication of the non existence of a feasible solution.
37
Use dual simplex method to solve the LPP
Min Z = x1 +x2
STC
2x1 + x2 >= 2
-x1 - x2 >=1
x1, x2 >= 0
Since, the given problem in min z form it is converted to max z and all the constraint is of
>= type it should be converted to <= type by multiplying -1 on the both sides then given
problem will be as follows
Max Z = -x1 -x2
STC
-2x1 - x2 <= -2
x1 + x 2 <= -1
x1, x2 >= 0
Now, introducing slack variable for the I and II constraint as x3>= 0, x4 >= 0
The standard form as follows
Max Z = -x1 -x2 +0 x3 + 0x4
STC
-2x1 - x2+ x3 = -2
x1 + x 2 + x4 = -1
x1, x2 , x3 x4 >= 0
The matrix form
Max Z = (-1,-1,0, 0) (x1, x2 , x3 x4)
STC
-2 -1 1 0 x1 -2 the identity matrix
1 1 0 1 x2 = -1 form are
x3 1 0 the correspond
x4 0 1 variables
x1, x2 , x3 x4 >= 0 (x3 x4) and
their solutions are -2 -1
38
starting table -1 -1 0 0
x3 0 -2 -2 -1 1 0
x4 0 -1 1 1 0 1
Max Z= =0*- =0*- =0*1+0 =0*0+0*
0*-2+0*-1 2+0*1+1 1+0*1+1 *0 -0 1-0
0 1 1 0 0
First table -1 -1 0 0
Basic Profit / solutio x1 x2 x3 x4
Variable Unit n
x1 -1 1 1 0.5 -1/2 0
x4 0 -2 0 0.5 1/2 1
Max Z= =- =0.5*- =-1*- =-1 * 0 +
-1*1=0*-2 1*1+0*0+ 1+0.5*0+ 1/2+0* 0*1-0
1 1 1/2 -0
-1 0 0.5 0 0
39
Since, all the values in NER is positive and in solution column one variable is –ve and
that is selected as key row and to select key column or pivot column at least on variable
in the row should be –ve but, no vector corresponding to that row is –ve and we cannot
find the ratios and So we cannot select the key column and the given problem does not
given any feasible solution to the LPP.
Use dual simplex table to solve the LPP
Min Z = x1 +2x2 +3 x3
STC
x1 - x 2 + x3 >= 4
x1 + x2+ 2x3 <= 8
x2 - x3 >= 2
x1, x2 , x3 >= 0
the given problem is set for the requirement of dual simplex method
Max Z = -x1 -2x2 -3 x3
STC
-x1 + x2- x3 <= - 4
x1 + x2+ 2x3 <= 8
-x2 + x3 <= - 2
x1, x2 , x3 >= 0
since, all the constraint are of <= type we introduce three slack variable for I II and III
constraint as x4>= 0, x5 >= 0, x6>= 0
the standard form
Max Z = -x1 -2x2 -3 x3 +0 x4+ 0x5+ 0x6
STC
-x1 + x2- x3 + x4 =-4
x1 + x2+ 2x3 + x5 = 8
-x2 + x3 + x6 =-2
x1, x2 , x3 x4 x5 x6 >= 0
40
The matrix form
STC
-1 1 -1 1 0 0 x1
1 1 2 0 1 0 x2 -4
0 -2 1 0 0 1 x3 = 8 1 0 0
x4 -2 0 1 0
x5 0 0 1
Starting table -1 -2 -3 0 0 0
Variable / unit
x4 0 -4 -1 1 -1 1 0 0
x5 0 8 1 1 2 0 1 0
x6 0 -2 0 -1 1 0 0 1
MaxZ =0*- 1 2 3 0 0 0
4+0*8+0*-8
41
Other than key row new nos are
x5
x5 = 1-1*0=1, x6 =0-1*0=0
x6
soln= -2-0*4=-2, all other value in the row remains the same because of corresponding
Starting table -1 -2 -3 0 0 0
For x1 row
soln=4-(-1)*2=6, x1 =1-(-1)*0=1, x2 =-1-(-1)1=0, x3 =1-(-1)-1=0, x4 =-1-(-
1)*0=-1, x5 =0-(-1)*0=0, x6 =0-(-1)*-1=-1
For x5 row
soln =4 - 0*2=4, any thing multiplied by 0 is 0 so the value in this row
remains same.
42
Starting table -1 -2 -3 0 0 0
Since all the NER and Solution column are non negative and the given problem as
attained the optimum
43
Dual Read off Technique
Solve the following the LPP and read the solution for the real problem
Min Z = 2x1 +x2
STC
x1 + x 2 >= 15
x1 - x 2 <= 3
2x1 + 5x2 >= 20
-x1 + 3x2 >= 10
x1, x2 >= 0
To write the dual of the above primal all the constraint should be of >= type, since, II
constraint is <= type we must convert it into >= type by -1, then, the given primal can be
written as follows
Min Z = 2x1 +x2
STC
x1 + x 2 >= 15
-x1 + x2 >= -3
2x1 + 5x2 >= 20
-x1 + 3x2 >= 10
x1, x2 >= 0
The dual for the above primal problem as follows
The dual variables (y1 y2 y3 y4 )
Max Z = 15y1 -3y2 +20y3 +10y4
STC
y1 - y2+2y3 - y4 <=2 y5 >= 0 as slack variable
y1 + y2+ 5y3 + 3y4 <=1 y6 >= 0 as slack variable
y1 y2 y3 y4 >=0
44
Matrix form
Max Z = (y1 y2 y3 y4 ) ( 15,-3,20,10)
STC
1 -1 2 -1 1 0 y1
1 1 5 3 0 1 y2 2
y3 = 1
y4
y5
y6
y1 y2 y3 y4 y5 y6 >=0
1 0
0 1 is identity matrix which form the basic variable (y5 y6 ) for the I table and it’s
solution is (2,1)
Starting table 15 -3 20 10 0 0
y6 0 1 1 1 5 3 0 1 1/5=
Starting table 15 -3 20 10 0 0
Max Z = 0 -11 7 0 2 0 20
45
Starting table 15 -3 20 10 0 0
Since all the NER non negative the given problem as attained optimum
46