OR Chapter - 3 - 100638

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 24

Chapter 3

Transportation and Assignment Problems


3.1. Introduction
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. Both transportation and assignment problems are members of a category of linear programming
techniques called network flow problems.
Transportation Problems
Transportation problem deals with the distribution of goods & passengers from several points of supplies
(sources) to a number of points of demands (destinations).
Consider a corporation engaged in the manufacture of products. Most of such big corporations are of
“multiple-product” and “multi-unit” organizations having production units situated at different places.
Items are produced for sales. Sales take place at different markets which are, again located at different
places. It is not feasible to co-locate production and market. Markets are located away from the
manufacturing places. Hence products are sent to factory warehouses set up near market outlets.
Cost of product consists of production cost and distribution cost.

Cost of product = production cost +


distribution cost
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 not fixed. The holding capacity of a warehouse or potential sales in
each marketing center is again a fixed quality which cannot be exceeded.
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.
 Uses of transportation techniques:
 Reduce distribution or transportation cost
 Improve competitiveness of product
 Assist proper location of warehouses
 Assist proper location of new factories or plants being planned.
 Close down warehouses which are found costly and uneconomical.
 The objective of transportation problem is:
 To identify the optimal shipping routes-minimum cost route

1
 To identify the maximum amount that can be shipped over the optimum route
 To determine the total transformation cost or the profit of transportation
3.1.1. The Transportation Method
The solution algorithm to a transportation problem may be summarized into the following steps:
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
There are different methods to find the initial feasible solution.
1. North-West Corner Method (NWCM)
2. Least Cost Method (LCM)
The initial solution obtained by any of the methods must satisfy the following condition:
i. The solution must be feasible
i.e.: it must satisfy all the supply and demand constraints
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
3.2. METHODS OF FINDING INITIAL FEASIBLE SOLUTION
There are several methods available to obtain an initial feasible solution. Here we shall discuss only two
different methods to obtain the initial feasible solution:
A. North- West Corner Method (NWCM)
This method does not take into account the cost of transportation on any route of transportation. 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.
Northwest corner rule
The following set of principles guides the allocation:
1. Begin with the upper left hand cell (Left, upper most in the table), & allocate as many units as
possible to that cell. This will be the smaller amount of either the row supply or the column
demand. Adjust the row & column quantities to reflect the allocation.
2. Subtract from the row supply & from the column demand the amount allocated
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.
4. If both are zero, move first to the next cell on the right then down one cell.
5. Once a cell is identified as per step (3), it becomes a northwest cell. Allocate to it an amount as
per step (1)

2
6. Repeat the above steps (1) - (4) until all the remaining supply and demand is gone.

Example:
1) Consider the following transportation problem:
To
Store Store Store
From Store 2 Supply
1 3 4
Plant 1 19 30 50 10
7
70 30 40 60
Plant 2 9
40 8 70 20
Plant 3 18

8 7 14 34
Demand 5

a. Develop an initial feasible solution using the NWCM


b. Compute the total cost for this solution.
Solution
a. Table: Initial feasible solution
To
Store Store Store
Store 2 Supply
From 1 3 4

Plant 1 19 30 50 10
7
5 2
Plant 2 70 30 40 60 9
6 3
Plant 3 40 8 70 20 18
4 14
8 7 14 34
Demand 5
Check that the solution is feasible or not:
 m + n-1; m=3 and n=4  3+4-1= 6 cells occupied (Feasible solution)
The total transportation cost of the initial feasible solution derived by the NWCM is:

Route Unit Per unit Total


From To Shipped X cost ( $) = Cost ( $)
Plant 1 Store 1 5 19 95
plant 1 Store 2 2 30 60
Plant 2 Store 3 6 30 180
Plant 2 Store 4 3 40 120

3
Plant 3 Store 4 4 70 280
Plant 3 Store 4 14 20 280
Total Cost= $ 1015

Note: NWCM does not consider the cost factor for allocation.
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
i.e: Total Supply > Total demand===> Add dummy column
* Excess demand (Supply < demand), then, add a dummy source
i.e: Total Supply < Total demand===> Add dummy row
Note: the cost of “shipments” to the dummy is usually set at zero ==> No real cost
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

Demand 80 120 60 210


260
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

Answer:X11=80, X12=20, X22=100, X23=10, X33=50 Total cost =$270


B. THE LEAST- COST METHOD (LCM) or (LARGEST- PROFIT) METHOD
LCM is the method used a minimum cost in the allocation.
It begins a solution by sequentially assigning to the ratios or cells with the minimum cost as many units
as possible. The first allocation is made to the cell with the lowest cost (the highest profit in a
maximization case).
The Least- Cost Method yields not only an initial feasible solution but also one that is close to optimal in
small problems.
Example

4
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:
B. Using Least-Cost Method
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

m= 3, n =4 ==> 3+4 -1 =6 occupied cells (Feasible)


Routes Units Unit Total
From To Shipped Cost =Cost
F1 W1 1000 X 3 $ 3000
F1 W2 4000 X 2 8000
F2 W1 2500 X 7 17500
F2 W3 2000 X 2 4000
F2 W4 1500 X 3 45000
F3 W1 2500 X 2 5000
Total transportation cost =$42,000

m= 3, n=4 ==> 3+4-1 =6 occupied calls (Feasible)


Least- Cost method is better than the NWCM because it considers cost factories.
2. Develop the initial feasible solution for the following TP using the least-cost method (LCM)

5
Destination D
Source E F G Supply
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
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.

The initial solution by the least -cost method


Destinatio D E F G Supply
Source
A 1 5 3 4 100
70
B 4 2 2 5 60
30 30
C 3 1 2 4 120
50 70
demand 70 50 100 60 280
Routes Units Unit Total
From To Shipped Cost =Cost
A D 70 X 1 $ 70
B F 30 X 2 60
B G 30 X 5 150
C E 50 X 1 50
C F 70 X 2 140
Total transportation cost =$470

m=3, n=4 ==> 3+4-1 = 6 occupied cells (feasible)


4. Develop an initial feasible solution using LCM
C. Vogel’s Approximation Method (VAM) /Penalty or Regret Method

In the transportation problem table if an allocation is made in the second lowest cost cell instead of the
first lowest, then this allocation will have associated with it a penalty corresponding to the difference of
these two costs due to ‘loss of advantage’. When we compute the difference between the two lowest costs
for each row and column, we find the opportunity cost relevant to each row and column. It would be most
economical to make allocation against the row or column with the highest opportunity cost. For a given
row or column, the allocation should be made in the least cost cell of that row or column.

6
VAM, therefore, makes effective use of the cost information and yields a better initial solution than
obtained by other methods.
VAM consists of the following procedures:
i) Write down the transportation table

To:
From 1 2 3 Supply
Form A 4 2 8
100 [2]
Form B 5 1 9
[4]
200
Form C 7 6 3
[3]
200 (1st) 200
Demand 50 150 300 Smallest cell cost

[1] [1] [5] -highest penalty


ii) Enter the difference between the smallest and second smallest element in each column below the
corresponding column and the difference between the smallest and second smallest element in
each row to the right of the row. This difference indicates the unit penalty incurred by failing to
make an allocation to the smallest cost cell in that row or column.

iii) Select the row or column with the greatest difference and allocate as much as possible to the
lowest cost cell in the row or column.

 If there is tie among the highest penalties: select the row or column having minimum cost.

 In the case of tie in minimum cost also, select the cell that can have maximum allocation.

 If there is tie among maximum allocation cells also, select the cell arbitrarily for allocation.

In our case, the column with the highest penalty (5) is column 3 and we allocate as much as possible to
the cell (3, 3) as it has the lowest cell cost (3) in column 3. Since supply is 200 while demand is 300, then
maximum possible allocation is 200.
iv) Cross out the row or column that is completely satisfied by the allocation just made and write the
shrunken transportation table as below. This table consists of the rows and columns where
allocations have not yet been made, including revised row and column totals which take the
already made allocation into account.

2nd table
To:
From 1 2 3 Supply
Farm A 4 2 8 100
[2]
Farm B 5 1 9 200
150(2 ) nd
Largest Penalty
[4]
7
Demand 50 150 100 Smallest cell
cost
[1] [1] [1]
v) Repeat the procedure from (i) to (iv) until all allocations have been made.

3rd transportation table

To:
From 1 3 Supply Minimum cost
Form A 4 8 100
[4] 50(3rd) 50(last) Two largest
Form B 5 9 50 penalties (tie)
50(4th)
[4] Demand
50 100

Final transportation table

To: Project Project #2 Project Supply


From #1 #3
Farm A 4 2 8
50 50 100
Farm B 5 1 9
150 50 200
Farm C 7 6 3
200 200
Demand 50 150 300

Total cost: 50(4) = Birr 200


50(8) = 400
150(1) = 150
50 (9) = 450
200(3) = 600
Birr 1,800
3.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.

8
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 a
decrease in the value of the objective function in minimization problems or an increase in maximization
problems.
Optimum solution to a TP can be obtained by following two methods.
A. Stepping stone Method
B. Modified Distribution method (MODI Method)
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 stepping- stone method to be applied to a transportation problem, one rule about the n o 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 n o
of rows plus the no of columns."
i.e Occupied shipping routes ( squares) = No of rows + No of columns - Non degenerate
solution.
Rules for drawing each closed loop:
1. Select an unused square (cell) to be evaluates.
2. Beginning at this cell, trace a closed loop going clockwise draw an arrow to an
occupied cell in the same row ( or column).
3. Move vertically or horizontally (but never diagonally) to another occupied cell “stepping –over”
unoccupied or occupied cells (if necessary) without changing them. Follow the same procedure
to other occupied cells until returning to the original empty cell.
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.
How to find the value of a cell evaluator
The value of a cell evaluator is the sum of the per unit shipping costs in the gaining cells less the sum of
the per unit shipping costs in the losing cells of the closed loop. This evaluation process must be
extended to all unoccupied cells.

9
1. The test of optimality for a minimization (cost) problem:
If one or more of the cell evaluators is negative, the existing solution is not optimal.
i.e: For minimization (cost) problems, all the cell evaluators must be positive for optimality.
 Analysis of test:
Check all the empty cells and select for improvement the one with the largest
improvement potential.
 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
2. The test of optimality for a maximization (profit) case:
: Is the reversed of minimization case
-If one or more of the cell evaluators is positive, the existing solution is not optimal.
i.e: for a maximization (profit) case, all the cell evaluators must be negative for optimality. If any
cell evaluation is positive, the solution is not optimal.
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 n o 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

Project Project Project ss Solution


A B C Initial feasible solution
F1 4 2 8 100
50 50
F2 5 1 9 200
100 100 10
F3 7 6 3 200
200
dd 50 150 300 500
m=3, n=3==> 3+3-1=5(Non-degenerate olution)

Total transportation cost = $[50x4+50x2+100x1+100x9+200x3] = $1900


Evaluation path for the unoccupied cells

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

Project Project Project Ss


A B C
F1 4 2 8 100
50 50 - +
F2 5 1 9 200
100 + 100-
F3 7 6 3 200
200
Dd 50 150 300 500 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?

The Stepping- stone path for cell (F1, C) is:


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.

11
The distribution plan after reallocation of 50 units is:
A B C ss
F1 4 2 8 100
50 50
F2 5 1 9 200
150 50
F3 7 6 200
3
Dd 50 150 300 500

Table: Test of optimality


Unoccupied cells Cell evaluators
(F1 ,B) +2 -8+9-1 =+2

(F2 ,A) +5 -4+8-9 =0

(F3 ,A) +7-4+8-3 =+8

(F3 ,A) +6-1+9-3= +11

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

4.1.3.1. The Stepping-stone method

The Stepping-stone method involves tracing a series of closed paths in the transportation table, using one
such path for each empty cell. The path represents a shift of one unit into an empty cell, and it enables the
manager or analyst to answer a “what-if” question: What impact on total cost would there be if one unit
were shifted into an unused route? The result is a cost change per unit shifted into a cell. If the shift would
result in a cost savings, the stepping-stone path also can be used to determine the maximum number of
units that can be shifted into the empty cell, as well as modifications to other completed cells needed to
compensate for the shift into the previously unused cell.

Reconsider the initial feasible solution we found using the northwest-corner method. Only the unoccupied
cells need to be evaluated because the question at this point is not how many units to allocate to a
particular route but only if converting a cell from zero units to nonzero (a positive integer) would
decrease or increase total costs. The unoccupied cells are A-3, B-1, C-1, and C-2. They must be evaluated
one at a time, but in no particular order.

Rules for tracing Stepping-stone paths:


i. All unoccupied cells must be evaluated. Evaluate cells one at a time.

12
ii. Except for the cell being evaluated, only add or subtract in occupied cells. (It is permissible to
skip over unoccupied cells to find an occupied cell from which the path can continue.)
iii. A path will consist of only horizontal and vertical moves, starting and ending with the empty cell
that is being evaluated.
iv. Alter + and – signs, beginning with a + sign in the cell being evaluated.

 Note that it is not necessary to actually alter the quantities in the various cells to reflect the one-unit
change, the + and – signs suffice.

The general implication of the plus and minus signs is that cells with + signs mean one unit would be
added, cells with a – sign indicate one unit would be subtracted. The net impact of such a one-unit shift
can be determined by adding the cell costs with signs attached and noting the resulting value. Thus, for
cell B-1, we have a net change of +2 (i.e., 5+2-4-1) which means that for each unit shifted into cell B-1,
the total cost would increase by $2.

Computed in similar way, the evaluations of cells C-1, A-3, and C-2 result in +10, -2, and +11
respectively. The negative value for cell A-3 indicates an improved solution is possible: For each unit we
can shift into that cell, the total cost will decrease by $2. The following table shows how empty cell C-1
can be evaluated using the Stepping stone method.

Evaluation path for cell C-1

To:
Projec Project Projec Supply
From: t #1 #2 t #3
4 2 8
Farm A 50 50 100
–- +
5 1 9
Farm B 100 100 200
– +
7 6 3
Farm C + – 200 200

Demand 50 150 300 500

4.1.3.2. The MODI method


The MODI (Modified Distribution) method of evaluating a transportation solution for optimality involves
the use of index numbers that are established for the rows and columns. These are based on the unit costs
of the occupied cells. The index numbers can be used to obtain the cell evaluation for empty cells without
using stepping-stone paths.

13
There is one index number for each column and for each row. The index numbers are determined in such
a way that for any occupied cell, the sum of the row index and the column index equal the cell’s unit
transportation cost.
Row index+Columnindex=Cell cos t
r i +¿k j=C ij ¿

The index numbers are determined sequentially in a manner dictated by the position of occupied cells.
The process always begins by assigning a value of zero as the index number of row 1.

To:
From K1 1= +4 K2 =2+2 K3=3 Supply
Farm A 4 2 8 Find k1, k2,k3, r2 and r3

0 50 50 100 Using
Farm B 5 1 9 200 Cjj = ri + kj
r2= -1 100 100
Farm C 7 6 3 200
r3=-7 200
Demand 50 150 300

k1 = 4 – 0 = +4
k2 = 2 – 0 = +2
1 = 2 + r2
r2 = 1-2 = -1
r3 = 9-(-1) = +10
r3 = 3 – 10 = -7
To evaluate the unoccupied cells for optimality we use the following relationship:
Cell Evaluation=Cell cost −Row index−Columnindex
e ij¿ C ij−¿r ¿ ij −¿k ij¿

Cell A – 3
eA-3 = 8 -0 – 10 = -2 desirable shift
Cell B – 1
eB-1 = 5 – (-1) – 4 = +2 undesirable
Cell C – 1
eC-1 = 7-(-7) -4 = +10 undesirable
Cell C-2
eC-2 = 6 – (-7) – 2 = +11 undesirable
+4 +2 +1
To:
From 1 2 3 Supply
A 4 2 8
0 50 50 100
B 5 1 9
-1 +2 100 100 200

14
-7
C 7 6 3
+10 +11 200 200
Demand 50 150 300

When cell evaluations are positive or zero, an optimal solution have been found. If one or more is
negative, the cell with the largest negative should be brought into solution because that route has the
largest potential for improvement per unit.

3.1.1 Developing an Improved Solution

Developing an improved solution to a transportation problem requires focusing on the unoccupied cell
that has the largest negative cell evaluation. In our example for cell A-3.
Improving the solution involves reallocating quantities into the transportation table. The stepping-stone
path for that cell is necessary for determining how many units can be reallocated while maintaining the
balance of supply and demand for the table. The stepping-stone path also reveals which cells must have
quantity changes and both the magnitude and the direction of changes. The limit on subtraction is the
smallest quantity in a negative position along the cell path. In our example, there are two quantities in
negative positions, 50 and 100. Because 50 <100 that amount will be shifted.
To:
From 1 2 3 Supply This 50 is the smallest
A 4 2 8 quantity in a negative
- + position of the path.
Hence, add 50 to the cells
50 50 100
with plus sign and subtract
B 5 1 9 50 to the cells with minus
+ - sign
100 100 200
C 7 6 3
200 200

Demand 50 150 300

k1 = +4 k2 = 0 k3 = +8
To:
From 1 2 3 Supply Evaluate this table, to see if
0 A 4 2 8 further improvement is
r2=+1
50 +2 50 100 possible,
k1 = 4 – 0 = +4
r3=-5 B 5 1 9 k3 = 8 – 0 = +8
0 150 50 200 r2 = 9 – 8 = +1
C 7 6 3 k2 = 1 – 1 = 0
+10 +11 200 200 r3 = 3 – 8 = -5
eA-2 = 2 – 0 – 0 = +2
Demand 50 150 300 eB-1 = 5 – 4 – 1 = 0

15
eC-1 = 7 -4 – (-5) = +10
eC-2 = 6 – 0 – (-5) = +11

16
Therefore, the solution is optimal.
3.2 ASSIGNMENT PROBLEMS
The assignment problem is also one of the areas of application of the linear programming
model. This problem arises in different situations of decision making such as, assigning jobs
to machines, to workers, etc…
The basic assumption within which we can solve assignment problems using the linear
programming is “assigning one job, project, etc… to one worker, machine, etc…” In doing
so, we will be having different alternatives (sets) of assignments; it is from these sets of
assignments we will select the optimal one. This means, that with the least possible cost,
time; the maximum possible profit, etc…
3.2.1 Solution procedure: the assignment Problem
Read the following assignment problem. The procedure for solving assignment problems is
discussed next to the problem.
3.2.3. HUNGARIAN ASSIGNEMNT METHOD (HAM)
A method, designed specially to handle the assignment problems in an efficient way, called
the Hungarian Assignment Method, is available, which is based on the concept of opportunity
cost. It is shown in figure 6.1 and discussed here. For a typical balanced assignment problem
involving a certain number of persons and an equal number of jobs, and with an objective
function of the minimization type, the method is applied as listed in the following steps:
Step 1. Locate the smallest cost element in each row of the cost table. Now subtract this
smallest from each element in that row. As a result, there shall be at least one zero
in each row of this new table, called the Reduced Cost Table (Row Reduction).
Step 2. In the reduced cost table obtained, consider each column and locate the smallest
element in it. Subtract the smallest value from every other entry in the column. As
a consequence of this action, there would be at least one zero in each of the rows
and columns of the second reduced cost table (Column Reduction).
Step 3. Draw the minimum number of horizontal and vertical lines (not diagonal ones) that
are required to cover the entire ‘zero’ elements. If the number of lines drawn is
equal to n (the number of rows/columns) the solution is optimal, and proceeds to
step 6. If the number of lines drawn is smallest than n, go to step 4.
Step 4. Select the smallest uncovered (by the lines) cost element. Subtract this element from
all uncovered elements including itself and add this element to each value located
at the intersection of any lines. The cost elements through which only one line
passes remain unaltered.
Step 5. Repeat steps 3 and 4 until an optimal solution is obtained.

Step 6. Given the optimal solution, make the job assignments as indicated by the ‘zero’
elements. This done as follows:

a) Locate a row which only ‘zero’ element. Assign the job corresponding to this element
to its corresponding person. Cross out the zero’s, if any, in the column corresponding
to the element, which is indicative of the fact that the particular job and person are no
more available.

17 | P a g e
b) Repeat (a) for each of such rows which contain only one zero. Similarly, perform the
same operation in respect of each column containing only one ‘zero’ element,
crossing out the zero(s), if any, in the row in which the element lies.
c) If there is no row or column with only a single ’zero’ element left, then select a
row/column arbitrarily and choose one of the jobs (or persons) and make the
assignment. Now cross the remaining zeros in the column and row in respect of which
the assignment is made.
d) Repeat steps (a) through (c) until all assignments are made.
e) Determine the total cost with reference to the original cost table.

Example
Solve the assignment problem given in Illustrative Example 1 for optimal solution using
HAM. The information is reproduced in the following table

Time Taken (in minutes) by 4 workers


Job
Worker A B C D
1 45 40 51 67
2 57 42 63 55
3 49 52 48 64
4 41 45 60 55

The solution to this problem is given here in a step-wise manner.


Step 1: The minimum value of each row is subtracted from all elements in the row. It is
shown in the reduced cost table, also called opportunity cost table, given as follows.

Reduced Cost Table 1


Job
Worker A B C D
1 5 0 11 27
2 15 0 21 13
3 1 4 0 16
4 0 4 19 14

Step 2: For each column of this table, the minimum value is subtracted from all the other
values. Obviously, the columns that contain a zero would remain unaffected by this
operation. Here only the fourth column values would change. The table below shows this.

Reduced Cost Table 2


Job
Worker A B C D

18 | P a g e
1 5 0 11 14
2 15 0 21 0
3 1 4 0 3
4 0 4 19 1

Step 3: Draw the minimum number of lines covering all zeros. As a general rule, we should
first cover those rows/columns which contain larger number of zeros. The above table is
reproduced in the next table and the lines are drawn.

Reduced Cost Table3


Job
Worker A B C D
1 5 0 11 14
2 15 0 21 0
3 1 4 0 3
4 0 4 19 1

Step 4: Since the number of lines drawn is equal to 4(=n), the optimal solution is obtained.
The assignments are made after scanning the rows and columns for unit zeros. Assignments
made are shown with squares, as shown in the following table.

Assignment of Jobs
Job
Worker A B C D
1 5 0 11 14
2 15 0 X 21 0
3 1 4 0 3
4 0 4 19 1
Assignments are made in the following order. Rows 1, 3, and 4 contain only one zero each.
So assign 1-B, 3-C and 4-A. Since worker 1 has been assigned job B, only worker 2 and job
D are left for assignment. The final pattern of assignments is 1-B, 2-D, 3-C, and 4-A,
involving a total time of 40+55+48+41=184 minutes. This is the optimal solution to the
problem-the same as obtained by enumeration and transportation methods.

XYZ Company is to undertake market studies for its three clients. The company has to do the
task of assigning project leaders to each of the three market studies. The Company’s
management realizes that the time required by each of the three project leaders assigned to
each study is different due to the experience and ability of the project leader. The estimated
project completion times are summarized by the table below.
Table: Estimated project completion times
Client
Project leader
1 2 3
1 Taye 10 15 9
2 Chanie 9 18 5
3 Kebede 6 14 3

19 | P a g e
The company would like to assign project leaders so that the total number of days required
to complete all the projects is minimized. If a project is to be assigned to one and only one
client, what assignments should be made?
The Hungarian method makes use of the matrix reduction process to determine the optimal
solution to the assignment problem. There are three steps in the matrix reduction procedure:
Step 1: Reduce the initial matrix by subtracting the smallest element in each row from every
element in that row. Then, subtract the smallest element in each column from every element
in that column of the row-reduced matrix.
By subtracting 9 (the smallest element in row 1) from row 1, 5 from row 2, and 3 from row 3;
we will have the following row-reduced matrix:
Client
Project leader
1 2 3
1 Taye 1 6 0
2 Chanie 4 13 0
3 Kebede 3 11 0

Column reduction will also be performed on the row-reduced matrix to complete step 1. This
is done by subtracting 1 from the first column elements, 6 from the second column elements,
and 0 from column three elements. The reduced matrix becomes
Client
Project leader
1 2 3
1 Taye 0 0 0
2 Chanie 3 7 0
3 Kebede 2 5 0

To reach the optimal solution, we shall go through the following two steps.
Step 2: Determine the minimum number of straight lines that must be drawn vertically or
horizontally to cover all the zeros in the reduced matrix. If the minimum number of lines is
found to be the same as the number of rows or columns, an optimal assignment can be made;
otherwise, go to step 3.
Let’s now go back to our example. The minimum number of lines required to cover all the
zeros is 2 as it is shown below.

Client
Project leader
1 2 3

1 Taye 0 0 0

20 | P a g e
2 Chanie 3 7 0

3 Kebede 2 5 0

These numbers of lines is different from the number of columns or rows. Therefore, we must
go to step 3.

Step 3: Subtract the value of the smallest uncovered element from every uncovered element
and add the same value to every element at the intersection of two lines. Return to step 2 and
continue until the minimum number of lines required to cover all the zeroes in the matrix is
equal to the number of rows or columns.
The minimum uncovered element is 2. Therefore, subtract 2 from all unlined elements and
add it to the element at the intersection of the two lines to get the following matrix.

Client
Project leader
1 2 3
0 0 2
1 Taye
1 5 0
2 Chanie
0 3 0
3 Kebede

Check the above matrix for optimality (return to step 2). Did you find that the maximum
number of straight lines required to cover the zeros is 3? Look at the following matrix.

Client
Project leader
1 2 3

1 Taye 0 0 2

2 Chanie 1 5 0

3 Kebede 0 3 0

21 | P a g e
Client
Project leader
1 2 3

1 Taye 0 0 2

2 Chanie 1 5 0

3 Kebede 0 3 0

The value of the optimum assignment is determined by summing up the times in the original
assignment problem associated with the optimal assignment indicated by the rectangles. That
is, 15 + 5 + 6 = 26 days are the optimal number of days that are required to complete the
study for the three clients.
Constrained/Prohibited/ Assignment Problems

It happens sometimes that a worker cannot perform a certain job or is not to be assigned a
particular job. To cope with this situation, the cost of performing that job by such person
is taken to be extremely large (which is written as M). Then the solution to the
assignment problem proceeds in the manner discussed earlier. The effect of assigning
prohibitive cost to such person-job combinations is that they do not figure in the final
solution.

Example:
You are given the information about the cost of performing different jobs by different
persons. The job-person marking X indicates that the individual involved cannot perform
the particular job. Using this information, state (i) the optimal assignment of jobs, and (ii)
the cost of such assignment,

Job
J1 J2 J3 J4 J5
P1 27 18 X 20 21
person

P2 31 24 21 12 17
P3 20 17 20 X 16
P4 22 28 20 16 27

Solution: - Balancing the problem not assigning a high cost to the pairings P1-J3 and
P3-J4, we have the cost given in the table below.

Job
J1 J2 J3 J4 J5
P1 27 18 M 20 21
person

P2 31 24 21 12 17
P3 20 17 20 M 16

22 | P a g e
P4 22 28 20 16 27
P5 0 0 0 0 0
dummy

Now we can derive the reduced cost table as shown in table shown below. Note that the
cells with prohibited assignments continue to be shown with the cost element M, since M
is defined to be extremely large so that subtraction or addition of value does not
practically affect it. To test optimality, lines are drawn to cover all zeros. Since the
number of lines

covering all zeros is less than n, we select the lowest uncovered cell, which equals 4.
With this value, we can obtain the revised reduced cost table, shown in the final table.

Reduced Matrix
Job
J1 J2 J3 J4 J5
P1 9 0 M 2 3
P2 19 12 9 0 5
P3 4 1 44 M 0
person

P4 6 12 4 0 11
P5 0 0 0 0 0
dummy

Reduced Matrix
Job
J1 J2 J3 J4 J5
P1 9 0 M 2 3
P2 19 12 9 0 5
P3 4 1 4 M 0
person

P4 6 12 4 0 11
P5 0 0 0 0 0
dummy

Assignment of Job
Job
J1 J2 J3 J4 J5
P1 9 0 M 2 3
P2 15 8 9 0 1
P3 4 1 4 M 0
person

P4 2 8 0 0 X 7
P5 0 0X 0X 0 0 X
dummy

The number of lines covering zeros is equal to 5(=n), hence the optimal assignment can
be made. The assignment is: P1-J2, P2-J4, P3-J5, P4-J3, while job J1 would remain
unassigned. This assignment pattern would cost 18+12+16+20=66 in the aggregate.

23 | P a g e
24 | P a g e

You might also like