How Transportation & Assignment Algorithms Work

How Transportation & Assignment Algorithms Work

Transportation and assignment models are special cases of linear programming with highly structured algorithms. This page explains how these algorithms work with diagrams and numerical examples.


1. Transportation Problem Structure

        D1   D2   D3   (Demand)
S1      4    6    8     20
S2      5    3    7     30
S3      6    4    5     25
       15   25   35

Goal: minimize total shipping cost.


2. Initial Solution Methods

2.1 Northwest Corner Rule

Allocate top-left first, then move right/down.

Example

S1โ†’D1 = 15
S1โ†’D2 = 5
S2โ†’D2 = 20
S2โ†’D3 = 10
S3โ†’D3 = 25

3. Vogelโ€™s Approximation Method (VAM)

Compute penalties for each row/column, allocate where penalty is highest.

Example Penalty Table

Row penalties: S1=2, S2=2, S3=1
Column penalties: D1=1, D2=1, D3=2

Highest penalty = 2 โ†’ allocate to lowest cost in that row/column.


4. Optimality Check Using MODI (uโ€“v Method)

Compute potentials \(u_i, v_j\) and reduced costs: \[ c_{ij}’ = c_{ij} – (u_i + v_j) \] If all reduced costs โ‰ฅ 0 โ†’ optimal.


5. Assignment Problem Structure

        J1   J2   J3   J4
W1      9    2    7    8
W2      6    4    3    7
W3      5    8    1    8
W4      7    6    9    4

Goal: assign each worker to exactly one job at minimum cost.


6. Hungarian Algorithm

Step 1: Row reduction

Subtract row minimums.

Step 2: Column reduction

Subtract column minimums.

Step 3: Cover zeros with minimum number of lines

0 0 5 6
2 0 0 4
4 7 0 7
3 2 5 0

Step 4: Assign zeros

Final assignment example:

  • W1 โ†’ J2
  • W2 โ†’ J3
  • W3 โ†’ J1
  • W4 โ†’ J4

This idea connects directly to:

Speak Directly to a Tutor โ€” Send Your Message Below

No call centers. No delays. Your message goes straight to the tutor.

Get help with linear programming, simplex method, corner points, BFS, and optimization theory.