[Math] Simplex Method : Entering variable and leaving variable

linear programmingoptimizationsimplex

i have a homework question and i am not sure if a understood the first part correctly ( english is not my native language ).

enter image description here

For the entering variable :
I guess $ 10x_1 – 32x_2 + 8x_3 + 5x_4$ is the objective function. right ?
$x_1$ has a positive coefficient (it's 10 ) and it has the smallest subscript ( the little one ) . It's sounds too easy. So my guess would be $$x_1 $$ is the entering variable.

What is the leaving variable ?

Best Answer

This is correct.

For the leaving variable, you must choose one that minimizes the ratio $\{b_i/a_{ij}\;|\; a_{ij}>0\}$, where $b_i$ is the right hand term of constraint $i$, and $a_{ij}$ is the element at line $i$, column $j$, where $j$ is the column of your entering variable.

So in your case, if your entering variable is $x_1$, you have to choose the minimizer of $\{5/4, 0/2.5\}$: your slack variable of the constraint at line 3.