diff --git a/Claudio_Maggioni_4/Claudio_Maggioni_4.md b/Claudio_Maggioni_4/Claudio_Maggioni_4.md index 50a96d9..7ad91a1 100644 --- a/Claudio_Maggioni_4/Claudio_Maggioni_4.md +++ b/Claudio_Maggioni_4/Claudio_Maggioni_4.md @@ -217,7 +217,7 @@ $$L(x, \lambda) = c^T x - \lambda^T (Ax - b) - s^T x$$ The KKT conditions are the following: 1. The partial derivative of the lagrangian w.r.t. $x$ is 0: - $$\nabla_x L(x, \lambda) = c - A^T \lambda - s = 0 \Leftrightarrow A^T \lambda + $$\nabla_x L(x, \lambda, s) = c - A^T \lambda - s = 0 \Leftrightarrow A^T \lambda + s = c$$ 2. Equality constraints hold: $$Ax - b = 0 \Leftrightarrow Ax = b$$ @@ -233,7 +233,8 @@ The KKT conditions are the following: We define the dual problem is the following way: -$$\max b^T \lambda \;\; \text{ s.t. } \;\; A^T \lambda \leq c \;$$ +$$\max b^T \lambda \;\; \text{ s.t. } \;\; c - A^T \lambda \geq 0 +\Leftrightarrow A^T \lambda \leq c \;$$ We then introduce a slack variable $s$ to find the equality and inequality constraints: @@ -250,12 +251,12 @@ $$\min - b^T \lambda \;\; \text{ s.t. } \;\; A^T \lambda + s = c \; \text{ and We then compute the Lagrangian of the dual problem: -$$L(\lambda, x) = -b^T \lambda + x^T (A^T \lambda + s - c) - x^T s = - b^T +$$L(\lambda, x, s) = -b^T \lambda + x^T (A^T \lambda + s - c) - x^T s = - b^T \lambda + x^T (A^T \lambda - c)$$ The KKT conditions are the following: -1. The partial derivative of the lagrangian w.r.t. $x$ is 0: $$\nabla_{\lambda} +1. The partial derivative of the lagrangian w.r.t.\ $\lambda$ is 0: $$\nabla_{\lambda} L(\lambda, x) = - b^T + x^T A^T = 0 \Leftrightarrow Ax = b$$ 2. Equality constraints hold: $$A^T \lambda + s = c$$ 3. Inequality constraints hold: $$c - A^T \lambda \geq 0 \Leftrightarrow s \geq diff --git a/Claudio_Maggioni_4/Claudio_Maggioni_4.pdf b/Claudio_Maggioni_4/Claudio_Maggioni_4.pdf index 653098e..ed69b17 100644 Binary files a/Claudio_Maggioni_4/Claudio_Maggioni_4.pdf and b/Claudio_Maggioni_4/Claudio_Maggioni_4.pdf differ