Quantitative Chapter 3
Quantitative Chapter 3
DISTRIBUTION MODELS
One important application of linear programming has been in the area of the physical
distribution (transportation) of resources, from one place to another, to meet a specific
set of requirement.
This chapter describes two special –purpose algorithms: the transportation model and
the assignment model. Model formulation and manual solution are covered for each of
these classes of problems.
Distribution cost consists of mainly the transportation cost of items from its
production (manufacturing) center to the warehouses. Transportation techniques are
designed to minimize the distribution costs. In order to identify products, it is necessary
to work out per unit distribution cost of each product. We also know the production
capacity of each product in each factory is fixed. The holding capacity of a warehouse or
potential sales in each marketing center is again a fixed quantity which cannot be
exceeded.
1
The characteristics of transportation problem are as follows:
1. A limited supply of one commodity is available at certain sources or origins.
2. There is a demand for the commodity at several destinations
3. The quantities of supply at each source and the demand at each destination are constant.
4. The shipping or transportation costs per unit from each source to each destination are assumed
to be constant.
5. No shipments are allowed between sources or between destinations. All supply and demand
quantities are given in whole number or integers.
6. The problem is to determine how many units shipped from each source to each destination so
that all demands are satisfied at the minimum total shipping costs.
Step 1:
Formulate the problem and set up in the matrix form
The formulation of the problem is similar to the linear programming. Here the objective
function is the total transportation cost and the constraints are the supply and demand
available at each source and destination respectively.
Step 2:
Obtain an initial basic feasible solution
2
There are 3 methods to find the initial feasible solution.
ii. The number of positive allocations must equal to m+n-1, where m=the
number of rows (or origins or supply centers) and n= the number of columns(or
destination centers or demand centers)
Example:
m=3 origins and n=4 destinations ==>m+n-1=3+4 -1=6 (i.e. the transportation model
should have 6 occupied cells).
Note:
The number of occupied cells < m+n-1==> degenerate solution
Step 3:
Test the initial solution for optimality
If the current solution is optimal, then stop. Otherwise, determine the new
improved solution.
Step 4:
Repeat step 3 until an optimal solution is reached
Example
Suppose that a firm has three factories /sources of supply/ & four warehouses /point of
demand/. The firm's production capacity at the three factories, the demand for the four
distribution centers located at various regions & the cost of shipping each unit from the
factories to the warehouses through each route is given as follows:
3
Destinations (dd) =j
Origin Factory
(Supply) W1 W2 W3 W4 Capacity =i
Br.3 2 7 6
F1 5000
7 5 2 3 6000
F2
2 5 4 5
F3 2500
Requirements of the
Warehouses 6000 4000 2000 1500 13500
( Units of demand)
4
ii. The network representation of the transportation LPP is called Net work flow
3
F1 50000 W1 6000
2
6 7
7
F2 6000 5 W2 4000
2
3
W3 2000
2 5
4
F3 2500 5 W4 1500
This LPP has 12 shipping routes. The objective is to identify the minimum cost route
(Least cost route).
The NWCM gets its name because the starting point for the allocation process is the
Upper Left-hand (Northwest) corner of the transportation table. Therefore, allocate to
the Northwest corner as many units as possible.
5
3. If the column demand is now zero, move to the cell next to the right, if the row supply
is zero, move down to the cell in the next row.
If both are zero, move first to the next cell on the right then down one cell.
4. Once a cell is identified as per step (3), it becomes a northwest cell. Allocate to it an
amount as per step (1)
5. Repeat, the above steps (1) - (4) until all the remaining supply and demand is gone.
Example:
1) Consider the following transportation problem:
To
Store 1 Store 2 Store 3 Store 4 Supply
From
Plant 1 19 30 50 10
7
70 30 40 60
Plant 2 9
40 8 70 20
Plant 3 18
5 8 7 14 34
Demand
Plant 1 19 30 50 10
5 2 7
70 30 40 60
Plant 2 6 3 9
40 8 70 20
Plant 3 4 14 18
5 8 7 14 34
Demand
6
The total transportation cost of the initial feasible solution derived by the NWCM is:
Note: NWCM does not consider the cost factor for allocation.
Exercise:
1. Determine an initial basic feasible solution to the following transportation problem
using NWCM. Compute the total cost for this solution
Destination
A B C Supply
S1 2 7 14 5
S2
3 3 1 8
S3 5 4 7 7
S4 1 6 2 14
Demand 7 9 18
Answer: X11=5, X21=2, X22=6, X32=3, X33=4, X43=4, and Total cost =$102
Note:
1. Total Supply= Total demand ===> Balanced TP
2. Total Supply ≠ total demand ===> Unbalanced TP
3. Convert the unbalanced TP into a balanced TP by using dummy destination/dummy
source.
* If total Supply > Total demand, then create a fictitious or artificial destination
called dummy destination
7
i.e: total Supply > Total demand===> Add dummy column
Example
Develop an initial feasible solution using NWCM
Table: Unbalanced transportation table
R S T Supply
A 1 2 3 100
B
4 1 5 110
Solution:
R S T Supply
1 2 3
A 100
80 20
4 1 5
B 110
100 10
0 0 0
Dummy 50
50
Demand 80 120 60 260
Assignment
Consider that Harley's Sand & Gravel Pit has contracted to provide topsoil for three
residential housing developments. Topsoil can be supplied form three different “farms"
as follows:
_________________________________________________________________
Weekly Capacity
Farm (Cubic Yards)
A 100
B 200
C 200
8
_________________________________________________________________
_________________________________________________________________
Required
Develop the initial feasible solution using NWCM & compute the total cost for this
solution.
Example
9
1.Suppose that a firm has three factories / sources of supply /& four warehouses/point of
demand/. The firm's production capacity at the three factories, the demand for the
four destination centers located at various regions & the cost of shipping each unit
from the factories to the warehouses through each route is given as follows:
Destinations
Factory
W1 W2 W3 W4 Capacity
F1 3 2 7 6 5000
F2 7 5 2 3 6000
F3 2 5 4 5 2500
Demand 6000 4000 2000 1500 13500
Required:
a. Develop an initial feasible solution using NWCM & Compute the total cost
b. Develop an initial feasible solution using least-cost method & compute the total cost.
[
Solution:
Initial feasible solution
Factory
W1 W2 W3 W4 Capacity
F1 3 2 7 6
5000
5000
Factory
7 5 2 3
F2 6000
1000 4000 1000
2 5 4 5
F3 2500
1000 1500
Demand 6000 4000 2000 1500 13500
10
b.
Factory
W1 W2 W3 W4 Capacity
3 2 7 6
F1 5000
1000 4000
7 5 2 3
F2 6000
2500 2000 1500
2 5 4 5
F3 2500
2500
Demand 6000 4000 2000 1500 13500
2. Develop the initial feasible solution for the following TP using the least-cost method
(LCM)
Destination
D E F G Supply
Source
A 1 5 3 4 100
B 4 2 2 5 60
C 3 1 2 4 120
demand 70 50 100 60 280
Solution
11
The 1st allocation be made to the cell with the least-cost. Cells AD & CE both have the
lowest cost of $1. Cell AD is selected 1st because more units can be allocated to it (70)
than to cell CE (50).
Cell CF is filled in 1st since a larger quantity (120-50-70) can be placed there. Then, the
remaining requirement of 30 for column F is allocated to cell BF & source B's supply is
reduced to 30.
A 1 2 3 100
B 4 1 5 110
Demand 80 120 60
Solution
R S T Supply
A 1 2 3 100
80 10 10
12
B 4 1 5 110
110
Dummy 0 0 0 50
50
Demand 80 120 60
Exercise
Three garment plants are available for monthly education of four styles of men's shirts.
The capacities of the three plants are 45,000, 93,000 and 60,000 shirts. The number of
shirts required in style "a" through "d" are 28,000, 65,000, 35,000 & 70,000, respectively.
The profits, in $ per shirt, at each plant for each style are shown below.
2 13 4 3 10
3 0 7 11 8
How many shirts of each type to produce in each plant so that profit is maximized?
A B C D Supply
S1 1 5 3 3 34
Source
S2 3 3 1 2 15
S3 0 2 2 4 12
S4 2 7 2 4 19
demand 21 25 17 17
13
C. VOGEL'S APPROXIMATION METHOD (VAM)
or
PENALTY METHOD
VAM is preferred to the other two methods described above. In this method each
allocation is made on the basis of the opportunity (or penalty or extra) cost that would
have incurred if allocation in certain cells with minimum unit transportation cost were
missed.
In this method allocation are made so that the penalty cost is minimized. The advantage
of this method is that it gives an initial solution which is nearer to an optimal solution or
is the optimal solution itself.
VAM determines the penalty for not using the minimum cost routes, where the objective
is to avoid large penalties so that the penalty from not using the routes is minimized.
The steps in VAM are as follows:
1. Calculate penalties for each row (column) by taking the smallest & the next smallest
unit transportation cost in the same row (column)
This difference indicates the penalty or extra cost which has to be paid if one fails
to allocate to the cell with the minimum unit transportation cost
2. Select the row or column with the largest penalty & allocate as much unit as possible
in the cell having the least cost in the selected row or column satisfying the
conditions.
If there is a tie in the values of penalties, then t can be broken by selecting the cell
where maximum allocation can be made.
3. Adjust the supply & demand & cross out the satisfied row or column
If a row or column is satisfied simultaneously, only one of them is crossed out &
the remaining row (column) is assigned a zero supply (demand) .Any row or column
with zero supply or demand should not be used in computing future penalties.
4. Repeat step 1 to 3 until the entire available supply at various sources & demand at
various destinations are satisfied.
Example:
1. Determine an initial basic feasible solution to the following transportation problem
using VAM.
14
Warehouse
A B C D Supply Row difference or Row penalty
or opportunity cost
Factory F1 2 2 0 4
25
5 20 2 0 - - -
F2 5 9 8 3
25 2 2 2 2 5
15 5 5
F3 6 4 3 2
10 1 2 2 - -
10
Demand 20 15 20 5 60
Column difference 3 2 3 1
or Column penalty
or opportunity cost 3 2 - 1
1 5 - 1
5 9 - -
5 - - -
m= 3, n=4 ==> 3+4-1 =6 Occupied cells (feasible)
The transportation cost associated with this solution is:
Total cost= 5x2 + 20x0+15x5x9 =+95x3+10x4= $185
2. A dairy firm has three plants located in different regions. The daily milk production at
each plant is as follows:
Plant 1: 6 million liters.
Plant 2: 1 million liters, &
Plant 3: 10 million liters
Each day the firm must fulfill the needs of its four distribution centers. Minimum
requirement at each center is as follows.
Distribution center 1: 7 million liters
" " 2: 5 " "
" " 3: 3 " "
" " 4: 2 " "
Cost of shipping one million liters form each plant to each distribution center is
given in the following table in hundreds of dollar.
Distribution Center
D1 D2 D3 D4
P1 2 3 11 7
Plant
P2 1 0 6 1
P3 5 8 15 9
15
Find the initial basic feasible solution by:
a. North-west corners method
b. LCM
c. VAM if the object is to minimize the total transportation cost
Answer:
a. Total cost = $11, 600
b. Total cost= $11,200
c.
D1 D2 D3 D4 Supply Row Penalty
P1 2 3 11 7 6 1 1 5 -
P2 1 0 6 1 1 1 - - -
P3 5 8 15 9 10 3 3 4 4
Demand 7 5 3 2
Column Penalty
7 5 3 2
1 3 5 6
3 5 4 2
3 - 4 2
5 - 15 9
Assignment
1. Determine an initial basic feasible solution to the following transportation problem by
VAM
Destination
D1 D2 D3 D4 Supply
S1 21 16 15 3 11
S2 17 18 14 13 13
16
Source S3 32 27 18 41 19
Demand 6 10 12 15
A 11 13 17 14 250
Source B 16 18 14 10 300
C 21 24 13 10 400
Demand 200 225 275 250
17
5.3. OPTIMALITY TESTS
Once an initial solution is available, the next step is to check its optimality. An optimal
solution is one in which there is no opportunity cost. That is, there is no other set of
transportation routes (allocations) that will reduce the total opportunity cost. Thus we
have to evaluate each unoccupied cell (represents unused route) in the transportation
table in terms of opportunity cost.
The purpose of the optimality test is to see if the proposed solution just generated can be
improved or not. The solution to be checked for optimality must be non-degenerate i.e
the no of occupied cells must be m+n-1.
The Procedure for testing optimality is analogous to that of the simplex method. A
distinction is made between basic variables, those associated with occupied cells & non-
basic variables, those associated with the empty cells.
For each empty cell, the effect of changing it to an occupied cell is examined. If any of
these changes are favorable, the solution is not optimal & a new solution must be
designed. A favorable change means an increase in the value of the objective function in
maximization problems or a decrease in minimization problems.
A. Stepping-stone method
The Stepping-stone method is an iterative technique for moving from an initial feasible
solution to an optimal solution in transportation problems.
For the stopping- stone method to be applied to a transportation problem, one rule
about the no of shipping routes being used must be observed. The rule is:
“The No of occupied routes (or squares) must always be equal to one less than the sum
of the no of rows plus the no of columns."
i.e Occupied shipping routes ( squares) = No of rows + No of columns - Non degenerate
solution.
18
2.Beginning at this cell, trace a closed loop going clockwise draw an arrow to an
occupied cell in the same row ( or column).
4. Begin with a plus (+) sign at the unused cell, place alternative (-) signs and plus signs on each
corner square of the closed path just traced.
i.e At each turn of the loop ( the loop may cross over itself at times), plus and minus signs
are alternately placed in the cells, starting with a + sign in an empty cell.
5. There must be exactly one cell with a + sign and exactly one cell with a - sign in any row
or column in which the loop turns.
6. An even no of at least four cells must participate in a loop and the occupied cells can be
visited once and only once.
7. Repeat steps 1 to 4 until an improvement index has been calculated for all unused squares
(cells). If all indices computed are greater than or equal to zero, an optimal solution has been
reached. If not, it is possible to improve the current solution and decrease total shipping costs.
Note:
In a non-degenerate problem, there is only one possible way of drawing the loop for
each empty cell.
Analysis of test:
Check all the empty cells and select for improvement the one with the
largest improvement potential.
19
If the solution is not optimal, the next step in the transportation method is to
find a better solution. The operations in this step are:
a. Identify the “incoming" cell (the empty cell to be occupied)
In a minimization case, the incoming cell is located by identifying
the most negative cell evaluator.
b. Design an improved solution
-By shifting units form cell to cell
Note:
A cell evaluator of 0 indicates the existence of another solution just as good as the
current solution. Thus, in the final solution, if cell evaluators of 0 exist, this
indicates the existence of multiple optimal solutions.
If two or more cells have the same value, then either may be selected.
If two or more of the "losing" cells contain the same no of units, both will become
empty simultaneously and a “degenerate" solution will result.
For the minimization case; when one or more cell evaluators are negatives, the
cell with the largest negative should be brought into solution because that route
has the largest potential for improvement per unit.
The loop starts and ends at the selected unoccupied cell. Every corner element of
the loop must be an occupied cell.
Example:
1. Use NWCM to find initial feasible solution and test the solution for optimality.
Project Project Project ss
A B C
F1 4 2 8 100
Farm
F2 5 1 9 200
F3 7 6 3 200
dd 50 150 300 500
20
Solution
Initial feasible solution
F2 5 1 9 200
100 + 100-
F3 7 6 3 200
200
Dd 50 150 300 500
Table: Test of optimality
Unoccupied cells Cell evaluators
(F2 ,A) +5-4+2-1=+2
(F1 ,C) +8-9+1-2=-2
(F3 ,A) +7-4+2-1+9-3=+10
(F3 ,B) +6-1+9-3=+11
The negative value for cell (F1, C) indicates an improved solution is possible. For each
unit we can shift into that cell, the total cost will decrease by $2. The next question is
how many units can be reallocated into that cell while retaining the balance of supply
and demand for that table?
21
The + Signs in the path indicate units to be added, the - signs indicate units to be
subtracted. The limit on subtraction is the smallest quantity in a negative position along
the cell path. There are two quantities in negative positions, 50 and 100. Because 50 is
the smaller quantity, that amount will be shifted in the following manner: Subtract 50
units from each cell on the path with a - sign and add 50 units to the quantity of each cell
with a + sign in it.
With each iteration (new solution), it is necessary to evaluate the empty cells to see if
further improvements is possible.
Because none of these no is negative, this is an optimal solution. Therefore, the total cost
for the distribution plan is:
The total transportation cost = $ (50x4 +50x8 150x1+50x9 +200x3) = $1,800
B 4 1 5 110
210
dd 80 120 60
260
22
a. Obtain the basic feasible solution using VAM
b. Obtain the optimal solution
c. What is the optimal shipping cost?
Solution:
a. Initial feasible solution
To
R S T ss
Opportunity cost
1 2 3 100
A 1 1 1 1
80 10 10
From
B 4 1 5 110 3 3 - -
110
Dummy 0 0 0 50 0 - - -
dd 80 120 60 260
Opportunity 1 1 3
3 1 2
cost 1 2 3
1 2 -
Note: Include the dummy cells to select the opportunity cost under VAM problems.
b. Test of optimality.
Since none of the cell evaluators is negative, the above feasible solution is optimal.
Thus, accordingly the distribution is as follows
A Supplies 80 units to warehouse R
B Supplies 10 units to warehouse S
C Supplies 10 units to warehouse T
B Supplies 110 units to warehouse S
23
c. The total optimal shipping cost is = $240
Exercise:
Consider the following transportation problem
A 12 20 15 50
warehouses
B 9 11 4 15
C 20 14 8 55
Demand 25 50 45 120
a. Develop an initial feasible solution using the NWCM. And compute the total cost
for this solution.
b. Evaluate the solution using the stepping-stone method. Is the solution optimal?
Explain.
c. What is the total cost for the optimal solution?
The MODI method allows us to compute improvement indices quickly foe each unused
cell with out drawing all of the closed paths. Because of this, it can often provide
considerable time savings over the stepping-stone method for solving transportation
problems.
[
MODI provides a new means of finding the unused route with the largest negative
improvement index. Once the largest index is identified, we are required to trace only
one closed path. Just as with the stepping-stone approach, this path helps to determine
the maximum No of units that can be shipped via the best unused route.
24
2. For unoccupied cells, calculate opportunity cost by using the relation:
Note:
Any initial feasible solution will do: NWCM, VAM Solution, or any arbitrary
assignment.
The stepping- stone method is efficient for small sized transportation problems. For
larger problems, however, the MODI method is recommended.
25
Example:
1. Obtain an optimal solution to the transportation problem by MODI method given
below:
Farm 1 4 2 8 100
Farm 2 5 1 9 200
Farm 3 7 6 3 200
Solution
Note:
Both the MODI and the stepping - stone method will yields the same values.
Remark:
Conventionally, we begin by assigning a value of zero as the index for row 1 (U1=0).
Once row index has been established, it will enable us to compute column index
numbers for all occupied cells in that row. Similarly, once a column index number has
been determined, index numbers for all rows corresponding to occupied cells in that
column can be determined.
Consider the initial feasible solution of the given example by NWCM as shown below:
Farm 1
4 2 8 100 U1=0
50
Farm 2
5 1 9 200 U2=1
100 100
Farm 3
7 6 3 200 U3=-7
200
26
Cij= Ui + Vj
==>C11= U1 +V1==>4=0+ V1==> V1=4 , U1=0 by convention
==>C12= U1 +V2==>2=0 +V2==> V1=2
==>C22= U2 +V2==>1= U2+ 0==> U2=-1
==>C23= U2 +V3==>9= -1+V3==> V3=10
==>C33= U3 +V3==>3= U3+10 ==> U3= -7
Note:
Cij≠ Ui + Vj (For unoccupied cells)
For instance, from the above information, C32 ≠ U3 + V2==>6≠-7+2
In this case, we found hat cell (1, 3) had an evaluation of -2, which represented an
improvement potential of and $ 2 per unit. Hence, an improved solution is possible.
Farm 3
7 6 3 200
200
27
The distribution plan after reallocation of 50 units is:
Farm 1
4 2 8 100 U1=0
50 50
5 1 9 200
Farm 2 U2=1
-+ 100 +
100 -
Farm 3
7 6 3 200 U3=-5
200
Cij= Ui + Vj
==>C11= U1 +V1==>4=0+ V1==> V1=4 , U1=0 by convention
==>C13= U1 +V3==>8=0 +V3==> V3=8
==>C23= U2 +V3==>1= U2+ 0==> U2=1
==>C22= U2 +V2==>1= 1+V2==> V2= 0
==>C33= U3 +V3==>3= U3+8 ==> U3= -5
28
Assignment
1. Obtain an optimal solution to the transportation problem by MODI method given
below.
D1 D2 D3 D3 Supply
Farm 1
19 30 50 10 7
Farm 2
70 30 40 60 9
Farm 3
40 8 70 20 18
5 8 7 34
Demand 14
2. A company has four ware houses a, b, c and d. It is required to deliver a product from
these warehouses to three customers A, B and C. The warehouses have the following
amounts in stock:
Ware house: a b c d
No of units: 15 16 12 13
Customer: A B C
No of units: 18 20 18
The table below shows the costs of transporting one unit from warehouse to
customer.
A b c d
8 9 6 3
A
6 11 5 10
B
3 8 7 9
C
29
3. A manufacturer has distribution centers at X, Y and Z. These centers have availability
40, 20, and 40 units of his product. His retail outlets at A, B, C, D and E require
25,10,20,30 and 15 units respectively. The transportation cost (in $) per unit between
each centre outlet is given below:
Distribution
Retail outlets
center
A B C D E
X
55 30 40 50 40
35 30 100 45 60
Y
40 60 95 35 30
Z
A 42 48 38 37
From
40 49 52 51
B
39 38 40 43
C
Determine the optima distribution for this company to minimize shipping costs.
30
The degeneracy in the transportation problems may occur at two stages:
1. when obtaining an initial solution
2. During improvement (or at any stage while moving to wards optimal
solution.
To resolve degeneracy, we processed by allocating a very small quantity close to zero to
one or more unoccupied cell so as to get m+n-1 number of occupied cells. This amount is
denoted by a Greek letter (epsilon) or (delta). This quantity would not affect the
total cost as well as supply and demand values.
= Almost zero
In a minimization transportation problem, allocate the smallest transportation cost to.
Insert when it is able to create a closed loop for each occupied cell.
The purpose of epsilon/delta is to enable evaluation of the remaining empty cells. The
choice of location for the epsilon/delta can be some what tricky: some empty cells may
be unsuitable if they do not enable evaluations of remaining empty cells. Not all choices
would be acceptable.
Actually, the No of epsilon/deltas needed will equal the difference between the No of
completed cells and m+n-1.Howerver; you will only be exposed to the most common
case in which one more completed cell is needed.
The epsilon/delta cannot be placed in a cell which later turns out to be in a negative
position of a cell path involved in reallocation because epsilon/delta will be the
“smallest quantity a negative position “ and shifting that minute quantity around the
cell path will leave the solution virtually unchanged. Consequently, a certain amount of
trial and error may be necessary before a satisfactory location can be identified for
epsilon/delta.
Example
1. Solve the following transportation problem.
1 2 Supply
1 3 3
50
2 4 6 30
Demand 50 30 80
31
Solution:
Using NWCM and MODI, the initial solution is:
Ui
1 2 Supply
3 3
1 50 U1=0
50
4 6
2 30 U2=3
30
Demand 50 30 80
Vj V1=3 V2=3
Cij= Ui + Vj
==>C11= U1 +V1==>3=0+ V1==> V1=3, U1=0 by convention
==>C12= U1 +V2==>3=0 +V2==> V2=3
==>C22= U2 +V2==>6= U2+3==> U2= 3
==>C33= U3 +V3==>3= U3+8 ==> U3= -5
Note: m=2 and n=2==>2+2-1=3==>Occupied cells=2< 3 (Degeneracy)
Table: Test of optimality
Vj V1=3 V2=3
32
3.5. ASSIGNMENT PROBLEMS
The Assignment Problem(AP) refers to the class of LPPs that involves determining the
most efficient assignment of people to projects, salespeople to territories, contracts to
bidders ,jobs to machines, and so on. The objective is to assign a number of resources to
an equal number of activities so as to minimize total costs or total time or maximize total
profit of allocation.
The problem of assignment arises because available resources such as men, machines,
etc have varying degrees of efficiency for performing different activities such as job.
Therefore, cost, profit or time of performing the different activities is different.
Assumptions:
The AP is a special case of TP under the condition that the number of origins is equal to
the number of destinations. Viz. m=n .Hence assignment is made on the basis of 1:1.
Remark:
The AP is considered as a special TP in which the supply at each source and the demand at each
destination are always one unit.
Since the supply and demand are always equal to one unit in each row and column, there is no
need to write them in the assignment table.
33
Example:
Service costs of different team assignment ($ in thousands)
34
5.5.1.1. Hungarian Method/Food’s Technique/
The Hungarian Method (developed by Hungarian mathematician D.Konig) of
assignment provides us with efficient method of finding the optimal solution without
having to make a direct comparison of every solution. It works on the principle of
reducing the given cost matrix (the principle of matrix reduction) to a matrix of
opportunity costs, which means that by subtracting and adding appropriate numbers in
the cost table or matrix ,we can reduce the problem to a matrix of opportunity costs.
Opportunity costs show the relative penalties associated with assigning resource to an
activity as opposed to making the best or least-cost assignment. If we can reduce the cost
matrix to the extent of having at least one zero in each row and column, then it will be
possible to make optimal assignments.
35
a. Draw the minimum number of Horizontal and /or Vertical lines necessary to cover all
zeros costs.
Draw the lines by trial and error but always try to cover two or more
zeros with one line.
b. Count the number of the lines
If the number of lines equals either the number of rows or columns in the
table, an optimal assignment can be made. If the number of lines is less
than the number of rows or columns, an improvement is possible (we
proceed to step 4).
In those problems where the first improvement does not yield an optimal solution, we
keep on improving the solution by repeating step 4 until an optimal solution is achieved.
If more than one optimal solution exists, a trial-and –error approach can be used to find
all possible combination assignments in the zero cells.
Example:
1. A computer center has three programmers. The center wants three application
programs to be developed. The head of the computer center, after studying carefully the
programs to be developed, estimate the computer time in minutes required by the
experts for the application programs as follows:
36
Programs
(Estimated time in minute)
Programmers
A B C
1 120 100 80
2 80 90 110
3 110 140 120
Assign the programmers to the programs in such a way that the total computer time is
minimum.
Solution:
Steps 1 and 2:
a. Perform row reduction
The minimum time element in row 1, 2, and 3 is 80, 80 and 110 respectively. Subtract
those elements from all elements in there respective row. The reduced time matrix is:
Table: After row reduction
A B C
-80 1 40 20 0
-80 2 0 10 30
-110 3 0 30 10
b. Column reduction
Since column B has no one ‘0’, perform also column reduction. The minimum time
element in columns A, B and C is 0, 10 and 0 respectively. Subtract these elements from
all elements in their respective column to get the reduced time matrix.
Table: After column reduction
A B C
1 40 10 0
2 0 0 30
3 0 20 10
A B C
1 40 10 0
2 0 0 30
3 0 20 10
37
b. Count the number of lines
If the number of lines is equal to the number of rows/columns, the optimal solution is
obtained. Thus proceed directly to step 5.
A B C
1 40 10
2 3 30
3 1 00 010
00
Note:
In optimal assignment, start with row/column having one zero and cancel the
alternative zeros(x)
The pattern of assignment among programmers and programs with their respective time
(in minute) is given below:
2. A department has five employees with five jobs to be performed .The time (in hours)
each man will take to perform each job is given in the effectiveness matrix
Employees
I II III IV V
A 10 5 13 15 16
B 3 9 18 13 6
10 7 2 2 2
Jobs
D 7 11 9 7 12
7 9 10 4 12
E
38
How should the jobs be allocated, one per employees, so as to minimize the total man-
hours?
Solution:
Table: After row reduction
I II III IV V
-5 A 5 0 8 10 11
-3 B 0 6 15 10 3
-2 C 8 5 0 0 0
-7 D 0 5 2 0 5
3 5 6 0 8
-4 E
Since the number of lines less than the number of rows/columns, an improvement is
possible.
Step 4. Improve the present opportunity cost table
This is done by the following operations;
a. Select the smallest entry (element) among all uncovered elements by the lines and
subtract it from all entries in the uncovered cells.
b. Add the same smallest entry to those cells in which lines intersect (cells with two
lines them).
c. Cells with one line through them are unchanged to the improved table.
I II III IV V
A 7 0 8 12 11
B 0 4 13 10 1
C 10 5 0 2 0
D 0 2 0 0 2
3 3 4 0 6
E
39
Since the number of lines equals to the number of rows/columns, the solution is optimal.
Table: Optimal assignments
I II III IV V
A 7 8 12 11
B 4 13 10 1
0
C 10 5 2
D 0 2 2
0
E 3 3 4 6
0 0
The pattern of assignments among jobs and employees with respective time (in hours) is
given below:
0 0
Job Employees Time (in minutes)
A II 5
B I 3
C V 0 2
D III 9
E IV 4
40