For formulating a dual problem, first you have to bring the problem in the canonical form. The following changes are used in formulating the dual problem.
(i) Change the objective function of maximization in the primal into minimization in the dual and vice versa.
(ii) The number of variables in the primal will be the number of constraints in the dual and vice versa.
(iii) The cost coefficient c1, c2, . . . , cn in the objective function of the primal will be the RHS constant of the constraints in the dual and vice versa.
(iv) In forming the constraints for the dual, you have to consider the transpose of the body matrix of the primal problem.
(v) The variables in both problems are non-negative.
(vi) If a variable in the primal is unrestricted in sign, then the corresponding constraint in the dual will be an equation and vice versa.
6.3.2 Definition of the Dual Problem Let the primal problem be,
Maximize z = c1x1 + · · · + cnxn
Subject to a11x1 + a12x2 + · · · + a1nxn ≤ b1
a21x1 + a22x2 + · · · + a2nxn ≤ b2 .
am1x1 + am2x2 + · · · + amnxn ≤ bm
x1, x2, . . . , xn ≥ 0
UNIT 6. DUALITY IN LINEAR PROGRAMMING
Dual: The dual problem is defined as,
Minimize w = b1y1 + b2y2 · · · + bmym
Subject to a11y1 + a21y2 + · · · + am1ym ≥ c1
a12y1 + a22y2 + · · · + am2ym ≥ c2
.
a1ny1 + a2ny2 + · · · + amnym ≥ cm y1, y2, . . . , ym ≥ 0
where y1, y2, y3, . . . , ym are called dual variables
Example 6.3.1 Write the dual of the following primal LP problem.
Maximize z = x1 + 2x2 + x3
Subject to: 2x1 + x2 − x3 ≤ 2
−2x1 + x2 − 5x3 ≥ − 6
4x1 + x2 + x3 ≤ 6 x1, x2, x3 ≥ 0.
☞ Solution. Since the problem is not in the canonical form, you have to interchange the inequality of the second constraint,
Maximize z = x1 + 2x2 + x3
Subject to: 2x1 + x2 − x3 ≤ 2 2x1 − x2 + 5x3 ≤ 6 4x1 + x2 + x3 ≤ 6 x1, x2, x3 ≥ 0.
Dual Let y1, y2, y3 be dual variables. Thus the dual problem is given by Minimize w = 2y1 + 6y2 + 6y3
Subject to: 2y1 + 2y2 + 4y3 ≥ 1 y1 − y2 + y3 ≥ 2
−y1 + 5y2 + y3 ≥ 1 y1, y2, y3 ≥ 0.
✍ Example 6.3.2 Find the dual of the following LPP.
UNIT 6. DUALITY IN LINEAR PROGRAMMING
Maximize z = 3x1 − x2 + x3
Subject to: 4x1 − x2 ≤ 8
8x1 + x2 + 3x3 ≥ 12 5x1 − 6x3 ≤ 13
x1, x2, x3 ≥ 0.
☞ Solution. Since the problem is not in the canonical form, you have to first of all interchange the inequality of the second constraint.
Maximize z = 3x1 − x2 + x3 Subject to: 4x1 − x2 ≤ 8
−8x1 − x2 − 3x3 ≤ −12 5x1 + 0x2 − 6x3 ≤ 13 x1, x2, x3 ≥ 0.
In matrix form you have
Maximize z = cx Subject to: Ax ≤ b
x ≥ 0
x1
8
4 −1 0
Where c = (3 − 1 1), x = x2
, b =
−12
and A =
−8 −1 −3
x3 13
5 0 −6 Dual. Let y1, y2, . . . , y3 be the dual variables. The dual problem is thus given as
Minimize w = bty Subject to: Aty ≥ ct
y ≥ 0
UNIT 6. DUALITY IN LINEAR PROGRAMMING
i.e.,
y1
Minimize w = (8 − 12 13) y2
y3
4 −8 5 y1
8
Subject to: −1 −1 0 y2
≥
−12
That is
0 −3 6 y3 13
Minimize w = 8y1 − 12y2 + 13y3 Subject to: 4y1 − 8y2 + 5y3 ≥ 3
−y1 − y2 + 0y3 ≥ − 1
0y1 − 3y2 + 6y3 ≥ 1 y1, y2, y3 ≥ 0.
✍ Example 6.3.3 Write the dual of the following LPP
Minimize z = 2x2 + 5x3
Subject to: x1 + x2 + 0x3 ≥ 2
−2x1 − x2 − 6x3 ≥ −6 x1 − x2 + 3x3 ≤ 4
x1 − x2 + 3x3 ≥ 4 x1, x2, x3 ≥ 0
☞ Solution. Again on rearranging the constraints, you have Minimize z = 0x1 + 2x2 + 5x3 Subject to: x1 + x2 + 0x3 ≥ 2
−2x1 − x2 − 6x3 ≥ −6 x1 − x2 + 3x3 ≥ 4
−x1 + x2 − 3x3 ≥ −4 x1, x2, x3 ≥ 0
Dual: Since there are four constraints in the primal, you have four dual variables namely y1, y2, yt 3 , y3 tt.
Maximize w = 2y1 − 6y2 + 4y3 t − 4y3 tt Subject to: y1 − 2y2 + y3 t − y3 tt ≤ 0
y1 − y2 −2 y3 t + y3 tt ≤ y1 − 6y2 + 3yt − 3ytt ≤ 5
0 3 3
y, y , yt , ytt ≥ 0
UNIT 6. DUALITY IN LINEAR PROGRAMMING
Let y3 = yt 3 − y3 tt
Maximize w = 2y1 − 6y2 + 4(y3 t − y3 tt) Subject to: y1 − 2y2 + (y3 t − y3 tt) ≤ 0
y1 − y2 − (y3 t − y3 tt) ≤ 2 0y1 − 6y2 + 3(yt − ytt) ≤ 5 Finally, you have
3 3
Maximize w = 2y1 − 6y2 + 4y3 Subject to: y1 − 2y2 + y3 ≤ 0
y1 − y2 − y3 ≤ 2 0y1 − 6y2 + 3y3 ≤ 5
y1, y2 ≥ 0, y3 is unrestricted.
✍ Example 6.3.4 Give the dual of the following problem:
Maximize z = x + 2y Subject to: 2x + 3y ≥ 4
3x + 4y = 5
x ≥ 0 and y unrestricted.
☞ Solution. Since the variable y is unrestricted, it can be expressed as y = yt − ytt, yt, ytt ≥ 0.
On reformulating the given problem, you have
Maximize z = x + 2yt − 2ytt Subject to: −2x − 3(yt − ytt) ≤ −
4
3x + 4(yt − ytt) ≤ 5 3x + 4(y − ytt) ≥ 5 x, yt, ytt ≥ 0
Since the problem is not in the canonical form, you have to rearrange the constraints.
Maximize z = x + 2yt − 2ytt Subject to: −2x − 3yt + ytt ≤ −
4
3x + 4yt − 4ytt ≤ 5
−3x − 4y + 4ytt ≤ −5 x, yt, ytt ≥ 0
Dual Since there are three variables and three constraints in the primal, you have three variables,
UNIT 6. DUALITY IN LINEAR PROGRAMMING
namely y1, yt 2 , ytt3 .
Minimize w = −4y1 + 5w2 t − 5w2 tt Subject to: −2y1 + 3y2 t − 3y2 tt ≥ 1
−3y1 + 4y2 t − 4y2 tt ≥ 2 3y1 − 4y2 t + 4y2 tt ≥ −2
, yt , ytt ≥ 0 y1 2 2
Let y2 = yt 2 − y2 tt, so that the dual variables y2 is unrestricted in sign. Finally the dual is Minimize w = −4y1 + 5y2
Subject to: −2y1 + 3y2 ≥ 1
−3y1 + 4y2 ≥ 2 3y1 − 4y2 ≥ −
2
y1 ≥ 0, y2 is unrestricted or
Minimize w = −4y1 + 5y2 Subject to: −2y1 + 3y2 ≥ 1
−3y1 + 4y2 ≥ 2
−3y1 + 4y2 ≤ 2
y1 ≥ 0, y2 is unrestricted or
Minimize w = −4y1 + 5y2 Subject to: −2y1 + 3y2 ≥ 1
−3y1 + 4y2 = 2
y1 ≥ 0, y2 is unrestricted
✍ Example 6.3.5 Write the dual of the following primal LPP.
6.3.3 Important Results in Duality 1. The dual of the dual is primal.
2. If one is a maximization problem, the the other is of minimization.
3. The necessary and sufficient condition for any LPP and its dual to have an optimal solu- tion is that both must have feasible solutions.
4. Fundamental duality theorem states, if either the primal or dual problem has a finite opti- mal solution, then the other problem also has a finite optimal solution and also the optimal values of the objective function is both the problems are the same, i.e., max z = min w.
The solution of the other problem can be read from zj − cj row below the columns of slack or surplus variables.
UNIT 6. DUALITY IN LINEAR PROGRAMMING
5. Existence theorems states that, if either problem has an unbounded solution then the other problem has no feasible solution.
6. Complementary slackness theorem states that:
(a) If a primal variable is positive, then the corresponding dual constraint is an equation at the optimum and vice versa.
(b) If a primal constraint is a strict inequality then the corresponding dual variable is zero at the optimum and vice versa.
Example 6.3.6 Solve the following LPP.
Maximize z = 6x1 + 8x2
by solving its dual problem.
Subject to: 5x1 + 2x2 ≤ 20 x1 + 2x2 ≤ 10 x1, x2 ≥ 0
☞ Solution. As there are two constraints in the primal, you have two dual variables y1 and y2. Thus the dual of this problem is given as.
Minimize w = 20y1 + 10y2 Subject to: 5y1 + y2 ≥ 6
2y1 + 2y2 ≥ 8 y1, y2 ≥ 0
You can solve the dual problem using the Big-M method. Since this method involves artificial variables, the problem is reformulated and you have,
Maximize wt = −20y1 − 10y2 + 0y3 − 0y4 − M A1 − M A2
Subject to: 5y1 + y2 − y3 + A1 = 6 2y1 + 2y2 − y4 + A2 = 8 y1, y2, y3, y4, A1, A2 ≥ 0
UNIT 6. DUALITY IN LINEAR PROGRAMMING
B y1 y2 y3 y4 A1 A2 yB yB /y1
A1
A2
5 2
1 2
-1 0
0 -1
1 0
0 1
6 8
1.02 → 4 wj −cj -7M +20
↑ -3M -10 M M 0 0 -14M
B y1 y2 y3 y4 A1 A2 yB yB /y1
y1 A2
1 0
1/5 8/5
-1/5 2/5
0 -1
−− 0 1
6/5 28/5
6 25/8 → wj −cj 0 - 8 M +6
↑ - 2 M +4 M − 0 28 M +24
B y1 y2 y3 y4 A1 A2 yB
y1
y2
1 0
0 1
-1/5 1/4
1/8
-5/8 −
− −
− 1/2 7/2
wj −cj 0 0 5/2 15/4 − − -45
5 5 5
Since all wj − cj ≥ 0, the solution is optimum. Therefore, the optimal solution of dual is, y1 = 1/2, y2 = 7/2, max wt = −45
Hence min w = 45
The optimum solution of the primal problem is given by the value of wj − cj in the optimal table corresponding to the column of surplus variables y1 and y2. i.e.,
5 15
x1 =
2 , x2 = 4
5 15
max z = 6 × 2 + 8 × = 45 4
✍ Example 6.3.7 Prove using duality theory that the following LPP has a feasible but not optimal solution.
Minimize z = x1 − x2 + x3 Subject to: x1 − x3 ≥ 4
x1 − x2 + 2x3 ≥ 3 x1, x2, x3 ≥ 0
☞ Solution. Given the primal LPP
Minimize z = x1 − x2 + x3 Subject to: x1 − x3 ≥ 4
x1 − x2 + 2x3 ≥ 3 x1, x2, x3 ≥ 0
UNIT 6. DUALITY IN LINEAR PROGRAMMING
B y1 y2 y3 y4 A1 y5 yB yB /y1
y3 A1
y5
1 0 -1
1 1 2
1 0 0
0 -1 0
0 1 0
0 0 1
1 1 1
1 1 1/2 → wj −cj -4 -M -3
↑ 0 M 0 0 -M
B y1 y2 y3 y4 A1 y5 yB yB /y1
y3
A1
y2
3/2 1/2 -1/2
0 0 1
1 0 0
0 -1 0
0 1 0
-1/2 -1/2 1/2
1/2 1/2 1/2
1/3 → 1 − wj −cj - 1 M + 5
↑ 0 0 M 0 1 M + 3 - 1 M - 3
Dual Since there are two constraints, there are two variables y1 and y2 in the dual, given by Maximize w = 4y1 + 3y2
Subject to: y1 + y2 ≤ 1 0y1 − y2 ≤ −
−y1 + 2y1 2 ≤ 1 y1, y2 ≥ 0 To solve the dual problem Convert to standard form
Maximize w = 4y1 + 3y2
Subject to: y1 + y2 + y3 = 1
0y1 + y2 − y4 + A1 = 1
−y1 + 2y2 + y5 = 1 y1, y2 ≥ 0
where y3, y5 are slack variables, y4 the surplus variable and A1 the artificial variable.
2 2 2 2 2 2
Table 6.1: Page 80-1
Since all wj − cj ≥ 0 and an artifical variable appears in the basis at positive level, the dual problem has no optimal basic feasible solution. Therefore there exists no finite optimum
solution to the given primal LPP (Unbounded solution) ✍ 6.3.4 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 and leave the basis. In dual simplex method, you first select the variable to leave the basis and then the variable to enter the basis.
This method yields an optimal solution to the given LPP in a finite number of steps, provided no basis is repeated.
The dual simplex method is used to solve problems which start dual feasible (i.e., whose
UNIT 6. DUALITY IN LINEAR PROGRAMMING