Constructing a Final Tableau from an an Initial Tableau and an Optimal Solution

Consider the following linear Linear Programming Problem:

Minimize z = -30 x1 - 6 x2 + 5 x3 - 18 x4
   subject to:
      x1+ 2 x3+ x4 < = 20
- 2 x1+   x2 - x4 < = 15
   6 x1+ 2 x2- 3 x3 < = 54
            x1, x2, x3, x4 > = 0

An initial canonical tableau of the problem is as follows:

A b
cz
x1x2x3 x4
x5 x6 x7
b
x5
x6
x7
1 0 2 1
-2 1 0 -1
6 2 -30
1 0 0
0 10
0 0 1
20
15
54
C
-30 -6 5 -18
000
0

Suppose an optimal solution X* = ( 0 , 27 , 0 , 20 , 0 , 8 , 0 )t to the problem is known. Then a final tableau may be constructed in the following way.

Step 1.
Notice that the basic variables are:

x2* = 27 , x4* = 20 and x6* = 8.

By using A2 , A4 and A6 we construct the matrix
B = [ A2 , A4 , A6 ] = [ 0     1     0
1    -1     1
2     0     0
]

Step 2.
Now, we find the inverse of the matrix B.
B-1 = [ 0     0    1/2
1     0      0
1     1   -1/2
]

Step 3.
We use B-1 to obtain A* = B-1 A   and   b* = B-1 b.
[ 0   0   1/2
1   0    0
1   1  -1/2
]
[  1     0     2     1     1     0     0
-2     1     0    -1     0     1    0
 6     2    -3     0     0     0    1
| 20
15
54
] = [  3     1    -3/2    0     0     0    1/2
 1     0       2     1     1     0     0
-4     0    7/2     0     1     1   -1/2
|27
20
8
]
Step 4.
Let CB=( C2 , C4 , C6 ), then C* = C- CB A*   and   z* = z - CB b. Thus the last row of our final tableau is:

[ -30   -6   5   -18   0   0   0 | 0 = z ] - ( -6 , -18 , 0 ) [ A* | b* ] = [ 6   0   32   0   18   0   3 | 522 = z*]

According to the Duality Theorem, Y* = ( 18 , 0 , 3 )t is an optimal solution to the Dual problem.

Here is our final tableau:

A* b*
c*z*
x1 x2 x3 x4
x5 x6 x7
b*
x4*
x6*
x2*
3 1 -3/2 0
1 0 2 1
-4 0 7/2 0
0 0 1/2
1 0 0
1 1 -1/2
27
20
8
C
6 0 32 0
18 0 3
522

Note
    1.
By rearranging the columns of the matrix B, we obtain a different B that gives us a different final tableau.
    2. Suppose instead of X*, the vector Y* = ( 18 , 0 , 3 )t, a solution to the dual of this problem is known, then by the Complementary Slackness Theorem, X* may be found.