Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

ATHENS U NIVERSITY OF E CONOMICS AND

B USINESS
D EPARTMENT OF I NFORMATICS

Convex Optimization

Assignment 3

Salis Charalampos
1 Exercise 4.1

The feasible set of the problem is (python file: Boyd_4_1_feasible_set.py):

where the middle point is found as the solution of the linear system:
" #" # " # " # " #
2 1 x1 1 x1 0.4
= ⇒ =
1 3 x2 1 x2 0.2

(a) We use python to search for the minimum point (python file: Boyd_4_1_a.py)
and get:

x∗ = (0.4, 0.2), with: f (x∗ ) = 0.6

(b) limx1 →∞ f0 (x1 , x2 ) = limx2 →∞ f0 (x1 , x2 ) = −∞, thus f0 is unbounded from


below.

(c) Xopt = {(0, x2 )|x2 ⊆ [1, +∞)}

(d) Searching on the edge of the feasible set for the point (x1 , x2 ), where x1 = x2 .
The point will be located between (1, 0) and (0, 1), thus, we only search the first two
constraints:
" #" # " # " # " #
1
2 1 x1 1 x1 3
= ⇒ = 1
1 −1 x2 0 x2 3

which is feasible, and:


" #" # " # " # " #
1
1 3 x1 1 x1 4
= ⇒ = 1
−1 1 x2 0 x2 4

which is not feasible. Thus: x∗ = ( 13 , 13 ).

2
None of the edges give a clear result, so we use python (python file: Boyd_4_1_e.py)
to search for the optimal:

x∗ = ( 12 , 16 ), with: f (x∗ ) = 1
2

2 Exercise 4.3

We need to prove that x∗ satisfies the optimality criterion for differentiable f0 with
inequality constraints:

∇f0 (x∗ )T (y − x∗ ) ≥ 0, ∀y ∈ X

We have: ∇f0 (x) = P x + q. Then:


 
−1

Px + q =  0 
 

2
Thus:

1
∇f0 (x∗ )T (y − x∗ ) = (−1, 0, 2)T (y1 − 1, y2 − , y3 + 1)
2
= 1 − y1 + 2y3 + 2 = 3 − y1 − 2y3

Since: −1 ≤ yi ≤ 1, we have:

miny1 ,y3 {3 − y1 − 2y3 } = 0 ⇒ f0 (x∗ )T (y − x∗ ) ≥ 0

Hence, the optimality criterion holds.

3 Exercise 4.8

(a) If the problem is infeasible, we know that p∗ = ∞. If the problem is feasible and
c ∈ R(AT ), then we can write c as:

c = AT c1 + c2 ⇒ cT x = cT1 Ax + cT2 x = cT1 b + cT2 x

Thus, by minimizing with respect to x, we either get cT1 b, if c2 = 0, or −∞ otherwise.

3
(b) Following the same thought process with (a), we break c into two components:
c = ac1 + c2 . Then:

cT x = cT1 aT x + cT2 x

If c1 > 0 or c2 ̸= 0, then p∗ = −∞. For c1 ≤ 0 and c2 = 0, we have:

cT x = cT1 aT x = (−c1 )T (−aT x) ≥ (−c1 )T (−b) = cT1 b

(c) We know that: l ≤ x ≤ u ⇒ ci li ≤ ci xi ≤ ci ui , ∀i. If ci > 0, then the minimum


of cTi xi is ci li and if ci < 0, ci ui . It is also apparent that if ci = 0, then any value
between the two Box constraints minimizes ci xi .

(d) We can find the investment with the maximum return cm = mini −ci . Then,
in order to minimize cT x, we would invest everything in m (xm = 1 and xj = 0, for
j ̸= m), which yields: cT x = cm . In the inequality form, we can zero x to obtain the
minimum, if cm > 0.

(e) Since 0 ≤ xi ≤ 1, ∀i, we cannot invest all our income in cm anymore. Now
we follow the logic of knapsack problem: we sort c in increasing order and have a
counter sum = 0. For each i, we give ci weight 1 (xi = 1) if sum < a and then update
the counter sum = sum + 1, until the counter reaches a. If a is not integer, we have
the fractional knapsack problem, where each ci before the counter reaches a is given
weight 1 and for the last item to fill the knapsack we give weight (a − ⌊a⌋).

(f) Following the thought process of the knapsack problem, we now sort the items
ci
not only based on their value, but their weight-value pairs: di . Then, for this ordering,
the solution remains the same with (e).

4 Exercise 4.10

In order to prove that the two problems are equivalent, we have to show that from the
solution of one, we can get the solution of the other.

(1) Suppose that x is feasible in the general linear program. This implies that the
positive part x+ , negative part x− and the slack variable: s = h − Gx are all feasible.
Furthermore, because:

cT x + d = cT x+ − cT x− + d

4
the optimal value of the general linear program leads to the optimal value of the
standard form by taking positive and negative parts.

(2) If x+ , x− and s are feasible, then x = x+ − x− is also feasible. Also, if x+ and


x− are optimal for the standard form, we can obtain the optimal solution of the general
linear program by taking: x = x+ − x− .

5 Exercise 4.11

(a) We know that:

||Ax − b||∞ = maxi=1,..,n |aTi x − bi |

Thus, the problem is:

min max |aTi x − bi |


i

s.t. : aTi x − bi ≥ 0, i = 1, ..., n


x≥0

By taking the epigraph problem, we obtain the LP form of the problem:

min t
s.t. : aTi x − bi ≤ t
aTi x − bi ≥ 0

where maxi |aTi x − bi | = maxi {aTi x − bi } from the non-negativity constraints.

(b) We know that:


Pn
||Ax − b||1 = i=1 |aTi x − bi |

Then:

|aTi x − bi | ≤ t ⇒ −ti ≤ aTi x − bi ≤ ti

5
Thus, the LP form of the problem is:

n
X
min ti
i=1

s.t. : aTi x − bi ≥ −ti


aTi x − bi ≤ ti

(c) We follow the same process with (b), however, we now have the additional
constraint:

||x||∞ ≤ 1 ⇒ maxi |xi | ≤ 1 ⇒ −1 ≤ xi ≤ 1, ∀i

Then, the LP form of the problem is:

n
X
min ti
i=1

s.t. : aTi x − bi ≥ −ti


aTi x − bi ≤ ti
xi ≤ 1
xi ≥ −1

Pn
(d) We know that: ||x||1 = i=1 |xi |. Then:

|xi | ≤ ti ⇒ −ti ≤ xi ≤ ti

And:

||Ax − b||∞ ≤ 1 ⇒ maxi |aTi x − bi | ≤ 1 ⇒ −1 ≤ aTi x − bi ≤ 1, ∀i

Then, the LP form is:

n
X
min ti
i=1

s.t. : − t i ≤ xi ≤ t i , i = 1, ..., n
− 1 ≤ aTi x − bi ≤ 1, i = 1, ..., n

6
(e) In addition, we can maximize each argument individually. Thus, from previous
results, we get:

n
(1)
X
min ti + t(2)
i=1
(1) (1)
s.t. : − ti ≤ aTi x − bi ≤ ti , i = 1, ..., n
(2) (2)
− ti ≤ xi ≤ ti , i = 1, ..., n

6 Exercise 4.12

The LP form of the problem is:

n X
X n
min C = cij xij
i=1 j=1
Xn n
X
s.t. : bi − xji + xij , ∀i, j (flow preservation constraint)
j=1 j=1

lij ≤ xij ≤ uij , ∀i, j

7 Exercise 4.33

(a) We know that: max{p(x), q(x)} = t ⇒ p(x) ≤ t and q(x) ≤ t, which in posynomial
p(x) q(x)
form is: t ≤ 1 and t ≤ 1. Thus, the problem becomes:

min t
p(x)
s.t. : p̃(x) = ≤1
t
q(x)
q̃(x) = ≤1
t

7
(p) (p)
PK1 (p) a1k ank PK1 (p) (p)
Since: p̃(x) = k=1 ck x1 ...xn = k=1 exp (wk )T y + bk , where:
PK2 (q) (q)
yi = log xi and: q̃(x) = k=1 exp (wk )T y + bk . Then, the convex problem is:

min t
K1
(p) (p)
X
s.t. : exp{(wk )T y + bk } ≤ 0
k=1
K2
(q) (q)
X
exp{(wk )T y + bk } ≤ 0
k=1

(b) We get:

min exp tp + exp tq


s.t. : p(x) ≤ tp
q(x) ≤ tq

and by transforming the variable: yi = logxi , we obtain the convex optimization


problem:

min exp tp + exp tq


K1
(p) (p)
X
s.t. : exp{(wk )T y + bk } ≤ log(tp )
k=1
K2
(q) (q)
X
exp{(wk )T y + bk } ≤ log(tq )
k=1

(c) We get:

min t
p(x)
s.t. : ≤t
r(x) − q(x)
r(x) − q(x) ≥ 0

We examine the constraint:


p(x) p(x)−tq(x)
r(x)−q(x) ≤ t ⇒ p(x) ≤ t(r(x) − q(x)) ⇒ tr(x) ≤1

8
which is a posynomial and:

q(x)
r(x) − q(x) ≥ 0 ⇒ r(x) ≤1

which is also a posynomial. Thus, we can transform our variable yi = log xi and
obtain the equivalent convex problem.

You might also like