Professional Documents
Culture Documents
Convex Optimization - Assignment 3 (Salis)
Convex Optimization - Assignment 3 (Salis)
B USINESS
D EPARTMENT OF I NFORMATICS
Convex Optimization
Assignment 3
Salis Charalampos
1 Exercise 4.1
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:
(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
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
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:
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:
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
(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.
5 Exercise 4.11
min t
s.t. : aTi x − bi ≤ t
aTi x − bi ≥ 0
Then:
5
Thus, the LP form of the problem is:
n
X
min ti
i=1
(c) We follow the same process with (b), however, we now have the additional
constraint:
n
X
min ti
i=1
Pn
(d) We know that: ||x||1 = i=1 |xi |. Then:
|xi | ≤ ti ⇒ −ti ≤ xi ≤ ti
And:
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
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
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:
(c) We get:
min t
p(x)
s.t. : ≤t
r(x) − q(x)
r(x) − q(x) ≥ 0
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.