Lagrange multiplier calculation issue

123 Views Asked by At

I have 8 Lagrange multipliers $\lambda_1, \lambda_2, \lambda_3,\cdots, \lambda_8$.

And the Lagrange formulation is

$L(\lambda_1, \lambda_2, \lambda_3,\cdots, \lambda_8) = \sum\limits_{i=1}^{8} \lambda_i - \sum\limits_{i=1}^{8} \sum\limits_{j=1}^{8} \lambda_i \lambda_j a_{i,j}$ with constraint

$\lambda_i \geq 0$ for all $1 \le i \le 8$ and

And auxiliary information is

$\lambda_1 - \lambda_2 -\lambda_3-\lambda_4+ \lambda_5+ \lambda_6 -\lambda_7+\lambda_8 = 0$

The matrix that supplies $a_{i,j}$ is shown below

\begin{pmatrix} 0.36 &-0.472 & -0.542& -0.699 & 0.340 & 0.320 & -0.73 & 0.126 \\ -0.472 & 0.612 & 0.700 & 0.905 & -0.441 & -0.414 & 0.94 & -0.163 \\ -0.542 & 0.700 & 1.014 & 1.045 & -0.403 & -0.520 & 1.187 & -0.234 \\ -0.699 & 0.905 & 1.045 & 1.3397 &-0.649 & -0.614 & 1.409 & -0.244 \\ 0.340 & -0.441 & -0.403 & -0.649 & 0.368 & 0.276 & -0.637 & 0.095 \\ 0.320 & -0.414 & -0.520 & -0.614 & 0.276 & 0.290 & -0.664 & 0.121 \\ -0.734 & 0.949 & 1.187 & 1.409 & -0.637 & -0.664 & 1.521 & -0.276 \\ 0.126 & -0.163 & -0.234 & -0.244 & 0.095 & 0.121 & -0.2763 & 0.054 \\ \end{pmatrix}

I need to find $\lambda_i$ for $1 \le i \le 8$

My approach is as follows:

Calculate $\frac{\partial L}{\partial \lambda_i} $ for $1 \le i \le 8$,

Finally, I get eight linear equations in eight unknowns after calculating derivatives and one extra equation (given auxiliary information). Solving them gives all the desired values.

But, my approach is not working and I am getting wrong answers. the correct answer is $\lambda_1 = \lambda_2 \approx 65.52$ and $\lambda_k = 0$ for all other $k$'s.

Where am I going wrong?

Note: Please ignore auxiliary information in case of any issue.

1

There are 1 best solutions below

0
On

Considering the lagrangian

$$ L(\lambda,\mu,s) = f(\lambda)+\mu_0(\lambda_1 - \lambda_2 -\lambda_3-\lambda_4+ \lambda_5+ \lambda_6 -\lambda_7+\lambda_8)+\sum_{k=1}^8\mu_k(\lambda_k-s_k^2) $$

with $f = \sum\limits_{i=1}^{8} \lambda_i - \sum\limits_{i=1}^{8} \sum\limits_{j=1}^{8} \lambda_i \lambda_j a_{i,j}$

the stationary points are the solutions for

$$ \nabla L = 0 $$

Assuming $A=\{a_{i,j}\}$ as given, we obtain the stationary (feasible) points for $L$ as

$$ \left[ \begin{array}{ccccccccccccccccc} f & \lambda_1&\lambda_2&\lambda_3&\lambda_4&\lambda_5&\lambda_6&\lambda_7&\lambda_8&s_1^2&s_2^2&s_3^2&s_4^2&s_5^2&s_6^2&s_7^2&s_8^2\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0.977804 & 0 & 0 & 0 & 0 & 0 & 0 & 0.977804 & 0.977804 & 0 & 0 & 0 & 0 & 0 & 0 & 0.977804 & 0.977804 \\ 1.10412 & 0 & 0 & 0 & 1.10412 & 0 & 0 & 0 & 1.10412 & 0 & 0 & 0 & 1.10412 & 0 & 0 & 0 & 1.10412 \\ 1.62602 & 0 & 0 & 0 & 0 & 1.62602 & 0 & 1.62602 & 0 & 0 & 0 & 0 & 0 & 1.62602 & 0 & 1.62602 & 0 \\ 1.66667 & 0 & 0 & 1.66667 & 0 & 0 & 0 & 0 & 1.66667 & 0 & 0 & 1.66667 & 0 & 0 & 0 & 0 & 1.66667 \\ 1.73611 & 0 & 0 & 1.73611 & 0 & 1.73611 & 0 & 0 & 0 & 0 & 0 & 1.73611 & 0 & 1.73611 & 0 & 0 & 0 \\ 1.80868 & 0 & 0 & 1.12341 & 0 & 1.80868 & 0 & 0.685278 & 0 & 0 & 0 & 1.12341 & 0 & 1.80868 & 0 & 0.685278 & 0 \\ 1.889 & 0 & 0 & 1.889 & 0 & 1.04221 & 0 & 0 & 0.846795 & 0 & 0 & 1.889 & 0 & 1.04221 & 0 & 0 & 0.846795 \\ 2.07039 & 0 & 0 & 0 & 0 & 0 & 2.07039 & 2.07039 & 0 & 0 & 0 & 0 & 0 & 0 & 2.07039 & 2.07039 & 0 \\ 2.39808 & 2.39808 & 0 & 0 & 0 & 0 & 0 & 2.39808 & 0 & 2.39808 & 0 & 0 & 0 & 0 & 0 & 2.39808 & 0 \\ 2.44081 & 0 & 0 & 0 & 2.44081 & 2.44081 & 0 & 0 & 0 & 0 & 0 & 0 & 2.44081 & 2.44081 & 0 & 0 & 0 \\ 2.48942 & 0 & 0 & 0 & 2.48942 & 0 & 2.48942 & 0 & 0 & 0 & 0 & 0 & 2.48942 & 0 & 2.48942 & 0 & 0 \\ 2.49559 & 0 & 0 & 0.460885 & 2.03471 & 2.49559 & 0 & 0 & 0 & 0 & 0 & 0.460885 & 2.03471 & 2.49559 & 0 & 0 & 0 \\ 2.63818 & 0 & 0 & 0 & 2.63818 & 1.21954 & 1.41864 & 0 & 0 & 0 & 0 & 0 & 2.63818 & 1.21954 & 1.41864 & 0 & 0 \\ 2.94118 & 0 & 2.94118 & 0 & 0 & 0 & 0 & 0 & 2.94118 & 0 & 2.94118 & 0 & 0 & 0 & 0 & 0 & 2.94118 \\ 3.31455 & 3.31455 & 0 & 0 & 3.31455 & 0 & 0 & 0 & 0 & 3.31455 & 0 & 0 & 3.31455 & 0 & 0 & 0 & 0 \\ 3.44828 & 3.44828 & 0 & 3.44828 & 0 & 0 & 0 & 0 & 0 & 3.44828 & 0 & 3.44828 & 0 & 0 & 0 & 0 & 0 \\ 3.46975 & 3.46975 & 0 & 3.10338 & 0 & 0 & 0 & 0.366371 & 0 & 3.46975 & 0 & 3.10338 & 0 & 0 & 0 & 0.366371 & 0 \\ 3.78788 & 0 & 0 & 3.78788 & 0 & 0 & 3.78788 & 0 & 0 & 0 & 0 & 3.78788 & 0 & 0 & 3.78788 & 0 & 0 \\ 4.01689 & 0 & 0 & 3.05722 & 0.959667 & 0 & 4.01689 & 0 & 0 & 0 & 0 & 3.05722 & 0.959667 & 0 & 4.01689 & 0 & 0 \\ 4.3517 & 4.3517 & 0 & 2.27239 & 2.07931 & 0 & 0 & 0 & 0 & 4.3517 & 0 & 2.27239 & 2.07931 & 0 & 0 & 0 & 0 \\ 10.2041 & 0 & 10.2041 & 0 & 0 & 10.2041 & 0 & 0 & 0 & 0 & 10.2041 & 0 & 0 & 10.2041 & 0 & 0 & 0 \\ 13.5135 & 0 & 13.5135 & 0 & 0 & 0 & 13.5135 & 0 & 0 & 0 & 13.5135 & 0 & 0 & 0 & 13.5135 & 0 & 0 \\ 13.7805 & 0 & 12.6829 & 1.09756 & 0 & 0 & 13.7805 & 0 & 0 & 0 & 12.6829 & 1.09756 & 0 & 0 & 13.7805 & 0 & 0 \\ 17.1994 & 0 & 17.1994 & 0 & 0 & 6.6526 & 10.5468 & 0 & 0 & 0 & 17.1994 & 0 & 0 & 6.6526 & 10.5468 & 0 & 0 \\ 35.7143 & 35.7143 & 35.7143 & 0 & 0 & 0 & 0 & 0 & 0 & 35.7143 & 35.7143 & 0 & 0 & 0 & 0 & 0 & 0 \\ \end{array} \right] $$

here $s_k = 0$ indicates that the respective restriction is actuating.