The math optional, made finite. Daily Practice

Transportation problem

At a Glance

Why This Chapter Matters

Transportation questions appear in 5 of the last 13 years and are consistently 20 marks — the single highest-mark question in Paper 2’s linear-programming cluster. Every question follows the same two-phase algorithm: find an initial basic feasible solution (IBFS) by Vogel’s Approximation Method (VAM), then test and achieve optimality by the MODI (u,vu,v) method. The algorithm is long but entirely procedural; the challenge is accuracy across many small arithmetic steps. A student who internalises the VAM and MODI templates can reliably score all 20 marks here.

Minimum Theory

Balanced transportation problem. mm sources with supplies aia_i, nn destinations with demands bjb_j, cost cijc_{ij} per unit shipped on route (i,j)(i,j). Balanced means ai=bj\sum a_i=\sum b_j; if unbalanced, add a dummy row or column with zero costs.

Basic feasible solution (BFS). A solution with exactly m+n1m+n-1 allocated cells (non-degenerate). Fewer allocations = degenerate; handle by adding a tiny allocation ε\varepsilon in an unoccupied cell.

Vogel’s Approximation Method (VAM) — IBFS.

  1. For each row/column, compute the penalty = (2nd smallest cost) - (smallest cost).
  2. Identify the row or column with the maximum penalty.
  3. In that row/column, allocate as much as possible to the cheapest cell: allocate min(remaining supply,remaining demand)\min(\text{remaining supply},\text{remaining demand}).
  4. Cross out the exhausted row or column. Recompute penalties (ignoring crossed-out rows/columns).
  5. Repeat until all supply and demand are fulfilled.

MODI / uu-vv optimality test.

  1. For each allocated cell (i,j)(i,j), set ui+vj=ciju_i+v_j=c_{ij}. Fix u1=0u_1=0 and solve for all ui,vju_i,v_j.
  2. For each unallocated cell, compute the opportunity cost Δij=cijuivj\Delta_{ij}=c_{ij}-u_i-v_j.
  3. If all Δij0\Delta_{ij}\ge0: the current BFS is optimal.
  4. If any Δij<0\Delta_{ij}<0: bring the cell with the most negative Δ\Delta into the basis via a closed loop reallocation; repeat.

Question Archetypes

One pattern covers every transportation question in the corpus.

ArchetypeYou are seeing this when…
transportation-problemfind IBFS by VAM, test optimality by MODI, state minimum cost

transportation-problem (5 question(s); 2014, 2017, 2020, 2022, 2025)

Recognition Cues

Solution Template

Phase 1: VAM

  1. Write the cost table with supply and demand.
  2. Compute row and column penalties. Record them next to each row/column.
  3. Mark the maximum penalty; allocate to the cheapest cell in that row/column; update supply/demand; cross out the exhausted row/column.
  4. Repeat. If a tie in penalties, break it arbitrarily (or choose the allocation that gives a smaller cost).
  5. Stop when all supply and demand are met. Count allocations: must be m+n1m+n-1.

Phase 2: MODI

  1. Label allocated cells. Set u1=0u_1=0; solve ui+vj=ciju_i+v_j=c_{ij} for all allocated cells.
  2. Compute Δij=cijuivj\Delta_{ij}=c_{ij}-u_i-v_j for all unallocated cells.
  3. If all Δij0\Delta_{ij}\ge0: current solution is optimal; compute and state total cost.
  4. If any Δij<0\Delta_{ij}<0: enter the most-negative cell via a loop (trace a path of alternating horizontal and vertical moves through allocated cells); redistribute along the loop by adding/subtracting θ=\theta= minimum allocation on the minus-sign cells.

Worked Example(s)

2014 Paper 2, 2014-P2-Q2c (20 marks)

Transportation problem (3 sources × 4 destinations); find IBFS by VAM; test and achieve optimality by MODI.

D1D_1D2D_2D3D_3D4D_4Supply
O1O_1641514
O2O_2892716
O3O_343625
Demand610154

VAM iterations (penalties in parentheses):

Iter 1: Row penalties O1O_1:3, O2O_2:5, O3O_3:1; Col penalties D1D_1:2, D2D_2:1, D3D_3:1, D4D_4:3. Max penalty 5 at O2O_2. Cheapest cell in O2O_2: (O2,D3)(O_2,D_3) cost 2. Allocate min(16,15)=15\min(16,15)=15. Eliminate D3D_3.

Iter 2: Max penalty 3 at D4D_4. Cheapest in D4D_4: (O3,D4)(O_3,D_4) cost 2. Allocate 4. Eliminate D4D_4.

Iter 3: Max penalty 2 at O1O_1. Cheapest in O1O_1: (O1,D2)(O_1,D_2) cost 4. Allocate 10. Eliminate D2D_2.

Iter 4: Only D1D_1 remains (demand 6). Fill: x11=4x_{11}=4, x21=1x_{21}=1, x31=1x_{31}=1.

IBFS allocations and cost: 4(6)+10(4)+1(8)+15(2)+1(4)+4(2)=24+40+8+30+4+8=1144(6)+10(4)+1(8)+15(2)+1(4)+4(2)=24+40+8+30+4+8=\mathbf{114}.

MODI check: Set u1=0u_1=0. From allocated cells: v1=6,v2=4,v3=0v_1=6,v_2=4,v_3=0 (u2+v3=2u2=2u_2+v_3=2\Rightarrow u_2=2), v4=4v_4=4 (u3+v4=2u3=2u_3+v_4=2\Rightarrow u_3=-2).

Opportunity costs for unallocated cells: (1,3)(1,3):100=11-0-0=1; (1,4)(1,4):504=15-0-4=1; (2,2)(2,2):924=39-2-4=3; (2,4)(2,4):724=17-2-4=1; (3,2)(3,2):3(2)4=13-(-2)-4=1; (3,3)(3,3):6(2)0=86-(-2)-0=8. All 0\ge0.

Optimal cost=114.\boxed{\text{Optimal cost}=114.}


2020 Paper 2, 2020-P2-Q4c (20 marks)

Costs S1[10,0,20,11]/15S_1[10,0,20,11]/15, S2[12,7,9,20]/25S_2[12,7,9,20]/25, S3[0,14,16,18]/5S_3[0,14,16,18]/5; demands [5,15,15,10][5,15,15,10].

Note: cost 0 entries are legitimate (no cost on that route). Run VAM and MODI following the same template; the zero entries are the cheapest cells and will be allocated first in the penalty step.

Common Traps

Practice Set

We've mapped all 13 years of this exam. Get new chapters, tools, and solutions as we release them — free.