OPERATIONS RESEARCH
Faculty of SIT
Department of Computer Sciences
Academic Year: 2024/2025
By Mr. Lambert IZERIMANA
Assistant Lecturer
INES-RUHENGERI
Chapter 5 : Transportation and
Assignment Problems
Transportation Problems
Introduction to transportation problem (TP)
A transportation problem basically deals with the problem,
which aims to find the best way to fulfill the demand of 𝒏
demand points using the capacities of 𝒎 supply points.
While trying to find the best way, generally a variable cost
of shipping the product from one supply point
to a demand point or a similar constraint should be
taken into consideration.
Transportation Model
Companies produce products at locations called sources/Origins and
ship these products to customer locations called destinations.
Each source/origin has a limited quantity that can ship and each
customer destination must receive a required quantity of the
product.
Only possible shipments are those directly from a source to a destination.
The problems with the above characteristics are generally called
transportation problems.
These problems involve the shipment of a homogeneous product from a
number of supply locations to a number of demand locations.
Three components of a transportation
A typical transportation problem requires three sets of numbers:
1.Capacities (or supplies): Indicate the most each plant can supply in
a given time period.
2.Demands (or requirements): They are typically estimated from some
type of forecasting model. Often demands are based on historical customer
demand data.
3.Unit shipping (and possibly production) cost: It is
calculated through a transportation cost analysis.
Transportation problem variables
Symbol Variable
m Sources (supply or productio locations)
n Destinations (demand or consumption locations)
ai Capacity (Supply or production) of source i
bj Need (Demand or Consumption) of destination j
cj Unit transportation cost from source i to destination j
xij Quantity shipped from source i to destination j
C Total transportation cost
Mathematical model of Transportation Problem
Transportation problem standard model
m n
Minimize C = ∑∑C x ij ij
i=1 j=1
Subject to:
m
∑x ij = ai ; i = 1, 2, , 3, . . . , n (Supply/Capacity constraints)
j=1
n
∑x ij = bj ; j = 1, 2, , 3, . . . , n (Demand/Needs constraints)
i=1
xij ≥ 0
The transport problem has feasible solutions only if the total of the
sourcesʹ capacities is equal to the total of destinationsʹ needs,
that is:
m n m n
∑a = ∑b = ∑∑x
i j ij
i=1 j=1 i=1 j=1
Standard Form of Transportation Tableau
Example of Transportation Problem
A mining company extracts gravel, the basic product it sells, from three mines,
L1, L2 and L3. The weekly production of each mine is 75, 150 and 75 tones of
gravel respectively. The gravel has to be transported to ve main consumers, K1,
K2, K3, K4 and K5 requiring for their needs 100, 60, 40, 75 and 25 tones of
gravel per week respectively.
Assumptions
Unit transportation costs are independent of transported
volume.
Supply and demand are known and independent on price
charged for the product.
Unlimited transportation capacity to ship across any
particular transportation route.
A single commodity is transported.
Solution of the Transportation Problem
Here are important definitions about solution of transportation
problem:
i.Feasible solution: A set of non-negative values , 𝑥 𝑖 𝑗 with
𝑖 = 1; 2; … ; 𝑚 ; 𝑗 = 1; 2 … ; 𝑛 that satisfies the constraints.
ii.Basic feasible solution: A feasible solution that
contains no more than 𝒎 + 𝒏 − 𝟏 non-negative allocations.
iii.Optimal solution: A feasible solution (not necessarily
basic) is said to be optimal if it minimizes the total
transportation cost.
iv.Non degenerate basic feasible solution: A basic feasible solution to
a (𝒎 × 𝒏) transportation problem that contains exactly 𝑚 + 𝑛 −1
allocations in independent positions.
v.Degenerate basic feasible solution: A basic feasible solution that
contains less than 𝒎 + 𝒏 − 𝟏 non-negative allocations.
Steps to solve a transportation problem
Step 1: Formulate the problem and setup in
the matrix form. This consists in expressing
supply from origins, requirements at destinations
and costs of shipping from origins to destinations in
the form of matrix. A check is made to balance the
supply and requirements by creating dummy
sources or dummy destinations.
Steps to solve a transportation problem…
Step 2: Obtain the initial basic feasible solution. There are
a number of methods for generating an initial feasible solution for a
transportation problem. In this we will use the following three methods:
1. North West Corner Method (NWCM)
2. Least Cost Method (LCM)
3. Vogel's Approximation Method (VAM)
Step 3: Optimizing the basic feasible solution.
• U-V Method (Our focus)
• Stepping Stone Method
North-West Corner Method (NWCM)
Step 1: Make the maximum possible allocation to the upper left (North-West)
corner cell in the first row depending upon the availability of supply for that row
and demand requirement for the column containing that cell, i.e., min (a1 ,b1 ).
Step 2: Move to the next cell of the first row depending upon the remaining
supply for that row and the demand requirement for the next column. Proceed
till the row total is exhausted.
North-West Corner Method (NWCM) …
For Step 2 there arise three possible cases to move to the next cell :
(i) b1 > a1 : If the allocation made in step 1 is equal to the supply available at
the first source (a1 , in the first row), then move vertically down to the cell (2, 1).
Apply step 1 again, for the next allocation.
(ii) b1 < a1 : If the allocation made in step 1 is equal to the demand of the first
destination (b1 , in the first column) then move horizontally to the cell (1, 2). Apply
step 1 again for the next allocation.
(iii) b1 = a1 : If there is a tie then allocate x11 = a1 = b1 and move diagonally to
the cell (2, 2).
North-West Corner Method (NWCM) …
Step 3: Repeat steps 1 and 2 moving down towards the lower/right
(south-east) corner of the transportation table until all the requirements
are satisfied
North-West Corner Method (NWCM) Example
Example 1: Obtain the initial BFS of the following TP using NWC Method.
North-West Corner Method (NWCM) Example Solution
As we the sum of the quantity supplied by 3 sources and the sum of the quantity
demanded at 3 destinations is the same, we have a balanced TP. The TP has a
feasible solution.
The transportation cost for our TP is given by:
𝑹𝒘𝒇 ((𝟏𝟎𝟎 × 𝟓) + (𝟐𝟎𝟎 × 𝟖) + (𝟏𝟎𝟎 × 𝟒) + (𝟏𝟎𝟎 × 𝟕) + (𝟐𝟎𝟎 × 𝟓)) = 𝑹𝒘𝒇 𝟒𝟐𝟎𝟎.
Transportation Problem – NWCM Exercise
Given the following transportation cost tableaux, apply the NWCM to find
an initial Basic Feasible Solution.
Least Cost Method (LCM)
The steps involved in this method, also known as Matrix Minima Method, are as follows:
• Step 1: Determine the cell with the lowest unit cost in the entire transportation table and
allocate as much as possible to this cell.
Let it be cij. Allocate 𝒙𝒊𝒋 = 𝒎𝒊𝒏(𝒂𝒊 , 𝒃𝒋) in the cell (i, j). If the smallest unit cost is not
unique then select the cell where the maximum allocation can be made.
• Step 2: If xij = ai , cross off the i-th row, decrease bj by ai and go to step 3. If xij = bj ,
cross off the j-th column, decrease ai by bj and go to step 3. If xij = ai = bj , cross off
either the i-th row or the j-th column but not both.
• Step 3: Repeat steps 1 and 2 until the resulting reduced transportation table satisfies all
the requirements. Whenever the minimum cost is not unique, make an arbitrary choice
among the minima.
Least Cost Method (LCM) Example
Find the Basic Feasible Solution of the following TP using LCM.
LCM Example - Solution
As we the sum of the quantity supplied by 3 sources and the sum of the
quantity demanded at 3 destinations is the same, we have a balanced TP.
The TP has a feasible solution.
The cost corresponding to this feasible solution is given by:
𝑹𝒘𝒇 ((𝟓𝟎 × 𝟏𝟔) + (𝟏𝟓𝟎 × 𝟏𝟐) + (𝟒𝟎 × 𝟏𝟒) + (𝟏𝟐𝟎 × 𝟖) + (𝟗𝟎 × 𝟐𝟔)) = 𝑹𝒘𝒇 𝟔𝟒𝟔𝟎
Transportation Problem – LCM Exercise
Obtain an initial basic feasible solution for the previous transportationproblem using
the Least Cost(matrix minima method), where the dataare summarized in the
following table:
Vogel’s Approximation Method (VAM)
Vogel's Approximation Method is preferred over the other two methods
because the initial feasible solution obtained is either optimal or very close to the
optimal solution.
Step 1:For each row of the transportation table identity the smallest and the
next-to smallest costs. Determine the difference between them for each row.
Display them alongside the transportation table by enclosing them in
parenthesis against the respective rows. Similarly, compute the differences for
each column.
Vogel’s Approximation Method (VAM) …
Step 2: Identify the row or column with the largest difference among all the
rows and columns. If a tie occurs, use any arbitrary tie-breaking choice. Let the
greatest difference correspond to i-th row and let ci j be the smallest cost in
the ith row. Allocate the maximum feasible amount x i j = m i n (ai , bj ) in the
(i , j )th cell and cross on the i-th row or the j-th column in the user manner.
Step 3: Recompute the column and row differences for the reduced
transportation table and go to step 2. Repeat the procedure until all the
requirements are satisfied
Vogel’s Approximation Method (VAM) - Example
Consider the following transportation problem. Find the initial basic
feasiblesolution using Vogel’s Approximation Method.
VAM – Example (Solution)
The transport cost corresponding to this feasible solution is given by:
$ ((𝟏𝟎 × 𝟐) + (𝟓 × 𝟑) + (𝟏𝟐 × 𝟖) + (𝟖 × 𝟕)) = $ 𝟏𝟖𝟕
Optimal Solution
Transportation Models
Optimal solution
• For a Transport Problem a feasible solution (not necessarily basic) is
said to be optimal if it minimizes the total transportation cost.
• After examining the initial basic feasible solution, the next step is to
test the optimality of basic feasible solution.
Loops in Transportation
• Table In a transportation table, an ordered set of four or more cells is said to
form a loop if:
i. Any two adjacent cells in the ordered set lie in the same row (column);
ii. Not more than two adjacent cells in the ordered set lie in the same row
(column);
iii. The first and the last cells in the ordered set lie in the same row (column);
iv. The ordered set must involve at least two rows (columns) of the table.
• Loops are closed i.e. they have neither beginning nor end.
Loops in Transportation …
(1)
(2)
(3) (4)
(1), (2), and (3) are loops, while (4) we don’t have loop.
Loops in Transportation …
Closed path or loop
This is a sequence of cells in the transportation tableau such that
a. Each pair of consecutive cells lie in either the same row or the same column.
b. No three consecutive cells lie in the same row or column.
c. The first and last cells of a sequence lie in the same row or column.
d. No cell appears more than once in the sequence.
Optimizing Initial BFS using U-V Method
Steps in U-V Method (also known as MODI)
Step 1: Find initial BFS using one of the three methods.
Step 2: Optimality test.
Once an initial BFS is obtained, the next step is to check its optimality.
An optimal solution is one where there is no other set of
transportation route (allocations) that will further reduce the total
transportation cost.
Step 3: Improve solution.
Finding out the Optimal Solution of TP
Steps involved for finding out the optimal solution of transportation problem are as follows:
1. Determine an initial basic feasible solution using any one of the five methods discussed earlier. We
start with a basic feasible solution consisting of (𝒎 + 𝒏 − 𝟏) allocations in independent positions.
2. Determine a set of (𝒎 + 𝒏) numbers 𝑼𝒊 (𝒊 = 𝟏, 𝟐, 𝟑, . . . , 𝒎) and 𝑽𝒋 (𝒋 = 𝟏, 𝟐, 𝟑, . . . , 𝒏), such
that, for each occupied cell (i, j) 𝐂𝐢𝐣 = 𝐔𝐢 + 𝐕𝐣
3. Compute the opportunity cost using 𝐃𝐢𝐣 = 𝐂𝐢𝐣 − (𝐔𝐢 + 𝐕𝐣 ) .
4. Check the sign of each opportunity cost. If the opportunity costs of all the unoccupied cells are
either positive or zero, the given solution is the optimum solution. On the other hand, if one
or more unoccupied cell has negative opportunity cost, the given solution is not an optimum
solution and further savings in transportation cost are possible.
5. Select the unoccupied cell with the smallest negative opportunity cost as the cell to be included in
the next solution.
Finding out the Optimal Solution of TP…
6. Draw a closed path or loop for the unoccupied cell selected in the previous step, using the most
direct route through at least three occupied cells and moving with only horizontal and vertical
moves.
7. Assign alternate plus and minus signs at the unoccupied cells on the corner points of the closed
path with a plus sign at the cell being evaluated.
8. Determine the maximum number of units that should be transported to this unoccupied cell.
The smallest value with a negative position on the closed path indicates the number of units that
can be transported to the entering cell. Now, add this quantity to all the cells on the corner points
of the closed path marked with plus signs and subtract it from those cells marked with minus
signs. In this way an unoccupied cell becomes an occupied cell.
9. Repeat the whole procedure until an optimum solution is obtained.
Optimizing Initial BFS using U-V Method (Example)
Case I: Initial Basic Feasible Solution is Non-Degenerate
Reminder: Initial BFS is said to be a Non-degeneracy solution if the number
of allocated/occupied cells is equal to 𝒎 + 𝒏 − 𝟏. In this situation optimality
test can be performed.
Assume that the initial BFS is non-degenerate, then the next step is to assign
𝑼𝒊 and 𝑽𝒋 to rows and columns respectively as shown:
✓ Always take 𝑈1 = 𝟎
✓ Find the other values of 𝑈𝑖 and 𝑉𝑗 using allocated
cells using the following formula:
𝑈𝑖+𝑉𝑗 = 𝐶𝑖𝑗
Improve solution
The location of maximum 𝑷𝒊𝒋 indicates New basic cell
From new basic cell, draw all possible closed loops consisting of horizontal
and vertical lines passing only in the allocated cells
Add signs to cells on the closed cells starting from + sign in the new basic cell
then −, … ;
Choose least (smallest) allocated value among cells on the closed loop with
negative sign (−)
Subtract that least value from the allocated cells with (−) sign and add it to
the allocation cells with (+) sign on the closed loop and make a new Table
Repeat step 2 until the solution become optimum.
Optimization using U-V Method (Example) …
Milk in a milk shed area is collected on three cooperatives A, B and C. There are four MCCs
P, Q, R and S where milk is kept before transporting it to a milk plant. Each route is able to
supply on an average one thousand liters of milk per day. The supply of milk from
cooperatives A, B and C are 150, 160 and 90 thousand liters respectively. Daily capacity in
thousand liters of MCCs is 140, 120, 90 and 50 respectively. The cost of transporting
1000 liters of milk from each cooperative location (source) to each MCC (destination)
differs according to the distance. These costs (in thousands Rwf) are shown in the following
table:
MCCs
Cooperatives
P Q R S
A 16 18 21 12
B 17 19 14 13
C 32 11 15 10
The problem is to determine how many thousand liters of milk is to be transported from each route
on daily basis in order to minimize the total cost of transportation.
Optimization using U-V Method (Example solution)
First find the Initial BFS using LCM
The transportation cost according to the above allocation is given by :
𝒁 = 𝑹𝒘𝒇 [((𝟏𝟔 𝒙 𝟏𝟒𝟎) + (𝟏𝟖 𝒙 𝟏𝟎) + (𝟏𝟗 𝒙𝟕𝟎) + (𝟏𝟒 𝒙 𝟗𝟎) + (𝟏𝟏 𝒙 𝟒𝟎) + (𝟏𝟎 𝒙 𝟓𝟎)𝒙𝟏𝟎𝟎𝟎)] = 𝑹𝒘𝒇 𝟓𝟗𝟓𝟎𝟎𝟎𝟎
Optimization using U-V Method (Example solution) …
Step 1: Since the number of allocated cells are 𝑚 + 𝑛 − 1 = 3 + 4 − 1 =
6 the initial solution is non-degenerate. Hence, optimal solution can be
obtained.
Step 2: Set up an equation for each allocated cell.
U1 + V1 = 16 U1 = 0 V1 = 16 - 0 = 16
U1 + V2 = 18 U1 = 0 V2 = 18 - 0 = 18
U2 + V2 = 19 U2 = 19 - 18 = 1 V2 = 19 - 1 = 18
U2 + V3 =14 U2 = 1 V3 = 14 -1 = 13
U3 + V2 = 11 U3 = 11 - 18 = -7 V2 = 11 -(-7) = 18
U3 + V4 = 10 U3 = -7 V4 = 10 -(-7) = 17
Optimization using U-V Method (Example solution) …
Step 3: After the row and column numbers have been computed, the next step is to evaluate
the opportunity cost for each of the unallocated cells by using the relationship:
𝐃𝐢𝐣 = 𝐂𝐢𝐣 − (𝐔𝐢 + 𝐕𝐣 )
Allocated cell Opportunity Cost
(A,R) D13 = 21 - (0 + 13) = 8
Since the opportunity
(A,S) D14 = 12 - (0 + 7) = -5 cost in the cell (A,S) and
(B,S) are negative , the
(B,P) D21 = 17 - (1 + 16) = 0 current basic feasible
(B,S) D24 = 13 - (1 + 17) = -5 solution is not optimal
and can be improved .
(C,P) D31 = 32 - (-7 + 16) = 23
(C,R) D33 = 15 - (-7 + 13) = 9
Optimization using U-V Method (Example solution) …
Step 4: Select the unallocated cell having the highest negative net cost change i.e. cell (A,S).
The transportation cost according to the above allocation is given by :
𝒁 = 𝑹𝒘𝒇 [((𝟏𝟔 𝒙 𝟏𝟒𝟎) + (𝟏𝟐 𝒙 𝟏𝟎) + (𝟏𝟗 𝒙𝟕𝟎) + (𝟏𝟒 𝒙 𝟗𝟎) + (𝟏𝟏 𝒙 𝟓𝟎) + (𝟏𝟎 𝒙 𝟒𝟎)𝒙𝟏𝟎𝟎𝟎)] = 𝑹𝒘𝒇 𝟓𝟗𝟎𝟎𝟎𝟎𝟎
Optimization using U-V Method (Example solution) …
To test this solution for further improvement, we recalculate the values of Ui and
Vj based on the second solution for each of the allocated cells.
U1 + V1 = 16 U1 = 0 V1 = 16 - 0 = 16
U1 + V4 = 12 U1 = 0 V4 = 12 - 0 = 12
U2 + V2 = 19 U2 = 19 - 13 = 6 V2 = 13
U2 + V3 =14 U2 = 6 V3 = 14 -6 = 8
U3 + V2 = 11 U3 = -2 V2 = 11 – (-2) = 13
U3 + V4 = 10 U3 = 10 – 12 = -2 V4 = 10 -(-2) = 12
Optimization using U-V Method (Example solution) …
Again, we again calculate the opportunity costs for each unallocated cell
by using the relationship:
𝐃𝐢𝐣 = 𝐂𝐢𝐣 − (𝐔𝐢 + 𝐕𝐣 )
Allocated cell Opportunity Cost
(A,Q) D12 = 18 - (0+13) = 5 Since the opportunity cost in the cell
(A,R) D13 = 21- (0+8) = 13 (B,P) and (B,S) are negative , the
current basic feasible solution is not
(B,P) D21 = 17 - (6+16) = -5 optimal and can be improved .
(B,S) D24 =13 - (6+12) = -5
(C,P) D31 = 32-(-2+16) = 18
(C,R) D33 = 15 - (-2+8) = 9
Optimization using U-V Method (Example solution) …
Choosing the unoccupied cell (B,S), we trace a closed path that begins and ends at this cell.
The maximum number of units that can be transported to a cell marked with a minus sign on
the closed path is 40. Add this number to the unoccupied cell and to other cells on the path
marked with a plus sign. Subtract the number from cells on the closed path marked with a
minus sign. New solution is given in the following table.
Optimization using U-V Method (Example solution) …
Let’s test the new solution for further improvement, we recalculate the values of
Ui and Vj based on the second solution for each of the allocated cells.
U1 + V1 = 16 U1 = 0 V1 = 16 - 0 = 16
U1 + V4 = 12 U1 = 0 V4 = 12 - 0 = 12
U2 + V2 = 19 U2 = 1 V2 = 19 - 1 = 18
U2 + V3 =14 U2 = 1 V3 = 14 -1 = 13
U2 + V4 = 13 U2 = 13-12= 1 V4 = 13 - 1 = 12
U3 + V2 = 11 U3 = 11 – 18 = -7 V2 = 11 – (-7) = 18
Optimization using U-V Method (Example solution) …
Again, let’s calculate the opportunity costs for each unallocated cell by
using the relationship:
𝐃𝐢𝐣 = 𝐂𝐢𝐣 − (𝐔𝐢 + 𝐕𝐣 )
Allocated cell Opportunity Cost
(A,Q) D12 = 18 - (0+18) = 0
(A,R) D13 = 21- (0+13) = 8 The opportunity costs for each
unoccupied cell is positive value,
(B,P) D21 = 17 - (1+16) = 0 we conclude that solution is
(C,P) D31 = 32 - (-7+16) = 23 optimal one.
(C,R) D32 = 15 -(-7+13) = 9
(C,S) D34 = 10 - (-7+12) = 5
The transportation cost according to the above allocation is given by :
𝒁 = 𝑹𝒘𝒇 [((𝟏𝟔 𝒙 𝟏𝟒𝟎) + (𝟏𝟐 𝒙 𝟏𝟎) + (𝟏𝟗 𝒙𝟑𝟎) + (𝟏𝟒 𝒙 𝟗𝟎) + (𝟏𝟑 𝒙 𝟒𝟎) + (𝟏𝟏 𝒙 𝟗𝟎)𝒙𝟏𝟎𝟎𝟎)] = 𝑹𝒘𝒇 𝟓𝟕𝟎𝟎𝟎𝟎𝟎
Exercises
Assignment Problems
What is an assignment problem?
The assignment problem is a special type of allocation problem.
The assignment problem may be defined as follows:
Given n facilities (Men, Machines,…) and j jobs, and given the
effectiveness of each facility for each job, the problem is to
assign each facility to one and only one job so that the given
measure of effectiveness is optimized.
Mathematical Formulation of the Assignment
Problem
Consider a problem of assignment of 𝒎 resources (workers) to 𝒏 activities (jobs)
so as to minimize the overall cost or time in such a way that each resource can
associate with one and only one job. The cost (or effectiveness) matrix ( 𝑪 𝒊 𝒋 ) is
given as under:
Let x i j denotes the assignment of 𝒊𝒕𝒉 resource to 𝒋𝒕𝒉 activity, such that:
1 if source (Worker) i is assigned to activity j
xij = {
0 otherwise
The mathematical formulation of the assignment problem is:
Example of Assignment Problem Formulation
Given below is an assignment problem, write it as a transportation problem
Assignment Problem – Example solution
Solution of Assignment Problem
The assignment problem can be solved by the following four methods:
a) Complete enumeration method
b) Simplex Method
c) Transportation method
d) Hungarian method (our focus)
Solution of Assignment Problem – Hungarian Method
An efficient method for solving an assignment problem was developed by
the Hungarian mathematician Denes Konig and is known as Kuhn’s
Algorithm.
Before using this method, first you have to determine the cost table from
the given problem.
i. If the number of sources is equal to the number of destinations, go to step 3.
ii. If the number of sources is not equal to the number of destinations, then add a
dummy source or dummy destination, so that the cost table becomes a square
matrix.
Note that the cost entries of dummy source/ destinations
are always zero.
Solution of Assignment Problem – Hungarian Method
• The Hungarian method of assignment provides an efficient means of
finding the optimal solution.
• The Hungarian method is based upon the following principles:
i. If a constant is added to every element of a row and/or column of the
cost matrix of an assignment problem the resulting assignment problem
has the same optimum solution as the original problem or vice versa.
ii. The solution having zero total cost is considered as optimum solution.
Hungarian Method
The method has two phases namely Row and column Reduction and
Optimization of the problem.
Phase I: Row and Column Reduction
This phase (Phase I) has two steps:
Step 1: Locate the smallest element in each row of the given cost matrix
and then subtract the same from each element of the row.
Step 2: In the reduced matrix obtained in step 1, locate the smallest
element of each column and then subtract the same from each element of
that column.
Each column and row have at least one zero.
Hungarian Method (Phase II: Optimization)
Step I: Draw a minimum number of lines to cover all the zeroes of the
reduced matrix in phase I.
Procedure
a. Row Scanning
i. Start from the first row, ask the following question:
Is there exactly only one zero in that row? If yes, mark square around that zero
and draw a vertical line passing through that zero. Otherwise skip that row.
ii. After scanning the last row, check whether all the zeros are covered with lines. If
Yes, go to step II, otherwise do column scanning.
b. Column Scanning
i. Start from the first column, ask the following question:
Is there exactly only one zero in that row? If yes, mark square around that zero
and draw a vertical line passing through that zero. Otherwise skip that column.
ii. After scanning last column, check whether all the zeros are covered with lines.
Step II:
Check whether the number of square marked is equal to the number of rows of
the matrix. If yes, go to step 5, otherwise go to step 3.
Step III:
a. Identify the minimum value of the undeleted cells (cells with no lines
passing through them).
b. Add the minimum undeleted cell value at the intersection point of the present
matrix
c. Subtract the minimum undeleted cell value from all the undeleted cells values.
d. All other entries remain the same. (i.e. Values in cells with only one lines
passing through them remain constant)
Step IV: Go to step I
Step V: Treat the solution as marked by the squares as the Optimal solution.
Hungarian Method – Example 1
A departmental head has four subordinates, and four tasks to be performed. The
subordinates differ in efficiency, and the tasks differ in their intrinsic difficulty.
His estimate, of the time each man would take to perform each task, is given in
the matrix below How should the tasks be allocated, one to a man, so as to
minimize the total man hours?
Hungarian Method – Example 1 (Solution) …
Subtracting the smallest element of each row from every element of the corresponding row, we
get the reduced matrix:
Subtracting the smallest element of each column of the reduced matrix from every element of
the corresponding column, we get the following reduced matrix:
Hungarian Method – Example 1 (Solution) …
All zeros are covered but the number of lines is less than the number of rows of the
matrix. The next step is to find the minimum undeleted cell value.
Hungarian Method – Example 1 (Solution) …
The optimum assignment is : A → G, B → E, C → F and D → H. The minimum
total time for this assignment schedules is 59 man-hours.
Hungarian Method – Example 2
A departmental head has three subordinators. The employees differ in their
capabilities and the tasks differ in their work contents. With the performance
matrix given below, which three of four tasks should be assigned to the
subordinators.
Hungarian Method – Example Solution
The given matrix is not a square matrix. i.e the number of rows is not equal to the number of
columns. As the number of rows is greater than the number of columns, we need to create
dummy destination. The dummy destination created will have zero entries.
As all rows have minimum zero, nothing we have to do on rows. Let go on columns. Subtracting the
smallest element of each column of the reduced matrix from every element of the corresponding
column. We get the following reduced matrix (Next slide),
Hungarian Method – Example Solution …
Optimization of the problem Optimal Assignment
Multiple Optimal Solution
The ABC company has a tax waiting at each of the four cubstands. Four
customers are called and requested services the distance in miles from the
waiting taxis to the customers are given in the matrix below. Find the optimal
assignment of the taxis to customers so as to minimize the total driving distances
to customers.
Hungarian Method – Exercise
Maximization in assignment problems
In some cases, the pay off elements of the assignment problem may represent
revenues or profits instead of costs so that the objective will be to maximize the
total revenue or profit. The Hungarian method explained earlier can also be used
for maximization case.
The problem of maximization can be converted into a minimization case by
selecting the largest element among all elements of the profit matrix and
subtracting from it all other elements in the matrix.
We can then proceed as usual and obtain the optimum solution by adding the
original values of these cells to which the assignment have been made.
Maximization in assignment - Example
A company has five jobs V, W, X, Y and Z and five machines A, B,
C, D and E. The given matrix shows the return in Rs. of assigning a
job to a machine. Assign the jobs to machines so as to maximize the
total returns.
THANK YOU!!!!