Artificial intelligent assistant

Penalty method for $f(x,y,z) = x^2 + 2y^2 + z^2$ **Exercise :** > Given the constraints $x^2+y^2+z^2 \leq 9, \; \; x+ y = 1, \; \; x-y = 2$ find a sufficient penalty function. Then, construct a penalty function for the minimization optimization problem of the function $f(x,y,z) = x^2 + 2y^2 + z^2$ over the constraints given. **Attempt :** The penalty function $p(x)$ will be given as : $$p(x) = \max\\{0, x^2 + y^2 + z^2 - 9\\}^2$$ How would one construct a penalty function for the minimization problem of the $f(x,y,z)$ given ?

According to the barrier function technique (Fiacco-Mc Cormick) a good barrier formulation could be

$$ \phi(x,y,z,\lambda)=x^2-2 y^2+z^2+\lambda_1\max \left(0,x^2+y^2+z^2-9\right)^2+\lambda_2(x+y-1)^2+\lambda_3 (x-y-2)^2 $$

Here $\lambda_1,\lambda_2,\lambda_3$ are positive constants adapted to each barrier to enhance the restriction satisfaction. The present exercise with $\lambda_1=\lambda_2=\lambda_3=\lambda_0$ and calling

$$ f = x^2-2 y^2+z^2\\\ g_1 = \max \left(0,x^2+y^2+z^2-9\right)^2\\\ g_2 = (x+y-1)^2\\\ g_3 = (x-y-2)^2 $$

gives after minimization a result which is $\lambda_0$ dependent.

$$ \begin{array}{cccccccc} x & y & z & \lambda_0 & g_1 & g_2 & g_3 & f\\\ 0.89668 & -2.89289 & 0 & 1 & 0.0298729 & 8.97726 & 3.20255 & -15.9336 \\\ 1.42857 & -0.555556 & 0 & 10 & 0 & 0.016125 & 0.000251953 & 1.42353 \\\ 1.49254 & -0.505051 & 0 & 100 & 0 & 0.00015658 & 0 & 1.71752 \\\ 1.49925 & -0.500501 & 0 & 1000 & 0 & 0 & 0 & 1.74675 \\\ \end{array} $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 9cd24d2267eb0d97b44a87b924bd1f3e