Linear programming
Conversion of primal into its dual
Duality is an extremely important feature of linear
programming. The various useful aspects of this property are:
1.
If the primal problem contains a large number of
rows(constraints) and a smaller number of columns(variables), then the
computational procedure can be reduced by converting it into dual and then
solving it.
2.
Calculation of dual checks the accuracy of the
primal solution.
3.
Duality in linear programming shows that each
linear programme is equivalent to a two-person zero-sum game. This indicates a
close relationship between linear programming and theory of games.
There are following points to
remember while converting into dual.
1.
If the primal contains n variables and m
constraints, the dual will contain m variables and n constraints.
2.
The maximization problem in the primal becomes
the minimization problem in the dual and vice versa.
3.
The
maximization problem has (≤) constraints while the minimization problem has (≥)
constraints.
4.
The constants c1, c2, …, cn
in the objective function of the primal appear in the constraints of the dual.
5.
The constants b1, b2, …, bm
in the constraints of the primal appear in the objective function of the
dual.
6.
The variables in both problems are non-negative.
Conversion of primal to its dual:
1. When primal is in canonical form:
The general L.P.P.(linear
programming problem) or primal in canonical form is:
Maximize z = c1x1+c2x2+…+cnxn
Subject to a11x1+a12x2+…+a1nxn
≤
b1
a21x1+a22x2+…+a2nxn≤b2
…………..………………………………………………
………………………………………………………….
am1x1+am2x2+…+amnxn≤bm
where, x1, x2,
...,xn, all ≥ 0.
Now its dual is:
Minimize w = b1y1+b2y2+…+bmym
Subject to a11y1+a21y2+…+am1ym
≤
c1
a12y1+a22y2+…+am2ym
≤
c2
…………..………………………………………………
………………………………………………………….
a1ny1+a2ny2+…+amnym
≤
cn
where, the dual variables y1, y2,
…, ym, all ≥ 0.
Example: construct the dual of the problem,
Maximize
Z=3x1+17x2+9x3
Subject
to x1-x2+x3≥3
-3x1+2x3 ≤1,
x1,
x2, x3, all ≥ 0
solution:
firstly
we need to convert first constraint into (≤) ,multiplying the inequality by
(-1), because the
objective function is maximize.
i.e., -x1+x2-x3≤-3
now the
dual of this problem is:
minimize W=-3y1+y2
subject
to –y1-3y2 ≥ 3
y1 ≥ 17
-y1+2y2 ≥ 9
y1, y2, both ≥ 0.
2. When primal is in standard form:
Consider
the L.P.P. or primal,
Maximize z =
c1x1+c2x2
Subject to a11x1+a12x2
=
b1 ,,equality
showing standard form.
a21x1+a22x2
≤ b2
x1≥0, x2≥0.
Here the first
constraint can be expressed in canonical form like,
a11x1+a12x2
≤
b1 , a11x1+a12x2
≥ b1
or, a11x1+a12x2
≤
b1 , -a11x1-a12x2
≤ -b1
Now its dual is:
Minimize
w = b1(y1’-y1’’) +b2y2
Subject to
a11(y1’-y1’’) + a21y2
≥ c1
a12(y1’-y1’’)
+ a22y2 ≥ c2
The dual variables, y1’, y1’’,
y2, all ≥ 0
Or, substituting (y1’-y1’’)
= y1, where y1 is unrestricted in sign.
We get,
Minimize
w = b1y1 +b2y2
Subject to
a11y1 + a21y2 ≥ c1
a12y1 + a22y2
≥ c2
so the dual variables, y1 is unrestricted in sign
and y2 ≥ 0.
NOTE: A=B IS EQUIVALENT TO-> A ≤ B AND A ≥ B.
Example: construct the dual of the problem,
Maximize
Z = 3x1+10x2+2x3
Subject to
2x1+3x2+2x3 ≤ 7
3x1-2x2+4x3
= 3
x1, x2, x3, all
≥ 0
solution: since the problem is of maximization
, so all constraint should be (≤).
Second
constraint can be expressed as a pair of inequalities like,
3x1-2x2+4x3
≤ 3 ,
3x1-2x2+4x3 ≥ 3
Or,
3x1-2x2+4x3 ≤ 3 , -3x1+2x2-4x3
≤ -3
Now the dual of the problem is:
Minimize W = 7y1
+3(y2’-y2’’)
Subject to 2y1+3(y2’-y2’’)
≥ 3
3y1-2(y2’-y2’’)
≥ 10
2y1+4(y2’-y2’’)
≥ 2
y1, y2’, y2’’,
all ≥ 0
now substituting (y2’-y2’’)
= y2, where y2 is unrestricted in sign.
We get,
Minimize W = 7y1
+3y2
Subject to 2y1+3y2 ≥ 3
3y1-2y2 ≥ 10
2y1+4y2 ≥ 2
y1 ≥ 0 and y2 is
unrestricted in sign.
Some points to remember:
1.
The dual of the dual is the primal.
2.
If either the primal or dual problem has an
unbounded solution, then the solution to the other problem is infeasible.
3.
If both the primal and the dual have feasible
solutions, then both have optimal solutions.
And
max Z = min W.
4.
The value of the objective function is same
for primal and dual solutions, but of opposite signs.