diff --git a/Claudio_Maggioni_4/Claudio_Maggioni_4.md b/Claudio_Maggioni_4/Claudio_Maggioni_4.md index b7b1cf9..7ef67a9 100644 --- a/Claudio_Maggioni_4/Claudio_Maggioni_4.md +++ b/Claudio_Maggioni_4/Claudio_Maggioni_4.md @@ -104,11 +104,47 @@ $$X \approx \begin{bmatrix}-0.966\\-0.199\\-0.166\end{bmatrix}$$ To reformulate the problem, we first rewrite the explicit values of $G$, $c$, $A$ and $b$: -$$G = \begin{bmatrix}3&0&0\\2&2.5&0\\1&2&2\end{bmatrix}$$ - $$c = \begin{bmatrix}-8\\-3\\-3\end{bmatrix}$$ +$$G = 2 \cdot \begin{bmatrix}3&0&0\\2&2.5&0\\1&2&2\end{bmatrix}$$ +$$c = \begin{bmatrix}-8\\-3\\-3\end{bmatrix}$$ $$A = \begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}$$ $$b = \begin{bmatrix}3\\0\end{bmatrix}$$ +Then, using these variable values and the formulation given on the assignment +sheet the problem is restated in this new form. + +## Exercise 2.2 + +The lagrangian for this problem is the following: + +$$L(x, \lambda) = \frac12\langle x, Gx\rangle + \langle x, c \rangle - \lambda +(Ax - b) =$$$$= \begin{bmatrix}x_1&x_2&x_3\end{bmatrix} + \begin{bmatrix}3&0&0\\2&2.5&0\\1&2&2\end{bmatrix} + \begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix} + + \begin{bmatrix}x_1&x_2&x_3\end{bmatrix} + \begin{bmatrix}-8\\-3\\-3\end{bmatrix} - \lambda + \left(\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix} + \begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix} - + \begin{bmatrix}3\\0\end{bmatrix}\right)$$ +The KKT conditions are the following: +First we have the condition on the partial derivatives of the Lagrangian w.r.t. +$X$: + +$$\nabla_x L(x, \lambda) = Gx + c - A^T \lambda = \begin{bmatrix}3 x_1 - 8 + + \lambda_1\\ 2x_1 + 2.5 x_2 - 3 + \lambda_2\\x_1 + 2x_2 + 2x_3 - 3 + \lambda_1 ++ \lambda_2\end{bmatrix} > 0$$ + +Then we have the conditions on the equality constraint: + +$$Ax - b = 0 \Leftrightarrow \begin{bmatrix}x_1 + x_3\\x_2 + x_3\end{bmatrix} = + \begin{bmatrix}3\\0\end{bmatrix}$$ + +Then we have the conditions on the equality constraint: + +$$\lambda^T (Ax - b) = 0 \Leftarrow Ax - b = 0 \text{ which is true if the above +condition is true.}$$ + +Since we have no inequality constraints, we don't need to apply the KKT +conditions realated to inequality constraints. diff --git a/Claudio_Maggioni_4/Claudio_Maggioni_4.pdf b/Claudio_Maggioni_4/Claudio_Maggioni_4.pdf index b078dd4..e36816f 100644 Binary files a/Claudio_Maggioni_4/Claudio_Maggioni_4.pdf and b/Claudio_Maggioni_4/Claudio_Maggioni_4.pdf differ