Linear Programming Techniques - I M.L. Kansal
Linear Programming Techniques - I M.L. Kansal
M.L. KANSAL
NEEPCO Chair Professor,
Department of Water Resources Development and Management,
Indian Institute of Technology Roorkee, ROORKEE 247 667
2.1 INTRODUCTION
Due to budget constraints the total investment cost for selected projects cannot exceed Rs. 750
million. Projects 2 & 3 can be implemented if project 6 is implemented. Project 10 can be
implemented if projects 8 & 9 are implemented. Project 4 cannot be selected if project 3 is
selected. At least one but not more than 3 of the following projects must be selected i.e, 5,6,7
and/or 8. Formulate this problem as Linear Programming model.
Solution
In this problem, there are ten decision variables, i.e., X1, X2,……X10 that represent the
various projects. The variables are of binary type. i.e., these can have values either 0 or 1. Once
the decision variables are identified, next step is to identify the objective function. Here, the
objective function is
Maximize Z = 4X1+3X2+5X3+9X4+7X5+6X6+4X7+5X8+2X9+7X10
The objective function is subject to various constraints. These are :
120X1+150X2+90X3+210X4+160X5+80X6+90X7+100X8+80X9+140X10<=750
(Cost constraint)
X2 + X3-2X6<= 0 or X2 - X6<= 0 and X3- X6<= 0
2X10 - (X8 + X9)<= 0 or X10 – X8<= 0 and X10- X9<= 0
X3 + X4<= 1
X5 + X6+ X7 + X8>= 1
X5 + X6+ X7 + X8<= 3
Incinerator Landfill
City City
1 2 1 2
1 3 1 1 5 8
2 4 5 2 9 6
Solution
In this problem, there are two cities, two incinerators, and two land fill sites. Let the
amount of waste/ debris transported from various cities to incinerators, and incinerators to
landfill sites are represented by eight decision variables (X11, X12, X21, X22, Y11, Y12, Y21, and
Y22 ) as shown below :
X11 Y11
C1 I1 L1
C2 X22 I2 Y22 L2
The objective function is to minimize the total cost of transportation from the cities to
incinerators, cost of incineration, and the cost of transportation of the debris from incinerators to
the landfill sites. Mathematically, this can be represented as
Minimize Z =
450X11+150X12+600X21+750X22+2000(X11+X21)+2500(X12+X22)+750Y11+1200Y12+1350Y21+900Y22
Subject to: -
120X1+150X2+90X3+210X4+160X5+80X6+90X7+100X8+80X9+140X10<=750
(Cost constraint)
X11+X12 = 500 (Waste production constraint)
X21+X22 = 450 (Waste production constraint)
Y11+Y21 <= 200 (Landfill Capacity constraint)
Y12+Y22 <= 200 (Landfill Capacity constraint)
X11+X21 <= 500 (Incinerator capacity constraint)
X12+X22 <= 500 (Incinerator capacity constraint)
Y11+Y12 = 0.2 (X11+X21) (Debris production constraint)
Y21+Y22 = 0.2 (X12+X22) (Debris production constraint)
X11, X12, X21, X22, Y11, Y12, Y21, Y22>= 0 (non negative constraints)
Problem 2.3
Consider a system composed of manufacturing factory and a Waste Treatment Plant of a owner.
The manufacturing plant produces finished goods that sell for unit price of Rs 500/-. However
the finished goods production cost is of Rs 300/- per unit. In the manufacturing process 3 units
of waste are generated for each unit of finished goods. In deciding about the number of goods to
be produced, the manager must also decide how much waste will be discharged without
treatment so that net benefit to the company can be maximized and the water quality
requirements of wastewater is also met. The treatment plant has a capacity of 300 units of waste
with 70 % waste removal efficiency at the treatment cost of Rs 20/- per unit of waste. There is
also an affluent tax imposed on the waste discharge at the rate of Rs 25/- per each unit of waste
discharge. The water pollution control authority has set up on upper limit of 200 units on the
amount of waste that can be discharged by any manufacturer. Formulate a linear programming
model for this problem.
Solution
X1
FACTORY FINISHED GOODS
3X1 – X2
WASTE TREATMENT PLANT
As the name suggest, the most important feature of LP problems is the presence of linearity in
the problem. The problem, thus reduces to maximizing or minimizing a linear function subject
to a number of linear inequalities/equalities (constraints) as discussed above. The technique is
used in a wide range of applications. The simplest form of LP problem is that which involves
two decision variables, as it can be solved by simple graphical technique, as interpretation of a 2-
variable graph is easy. However, for a large number of decision variable, graphical method does
not work well and there is a need for systematic solution of such problems. Simplex method can
be used in case of large number of variables and constraints. Following sections deals with such
problems.
Problem 2.4
Suppose that a farmer wants to sow two crops viz wheat and jowar for his remote land where
only ground water is available to him for irrigation. He can’t pump more than 60 units of water
in a year to avoid the problem of mining in that region. Each unit production of wheat requires 6
units of water and that of jowar requires 5 units of water, also one unit of wheat production
requires 10 units of land and one unit of jowar production requires 20 units of land, where as
total land available to him is 150 units of land. Since he is already sowing wheat in his other
land, he doesn’t want to sow more than 8 units of wheat. The profit per unit production of wheat
is Rs 500 and that for jowar is Rs 450. What should be the policy of the farmer about sowing of
the two crops so that he maximizes the profit?
Solution
Identify the problem and write in mathematical form:
In this problem, there are two decision variables, i.e.,
X1 = no of units of Wheat production
X2 = no of units of Jowar production
Objective function: - Maximize Z = 500 X1 + 450 X2
Subject to: - 6 X1 + 5 X2 <= 60 (water consumption constraints)
10 X1 + 20 X2 <= 150 (land constraints)
X1 <= 8 (upper limit of wheat production)
X1 >= 0, X2 >= 0 (non negative constraints)
General form of Linear Programming
Maximize or Minimize Z = C1 X1 + C2 X2 + ………. + Cn Xn
Subject to a11 X1 + a12 X2 + ……….. + a1n Xn = b1
a21 X1 + a22 X2 + ……….. + a2n Xn = b2
..
..
..
am1 X1 + am2 X2 + ……….. + amn Xn = bm
a m1 am2 a mn x m bm
To derive the solution, plot the graph between X1 and X2
All the equations in the problem can be written in the form of: -
Y = mx + C (straight line)
Z = 500 X1 + 450 X2 =====> X2 = (Z / 450) – (500 X1 / 450)
6 X1 + 5 X2 = 60 =====> X2 = (60 / 5) – (6 X1 / 5)
10 X1 + 20 X2 = 150 =====> X2 = (150 / 20) – (10 X1 / 20)
Where ever the solution is feasible in nature, policy space must be convex in nature.
Effective constraints: All the constraints that affect the objective function , i.e.
6 X1 + 5 X2 = 60 and 10 X1 + 20 X2 = 150
Redundant constraint X2 8
Coordinate of points in the policy space where the slope of boundary changes are:
1. (0,0)
2. (0, 7.5)
3. (45/7,30/7)
4. (8,12/5)
5. (8,0)
The objective function will be maximum at point (45/7, 30/7) & shall be
Z max = 500 x 45/7 + 450 x 30/7
= 5142.86
So policy of the farmer should be
X1 = 45/7 i.e. wheat production 6.429 units
X2 = 30/7 i.e. jawar production 4.286 units
Sensitivity Analysis :
Shadow Price or Reduction Cost
There is always a shadow price connected with effective constraint.
Maximize Z1 = 500 X1 + 450 X2
If 6 X1 + 5 X2 61 ------- A If 10 X1 + 20 X2 = 151
10 X1 + 20 X2 150 ------- B 6 X1 + 5 X2 = 60
X1 8 ------- C from these equation
Considering inequality A, B, C 14 X1 = 89 ====> X1 = 6.351
X1 = 6 75 X2 = 4.371
X2 = 4 17 Z151 = 500 x 6.36 + 450 x 4.37
= 5145.714
Z1 = 5221 73 Difference (Z151) - (Z150) = 2.86
Difference (Z1 61) - (Z1 60) = 78.57 Shadow price
Extra benefit
L b1 U
6 x 8 + 5 x 3.5 = 65.5
6 x 0 + 5 x 7.5 = 37.5
Water constraint varies between 65.5 & 37.5
L b2 U
10 x 0 + 20 x 12 = 240
10 x 8 + 20 x 2.4 = 128
Land constraint varies between 240 & 128
L b3 infinity
6.43 x 1 = 6.43
6.43 b3
This constraint can vary from 6.43 to infinity.
Limits of Objective Coefficients
Limits of C1 Limits of C2
-6/5 - C1 / 450 -1/2 -6/5 - 500 / C2 -1/2
540 C1 225 416(2/3) C2 1000
Note :
1. If the slope of the objective function matches, with the slope of effective constraint then
there will be multiple solutions to the problem.
2. If the feasible region is bounded, the solution will be bounded, and if the feasible region
is unbounded the solution will be unbounded.
2.3 LINEAR PROGRAMMING (SIMPLEX METHOD)
The Graphical method for solving the LP problems is useful when the number of variables is
two. However, if the number of variables is more than two, it will be difficult to follow the
graphical method as the graphs of multiple variables will be very difficult to construct and
interpret. Under such situations, a systematic approach is required to find the optimal solution.
Simplex method is such approach which identifies the optimal solution of LP problem. The
steps of Simplex method will be explained with the help of an illustrative example.
Problem 2.5
Suppose an organization is manufacturing two products. The profit per tonne of the two
products is Rs. 50 and Rs. 60 respectively. Both the products require processing in three types of
machine (m/c). The following table indicates the available m/c hours per week and the time
required on each m/c for one tonne of the two products. Formulate and solve this LP problem
using Simplex method.
Solution
Objective Function Maximize Z = 50 X1 + 60 X2
Subject to
2 X1 + X2 300
3 X1 + 4 X2 509
4 X1 + 7 X2 812
X1 0; X2 0
We have to change the inequality constraints to equality constraints, i.e.
2 X1 + X2 + X3 = 300
3 X1 + 4X2 + X4 = 509
4 X1 + 7 X2 + X5 = 812
X1 0, X2 0, X3 0, X4 0, X5 0
Maximize Z = 50 X1 + 60 X2 + 0 X3 + 0 X4 + 0 X5
where, X3, X4 and X5 are slack variables.
For basic feasible solution;
X1 = 0, X2 = 0 -------------------------- Non basic variable
X3 = 300, X4 = 509, X5 = 812 ------- Basic variable
Z = 0 ------------------------------------- Basic feasible solution
Total no. of variables = 5; Basic variable = 3
Combinations = 5C3 = 5*4*3 / 1*2*3 = 10
Basic Cj 50 60 0 0 0
CB Ratio test
Variable XB X1 X2 X3 X4 X5
0 X3 300 2 1 1 0 0 300/1=300
0 X4 509 3 4 0 1 0 509/4=127.25
0 X5 812 4 7 0 0 1 812/7=116
Zj – Cj -50 -60 0 0 0
Z = 50 x 0 + 60 x 0 = 0 Pivotal element
Basic Cj 50 60 0 0 0
CB Remark
Variable XB X1 X2 X3 X4 X5
0 X5 94 0 0 1 -2 1
50 X1 691/5 1 0 4/5 -1/5 0
60 X2 118/5 0 1 -3/5 2/5 0
Zj - Cj 0 0 4 14 0
Tableau 2
Basic Cj 500 450 0 0 0
CB Ratio Test
Variable XB X1 X2 S1 S2 S3
0 S1 12 0 5 1 0 -6 12/5 = 2.4→
0 S2 70 0 20 0 1 -10 70/20 = 3.5
500 X1 8 1 0 0 0 1 -
Z = 4000 Zj - Cj 0 -450↑ 0 0 500
Tableau 3
Basic Cj 500 450 0 0 0
CB Ratio Test
Variable XB X1 X2 S1 S2 S3
450 X2 12/5 0 1 1/5 0 -6/5 -
0 S2 22 0 0 -4 1 14 22/14= 1.57→
500 X1 8 1 0 0 0 1 8
Z = 5080 Zj - Cj 0 0 90 0 -40↑
Tableau 4
Basic Cj 500 450 0 0 0
CB Ratio Test
Variable XB X1 X2 S1 S2 S3
450 X2 30/7 0 1 -1/7 3/35 0
0 S3 11/7 0 0 -2/7 1/14 1
500 X1 45/7 1 0 2/7 -1/14 0
Z = 5142.86 Zj - Cj 0 0 550/7 20/7 0
The objective function will be maximum at point (45/7, 30/7) and
Z max= 500 x 45/7 + 450 x 30/7 = 5142.86
So policy of the farmer should be
X1 = 45/7 i.e. wheat production 6.429 units
X2 = 30/7 i.e. jawar production 4.286 units
Problem 2.7
Solve the following linear programming problem
Maximize Z = 3 X1 + 2 X2 + 5 X3
Subject to
X1 + 2 X2 + X3 430
3 X1 + 2 X3 460
X1 + 4 X3 420
X1 0 , X2 0 , X3 0
Solution
We have to change the inequality constraints to equality constraints, i.e.
X1 + 2 X2 + X3 + X4 = 430
3 X1 + 2X3 + X5 = 460
X1 + 4 X3 + X6 = 420
X1 0, X2 0, X3 0, X4 0, X5 0 X6 0
Maximize Z = 3 X1 + 2 X2 + 5 X3 + 0 X4 + 0 X5 + 0 X6
where, X4, X5 and X6 are slack variables.
For basic feasible solution;
X1 = 0, X2 = 0, X3 = 0 -------------------------- Non basic variable
X4 = 430, X5 = 460, X6 = 420 ------- Basic variable
Z = 0 ------------------------------------- Basic feasible solution
Basic Cj 3 2 5 0 0 0
CB Ratio test
Variable XB X1 X2 X3 X4 X5 X6
0 X4 430 1 2 1 1 0 0 430/1=430
0 X5 460 3 0 2 0 1 0 460/2=230
0 X6 420 1 0 4 0 0 1 420/4=105
Zj – Cj -3 -2 -5 0 0 0
Z=3x0+2x0 + 5 x 0= 0
Pivotal element
Basic Cj 3 2 5 0 0 0
CB Ratio test
Variable XB X1 X2 X3 X4 X5 X6
0 X4 325 3/4 2 0 1 0 -1/4 325/2=162.5
0 X5 250 5/2 0 0 0 1 -1/2
5 X3 105 1/4 0 1 0 0 1/4
Zj – Cj -7/4 -2 0 0 0 5/4
Basic Cj 3 2 5 0 0 0
CB Ratio test
Variable XB X1 X2 X3 X4 X5 X6
2 X2 325/2 3/8 1 0 1/2 0 -1/8 (325/2)/(3/8)=433.33
0 X5 250 5/2 0 0 0 1 -1/2 250/(5/2)=100
5 X3 105 1/4 0 1 0 0 1/4 105/(1/4)=420
Zj – Cj -1 0 0 1 0 1
Z = 3 X1 + 2 X2 + 5 X3 Pivotal element
= 2 x 162.5 + 5 x 105
= 850 improving
Basic Cj 3 2 5 0 0 0 Ratio
CB
Variable XB X1 X2 X3 X4 X5 X6 test
2 X2 125 0 1 0 1/2 -3/20 -1/20
3 X1 100 1 0 0 0 2/5 -1/5
5 X3 80 0 0 1 0 -1/10 3/10
Zj – Cj 0 0 0 1 2/5 4/5
Basic Cj 50 60 0 0
CB Remark
Variable XB X1 X2 X3 X4
3000 X2 100/9 6/9 1 1/9 0
0 X4 80/11 4/3 0 -1/9 1
Zj – Cj 0 0 1000/3 0
Basic Cj 50 60 0 0
CB Remark
Variable XB X1 X2 X3 X4
3000 X2 20/3 0 1 1/6 1/2
2000 X1 20/3 1 0 -1/12 9/12
Zj – Cj 0 0 1000/3 3000
When problem has & both type of constraints then the problem can be solved in two phases
which is explained through an example here:
Problem 2.9
Minimize Z 12.5 x1 14.5 x 2
Subject to
x1 x2 2000 or x1 x2 2,000
0.4 x1 0.75 x2 1000 or 40 x1 75 x2 100,000
0.075 x1 0.1x2 200 or 75 x1 100 x2 200,000
x1 0 & x2 0
Solution:
Maximize Z 12.5 x1 14.5 x 2
Subject to
x1 x 2 x3 2000
0.4 x1 0.75 x 2 x 4 1000
0.075 x1 0.1x 2 x5 200
where, x3 & x4 are surplus variable and x5 is slack variable. x3 , x4 , x5 0
Now,
x1 x 2 x3 x 6 2000
0.4 x1 0.75 x 2 x 4 x 7 1000
0.075 x1 0.1x 2 x5 200
where, x6 & x7 are artificial variable and x6 , x7 0
Phase-I
Minimize Z x6 x7 Or, Maximize Z x6 x7
Subject to
x1 x 2 x3 x 6 2,000
40 x1 75 x 2 x 4 x 7 100,000
75 x1 100 x 2 x5 200,000
Coeff. Basic Cj 0 0 0 0 0 -1 -1
Ratio
Basic variable XB X1 X2 X3 X4 X5 X6 X7
-1 X6 2000 1 1 -1 0 0 1 0 2000
-1 X7 100000 40 75 0 -1 0 0 1 100000/75 =1333.33
0 X5 200000 75 100 0 0 1 0 0 2000
Zj – Cj -41 -76 1 1 0 0 0
Coeff. Basic Cj 0 0 0 0 0 -1 -1
Ratio
Basic variable XB X1 X2 X3 X4 X5 X6 X7
X6 (2000/3)/(7/15)
-1 2000/3 7/15 0 -1 1/75 0 1 -1/75
=1428.57
(4000/3)/(8/15)
0 X2 4000/3 8/15 1 0 -1/75 0 0 1/75
=2500
0 X5 200000/3 65/3 0 0 4/3 1 0 -4/3 40000/13=3076.92
Zj – Cj -7/15 0 1 -1/75 0 0 76/75
Coeff. Basic Cj 0 0 0 0 0 -1 -1
Ratio
Basic variable XB X1 X2 X3 X4 X5 X6 X7
0 X1 10000/7 1 0 -15/7 1/35 0 15/7 -1/35
0 X2 4000/7 0 1 8/7 -1/35 0 -8/7 8/525
0 X5 250000/7 0 0 325/7 5/7 1 -325/7 -5/7
Zj – Cj 0 0 0 0 0 1 1
Now all the values of Zj-Cj are non-negative
Phase-II
Now we introduce the original problem
Cj -12.5 -14.5 0 0 0
Coeff. Basic
Ratio
Basic variable XB X1 X2 X3 X4 X5
-12.5 X1 10000 / 7 1 0 -15/7 1/35 0
-14.5 X2 4000 / 7 0 1 8/7 -1/35 0
0.0 X5 250000/7 0 0 325/7 5/7 1
Zj - Cj 0 0 143/14 2/35 0
Since all the values of Zj-Cj are non negative, hence, the solution is optimum. Therefore,
X1 = 10000 / 7 and X2 = 4000 / 7 Z = 12.5 x 10000 / 7+ 14.5 x 4000 / 7=183000 / 7
Note : If in the course of computation by simplex method one or more artificial variable remain
basic variable at the end of phase-I computation then the problem has no feasible solution,
i.e. at the end of phase-I artificial variable must go out.
Coordinate of points in the policy space where the slope of boundary changes are:
A. (0,2000) ;
B. ;
C. (2500, 0) ;
D.
Cj
Coeff. Basic -12.5 -14.5 0 0 0
Ratio
Basic variable XB X1 X2 X3 X4 X5
-12.5 X1 10000/7 1 0 -15/7 1/35 0
-14.5 X2 4000/7 0 1 8/7 -1/35 0
0 X5 250000/7 0 0 325/7 5/7 1
Zj - Cj 0 0 143/14 2/35 0
Since all the values of Zj-Cj are non-negative, the result is optimum. Therefore, X1 =10000/7
and X2 = 4000/7 Z = 12.5 x10000/7 + 14.5 x 4000/7= 26,142.86
Problem 2.11 .
Maximise Z = 12X1 + 15 X2 + 9X3
Subject to
8 x1 + 16 x2 + 12 x3 250
4 x1 + 8 x2 +10 x3 80
7 x1 + 9 x2 + 8 x3 = 105
x1 , x2 , x3 0
Solution:
Maximize Z = 12 x1 + 15 x2 + 9 x3
Subject to
8 x1 + 16 x2 + 12 x3 + x4 = 250
4 x1 + 8 x2 +10 x3 - x5 = 80
7 x1 + 9 x2 + 8 x3 = 105
where, x5 is surplus variable and x4 is slack variable. x4 , x5 0
Now,
8 x1 + 16 x2 + 12 x3 + x4 = 250
4 x1 + 8 x2 +10 x3 - x5 + x6 = 80
7 x1 + 9 x2 + 8 x3 + x7 = 105
where, x6 & x7 are artificial variable and x6 , x7 0
Revised objective function is
Maximize Z = 12 x1 + 15 x2 + 9 x3 – M (x6+ x7 )
Subject to
8 x1 + 16 x2 + 12 x3 + x4 = 250
4 x1 + 8 x2 +10 x3 - x5 + x6 = 80
7 x1 + 9 x2 + 8 x3 + x7 = 105
x1 , x2 , x3 , x4 , x5 , x6 , x7 0
Coeff. Basic Cj 12 15 9 0 0 -M -M
Ratio
Basic variable XB X1 X2 X3 X4 X5 X6 X7
0 X4 250 8 16 12 1 0 0 0 250/12=20.833
-M X6 80 4 8 10 0 -1 1 0 80/10=8
-M X7 105 7 9 8 0 0 0 1 105/8=13.12
-11M -17M -18M
Zj - Cj 0 +M 0 0
-12 -15 -9
Coeff. Basic Cj 12 15 9 0 0 -M
Ratio
Basic variable XB X1 X2 X3 X4 X5 X7
-0 X4 154 16/5 32/5 0 1 6/5 0 385/8=48.12
9 X3 8 2/5 4/5 1 0 -1/10 0 20
-M X7 41 19/5 13/5 0 0 4/5 1 205/19=10.789
-19/5M - -13/5M - -4/5M -
Zj - Cj 42/5 39/5
0 0
9/10
0
Cj 15
Coeff. Basic 12 9 0 0
Ratio
Basic variable XB X1 X2 X3 X4 X5
0 X4 2270/19 0 80/19 0 1 10/19 227/8=28.37
9 X3 70/19 0 10/19 1 0 -7/38 7
12 X1 205/19 1 13/19 0 0 4/19 205/13=15.769
Zj - Cj 0 -39/19 0 0 33/38
Coeff. Basic Cj 15
12 9 0 0
Ratio
Basic variable XB X1 X2 X3 X4 X5
0 X4 90 0 0 -8 1 2
15 X2 7 0 1 19/10 0 -7/20
12 X1 6 1 0 -13/10 0 9/20
Zj - Cj 0 0 39/10 0 3/20
Since all the values of Zj-Cj are non-negative), the optimum values are achieved, so X1 = 6 and
X2 = 7 Z = 12 x 6 + 15 x 7 + 9 x 0 = 177
Every LP problem is associated with another LP problem known as Dual Problem. The original
problem is known as Primal Problem. The formulation of Dual LP problem is substantially
helpful in understanding the LP. The variable of Dual LPP are also known as Dual Variables
have important economic interpretations which can be used by a decision maker for planning his
resources. Under certain circumstances the dual problem is easier to solve than Primal Problem.
The solution of Dual Problem lead to the solution of the Primal Problem and thus efficient
computational technique can be developed through the concept of duality. Finally in the
problems of competitive strategy, solution of both the Primal and the Dual Problem is necessary
to understand the problem fully.
Formulation of a Dual Problem
If the Primal problem is in Standard form then dual can be formulated using the following rules:
Primal Dual
1. Objective is to Maximize 1. Objective is to Minimize
2. Variables are j, i.e., Xj 2. Constraints are j
3. Constraints are I 3. Variables are I (Wi)
4. If variable Xj is unrestricted in sign 4. Jth Constraint is = type
5. If constraint is = type 5. Corresponding variable (Wi) is unrestricted
6. type constraint 6. type variable
7. > inequality constraint 7. < 0 variable
8. 0 variable 8. inequality constraint
1. If the Primal problem is a maximization problem, then, the dual problem will be a
minimization problem
2. Numbers of constraints in the Primal problem are equal to the number of Dual variables.
Further, the numbers of constraints in the Dual problem will be equal to the number of
variables in the Primal Problem.
3. The profit coefficients of the Primal Problem appear on the right hand side of the constraints
of dual problem.
4. The primal problem has type constraints while the dual problem has type constraints.
5. The coefficient of the primal problem, which appears, left to right be placed top to bottom in
the constraints of the dual problem & vice-versa.
If the primal problem is non-standard form, the structure of the dual-problem remains
unchanged, however, if a constraint is type the corresponding dual variable is negative or zero
and if a constraint in the primal is equal to type then the corresponding dual variable is
unrestricted in sign.
Properties of Dual Problem
1. If the primal problem is in standard form, the solution of dual problem can be obtained from
the Zj-Cj values of the slack variable in the final simplex table
2. The maximum value of the objective function of the primal problem is the minimize value of
the objective function of the dual problem.
3. If the number of constraints and variables in a primal problem are m & n respectively. The
number of constraints and variable in the dual problem will be n & m respectively.
4. Dual of the dual LP problem is again a primal problem.
5. A linear program can also be unbounded or infeasible. Duality theory tells that if the primal
is unbounded then the dual is infeasible by the weak duality theorem. Likewise, if the dual is
unbounded, then the primal must be infeasible. However, it is possible for both the dual and
the primal to be infeasible.
6. If either the primal or dual problem has a finite optimal solution, the other one also possesses
the same, and the optimal value of the objective functions of the two are equal.
7. Complementary slackness property of primal-dual relationship states that for a positive basic
variable in the primal, the corresponding dual variable will be equal to zero. Alternatively,
for a non-basic variable in the primal (which is zero), the corresponding dual variable will be
basic and positive. For example, if the slack variable in the primal problem are Y1, Y2, Y3,
….. Ym, and the surplus variable in the dual problem are Z1, Z2, Z3, ….. Zn, then in the
optimal solution
a. If Xi >0 Zi = 0
b. If Zi >0 Xi = 0
c. If Wi >0 Yi = 0
d. If Yi >0 Wi = 0
Physically, the shadow price or the marginal cost of a resource, which is the unique price that is
equal to the increase in profit to be realized by one additional unit of the resource, is referred as
the dual variable that means this is the highest price the manufacturer would be willing to pay for
a resource. If the shadow price of a resource is zero that means there is already unutilized amount
and the profit is not increased until the current supply is totally exhausted.
Problem : 2.14
The primal problem is
Minimize Z = X1 + 2X2
Subject to
2x1 + 4x2 160 or -2x1 - 4x2 -160
x1 - x2 = 30
x1 10
x1 , x2 0
Solution
Dual of the above primal is
Maximize Z = -160 w1+ 30 w2+ 10 w3
Subject to
- 2w1+ w2+ w3 1
- 4w1 - w2 2
w1 , w3 , 0 , w2 is unrestricted in sign
Problem :2.15
The primal problem is
Maximize Z = 2X1 + 3X2 + 4X3
Subject to
2x1 + 3x2 + 5x3 2 or -2x1 - 3x2 - 5x3 -2
3x1 + x2 + 7x3= 3
x1 + 4x2 + 6x3 5
x1 , x2 0 , x3 is unrestricted in sign
Solution
Dual of the above primal is
Maximize Z = -2 w1+ 3 w2+ 5w3
Subject to
-2w1+ 3w2+ w3 2
-3w1+ w2+ 4w3 3
-5w1+ 7w2+ 6w3 = 4
w1 , w3 , 0 , w2 is unrestricted in sign
Problem :2.16
The primal problem is
Minimise Z = 3X1 + X2 + X3 - X4
Subject to
2x1 - x2 + 3x3 - x4 = 1
x1 + x2 - x3 + x4 = 3
2 x2 – x3 4
x1 , x2 , x3 , x4 0,
Solution
Dual of the above primal is
Maximize Z = w1+ 3 w2+ 4 w3
Subject to
2w1+ w2 3
-w1+ w2 + 2 w3 13
3w1- w2 - w3 1
-w1+ w2 -1
w1 , w2 is unrestricted in sign , w3 0
(ii) Maximize 12 x1 15 x 2 9 x 3
8 x1 16 x 2 12 x 3 250
4 x1 8 x 2 10 x 3 80
Subject to 7 x1 9 x 2 8 x 3 105
x1 , x 2 , x 3 0
Problem 2.18
Objective Function Minimize Z = X1 + 2 X2 + 3 X3
Subject to 2 X1 - X2 + X3 4 or - 2 X1 + X2 - X3 < - 4
X1 + X2 + 2 X3 < 8 or X1 + X2 + 2 X3 < 8 (same)
X2 - X3 > 2 X2 + X3 - 2
X1 0; X2 0 X3 0
We have to change the inequality constraints to equality constraints, i.e.
- 2 X1 + X2 - X3 + X4 = - 4
X1 + X2 + 2 X3 + X5 = 8
X1 + X2 + X6 = - 2
X1 0, X2 0, X3 0, X4 0
For basic feasible solution;
X1 = 0, X2 = 0 -------------------------- Non basic variable
X4 = -4, X5 = 8 , X6 = -2------------------------ Basic variable
Z = 0 ------------------------------------- Basic feasible solution
Prepare the first simplex table and compute the Zj – Cj values. The slack variable which gives
the most negative value will be the leaving variable. For example, in this problem, slack variable
corresponding to – 4, is the leaving variable.
CB Basic Cj 1 2 3 0 0 0
Variable XB X1 X2 X3 X4 X5 X6
0 X4 -4 -2 1 -1 1 0 0
0 X5 8 1 1 2 0 1 0
0 X6 -2 0 -1 1 0 0 1
Zj 0 0 0 0 0 0
Zj-Cj -1 -2 -3 0 0 0
X4 -2 1 -1 1 0 0
Ratio (-1)/(-2) (-3)/(-1)
= 1/2 =3
For identifying the entering variable, we do the ratio test. In ratio test, repeat the row
corresponding to the leaving variable just below the (Zj – Cj) row. Compute the ratio for each
variable except the positive and zero values in the denominator. Identify the minimum ratio
value. The variable corresponding to minimum ratio will be the entering variable.
Then make the pivotal row and revise the table as is done in simplex table as shown below. -2 is
the pivotal element.
CB Basic Cj 1 2 3 0 0 0
Variable XB X1 X2 X3 X4 X5 X6
1 X1 2 1 - 1/2 1/2 - 1/2 0 0
0 X5 6 0 3/2 3/2 1/2 1 0
0 X6 -2 0 -1 1 0 0 1
Zj 1 - 1/2 1/2 - 1/2 0 0
Zj-Cj 0 -5/2 -5/2 - 1/2 0 0
X6 0 -1 1 0 0 1
Ratio (-5/2)/(-1)
= 5/2
Here, -1 is the pivotal element.
CB Basic Cj 1 2 3 0 0 0
Variable XB X1 X2 X3 X4 X5 X6
1 X1 3 1 0 0 - 1/2 0 -½
0 X5 3 0 0 3 1/2 1 3/2
2 X2 2 0 1 -1 0 0 -1
Zj 1 2 -2 - 1/2 0 -5/2
Zj-Cj 0 0/1 -5 - 1/2 0 -5/2
Problem 2.19
Objective Function Minimize Z = 3 X1 + 2 X2
Subject to 3 X1 + X2 3 or -3 X1 - X2 -3
4 X1 + 3 X2 6 -4 X1 - 3 X2 -6
X1 + X2 3 X1 + X2 3
X1 0; X2 0
We have to change the inequality constraints to equality constraints, i.e.
-3 X1 - X2 + X3 = -3
-4 X1 - 3 X2 + X4 = -6
X1 + X2 + X5 = 3
X1 0, X2 0, X3 0, X4 0
Most negative B.V. leaves the basis and for entering basic, do the max. ratio test.
Basic Cj -3 -2 0 0 0
CB Max. Ratio test
Variable XB X1 X2 X3 X4 X5
0 X3 -1 -5/3 0 1 -1/3 0 X1 enters the basis and (- 1/3)/(-5/3)
2 X2 2 4/3 1 0 -1/3 0 and (- 2/3)/(-1/3), i.e., 0.2, 2, i.e., X3
0 X5 1 -1/3 0 0 1/3 1 leaves the basis
Zj – Cj -1/3 0 0 -2/3 0
Z = 2x2
Pivotal element
= 4
Basic Cj 3 2 0 0 0 Max. Ratio
CB
Variable XB X1 X2 X3 X4 X5 test
3 X1 3/5 1 0 -3/5 -1/5 0
2 X2 6/5 0 1 4/5 -3/5 0
0 X5 6/5 0 0 -1/5 2/5 1
Zj – Cj 0 0 -1/5 -3/5 0
Now all the values of XB are non-negative, hence this is the feasible solution.
Z = 3 x (3/5) + 2 x (6/5)
= 21/5
Exercise 2.20
A farmer has 100-acre farm. He is growing vegetables and fruits in his farm and sell all the
tomatoes, lettuce and radish produced in the farm. The price that he can obtain is Rs 10 per kg
for tomato, Rs 7.50 for price of the lettuce and Rs 20 per kg for radish. The average yield per
acre is 2000 kg of tomato, 3000 pieces of lettuce and 1000 kg of radish. The fertilizer is available
at Rs 5 per kg and the amount required per acre is 100 kg for tomato and lettuce and 50 kg for
radishes. The laborer required for sowing cultivating and harvesting per acre is 5 man-days for
tomato and radish and 6 man-days for lettuce. A total of 400 man-days are available at the rate of
Rs 100 per man-day. Formulate the LPP for the maximizing the farmer’s benefit.
Exercise 2.21
Maximize 12 x1 3 x2 x3
Subject to
10 x1 2 x 2 x 3 100
7 x1 3 x 2 2 x3 77
2 x1 4 x 2 x3 80
x1 0 , x 2 0 , x 3 0
REFERENCES