r/OperationsResearch • u/Jasmeetk28 • 6h ago
Simplex table
Simplex Table (Simplex Method)
The Simplex Table is a tabular method used to solve Linear Programming Problems (LPPs), especially when there are more than two variables or when the graphical method is difficult.
It helps us find the maximum or minimum value of an objective function step by step.
1. Example of a problem
Maximize:
We convert the inequalities into equations by adding slack variables \(S_1,S_2,S_3\).
2. Initial Simplex Table
| Cj | 3 | 2 | 0 | 0 | 0 | |
|---|---|---|---|---|---|---|
| Basis | x | y | S₁ | S₂ | S₃ | RHS |
| S₁ | 1 | 1 | 1 | 0 | 0 | 4 |
| S₂ | 1 | 0 | 0 | 1 | 0 | 2 |
| S₃ | 0 | 1 | 0 | 0 | 1 | 3 |
| Zj | 0 | 0 | 0 | 0 | 0 | 0 |
| Cj−Zj | 3 | 2 | 0 | 0 | 0 |
Step 1: Find the entering variable
- Look at the Cj − Zj row.
- The largest positive number is 3.
- Therefore, x enters the basis (pivot column).
Step 2: Find the leaving variable
Divide RHS by the positive entries of the pivot column:
| Row | Calculation | Ratio |
|---|---|---|
| S₁ | 4 ÷ 1 | 4 |
| S₂ | 2 ÷ 1 | 2 |
| S₃ | Not applicable (0) | — |
S₂ leaves the basis because 2 is the smallest positive ratio.
The pivot element is 1 (in the S₂ row and x column).
3. Second Simplex Table
After performing the pivot operations:
| Cj | 3 | 2 | 0 | 0 | 0 | |
|---|---|---|---|---|---|---|
| Basis | x | y | S₁ | S₂ | S₃ | RHS |
| S₁ | 0 | 1 | 1 | −1 | 0 | 2 |
| x | 1 | 0 | 0 | 1 | 0 | 2 |
| S₃ | 0 | 1 | 0 | 0 | 1 | 3 |
| Zj | 3 | 0 | 0 | 3 | 0 | 6 |
| Cj−Zj | 0 | 2 | 0 | −3 | 0 |
Step 3: Find the entering variable
The largest positive value in Cj − Zj is 2.
Therefore, y enters the basis.
Step 4: Find the leaving variable
| Row | Calculation | Ratio |
|---|---|---|
| S₁ | 2 ÷ 1 | 2 |
| x | Not applicable (0) | — |
| S₃ | 3 ÷ 1 | 3 |
Therefore, S₁ leaves the basis. The pivot element is 1.
4. Final Simplex Table
After the second pivot operation:
| Cj | 3 | 2 | 0 | 0 | 0 | |
|---|---|---|---|---|---|---|
| Basis | x | y | S₁ | S₂ | S₃ | RHS |
| y | 0 | 1 | 1 | −1 | 0 | 2 |
| x | 1 | 0 | −1 | 1 | 0 | 0 |
| S₃ | 0 | 0 | −1 | 1 | 1 | 1 |
| Zj | 3 | 2 | 3 | 1 | 0 | 10 |
| Cj−Zj | 0 | 0 | −3 | −1 | 0 |