Professional Documents
Culture Documents
G. Iyengar
Homework # 8
(a) What would be the sign of the dual variables corresponding to the inequality con- [5]
straints x ≥ 0? Note that this is a maximization problem.
Solution: ≥ is a bizarre constraint for a maximization problem; therefore, the
dual variable should ≤ 0.
(b) x(0) = 13 1 is a feasible point for this QP. Construct the equality constrained QP [10]
where you only keep the constraints tight at the point x(0) . Rewrite the QP in
terms of the deviation y = x − x(0) , and solve for the y ∗ and the dual variables
corresponding to the tight constraints at x(0) .
Solution: See the solutions code HW8sols.ipynb. From the code, we get:
y = [ 0.2 0.2 -0.4]
u = [-1.66666667]
(c) The y ∗ that you computed in (b) is not equal to zero, i.e. x(0) is not a critical point [10]
of its active set. Compute the step length λ and the new iterate x(1) .
Solution: From the solution code, we get:
0.5
λ = 0.8333333333333334, x(1) = 0.5
0
(d) Repeat (b) for x(1) . If your computations work out right, you will find that y ∗ = 0, [10]
i.e. x(1) is a critical point for its active set. Show that x(1) is a critical point for the
original QP. Is it optimal for the original QP?
1
Solution: The dual variable of the inequality constraint x3 ≥ 0 that is tight at
the current iterate is −0.5. Therefore, the current point is a KKT point for the
inequality constrained QP.
Since Q 0, the problem is convex, and has a finite optimal value. Furthermore,
x(0) is a strictly feasible point. Therefore, it follows that any KKT point is a global
optimal point; furthermore, all global optima are KKT points.
(e) Suppose we were to introduce a risk-free asset in the market and relax the portfolio [5]
constraint to 1> x ≤ 1. Would the point that you computed in part (d) still remain
optimal?
Solution: The dual variable for the constraint 1> x = 1 is u = −1.5. This does
not have the correct sign. Therefore, point x(1) will not be optimal if the constraint
is relaxed to 1> x ≤ 1.
max β
s.t. µ>
k x − λ kVk xk2 ≥ β, k = 1, . . . , m,
>
1 x = 1,
P n −
i=1 xi ≤ 4.
2
3. Integer knapsack problem Total points: [15]
15
Consider the following integer knapsack problem
P5
max vi xi
Pi=1
5
subject to i=1 wi xi ≤ W
xi ∈ Z+
n = 5;
v = [1,6,18,22,28]’;
w = [1,2,5,6,7]’;
W = 11;
where
In the recursion above, it is optimal to pick up one unit of object i only if vi +Vi (w−wi ) ≥
Vi−1 (w). We want compute V5 (11), and recover the optimal solution. Solve this recursion
using python.
3
as functions of the additional funds allocated to each projects are given in the table
below.
Write a code to compute how $35,000 should be allocated among the projects to achieve
the largest total reduction in completion times? Assume that the additional funds can
be allocated only in blocks of $5000.
Additional funds
(×1000 dollars) Project 1 Project 2 Project 3 Project 4
0 15 20 18 25
5 12 16 15 21
10 9 13 12 18
15 8 11 10 16
20 7 9 9 14
25 6 8 8 12
30 5 7 7 11
35 4 7 6 10
Solution: Let M (x, j) for x ∈ {0, . . . , 7} denote the completion time when 5000x
dollars are invested in Project j. The goal here is to solve the following optimization
problem: P4
minx M (xj , j),
Pj=1
4
s.t. j=1 xj ≤ W (= 7).
Define the value function
Vi (s) = Minimum completion time of projects 1, . . . , i
when a total of 5000s dollars are invested on them.
Then the recursion of V (s, i) is given by
Vi (s) = min M (x, i) + Vi−1 (s − x) ,
0≤x≤s
• Set s = W (= 7)
• For i = n, n − 1, . . . , 1
– x∗i = Di (s)
– s = s − x∗i