Линейное программирование. Практикум. Учебное пособие для бакалавриата
.pdf
6. DUALITY
Solution. The constraint x1 ≥1 will be consider as a non-trivial constraint, so
f = 4x1 −5x2 +8x3 −10x4 +x5 +14 → minx1 −2x2 +7x3 −x5 ≤ 37,
−4x1 −7x2 +4x4 −9x5 ≥ −28,2x1 +6x3 −4x4 +x5 = 48,
x1 ≥1,
x1 ~,x2 ≥ 0,x3 ≤ 0,x4 ≥ 0.
Thus, the primal problem has the matrix
|
1 −2 7 |
0 |
−1 |
|
≤ |
|
37 |
||||
|
|
|
|||||||||
|
|
−4 −7 |
0 |
4 |
−9 |
|
≥ |
|
−28 |
||
|
|
|
|
|
|
|
|
|
|
|
|
A |
|
2 |
0 |
6 |
−4 |
1 |
|
= |
|
48 |
|
= |
1 |
0 |
0 |
0 |
0 |
|
≥ |
|
1 |
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
~ |
≥ |
≤ |
≥ |
~ |
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
−5 |
8 |
−10 |
1 |
|
|
|
14 |
||
|
|
|
|
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
→min |
|
|
|
|
|
|
|
|
|
|
||
Due to the algorithm, the dual problem has the matrix
|
1 |
−4 |
2 |
1 |
|
= |
|
4 |
|
|
|
|
|
||||||||
|
|
−2 −7 0 0 |
|
≤ |
|
−5 |
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
0 |
6 |
0 |
|
≥ |
|
8 |
|
|
|
0 |
4 |
−4 |
0 |
|
≤ |
|
−10 |
|
A′ = |
|
|
|
|
|
|
|
|
|
|
|
|
−1 |
−9 |
1 |
0 |
|
= |
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
≤ |
≥ |
~ |
≥ |
|
|
|
|
||
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
37 |
−28 |
48 |
1 |
|
|
|
14 |
||
|
|
|
|
|
|
|
|
|
|
→max |
|
|
|
|
|
|
|
|
|
||
Finally, we have the dual problem
— 61 —
6. DUALITY
g = 37y1 −28y2 +48y3 +y4 +14 → max
y1 −4y2 +2y3 +y4 = 4,
−2y1 −7y2 ≤ −5, 7y1 +6y3 ≥ 8,
4y2 −4y3 ≤ −10,
−y1 −9y2 −y3 =1,
y1 ≤ 0,y2 ≥ 0,y4 ≥ 0.
6.4. The main theorems
Let we have the duel linear programming problems
The primal problem |
The dual problem |
|||
f (X)= CT X → max |
g(Y)= BTY → min |
|||
|
AX ≤ B, |
|
T |
Y ≥ C, |
|
A |
|
||
|
|
|
≥ 0. |
|
X ≥ 0. |
Y |
|||
|
|
|
|
|
|
|
|
|
|
Theorem 1 (the weak duality). For all feasible solutions X,Y of the pair of the dual problems it holds the inequality:
f (X)≤ g(Y).
Proof.
, AX ≤ B XT AT ≤ BT XT ATY ≤ BTY = g(Y) XT ATY ≤ g(Y).
Similarly,
ATY ≥ C XT ATY ≥ XTC = f(X) . f (X)≤ XT ATY ≤ g(Y).+
Corollary 1 (The sufficient condition for optimality). If there exist feasible solutions X*,Y* of the pair of the dual
— 62 —
6. DUALITY
problems satisfying f (X* )= g(Y* ), then X*,Y* are the optimal solutions.
Proof.
, Due to the theorem 1 for any feasible solution X of the primal problem
f (X)≤ g(Y* ) f (X)≤ f (X* ) . fmax = f (X* ).
Similarly, for any feasible solution Y of the dual problem
f (X* )≤ g(Y) g(Y* )≤ g(Y) gmin = g(Y* ).+
Corollary 2. If the one of the dual linear programming
problem is unbounded ( fmax = +∞ or gmin = −∞ ) then the other problem is infeasible.
Theorem 2 (the strong duality). If there exists the optimal solution X* of the primal problem then there exists the optimal solution Y* of the dual problem and
f (X* )= g(Y* ),
i.e. fmax = gmin .
Theorem 3 (the equilibrium theorem). The optimal
solutions X = (x1 ,x2, ,xn )T and Y = (y1 ,y2, ,ym )T of the pair of the dual problems satisfy the equations
|
m |
|
|
|
∑aijyi −cj |
||
i=1 |
|
|
|
|
n |
|
|
|
|
|
|
|
a x |
−b |
|
|
j |
||
|
∑ ij |
i |
|
j=1 |
|
|
|
xj = 0, j =1, ,n,
yi = 0, i =1, ,m.
Let us write the pair of the dual problems to the canonicals form.
— 63 —
6. DUALITY
|
|
|
|
The primal problem |
|
|
|
|
||||
|
|
|
|
|
|
|
||||||
|
|
f (x)= c1x1 + +cnxn +c0 → max |
|
|
|
|||||||
|
|
a11x1 + +a1nxn +xn+1 = b1, |
|
|
|
|
||||||
|
|
............................................. |
|
|
||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ +amnxn +xn+m = bm, |
|
|
|
|||||
|
|
am1x1 |
|
|
|
|||||||
|
|
|
≥ 0, ,xn+m ≥ 0. |
|
|
|
|
|
||||
|
|
x1 |
|
|
|
|
|
|||||
|
|
|
|
The dual problem |
|
|
|
|
||||
|
|
|
|
|
|
|
||||||
|
|
g(y)= b1y1 + +bmym +c0 → min |
|
|
|
|||||||
|
|
a11y1 + +am1ym −ym+1 = c1, |
|
|
|
|
||||||
|
|
............................................ |
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ +amnym −ym+n = cn, |
|
|
|
|
||||
|
|
a1ny1 |
|
|
|
|
||||||
|
|
|
≥ 0, ,ym+n ≥ 0. |
|
|
|
|
|
||||
|
|
y1 |
|
|
|
|
|
|||||
|
There exists the correspondence |
|
|
|
|
|
||||||
x1 |
x2 |
xj |
xn |
|
xn+1 xn+2 |
xn+i |
xn+m |
|||||
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
ym+1 ym+2 ym+j ym+n |
|
y1 |
y2 |
yi |
ym |
|||||||
Due to this correspondence the conditions above can be rewritten in the form
xj ym* +j = 0, j =1, ,n,
xi+n yi = 0, i =1, ,m.
Where
X = (x ,x , ,x ,x + , ,x + )T and
1 2 n n 1 n m
Y = (y ,y , ,y ,y + , ,y + )T
1 2 m m 1 m n
— 64 —
6. DUALITY
are the optimal solutions of the pair of the dual problems. Example. Solve the linear programming problem using
the equilibrium theorem.
f =22x1 +91x2 −37x3 +19 → min |
|||||||
−10x +7x |
+3x |
≥ |
1, |
|
|
||
|
1 |
2 |
3 |
|
|
|
|
|
|
−10x3 ≥22, |
|
|
|||
8x1 +2x2 |
|
|
|||||
x |
≥ 0,x |
≥ 0,x ≥ 0. |
|
|
|||
1 |
2 |
|
3 |
|
|
|
|
Solution. |
|
|
|
Let us find first the solution |
|||
|
|
|
|
||||
|
|
|
of the dual problem: |
||||
|
|
|
g(Y)= y1 +22y2 +19 → max |
||||
|
|
|
−10y +8y ≤22, |
||||
|
|
|
|
|
1 |
|
2 |
|
|
|
|
|
+2y2 ≤ 91, |
||
|
|
|
7y1 |
||||
|
|
|
3y −10y |
|
≤ −37, |
||
|
|
|
|
1 |
2 |
|
|
|
|
|
y ≥ 0,y |
≥ 0. |
|||
|
|
|
|
1 |
2 |
|
|
We can solve it by using the geometrical method.
The boundaries of the feasible region are defined by the following straight lines;
l1 : −10y1 +8y2 =22 , l2 :7y1 +2y2 = 91,
l3 : 3y1 −10y2 = −37 .
The intersection of this lines gives us the corner points:
A(9,14), B(11,7), C(1,4).
Using the gradient n = (1;22) we can easily the optimal solution of the problem.
Y = A(9;14),
— 65 —
6. DUALITY
gmax = g(9;14)= 336 .
It follows from the equilibrium theorem.
(−10y1 +8y2 −22) x1 = 0, |
|
||||||||||||
|
|
|
+2y2 −91) x2 = 0, |
|
|
||||||||
(7y1 |
|
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
= 0, |
|
|
|||
( |
3y1 |
−10y2 +37) x3 |
|
|
|||||||||
( |
|
|
1 |
|
2 |
|
|
3 |
|
) |
1 |
|
|
|
−10x +7x |
+3x −1 |
|
y = 0, |
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8x |
|
+2x |
|
−10x |
|
−22 |
) |
y |
|
= 0. |
||
|
|
|
|
|
|||||||||
( |
1 |
2 |
|
3 |
|
|
2 |
|
|||||
Due to Y = (9;14) ( y1 ≠ 0,y2 ≠ 0 ) it follows from two last equations of the system above that
−10x1 +7x2 −1 = 0,8x1 +2x2 −22 = 0.
The point A is the intersection of l1 and l2 (A = l1 ∩l2 ) and does not belong to l3 (A l3 ). So, we have
−10y1 +8y2 −22 = 0,7y1 +2y2 −91 = 0,
3y1 −10y2 +37 ≠ 0
It follows from the equilibrium equation ‘
(3y1 −10y2 +37) x3 = 0 .
So, due to
3y1 −10y2 +37 ≠ 0
we obtain
x3 = 0 .
Thus,
— 66 —
6. DUALITY
x3 = 0,
−10x1 +7x2 −1 = 0,8x1 +2x2 −22 = 0.
The solution of this gives the optimal vector
X* = (2,3,0).
f (X* )=22 2 +91 3 −37 0 +19 = 336 = g(Y* ).
Example. Solve the linear programming problem
f =23x1 +40x2 +60x3
4x1 +10x2 +11x3 +x4
2x −6x2 −x3 +x4 −x5
xj ≥ 0, j =1,..,5.
+2x4 −x5 −18 → max
+x5 =57,
=9,
by simplex method and find solutions of the dual problem. by the equilibrium theorem.
Solution. Let us find the matrix of the primal problem
|
|
|
4 |
10 |
11 |
1 |
1 |
|
= |
|
57 |
|
|
|
|
|
|
|
|||||||||
|
|
|
2 |
−6 |
−1 |
1 |
−1 |
|
= |
|
9 |
|
|
A |
= |
|
|
|
|
|
|
|
|
|
|
|
, |
|
≥ ≥ ≥ ≥ ≥ |
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
60 |
2 |
−1 |
|
|
|
|
|
||
|
|
23 |
|
|
|
−18 |
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
→max |
|
|
|
|
|
|
|
|
|
|
|
|
|
||
So, the matrix of the dual problem will be
|
|
4 |
2 |
|
≥ |
|
23 |
|
|
|
|
|
|
|
|
||||||
|
|
10 |
−6 |
|
≥ |
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
−1 |
|
≥ |
|
60 |
|
|
|
|
′ |
|
1 |
1 |
|
≥ |
|
2 |
|
. |
A |
|
= |
|
|
|
|
|
|
|
|
|
|
|
1 |
−1 |
|
≥ |
|
−1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~ |
~ |
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
9 |
|
|
|
−18 |
|
||
|
|
|
|
|
|
|
|
|
→min |
|
|
|
|
|
|
|
|
|
|
||
— 67 —
6. DUALITY
Thus, the dual problem:
|
|
|
g =57y1 +9y2 −18 → min, |
|
||||||||
|
|
|
|
|
4y +2y ≥23, |
|
|
|||||
|
|
|
|
|
|
1 |
|
2 |
|
|
|
|
|
|
|
|
|
10y1 −6y2 ≥ 40, |
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11y1 −y2 ≥ 60, |
|
|
|||||
|
|
|
|
|
y +y |
≥2, |
|
|
||||
|
|
|
|
|
|
1 |
2 |
≥ −1. |
|
|
||
|
|
|
|
|
y −y |
|
|
|||||
|
|
|
|
|
|
1 |
2 |
|
|
|
|
|
Let us find the initial basis. We have |
|
|||||||||||
|
6x1 +4x2 +10x3 +2x4 = 66, |
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2x1 +16x2 +12x3 +2x5 = 48. |
|
||||||||||
After division the equation by 2 we get |
|
|||||||||||
|
|
|
3x1 +2x2 +5x3 +x4 = 33, |
|
||||||||
|
|
|
x +8x +6x +x =24. |
|
||||||||
|
|
|
|
1 |
|
2 |
|
3 |
5 |
|
|
|
So, we obtain |
|
|
|
|
|
|
|
|
||||
|
f =18x1 +44x2 +56x3 +24 → max |
|||||||||||
|
3x +2x +5x +x |
= 33, |
|
|
||||||||
|
|
|
1 |
|
2 |
|
3 |
4 |
|
|
|
|
|
x1 |
+8x2 +6x3 +x5 =24, |
|
|
||||||||
|
x |
j |
≥ 0, j =1,..,5. |
|
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
Let us fill in the simple table |
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|
|
||
|
basis |
|
bi |
|
x1 |
|
x2 |
x3 |
x4 |
x5 |
||
|
x4 |
|
|
|
33 |
|
3 |
|
2 |
5 |
1 |
0 |
|
x5 |
|
|
|
24 |
|
1 |
|
8 |
6 |
0 |
1 |
|
f |
|
|
|
24 |
|
−18 |
|
−44 |
−56 |
0 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
Let us choose a23 = 6 as a pivot (x5 ↔ x3 ). We get
— 68 —
|
|
|
|
|
|
|
|
|
|
|
|
|
6. DUALITY |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
basis |
bi |
|
|
x1 |
x2 |
x3 x4 |
x5 |
|
|
||||
|
|
x4 |
13 |
|
13/ 6 −14 / 3 0 1 −5/ 6 |
|
|
||||||||
|
|
x3 |
4 |
|
1/ 6 |
|
4 / 3 1 0 1/ 6 |
|
|
||||||
|
|
f |
248 |
|
−26 / 3 |
92/ 3 0 0 |
28 / 3 |
|
|
||||||
|
|
|
|
|
|
|
|
|
|
|
|
||||
Now we choose a11 |
= |
13 |
as a pivot (x4 ↔ x1 ). We obtain |
||||||||||||
|
|||||||||||||||
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
|
|
|
basis |
|
bi |
|
x1 |
|
x2 |
|
x3 |
x4 |
x5 |
|
||
|
|
x1 |
|
6 |
1 |
−28 /13 |
0 |
6 /13 |
−5/13 |
|
|||||
|
|
x3 |
|
3 |
0 |
22/ 3 |
1 |
−1/13 |
3/13 |
|
|
||||
|
|
f |
|
300 |
0 |
12 |
|
0 |
4 |
6 |
|
|
|||
|
|
|
|
|
|
|
|||||||||
|
|
X* = (6,0,3,0,0) , |
fmax = f(X* ) = 300 . |
||||||||||||
It follows from the equilibrium theorem |
|
|
|
||||||||||||
|
|
|
|
|
(4y1 +2y2 −23)x1* = 0 . |
|
|
|
|||||||
|
|
|
|
|
(11y1 −y2 −60)x3* = 0 . |
|
|
|
|||||||
Taking into account that |
x1* = 6 ≠ 0 and x3* = 3 ≠ 0 |
||||||||||||||
we find |
|
|
4y1 +2y2 −23 = 0 |
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
11y1 −y2 |
−60 = 0 . |
|
|
|
|||||
So, we obtain the system |
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
4y1 +2y2 =23, |
. |
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
11y1 −y2 = 60. |
|
|
|
|
|||||
And get the optimal solution of the dual problem
y1* =5,5y2* = 0,5
gmin = g(Y* ) =57 5,5 +9 0,5 −18 = 300 = fmax.
— 69 —
6. DUALITY
Questions for self-control
1)What are symmetric dual problems?
2)What are asymmetric dual problems?
3)How to construct dual problem in general case?
4)How are optimal solutions of dual problems related?
5)Formulate the equilibrium theorem.
Exercises for independent work
1) Construct the dual problem for the following linear programming problelems
f = −2x1 +3x2 +2x3 −3 → max |
||||
|
|
−4x2 |
−x3 ≤ 8, |
|
2x1 |
||||
a) −7x +9x −5x ≤ 8, |
||||
|
|
1 |
2 |
3 |
x ≥ 0,x ≥ 0,x ≥ 0, |
||||
|
1 |
2 |
|
3 |
g = 8y1 +8y2 −3 → min |
||||
|
|
−7y2 |
≥ −2, |
|
2y1 |
|
|||
|
|
|
|
|
−4y1 +5y2 ≥ 3, |
|
|||
−y −5y |
≥2, |
|
||
|
1 |
2 |
≥ 0. |
|
y ≥ 0, y |
|
|||
|
1 |
2 |
|
|
f = x1 +2x2 −x3 → min
x1 +2x2 −5x3 ≥ 3,
b)2x1 −8x2 +6x3 ≥5,x1 −7x2 +2x3 ≥2,
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0.
— 70 —
