Simplex Method Program for the TI-83


The below program will allow you to enter your intial tableau matrix for a linear programming problem into the TI-83. It will then compute the pivot row and column and then display the next tableau. You may then continue on until there is no more pivoting to be done and you will have each matrix tableau for each step.

To use the program you must enter your matrix (your initial tableau) under the name [A] (via pressing the MATRIX key and then selecting EDIT [A]). Also be sure nothing important is stored in [E] (as it will be lost). Further many variables will lose their value also, such as C, G, I, J, L, M, N, P, Q, R. Once your initial tableau matrix is entered into [A] just press PRGM and EXEC the program named Simplex. From there it should be pretty obvious what to do.

Below you will find the listing of the program, named Simplex. You should refer to your calculator's owner manual to see how to enter it into the calculator (or find someone who knows how to do it).

When entering the below program understand that the minus arrow: -> is supposed to be just an arrow pointing right (the STO button).

[A]->[E]
Lbl 10

Pause [A]
Disp "2 NEXT TABLEAU"
Disp "3 TO UNDO ALL"
Disp "4 TO EXIT"
Input G

If G=4
Then
Stop
End

If G=3
Then
[E]->[A]
End

If G=2
Then
dim([A])->L6
L6(1)->N
L6(2)->M
0->R
0->C
0->L

For(J,1,M-1,1)
If [A](N,J)L
J->C
End
End

If L=0
Then
ClrHome
Disp "CURRENT IS FINAL"
[A]
End

If L0
Then
0->R
999999999999->L

For(I,1,N-1,1)
If [A](I,C)>0
Then
[A](I,M)/[A](I,C)->Q
If QL
I->R
End
End
End

If R>0
Then
Disp "PIVOT ROW=",R
Disp "PIVOT COL="
Pause C
[A](R,C)->P
For(J,1,M,1)
[A](R,J)/P->[A](R,J)
End
For(I,1,N,1)
If IR
Then
[A](I,C)->Q
For(J,1,M,1)
[A](I,J)-[A](R,J)*Q->[A](I,J)
End
End
End
End

End

End
Goto 10