0% found this document useful (0 votes)
72 views6 pages

Mathematical Programming Solutions and Duality

The document provides solutions to several examples involving mathematical programming and primal-dual pairs. For example 1, the primal problem is infeasible with an optimal objective value of 6 for the dual problem. For example 2, the constraints of both the primal and dual problems are incompatible. Example 3 involves solving a primal-dual pair using the two-phase simplex method and determining optimal solutions for both problems.

Uploaded by

Ng Chun Hiu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views6 pages

Mathematical Programming Solutions and Duality

The document provides solutions to several examples involving mathematical programming and primal-dual pairs. For example 1, the primal problem is infeasible with an optimal objective value of 6 for the dual problem. For example 2, the constraints of both the primal and dual problems are incompatible. Example 3 involves solving a primal-dual pair using the two-phase simplex method and determining optimal solutions for both problems.

Uploaded by

Ng Chun Hiu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Mathematical Programming

Solutions to Examples 3
1. Dual pair is
P: minimize 3x
1
+ 4x
2
subject to x
1
+x
2
4
2x
1
+ 3x
2
18
x
1
; x
2
0
D: max 4y
1
+ 18y
2
s.t. y
1
+ 2y
2
3
y
1
+ 3y
2
4
y
1
; y
2
0
Solution of primal P by Two-Phase simplex method:
min r = R
min x
1
x
2
s
2
s
1
1 1 0 4
R 2 3 1 18
r 2 3 1 18
min x
1
s
1
s
2
x
2
1 1 0 4
R 1 3 1 6
r 1 3 1 6
so r
min
= 6 > 0: Hence P is infeasible. [ e.g. Constraint 2 can be written 2 (x
1
+x
2
) + x
2
18 but
Constraint 1 )LHS 8 + 4 = 12]
Solution of dual:
min r = R
min y
1
y
2
s
1
R 1 2 1 3
s
2
1 3 0 4
r 1 2 1 3
min/max R y
2
s
1
y
1
2 1 3
s
2
1 1 7
r (min) 0 0 0
z (max) 10 4 12
max s
2
s
1
y
1
2 3 17
y
2
1 1 7
z 10 6 58
The s
1
column of the nal tableau shows that the dual is unbounded.
2. Dual pair is
P: maximize 3x
1
+ 5x
2
subject to x
1
x
2
2
x
1
+x
2
2
x
1
; x
2
0
D: minimize 2y
1
2y
2
subject to y
1
y
2
3
y
1
+y
2
5
y
1
; y
2
0
Second constraint of P is x
1
+x
2
2 ()x
1
x
2
2 which is incompatible with the rst constraint.
Same argument applies to D.
3. Primal dual pair is
P: maximize 5x
1
+ 12x
2
+ 4x
3
subject to x
1
+ 2x
2
+x
3
5
2x
1
x
2
+ 3x
3
= 2
x
1
; x
2
; x
3
0
D: minimize 5y
1
+ 2y
2
subject to y
1
+ 2y
2
5
2y
1
y
2
12
y
1
+ 3y
2
4
y
1
0 y
2
u.r.s.
1
(a) Solve primal by Two-Phase procedure:
min x
1
x
2
x
3
s
1
1 2 1 5
R 2 1 3 2
r 2 1 3 2
min/max x
1
x
2
R
s
1
1
3
7
3
13
3
x
3
2
3

1
3
2
3
r (min) 0 0 0
z (max)
7
3

40
3
8
3
max x
1
s
1
x
2
1
7
3
7
13
7
x
3
5
7
1
7
9
7
z
3
7
40
7
192
7
max x
3
s
1
x
2
8
5
x
1
9
5
z
3
5
29
5
141
5
The dual values at optimum are y
T
= c
T
B
B
1
= (y
1
; y
2
) ; say.
The bottom row of the optimal tableau contains z
j
c
j
values where z
T
= c
T
B
B
1
N = (y
1
; y
2
)
_
1 1
3 0
_
:
and c
T
N
= (4; 0) contains the c
j
values. Hence we can express the bottom row of the optimal primal
tableau in terms of the dual variables:
y
1
+ 3y
2
=
23
5
y
1
=
29
5
from which we nd y

1
=
29
5
; y

2
=
2
5
as the optimal solution to the dual.
(b) Substitute y

1
and y

2
into the dual constraints: y

1
+ 2y

2
= 5 (OK, active), 2y

1
y

2
= 12 (OK,
active),y

1
+3y

2
=
23
5
> 4 (OK). Therefore y

is dual feasible. Evaluate dual objective w = 5y

1
+2y

2
=
141
5
= z

(primal optimal value). Hence, by duality theorem (corollary), y

is optimal for dual.


(c) Same dual solution can be obtained via complementary slackness (C-S) conditions. Denote the
dual slacks by v
1
; v
2
; v
3
: Given x

1
> 0 and x

2
> 0; then, at the respective optimal solutions
x
1
v
1
= 0 =)v
1
= 0
x
2
v
2
= 0 =)v
2
= 0
Therefore
y
1
+ 2y
2
= 5
2y
1
y
2
= 12
resulting in y

1
=
29
5
; y

2
=
2
5
as deduced in Part (a).
4. Assume the following primal dual pair:
P: min c
T
x
s.t Ax b
x 0
D: max b
T
y
s.t y
T
A c
T
y 0
2
Standard form primal is min
_
c
T
x : Ax = b; x 0
_
: Write Ax = b as the 2m inequalities
_
A
A
_

_
b
b
_
giving a canonical minimization form for the primal.
Dene 2m dual variables u; v. The dual problem is
max
_
b
T
b
T
_
_
u
v
_
s.t.
_
u
T
v
T
_
_
A
A
_
c
T
and u; v 0
or
max b
T
(u v)
s.t. (u v)
T
A c
T
Write y = u v which is u.r.s. gives the standard form dual
max
_
b
T
y : yA c
T
; y u.r.s.
_
5. Primal by simplex iterations
max x
1
x
2
x
3
s
1
1 1 1 3
s
2
1

4 7 9
z 2 3 1 0
max x
1
s
2
x
3
s
1
3
4

1
4

3
4
3
4
x
2
1
4
1
4
7
4
9
4
z
5
4
3
4
17
4
27
4
max s
1
s
2
x
3
x
1
4
3

1
3
1 1
x
2

1
3
1
3
2 2
z
5
3
1
3
3 8
so (x

1
; x

2
; x

3
) = (1; 2; 0) :
(a) Dual problem is
min w(y) = 3y
1
+ 9y
2
s.t. y
1
+y
2
2
y
1
+ 4y
2
3
y
1
+ 7y
2
1
y
1
; y
2
0
or
min w = 3y
1
+ 9y
2
s.t. y
1
+y
2
v
1
= 2
y
1
+ 4y
2
v
2
= 3
y
1
+ 7y
2
v
3
= 1
y
1
; y
2
0
Optimal solution to dual can be deduced from bottom row of optimal primal tableau: y

1
=
5
3
;
y

2
=
1
3
:
Note that the optimal dual values y

appear in the bottom row of the optimal (primal) tableau


under the slack columns. This is not a coincidence. We note that y
T
= c
T
B
B
1
= c
T
B
B
1
I
2
and
I
2
are the columns of the Amatrix corresponding to the slacks s
1
; s
2
:
(b) Check that y

is dual feasible and that w(y

) = 8 = z (x

) : Duality theorem=)y

is optimal.
3
(c) By complementary slackness
x
1
> 0 )v
1
= 0 or y
1
+y
2
= 2 and
x
2
> 0 )v
2
= 0 or y
1
+ 4y
2
= 3
Therefore y

1
=
5
3
; y

2
=
1
3
.
(d) Criterion for optimality is z
j
c
j
0 8j. Changing c
3
; a non-basic cost, aects only the nal
tableau bottom row entry under the x
3
column.
z
3
c
3
= 4 c
3
= 3 when c
3
= 1 (current value)
so for current basis to remain optimal: z
3
c
3
0 ) 4 c
3
0 or c
3
4.
Changing c
1
potentially aects z
j
c
j
in all nal tableau columns since x
1
is basic (x
3
was not).
Criterion for optimality is that simultaneously
4
3
c
1
1 0;
1
3
c
1
+ 1 0; c
1
+ 6 1 0
c
1

3
4
c
1
3 c
1
5
Solution remains optimal while
3
4
c
1
3:
As x
2
is basic, changing c
2
also aects all bottom row elements. Tableau is optimal while simul-
taneously
8
3

1
3
c
2
0;
2
3
+
1
3
c
2
0 2 + 2c
2
1 0
c
2
8 c
2
2 c
2

3
2
Solution remains optimal while
3
2
c
2
8:
(e) For c
3
= 6; nal tableau becomes optimal again after 1 iteration
max s
1
s
2
x
3
x
1
4
3

1
3
1 1
x
2

1
3
1
3

2 2
5
3
1
3
2 8
max s
1
s
2
x
2
x
1
2
x
3
1
4
3
2
3
1 10
so the new solution is (x

1
; x

2
; x

3
) = (2; 0; 1) and z

= 10:
(f) Changing b-values aects the tableau r.h.s. elements

b; so potentially making an optimal nal
tableau infeasible;
Consider b
1
b
1
+ so b (3 + ; 9) so

b
0
= B
1
b
0
= B
1
(b +b) where b = (; 0)
T
:
Hence

b
0
=

b +B
1
b
We can read o B
1
from the y
ij
values in the slack columns of the nal tableau for the original
problem:
B
1
=
_
4
3

1
3

1
3
1
3
_
:
Change to solution

b resulting from change in b
1
is B
1
b =
_
4
3
;
1
3

_
T
: Criterion for
feasibility of revised nal tableau is

b
0
0
1 +
4
3
0 2
1
3
0
4
so
3
4
6 giving the range for b
1
as
9
4
b
1
9:
Similarly, for a change in b
2
while keeping b
1
xed,
1
1
3
0 2 +
1
3
0
so
2
3
3 giving the range for b
2
as 8
1
3
b
2
12:
(g) If the r.h.s. element b
1
= 12 then with = 9 the nal tableau becomes feasible after 1 iteration
of the dual simplex algorithm
max s
1
s
2
x
3
x
1
4
3

1
3
1 13
x
2

1
3

1
3
2 1
5
3
1
3
3 23
max x
2
s
2
x
3
x
1
9
s
1
3
18
resulting in (x

1
; x

2
; x

3
) = (9; 0; 0) and z

= 18:
6. Primal-dual pair are
P1: minimize 2x
1
+x
2
+ 4x
3
s.t. 2x
1
+ 3x
2
+x
3
1
3x
1
x
2
+x
3
4
5x
1
+ 6x
2
+x
3
= 3
x
1
0; x
2
0; x
3
u.r.s.
D1: maximize y
1
+ 4y
2
+ 3y
3
s.t. 2y
1
+ 3y
2
5y
3
2
3y
1
y
2
+ 6y
3
1
y
1
+y
2
+y
3
= 4
y
1
0; y
2
0; y
3
u.r.s.
To convert the primal into canonical form use the substitutions u
2
= x
2
; u
3
v
3
= x
3
with u
2
; u
3
; v
3

0: Multiply the 2nd constraint by (1) and rewrite the 3rd equality constraint as two inequality
constraints i) 5x
1
+ 6x
2
+ x
3
3 and ii) 5x
1
+ 6x
2
+ x
3
3 then multiply ii) by (1) giving the
primal-dual pair
P2: minimize 2x
1
u
2
+ 4u
3
4v
3
s.t. 2x
1
3u
2
+u
3
v
3
1
3x
1
u
2
u
3
+v
3
4
5x
1
6u
2
+u
3
v
3
3
5x
1
+ 6u
2
u
3
+v
3
3
x
1
; u
2
; u
3
; v
3
0
D2: maximize w
1
4w
2
+ 3w
3
3w
3
s.t. 2w
1
3w
2
5w
3
+ 5w
4
2
3w
1
w
2
6w
3
+ 6w
4
1
w
1
w
2
+w
3
w
4
4
w
1
+w
2
w
3
+w
4
4
w
1
; w
2
; w
3
; w
3
0
Let y
1
= w
1
; y
2
= w
2
; y
3
= w
3
w
4
then the dual stated above results. Simplex iterations show that
(x

1
; x

2
; x

3
) = (0; 0; 3) : The sequence of tableaux is as below. For Phase I we require min r = R
1
+R
2
:
I x
1
u
2
u
3
v
3
s
1
R
1
2 3

1 1 1 1
s
2
3 1 1 1 0 4
R
2
5 6 1 1 0 3
r 3 9 2 2 1 4
II x
1
u
2
R
1
v
3
s
1
u
3
2 3 1 1 1 1
s
2
1 4 1 0 1 3
R
2
7 3 1 0

1 2
r 7 3 2 0 1 2
5
III x
1
u
2
R
1
v
3
R
2
u
3
5 6 0 1 - 3
s
2
8 7 0 0 - 1
s
1
7 3 1 0 - 2
r 0 0 1 0 - 0
IV x
1
u
2
R
1
v
3
R
2
u
3
5 6 - 1 - 3
s
2
8 7 - 0 - 1
s
1
7 3 - 0 - 2
z 22 23 - 0 - 12
Tableau III is optimal for Phase I with r = 0; so represents a feasible solution to our problem. In
Tableau IV (Phase II) the bottom row z
j
c
j
values for the original objective function have been
computed. We obtain the dual solution using complementary slackness (C-S) conditions.
For primal problem at optimum x

3
= u

3
= 3 > 0; s
1
= 2 > 0 and s
2
= 1 > 0 with z
min
= 12:
Hence y

1
= y

2
= 0 and w

3
w

4
= 0 (3rd dual slack=0) so y

3
= 4:
The values 22 and 23 also are the rst and the second dual slacks (with sign change).
7. The dual simplex algorithm works with an infeasible but optimal tableau. Iterations preserve optimality
and terminate when feasible.
Instead of using articial variables and the Two Phase method, we can write down an initial infeasible
tableau and apply dual simplex iterations
I x
1
x
2
s
1
4 2 80
s
2
2 3 90
z 12 5 0
II x
1
s
2
s
1

8
3

2
3
20
x
2
2
3

1
3
30
z
26
3

5
3
150
III x
1
s
1
s
2
80
x
2
40
z 200
The bottom row of the nal tableau will be 0 (optimal) so feasibility (r:h:s: 0) is sucient to
STOP iterations with x

= (0; 40) and z

= 200:
8. The dual of the bakers problem is
minimize w = 30y
1
+ 5y
2
s.t. 5y
1
+y
2
30
y
1
= 4
y
1
; y
2
0
By inspection the optimal solution to the dual is y

1
= 4; y

2
= 10 with w

= 170 (= z

) :
Note that since x

1
; x

2
> 0 both dual constraints are active. Also y

1
; y

2
> 0 and both primal constraints
are active. This veries C-S conditions.
We can interpret dual variables as marginal costs (shadow costs):
i) Decreasing r.h.s. of our constraint by 1 unit reduces prot by 4p per oz.
ii) Increasing available yeast by 1 oz. increases net prot by 10p (since an extra loaf of bread can be
baked.)
6

You might also like