# Thread: Stack Variables & Simplex Tableau

2. ## Solution

So, you set up the initial problem correctly with slack variables. The next step was to put it into tableau form, which you will see in the excel file.

The first pivot was selected by picking the most negative entry in the objective row P, which in this case was -3 in the x1 column. This determined the entering basic variable.
Then, you determine the departing basic variable by using the minimum ratio test, or taking the values in the rightmost column and dividing them by the values in the x1 column for the s1 and s2 rows.
The two values are 4/1 and 16/3. Since 4/1 < 16/3, we choose s1 as our departing basic variable. So this corresponds to using 1 as the pivot.

After performing the calculations denoted for tableau #2, we do the same operations again because there is still a negative entry in the objective row in tableau #3.

Once we get to tableau #4 we know the table is optimized because there are no negative entries in the objective row.

In the final tableau, we set the nonbasic variables, namely s1 and s2 equal to zero to solve for x1 and x2.

Hope this helps.