Will the slack variables always have coefficients of zero in the objective function?

2.9k Views Asked by At

I've been following this video: https://www.youtube.com/watch?v=M8POtpPtQZc

Will the CBi values (slack variable coefficients) ever not be zero? When?

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

In the video the coefficients of the objective function are not recalculated. But this has to be done to choose the right (pivot-)column. In Phase 1 of the simplex method you have to find a basic feasible solution. In this case it is found before the first iteration. Now Phase 2 starts to find the optimal solution.

Basis   x1  x2  s1  s2  RHS
s1       10  20  1  0   120
s2        8   8  0  1   80
z       -12 -16  0  0    0

The basic feasible solution is $(x_1,x_2,s_1,s_2)=(0,0,120,80)$. The next pivot columns is $x_2$, because the most negative coefficient at the objective function is $min(-12,-16)=-16$. And the pivot row is $s_1$, because $min\left( \frac{120}{20},\frac{80}{8}\right)=min(6,10)=6$

Basis   x1  x2  s1   s2  RHS
x2      0.5  1  0.05  0  6
s2      4    0  -0.4  1 32
z      -4    0   0.8  0 96

The next pivot column is obviously $x_1$. And the pivot row is $s_2$, because $min\left( \frac{6}{0.5},\frac{32}{4}\right)=min(12,8)=8$

Basis   x1  x2  s1     s2       RHs
x2      0   1   0.1    -0.125   2
x1      1   0  -0.1     0.25    8
F      0    0   0.4     1     128

All coefficients of the objective function are non-negative. Thus the optimal solution is found.