HW3 Solutions Autotag
HW3 Solutions Autotag
HW3 Solutions Autotag
Fall 2021
min x+y
s.t. x + y = 1,
x ≤ 0, y ≤ 0.
x + y = 1.
min (x · sin(x))2
s.t. x ∈ R.
(a) Find all the global minimum solutions. Explain how you find them.
Hint: there may be multiple ones.
(b) Is there any local minimum solution that is not a global minimum
solution?
(c) Is the objective function f (x) = (x · sin(x))2 a convex function on R?
1
Solution:
(x · sin(x))2 = 0.
Note that
π2
> 0,
4
so f (x) is not a convex function on R
2
3. Consider the following optimization problem
1
min
x
s.t. x ≥ 0.
min x + f (x)
s.t. x ∈ R,
⎧
⎪x,
⎪ −1 < x < 1
⎪
⎨2, x=1
g(x) = .
⎪
⎪
⎪ 1, x = −1
+∞, x > 1 or x < −1
⎩
Method 1: We will show that function g(x) is convex using the defi-
nition of a convex function, i.e. we will show that
3
g(λa + (1 − λ)b) ≤ λg(x) + (1 − λ)g(x)
for any a, b ∈ R and any λ ∈ (0, 1).
– If a, b ∈ (−1, 1) then λa + (1 − λ)b ∈ (−1, 1) and:
g(λa + (1 − λ)b) = λa + (1 − λ)b = λg(a) + (1 − λ)g(b)
We can also notice that in this case objective function is equal
to x + 0 which is linear function, and thus convex.
– If a = −1 and b ∈ (−1, 1) then λ(−1) + (1 − λ)b ∈ (−1, 1) and:
g(−λ+(1−λ)b) = −λ+(1−λ)b ≤ λ+(1−λ)b = λg(−1)+(1−λ)g(b)
– If a ∈ (−1, 1) and b = 1 then λa + (1 − λ)(1) ∈ (−1, 1) and
g(λa+(1−λ)(1)) = λa+1−λ ≤ λa+2(1−λ) = λg(a)+(1−λ)g(1)
– If either of the points a or b belongs to (−∞, −1) ∪ (1, +∞) then
value of the function g(x) at that point will be +∞. In that case
we have λg(a) + (1 − λ)g(b) = +∞ and:
g(λa + (1 − λ)b) ≤ +∞ = λg(a) + (1 − λ)g(b)
Method 2: Lets look at function h : [−1, 1] → R given by:
⎧
⎪x, −1 < x < 1
⎨
h(x) = 2, x = 1 .
⎪
1, x = −1
⎩
4
and we can see it is a convex function on its domain. If function
h(x) is convex on its domain dom(h) = [−1, 1] then its extension
g : R → R ∪ {−∞} given by:
(
h(x), x ∈ [−1, 1]
g(x) = .
+∞, x∈/ [−1, 1]
is also convex (same argument as in the last bullet point from Method
1).
(b) Problem does not have a solution.
Value x∗ ∈
/ (−1, 1) can’t be the solution, because for example
⎧
⎨1,
⎪ x = −1
∗
g(0) = 0 < g(x ) = 2, x=1 .
⎪
+∞, x ∈
/ [−1, 1]
⎩
5. For each of the statements below, state whether it is true or false. Justify
your answer.
(a) Consider the optimization problem
5
(c) Consider the following optimization problem
(P ) max f (x)
s.t. gi (x) ≥ bi , ∀i ∈ I.
Suppose the optimal objective value of (P) is vP . Then, the La-
grangian dual of (P) is given by
min{L(λ) : λ ≥ 0},
(D) (1)
P
where L(λ) = maxx {f (x) + i∈I λi (gi (x) − bi )}. Furthermore, sup-
pose the optimal objective value of (D) is vD , then vP ≤ vD .
Solution:
(a) False.
Restricting the solution space cannot result in a better solution. Note
that any solution of the new problem is also a feasible solution of the
original problem because
g(x) ≥ 1 =⇒ g(x) ≥ 0.
Let x̂ be the optimal solution of the new problem, and v̂ = f (x̂) be
the optimal value. Since x̂ is also feasible to the original problem,
v ≤ f (x̂) (* v is optimal value of original) (2)
∴ v ≤ v̂ (3)
(b) True.
Note that f (x)4 ≥ 0, ∀x. Since f (x∗ ) = 0, we have f (x)4 ≥ f (x∗ ), ∀x.
Thus, by the definition of global optimum, x∗ is a global optimal so-
lution.
(c) True.
Let S = {x : gi (x) ≥ bi , ∀i ∈ I}. Let x∗ ∈ S be the optimal solution
of (P). Thus, vP = f (x∗ ). Also, let λ∗ ≥ 0 be the optimal solution of
(D) and so vD = L(λ∗ ). Now, for any λ ≥ 0,
X
L(λ) = max{f (x) + λi (gi (x) − bi )} (4)
x
i∈I
X
≥ max{f (x) + λi (gi (x) − bi )} (5)
x∈S
i∈I
≥ max{f (x)} (6)
x∈S
= vP (7)
where Eq.(5) follows because the feasible space is being restricted
(refer to Q5 (a) if unclear) and Eq.(6) follows because λ ≥ 0 and
x ∈ S imply that λi (gi (x) − bi ) ≥ 0 for all i ∈ I. Since this holds for
all λ ≥ 0, it also holds for λ∗ . Therefore, vD = L(λ∗ ) ≥ vP .