# MATH 340 Sample Revised Simplex Computations for Quiz 4. ```MATH 340
Sample Revised Simplex Computations for Quiz 4.
In each of the following questions you are given A, b, c, current basis and B −1 . Determine, using
our revised simplex methods, the next entering variable (if there is one), next leaving variable (if
there is one) and the new basis and the next basic feasible solution. If there is a leaving variable
give the new basic feasible solution after the pivot.
1.
x1
x3 2

A = x4  1
x5 0
x2
1
2
1

c=
x1
4
x3
1
0
0
x2
5
x4
0
1
0
x3
0
x5
b

 
0
x3 8


0  x4 
7
1
x5 3
x4
0
x5
0
x3
x3 1

= x1  0
x2 0

basis: {x3 , x1 , x2 }, B −1
x4 x 5

−2 3
1 −2 

0
1
Solution:
cTN
−
cTB B −1 AN
=
x4
0
x5 x3
0 −
0
x1
4
x3
x2 x3 1
5 x1 
 0
x2 0

x4 x5
x4


−2 3
x3 0

1 −2  x4 
 1
0
1
x5 0
x5

0
0
 = [−4 3]
1
Thus we choose x5 to enter.

 
 

1 −2 3
8
3

 
 
B −1 b =  0 1 −2   7  =  1  ,
0 0
1
3
3
 


1 −2 3
0
3


 

B −1 A5 =  0 1 −2   0  =  −2  .
0 0
1
1
1
Now xB = B −1 b − B −1 A5 x5 ≥ 0 implies x5 ≤ 1 and so x3 leaves the basis. Thus the new basis
is {x5 , x1 , x2 }. The next basic feasible solution can be obtained by taking x5 = 1 and then we
obtain x3 = 0, x1 = 3, x2 = 2 (using xB = B −1 b − B −1 A5 &middot; 1) with x4 = 0. We could have asked
for the eta matrix that updates B (we won’t on your quiz): Our eta matrix appropriately labelled
(you didn’t need to label it)
x5 x1
x3 3
0

x1  −2 1
x2 1
0

x2
x3


0
x3 1

0 . We may check: x4 
 0
1
x5 0
x1
2
1
0
x2

1
x3
2

x1
1
x5 x1
3
0
−2 1
x5
x2

!
x3 0
0

= x4  0
0
x5 1
x1
2
1
0
x2

1
2

1
We could compute (but you are not required to compute):
x3
x4
x5



 
x5 1/3 −2/3 1
3
1




 
= x1  2/3 −1/3 0 (perform pivot on old B −1 to take  −2  to  0 ).
x2 −1/3 2/3
0
1
0

new B −1
2.
x1
x5 1

A = x6  1
x7 0

x2 x3
2
1
−1 2
1
0
x4
0
1
1
x5
1
0
0
x6
0
1
0
x7
b

 
0
x5 3


0  x6 
3
1
x7 1
c=
x1
x2
4
0
x3
2
x4
0
x5
0
x6
0
x7 0
x5
x6
x7

x2 1/3 −1/6 1/6

1/3 −1/3 
= x3  1/3

x4 −1/3 1/6
5/6

current basis: {x2 , x3 , x4 }, B −1
Solution:
cTN − cTB B −1 AN =
x1
0
x5
0
x6
0
x7 x2
0 −
4
x3
2
x5
x6
x7
x1


x4 x2 1/3 −1/6 1/6
x5 1


0 x3  1/3
1/3 −1/3  x6 
 1
x4 −1/3 1/6
5/6
x7 0
x5
1
0
0

=
x1 x5 x 6
−2 −2 0
x7
0
x6
0
1
0
x7

0
0

1
Thus we are at optimality (since all coefficients are negative) with an optimal solution:
 



2/3
3
1/3 −1/6 1/6



 
B −1 b =  1/3
1/3 −1/3   3  =  5/3  .
1/3
1
−1/3 1/6
5/6
3.
x1
x4 1
A = x5 
 1
x6 1

c=
x2 x3
−1 2
−2 3
−1 1
x
1
3
x4
1
0
0
x2 x3
−1 5
x5
0
1
0
x4
0
x6
b

 
0
x4 2


0  x5 
4
1
x6 3
x5
0
x4 x5
x1 1
0

= x5  −1 1
x6 −1 0
x6

0
0

1

basis: {x1 , x5 , x6 }, B −1
x6 0
Solution:
cTN
−
cTB B −1 AN
=
x 2 x3
−1 5
x4 x1
0 −
3
x5
0
x4 x5
x 6 x1 1
0

0 x5  −1 1
x6 −1 0

=
x2
2
x6
x2 x3


0 x4 −1 2

0
 x5  −2 3
1 x6 −1 1
x4

1
0

0
x 3 x4 −1 −3
Thus we choose x2 to enter.

 
 
1 0 0
2
2
 
 
B −1 b = 
 −1 1 0   4  =  2  ,
−1 0 1
3
1





1 0 0
−1
−1




B −1 A2 = 
 −1 1 0   −2  =  −1  .
−1 0 1
−1
0
Now B −1 b − B −1 A2 x2 ≥ 0 implies no restriction on the value of x2 and so the LP is unbounded.
Letting x2 = t &gt; 0 we have the solution x1 = 2 + t, x5 = 2 + t, x6 = 1 of value z = 6 + 2t. Note:
when you get an unbounded solution I expect that you give this parametric solution to verify that
it is unbounded.
```