Docsity

Solution Key for Homework - Linear and Nonlinear Programming | MATH 4553, Assignments of Mathematics

Toggle sidebar
bg1
Solution to homework problem # 4.107 and 7.1
Let us first review some basic concepts.
1. Derive the dual problem from the Lagrangian duality. It works for convex problems, including all linear pro-
gramming problems. Given a convex optimization problem
Minimize f(x)
subject to gi(x)≤0,for i= 1,...,m1
hi(x) = 0,for i= 1,...,m2
let us first write down its Lagrangian function
L(x,u,v) = f(x) +
m1
X
i=1
uigi(x) +
m2
X
i=1
vihi(x),
where ui≥0,for i= 1,...,m1,
and viare free variables.
Then we have
primal problem ⇐⇒ min
xmax
u≥0,v
L(x,u,v)
dual problem ⇐⇒ max
u≥0,vmin
x
L(x,u,v)
To derive the dual problem, we need to compute minxL(x,u,v), which can be calculated by using ∇xL(x,u,v) =
0. Indeed, ∇xL=0, together with u≥0, gives the constraints of the dual problem. Suppose g(u,v) =
minxL(x,u,v), then the dual problem is
Maximize g(u,v)
subject to ∇xL(x,u,v) = 0
u≥0
(Do not forget u≥0, and DO NOT add v≥0.)
2. For linear programming problems, we have some easy-to-use formulas. However, one need to be careful on
choosing the correct formula to use. In the following table, the first primal problem is written in its canonical
form, and the second is in its standard form.
primal problem dual problem
Minimize f=ctx
subject to Ax≥b
x≥0
Maximize g=bty
subject to Aty+u=c
y≥0,u≥0or
Maximize g=bty
subject to Aty≤c
y≥0
Minimize f=ctx
subject to Ax=b
x≥0
Maximize g=bty
subject to Aty+u=c
u≥0or Maximize g=bty
subject to Aty≤c
(The formula given in textbook uses vinstead of y. This vis different from the vin Lagrangian duality forms.)
3. The Lagrangian duality in item 1 and the formulas in item 2 should give exactly the same dual problem. Some-
time they may have differently-looking forms. However, by eliminating slack variables or using a change of
variable, these forms can be shown to be equivalent.
1
pf3
pf4
pf5

Partial preview of the text

Download Solution Key for Homework - Linear and Nonlinear Programming | MATH 4553 and more Assignments Mathematics in PDF only on Docsity!

Solution to homework problem # 4.107 and 7.

Let us first review some basic concepts.

  1. Derive the dual problem from the Lagrangian duality. It works for convex problems, including all linear pro- gramming problems. Given a convex optimization problem

Minimize f (x)

subject to

gi(x) ≤ 0 , for i = 1,... , m 1 hi(x) = 0, for i = 1,... , m 2

let us first write down its Lagrangian function

L(x, u, v) = f (x) +

∑^ m^1

i=

uigi(x) +

∑^ m^2

i=

vihi(x),

where ui ≥ 0 , for i = 1,... , m 1 ,

and vi are free variables. Then we have primal problem ⇐⇒ min x

max u≥ 0 , v

L(x, u, v)

dual problem ⇐⇒ max u≥ 0 , v

min x L(x, u, v)

To derive the dual problem, we need to compute minx L(x, u, v), which can be calculated by using ∇xL(x, u, v) =

  1. Indeed, ∇xL = 0 , together with u ≥ 0 , gives the constraints of the dual problem. Suppose g(u, v) = minx L(x, u, v), then the dual problem is

Maximize g(u, v)

subject to

∇xL(x, u, v) = 0 u ≥ 0

(Do not forget u ≥ 0 , and DO NOT add v ≥ 0 .)

  1. For linear programming problems, we have some easy-to-use formulas. However, one need to be careful on choosing the correct formula to use. In the following table, the first primal problem is written in its canonical form, and the second is in its standard form.

primal problem dual problem Minimize f = ctx

subject to

Ax ≥ b x ≥ 0

Maximize g = bty

subject to

Aty + u = c y ≥ 0 , u ≥ 0

or

Maximize g = bty

subject to

Aty ≤ c y ≥ 0

Minimize f = ctx

subject to

Ax = b x ≥ 0

Maximize g = bty

subject to

Aty + u = c u ≥ 0

or

Maximize g = bty subject to Aty ≤ c

(The formula given in textbook uses v instead of y. This v is different from the v in Lagrangian duality forms.)

  1. The Lagrangian duality in item 1 and the formulas in item 2 should give exactly the same dual problem. Some- time they may have differently-looking forms. However, by eliminating slack variables or using a change of variable, these forms can be shown to be equivalent.

Solution for # 4.107. The primal problem is

Minimize f = −x − 3 y

subject to

x + y = 6 −x + y ≤ 4

The Lagrangian function can be written as

L(x, y, u, v) = (−x − 3 y) + u(−x + y − 4) + v(x + y − 6), where u ≥ 0.

Notice that v should be a free variable. Then the dual problem is equivalent to the following saddle point problem: max u≥ 0 , v

min x,y L(x, y, u, v)

To compute minx,y L(x, y, u, v), let us take ( (^) ∂L ∂x ∂L ∂y

− 1 − u + v = 0 −3 + u + v = 0

and when u, v satisfy these two equations, we have

min x,y L(x, y, u, v) = (− 1 − u + v)x + (−3 + u + v)y − 4 u − 6 v = 0x + 0y − 4 u − 6 v.

Substitute this into maxu≥ 0 , v (minx,y L(x, y, u, v)), the dual problem can be written as

Maximize g = − 4 u − 6 v

subject to

− 1 − u + v = 0 −3 + u + v = 0 u ≥ 0

(Notice that u ≥ 0 is required by the Lagrangian function, and v should be a free variable.) It is not hard to find that the primal problem has min f = − 16 at (x, y) = (1, 5), and the dual problem has max g = − 16 at (u, v) = (1, 2). The details are skipped.

Solution for # 7.1. The primal problem is

Maximize z = x 1 + 3x 2

subject to

x 1 + 4x 2 ≤ 10 x 1 + 2x 2 ≤ 10 x 1 , x 2 ≥ 0

This problem can be rewritten into a canonical form:

Minimize f = −x 1 − 3 x 2

subject to

x ≥

x 1 , x 2 ≥ 0

Hence by the formula for the canonical form (on page 1 of this document), we have the dual problem:

Maximize g = − 10 y 1 − 10 y 2

subject to

−y 1 − y 2 + u 1 = − 1 − 4 y 1 − 2 y 2 + u 2 = − 3 y ≥ 0 , u ≥ 0

or

Maximize g = − 10 y 1 − 10 y 2

subject to

−y 1 − y 2 ≤ − 1 − 4 y 1 − 2 y 2 ≤ − 3 y ≥ 0

If you prefer to first write the primal problem into its standard form, that’s fine. The standard form for the primal problem is Minimize f = −x 1 − 3 x 2 + 0x 3 + 0x 4

subject to

x =

x 1 , x 2 , x 3 , x 4 ≥ 0 Use the formula for the standard form (on page 1 of this document), we have the dual problem:

Maximize g = 10y 1 + 10y 2

subject to

y 1 + y 2 + u 1 = − 1 4 y 1 + 2y 2 + u 2 = − 3 y 1 + u 3 = 0 y 2 + u 4 = 0 u ≥ 0

or

Maximize g = 10y 1 + 10y 2

subject to

y 1 + y 2 ≤ − 1 4 y 1 + 2y 2 ≤ − 3 y 1 ≤ 0 y 2 ≤ 0

It is not hard to see that all above four different forms (in 4 boxes) for the dual problem are equivalent. For example, take the two forms on the right. By changing the sign of variables y 1 and y 2 , we can see that they are exactly the same. Finally, one can also use Lagrangian duality to find the dual for this problem. There are two possibilities.

  1. Use the Lagrangian function for the canonical form, which should be

L(x, u) = (−x 1 − 3 x 2 ) + u 1 (x 1 + 4x 2 − 10) + u 2 (x 1 + 2x 2 − 10) + u 3 (−x 1 ) + u 4 (−x 2 ) where u 1 , u 2 , u 3 , u 4 ≥ 0.

It is important not to forget constraints −x 1 ≤ 0 and −x 2 ≤ 0 in the Lagrangian function. Then using the formula for the Lagrangian duality (on page 1 of this document), we have the dual problem Maximize g = − 10 u 1 − 10 u 2

subject to

−1 + u 1 + u 2 − u 3 = 0 −3 + 4u 1 + 2u 2 − u 4 = 0 u 1 , u 2 , u 3 , u 4 ≥ 0

  1. Use the Lagrangian function for the standard form, which should be

L(x, u, v) =(−x 1 − 3 x 2 ) + v 1 (x 1 + 4x 2 + x 3 − 10) + v 2 (x 1 + 2x 2 + x 4 − 10)

  • u 1 (−x 1 ) + u 2 (−x 2 ) + u 3 (−x 3 ) + u 4 (−x 4 ) where u 1 , u 2 , u 3 , u 4 ≥ 0.

Again, it is important not to forget constraints −xi ≤ 0 , for i = 1, 2 , 3 , 4 , in the Lagrangian function. Also, notice that v 1 , v 2 are free variables, since they corresponds to “equation” type constraints of the standard form. Then using the formula for the Lagrangian duality, the dual problem is Maximize g = − 10 v 1 − 10 v 2

subject to

−1 + v 1 + v 2 − u 1 = 0 −3 + 4v 1 + 2v 2 − u 2 = 0 v 1 − u 3 = 0 v 2 − u 4 = 0 u 1 , u 2 , u 3 , u 4 ≥ 0

Altogether, for problem # 7.1, we already have 6 different forms for the dual problem. All of them are equivalent. (this is left as an exercise for you.)

It can also be shown that the minimum of the primal problem is − 10 , and the maximum of the dual problem (no matter in which form) is − 10.