Notes Unit 3
Notes Unit 3
1. Definition:
The Transportation Problem is a type of Linear Programming Problem (LPP) where the objective is
to minimize the cost of transporting goods from multiple sources (supply) to multiple destinations
(demand) while satisfying supply and demand constraints.
Here are the basic assumptions of the Transportation Problem in a clear and student-friendly
format:
o The quantities available at each source (supply) and the quantities required at each
destination (demand) are known and fixed.
3. Single Commodity
4. No Intermediate Stops
o Total supply = Total demand. If not, the problem is balanced by adding a dummy row
or column with zero transportation cost.
o Total transportation cost is the sum of individual costs across all routes, and
transported quantities cannot be negative.
o Unit transportation cost for each route remains constant, regardless of the quantity
transported.
2. Formulation:
Let:
- m = number of sources
- n = number of destinations
- c_ij = cost of transporting 1 unit from source i to destination j
- x_ij = quantity transported from source i to destination j
- a_i = supply at source i
- b_j = demand at destination j
Objective Function:
Minimize Z = ΣΣ c_ij * x_ij
Subject to:
Σ x_ij (over j) = a_i (supply constraints)
Σ x_ij (over i) = b_j (demand constraints)
x_ij ≥ 0
Features:
- Simple, fast.
- Does not consider cost.
- May give poor solution quality.
Features:
- Considers cost.
- Better than NWCR.
- Still may not give optimal result.
Features:
- Most accurate IBFS.
- Closer to optimal.
- Slightly more time-consuming.
Summary Table:
Method Cost Consideration Accuracy Complexity
2. Formulation:
Let:
- n = number of agents/tasks
- c_ij = cost of assigning agent i to task j
- x_ij = 1 if agent i is assigned to task j, otherwise 0
Objective Function:
Minimize Z = ΣΣ c_ij * x_ij
Subject to:
Σ x_ij = 1 for each row (one task per agent)
Σ x_ij = 1 for each column (one agent per task)
x_ij ∈ {0, 1}
3. Hungarian Method:
Steps:
1. Subtract the row minimum from each row.
2. Subtract the column minimum from each column.
3. Cover all zeros using minimum number of lines (horizontal/vertical).
4. If lines = n, an optimal assignment is possible. Otherwise, adjust the matrix and repeat.
2. Handling Degeneracy:
To resolve degeneracy, allocate a very small quantity ε (epsilon) in one of the unoccupied cells
(preferably with the lowest cost) to make the number of allocations equal to (m + n - 1). This ε has no
practical impact but ensures mathematical feasibility.
Simplex Method – Basic Notes with
Example
1. Definition:
The Simplex Method is a mathematical technique used to solve Linear Programming Problems (LPP)
with multiple constraints and variables. It helps in finding the maximum or minimum value of a
linear objective function.
4. Example:
Maximize Z = 3x₁ + 5x₂
Subject to:
x₁ + 2x₂ ≤ 100
x₁ + x₂ ≤ 80
x₁, x₂ ≥ 0
| x₁ | x₂ | s₁ | s₂ | RHS
---|----|----|----|----|-----
S₁ | 1 | 2 | 1 | 0 | 100
S₂ | 1 | 1 | 0 | 1 | 80
Z | -3 | -5 | 0 | 0 | 0
1. After getting an initial BFS, determine the values of ui and vj so that ui + vj = cij
for the occupied cells.
2. For the unoccupied cells, compute the opportunity cost dij = cij − (ui + vj).
3. If all dij ≥ 0, the solution is optimal. On the other hand, if at least one dij < 0,
the solution is not optimal and further saving in transportation cost is
possible.
4. Select the unoccupied cell with the smallest negative opportunity cost as this
cell is to be included in the next solution.
5. Draw a loop for the unoccupied cell selected in the previous step. The right
angle turn in this path is permitted only at occupied cells and at the original
unoccupied cell.
6. Assign alternate ‘+’ and ‘-’ signs on the corner points of the closed path,
starting from the unoccupied selected cell.
7. Determine the maximum number of units that should be shipped to this unoc-
cupied cell. The smallest value with a negative position on the loop indicates
the number of units that can be shipped to the entering cell. Now, add this
quantity to all the cells on the corner points of the loop marked with ‘+’ sign,
and subtract it from those cells marked with ‘-’ sign. In this way, an
unoccupied cell becomes an occupied cell.
Destination
D1 D2 D3 D4 Availability
O1 19 30 50 12 7
O2 70 30 40 60 10
Origin O3 40 10 60 20 18
Demand 5 8 7 15
Solution: An initial BFS obtained by Matrix minima method is shown in Table 2.10.
D1 D2 D3 D4 ai
O1
, ,
z7 r
O2 19 50 12 7
, , 30 , ,
z3 r z7 r
O3 70 30 40 60
, , , , , , 10
z2 r z8 r z8 r
40 10 20
60 18
bj 5 8 7 15
u1 + v4 = c14 → v4 = 12
u3 + v4 = c34 → u3 = 8
u3 + v2 = c32 → v2 = 2
u3 + v1 = c31 → v1 = 32
u2 + v1 = c21 → u2 = 38
u2 + v3 = c23 → v3 = 2
Now, we calculate the opportunity cost dij = cij − (ui + vj) for the unoccupied cells.
D1 D2 D3 D4 ai ui
-13 28 48 , ,
z7 r
O1 19 30 50 12
, , -10 , , 10
z3 z7 r 7 0
r 70 30 40 60
, , , , 50 , ,
O2 z2 z8 z8 r
r 40 r 10 60 20 10 38
O3
18 8
bj 5 8 7 15
vj 32 2 2 12
The opportunity costs are plotted in the transportation table within shadow boxes as shown in
Table 2.11. Since all dij § 0, the current solution is not optimal.
Now, we choose the most negative value (-13) from opportunity cost and draw a closed loop
starting from (O1, D1) to this cell back through the cells (O3, D1), (O3, D4) and (O1, D4) as
shown in Table 2.12.
D1 D2 D3 D4 ai
, ,
-13 28 48
z7 r
O1 (+) ← ← ← ← ← (−) 7
← ← ← ↑ 12
↓ 19 30 50
, , -10 , , 10 ↑
O2 z3 r ↓ z7 r
↓ ↑ 10
↓ 70 30 40 ↑ 60
, , , , 50 , ,
z2 r ↓ z8 r z8 r
↑
O3 (−) → → → → (+)
→ → 18
40 → → 20
bj 5 8 7 15
D1 D2 D3 D4 ai ui
, , 28 61 , ,
z r z5 r
2 19 30 50 12
O1 , , , ,
-23 -3
z r z7 r 7 0
3 70 30 40 60
13 , 63 , ,
,
O2 z8 z10
40 10 60 r 20
r 10 51
O3 18 8
bj 5 8 7 15
vj 19 2 -11 12
The revised solution is shown in Table 2.13. The optimality test by MODI method
shows that all dij § 0. So, again we form a closed loop for the most negative oppor- tunity
cost (-23) as shown in Table 2.14 and trace out the smallest possible allocation amongst the
occupied cell in the closed loop, which is 3. We then obtain the fur- ther improved
solution as shown in Table 2.15. The optimality test by MODI method shows that all the current
opportunity costs are nonnegative (see the shadow boxes in Table 2.15). Hence the
optimality allocation is x11 = 5, x14 = 2, x22 = 3, x23 = 7, x32 = 5, x34 = 13 and the
corresponding minimum transportation cost is Rs.(19 × 5 + 12 × 2 + 30 × 3 + 40 × 7 + 10
× 5 + 20 × 13) = Rs.799.
D1 D2 D3 D4 ai
, , 28 61 , ,
O1 z r z5 r
2
(+) ← ← ← ← ← ← ← ← (−)
7
↓ 19 30 50 ↑ 12
, , -23 , , -3 ↑
z r ↓ z7 r
3 (+)
(−) → → ↑
O2
70 ↓ 30 40 ↑ 60
13 , , 63 , , 10
z8 ↓ z10 r ↑
r (−) → → → → → (+)
40 10 60 20
O3
18
bj 5 8 7 15
D1 D2 D3 D4 ai ui
, , 28 38 , ,
z5 r z2 r
O1 19 30 50 12
23 , , , , 20
z r z7 r 7 0
70 3 60
30 40
13 , , 40 , ,
O2 z r z13
40 5 60 r
10 20 10 28
O3
18 8
bj 5 8 7 15
vj 19 2 12 12
Table 2.15: Improved solution and test for optimality by MODI method
An initial BFS (see Table 2.17) obtained by Matrix minimum method shows that the number
of basic variables = 5 < m + n − 1 = 6. Hence, it is a degenerate TP. To resolve
Destination
D1 D2 D3 D4 Supply
O1 2 2 2 4 1000
O2 4 6 4 3 700
Origin
O3 3 2 1 0 900
Demand 900 800 500 400
D1 D2 D3 D4 ai
2 2 2 4
O1 , , , ,
1000
z900 z10 r
r 0
4 6 4 3
O2 , ,
700
z70 r
0
O3 3 2 1 0
, , , , 900
bj 900 800 500 400
degeneracy, we assign a very small quantity ϵ(> 0) to that unoccupied cell which has the
minimum transportation cost. In Table 2.17, there is a tie in selecting the smallest unoccupied
cell. So, we choose the cell (O3, D2) arbitrarily, see Table 2.18.
D1 D2 D3 D4 ai
2 2 2 4
O1 , , , ,
1000
z900 z100 r
r
O2 4 6 4 3
, ,
700
z700 r
3 2 1 0
O3 , , , , , ,
zϵ r z500 z400 900 + ϵ
bj 900 800 + ϵ 500 400
Now, we use the stepping stone method to find an optimal solution. We calculate the
opportunity cost for all unoccupied cells as given below:
Unoccupied cell Increase in cost per unit Remarks
of reallocation
(O1, D3) +2 − 2 + 2 − 1 = 1 Cost increases
(O1, D4) +4 − 2 + 2 − 0 = 4 Cost increases
(O2, D1) +4 − 6 + 2 − 2 = −2 Cost decreases
(O2, D3) +4 − 6 + 2 − 1 = −1 Cost decreases
(O2, D4) +3 − 6 + 2 − 0 = −1 Cost decreases
(O3, D1) +3 − 2 + 2 − 2 = 1 Cost increases
The cell (O2, D1) is having the maximum improvement potential, which is equal to −2. The
maximum amount that can be allocated to (O2, D1) is 700 and this will make the current basic
variable corresponding to cell (O2, D2) non-basic. The improved solution is shown in Table
2.19.
D1 D2 D3 D4 ai
2 2 2 4
O1 , , , ,
1000
z200 z800 r
r
O2 4 6 4 3
, ,
700
z700
r
O3 3 2 1 0
, , , , , , 900 + ϵ
bj 900 800 + ϵ 500 400
As no further improvement is possible, the optimal solution is x11 = 200, x12 = 800, x21 = 700, x32
= ϵ, x33 = 500, x34 = 400 and the corresponding transportation cost is Rs.(2 × 200 + 2 × 800 + 4
× 700 + 2 × ϵ + 1 × 500 + 0 × 400) = Rs.(5300 + 2ϵ). Since ϵ is a very small quantity, it can be
neglected. Thus, the net transportation cost is Rs.5300.
Example 2.3: Consider the transportation problem presented in the following table.
Destination
D1 D2 D3 Supply
O1 28 17 26 500
O2 19 12 16 300
Demand 250 250 500
Origin
∑2 ∑3
Solution: The given transportation problem is unbalanced as i=1 ai = 800 < j=1 bj =
1000. To solve this problem, we introduce a dummy row with transportation cost zero
and availability 200, see Table 2.21. Using Matrix minima method, an initial BFS is
obtained as shown in Table 2.22. The corresponding transportation cost is Rs.(50 × 28 +
450 × 26 + 250 × 12 + 50 × 16 + 200 × 0) = Rs.16900. For optimality test, one can use MODI
method as explained before. Further, improvement in the solution can be done by forming
loop, if needed.
D1 D2 D3 ai
Destination 28 17 26
O1 , , , ,
D1 D2 D3 Supply
O1 28 17 26 500 z50 r z450 r500
O2 19 12 16 300 19 12 16
Origin O2 , , , ,
Dummy 0 0 0 200
50 0
Demand 250 250 500
z2 r z5 r300
0 0 0
Dummy ,
,
z200 r
200
We assign a cost ∞ to each of these cells and determine the initial BFS by Matrix minima
method as shown in Table 2.24.
Destination
D1 D2 D3 Supply
O1 16 – 12 200
O2 14 8 18 160
O3 26 – 16 90
Origin
Demand 180 120 150
D1 D2 D3 ai
16 ∞ 12
O1 , , , ,
z40 r z120 r
160
26 ∞ 16
O3 , ,
z90 r 90
Example 2.4: Suppose that three factories X, Y , and Z supply goods to four deal- ers
spread all over the country. The production capacities of these factories are 200, 500 and 300
units per month, respectively. Transportation costs from the factories to the dealers are given
in the following Table 2.25. Determine a suitable allocation to maximize the total net return.
Solution: Maximization transportation problem can be converted into minimization
transportation problem by subtracting each transportation cost from the maximum
transportation cost. Here, the maximum transportation cost is 25. So, we subtract each
cost from 25. The revised transportation problem is shown in Table 2.26. The initial BFS
obtained by Matrix minima method is given in Table 2.27.
Destination
D1 D2 D3 D4 Availability
X 12 18 6 25 200
Y 8 7 10 18 500
Z 14 3 11 20 300
Origin
Demand 180 320 100 400
Destination
D1 D2 D3 D4 ai
X 13 7 19 0 200
Origin Y 17 18 15 7 500
Z 11 22 14 5 300
bj 180 320 100 400
D1 D2 D3 D4 ai
13 7 19 0
X , ,
, , z200 r 200
z80
18 15 7
r
Y 17 ,
, , ,
z320 14 z100 r
500
11 22 r
5
Z , ,
, ,
z100 r z200 r 300