Skip to the content

Topics Covered

General LPP Matrix Form Slack & Surplus Standard Form Canonical Form Basic Solution Simplex Algorithm Max & Min
On this page
  1. 1. General Linear Programming Problem (GLP)
  2. 2. Slack, Surplus and Artificial Variables
  3. 3. Standard Form and Canonical Form
  4. 4. Types of Solutions
  5. 5. Simplex Algorithm — Computational Procedure
  6. 6. Structure of the Simplex Tableau
  7. 7. Worked Example — Maximisation
  8. 8. Worked Example — Minimisation
  9. 9. Three-Variable Example
  10. 10. Interpreting the Final Tableau
  11. Key Take-aways

1. General Linear Programming Problem (GLP)

DEFINITION

The General LPP seeks to optimise a linear function of \(n\) decision variables subject to \(m\) linear constraints (any of which may be \(\le, =\) or \(\ge\)), with the variables typically non-negative (some may be unrestricted).

Matrix Form

\[ \text{Max (or Min)}\quad Z = \mathbf{c}^{T} \mathbf{x} \] \[ \text{subject to}\quad A\mathbf{x} \;(\le, =, \ge)\; \mathbf{b}, \quad \mathbf{x} \ge \mathbf{0}, \]

where \(\mathbf{c} \in \mathbb{R}^n,\; \mathbf{x} \in \mathbb{R}^n,\; \mathbf{b} \in \mathbb{R}^m,\; A \in \mathbb{R}^{m \times n}.\)

2. Slack, Surplus and Artificial Variables

2.1 Slack Variable (for ≤ constraint)

Convert an inequality \(a_{i1} x_1 + \cdots + a_{in} x_n \le b_i\) to an equality by adding a non-negative slack variable \(s_i\):

\[ a_{i1} x_1 + \cdots + a_{in} x_n + s_i = b_i, \quad s_i \ge 0. \]

The slack represents unused resource. Its objective coefficient is 0.

2.2 Surplus Variable (for ≥ constraint)

Convert \(\sum a_{ij} x_j \ge b_i\) to equality by subtracting a non-negative surplus variable \(s_i\):

\[ a_{i1} x_1 + \cdots + a_{in} x_n - s_i = b_i, \quad s_i \ge 0. \]

The surplus represents the amount by which a requirement is exceeded. Objective coefficient is 0.

2.3 Artificial Variable

For = constraints (or after introducing surplus to ≥ constraints), the simplex needs an obvious starting basis. Add an artificial variable \(A_i \ge 0\) with a very large objective penalty (Big-M, see Unit 4).

2.4 Unrestricted Variable

If a variable \(x_j\) can take any real value, replace it by \(x_j = x_j' - x_j''\) with \(x_j', x_j'' \ge 0\).

3. Standard Form and Canonical Form

3.1 Standard Form

An LPP is in standard form when:

  1. The objective is to maximise \(Z\) (a minimisation problem becomes Max(\(-Z\))).
  2. All constraints are equalities with non-negative right-hand sides \(b_i \ge 0\).
  3. All decision variables are non-negative.

3.2 Canonical Form

An LPP is in canonical form when:

  1. The objective is to maximise \(Z\).
  2. All constraints are \(\le\) with non-negative right-hand sides.
  3. All decision variables are non-negative.

Conversion rules:

4. Types of Solutions

Key theorem: If an LPP has an optimal solution, it has an optimal basic feasible solution. So the simplex method need search only among the finite set of BFSs (vertices).

5. Simplex Algorithm — Computational Procedure

IDEA

Start at a vertex (BFS) of the feasible polyhedron, then repeatedly move to an adjacent vertex that improves \(Z\), until no further improvement is possible. The process is guaranteed to terminate in a finite number of steps.

5.1 Algorithm Steps (Maximisation)

  1. Convert to standard form by adding slack variables.
  2. Initial BFS: set decision variables to 0; slacks = b. Construct the initial simplex tableau.
  3. Optimality test: compute \(z_j - c_j\) (or \(c_j - z_j\)) for each non-basic variable.
    • For Max: if all \(c_j - z_j \le 0\), current BFS is optimal — STOP.
    • Otherwise, pick the variable with the most positive \(c_j - z_j\) — this is the entering variable.
  4. Ratio test: for each row with a positive coefficient in the entering column, compute \(\theta_i = b_i / a_{ij}^*\). The row with the smallest non-negative ratio determines the leaving variable (and the pivot element).
  5. Pivot: perform row operations to make the pivot element 1 and all other entries in the entering column 0. Update the tableau.
  6. Go back to step 3.

For Minimisation: either convert to Max \(-Z\), or use \(z_j - c_j\) test where we look for the most negative entry.

6. Structure of the Simplex Tableau

The tableau is a tabular bookkeeping format:

cBBasisxBc₁c₂…cnθ (ratio)
cB1xB1b₁a₁₁a₁₂…a1nθ₁
cB2xB2b₂a₂₁a₂₂…a2nθ₂
ZjZ = cB·bz₁z₂…zn
cj − Zjc₁−z₁c₂−z₂…cn−zn

7. Worked Example — Maximisation

PROBLEM

Max \(Z = 3 x_1 + 2 x_2\) subject to \(x_1 + x_2 \le 4,\;\; x_1 + 3 x_2 \le 6,\;\; x_1, x_2 \ge 0\).

Step 1 — Standard form

Add slacks \(s_1, s_2\):

\[ \text{Max } Z = 3x_1 + 2x_2 + 0 s_1 + 0 s_2 \] \[ x_1 + x_2 + s_1 = 4 \] \[ x_1 + 3 x_2 + s_2 = 6 \]

Step 2 — Initial tableau

cBBasisxBx₁ (3)x₂ (2)s₁ (0)s₂ (0)θ
0s₁411104/1 = 4
0s₂613016/1 = 6
Zj00000
cj−Zj3200

Most positive \(c_j - z_j = 3\) ⇒ \(x_1\) enters. Ratios: 4 and 6 ⇒ row 1 leaves (s₁ exits). Pivot element = 1 (row 1, x₁ column).

Step 3 — Pivot & Iteration 2

R₁ stays (pivot already 1); R₂ → R₂ − R₁:

cBBasisxBx₁ (3)x₂ (2)s₁ (0)s₂ (0)θ
3x₁411104/1 = 4
0s₂202−112/2 = 1
Zj123330
cj−Zj0−1−30

All \(c_j - z_j \le 0\) (the largest is \(0\), and \(x_2\)'s entry is \(-1\)), so no non-basic variable can improve \(Z\) — the tableau is optimal.

Optimal solution: \(x_1 = 4,\; x_2 = 0,\; s_1 = 0, s_2 = 2;\; Z_{\max} = 12\).

8. Worked Example — Minimisation

PROBLEM

Min \(Z = 5 x_1 + 4 x_2\) subject to \(2 x_1 + x_2 \ge 12,\; x_1 + 2 x_2 \ge 12,\; x_1, x_2 \ge 0\).

Strategy

Convert to standard form by introducing surplus variables and then artificial variables (since they're ≥ constraints with no obvious starting basis). This invokes the Big-M method covered in Unit 4. Alternatively, convert to Max \(-Z\):

\[ \text{Max } Z' = -5 x_1 - 4 x_2 \]

after which Big-M (Unit 4) applies. Full numerical solution is worked out in Unit 4's Big-M example.

For an LPP with all "≤" constraints and non-negative b, just convert Min to Max (−Z), add slacks and apply the standard simplex.

9. Three-Variable Example

PROBLEM

Max \(Z = 2 x_1 + 4 x_2 + 3 x_3\) subject to

Add slacks \(s_1, s_2, s_3\) and start with BFS \(s_1 = 60, s_2 = 40, s_3 = 80\), Z = 0.

Most positive \(c_j - z_j\) = 4 ⇒ \(x_2\) enters. Ratios 60/4 = 15, 40/1 = 40, 80/3 ≈ 26.67. Smallest is 15 ⇒ \(s_1\) leaves. Pivot, iterate, and eventually find optimum.

(Result after two further iterations: \(x_1 = 0,\; x_2 = 20/3 \approx 6.67,\; x_3 = 50/3 \approx 16.67,\; Z = 230/3 \approx 76.67\), with the first two constraints binding. Detailed tableau steps follow the same procedure as Section 7.)

10. Interpreting the Final Tableau

Key Take-aways