Anda di halaman 1dari 100

# SPECIAL PURPOSE

LINEAR
PROGRAMMING
LEARNING OBJECTIVES

## determine the importance of the transportation and assignment

methods as special algorithms of linear programming in business
set up an initial distribution arrangement by the northwest method
handle an unbalanced supply and demand condition of transportation
problems
formulate transportation model
generate an initial feasible solution using the northwest corner rule,
greedy method and VAM method.
handle degeneracy in the transportation model
solve transportation problems using the MODI method
describe the nature of assignment problems
solve assignment problems using the Hungarian method
formulate assignment problem models
apply transportation and assignment problems in business
SPECIAL PURPOSE LINEAR
PROGRAMMING

PROBLEMS

## Methods in Establishing the Initial

Methods in Establishing Feasible Solution
the Optimal Feasible 1. Northwest Corner Rule
Solution 1.
2. Greedy Method Hungarian
1. Stepping Stone Method
3. VAM Method Method
2. MODI Method
Transportation problems
deal with selecting the routes from the source of
supply to the distribution outlets.
also included in selecting routes for the product
distribution network among the manufacturing
warehouses or among the regional and local
distribution outlets.
a simplified special case of the simplex method. Its name
was derived from its application to problems involving
transporting products from several sources to several
destinations.
Destination
Is a point of demand in a transportation problem.
Origin
Is the source or supply location in a transportation
problem.
Unused Squares
Are squares, which represent routes where no
quantity is shipped between a source and a
destination
Stone Squares
Are used squares in the transportation problem
Transportation Problem

## To solve the transportation problem by its special purpose

algorithm, it is required that the sum of the supplies at the
sources equal the sum of the demands at the destinations. If
the total supply is greater than the total demand, a dummy
destination is added with demand equal to the excess
supply, and shipping costs from all sources are zero. Similarly,
if total supply is less than total demand, a dummy source is
When solving a transportation problem by its special
purpose algorithm, unacceptable shipping routes are
given a cost of a large number.
Transportation problems
Two methods of Solving Transportation Problem
1. Stepping Stone
a. Balanced: Demand= Supply; Supply= Demand

## b. Unbalanced: Demand greater than supply

Demand less than supply

## 2. MODI (Modified Distribution

Balanced Transportation problems
Stepping- stone Method of Transportation
This method utilizes unused square cells as a point of
destination to evaluate. This method utilizes unused
square cells as a point of destination to evaluate if the
solution can still be improved.
The objective is to look for three available cells,
usually rectangular in form, in relation to the point of
destination. The movements are vertical and
horizontal.
Here are the general steps in solving TP using stepping-stone
method:

## Step 1. Set up the transportation tableau.

Step 2. Develop an initial solution.
Step 3. Test the solution for improvement.
Step 4. Developed an improved solution.

## In Step 4, once the improvement indices all positive, a

final solution is reached in the case of minimizing the cost of
transportation. The decision makers may then decide.
EXAMPLE The GGP Gravel and Sand Company is contracted to supply
materials for three different locations in Partido: Lagonoy, Tigaon,
and Sagnay.
The engineer estimated the number of truckloads needed for
each location. Lagonoy needs 72 truckloads; Tigaon needs 102
Sand Com. Has three gravel and sand plants located in the
different Barangays of San Jose: Brgy. Pugay, and Brgy. Salogon.
Sabang has 56 available truckloads; Pugay has 82 available
truckloads; and Salogon has 77 available.
The costs of transportation from the plants to the project
locations are as follows: P8 per truckload from Sabang to
Lagonoy; P16 from Sabang to Tigaon; P16 from Sabang to
Sagnay; P32 from Pugay to Lagonoy; P48 from Pugay to Tigaon;
and P48 from Salogon to Sagnay. Design a plan of distribution to
minimize the cost of transportation.
Step 1 Solution Project Location
To Supply
Lagonoy Tigaon Sagnay (Plant
(A) (B) (C) Capacity)
From
8 16 16
Sabang (1) 56

32 48 32
Pugay (2) 82

16 32 48
Salogon (3) 77
Demand(Project 215
Requirement) 72 102 41 215
Step 2
A systematic and logical procedure known as the
northwest corner rule (horizontal and vertical movements) is
used in developing an initial solution.

## Northwest Corner Rule (NCR)

Is a procedure for obtaining an initial feasible solution to
a transportation problem that starts with allocating units
to the upper left- hand corner of any transportation
problem
Here are the following steps in using the
north -west corner method:
a. Start in the cell at the upper left corner, place a quantity
of goods in this cell that equals the smaller of the row total or
the column total in the transportation.
b. If the smaller number is the row total, the 1st row is
exhausted. Go to the 2nd. If the smaller number is the
column total, the 1st column is exhausted. Go to the 2nd
column.
c. If you have gone to the 2nd row, allocate enough goods to
the cell in row 2, column 1, to exhaust column 1. This will be
the difference between the total column 1and the amount in
the 1st cell. Advance to the second cell in row 2. (Similarly, if
you have gone to the 2nd column, allocate enough to the
second cell to exhaust the first row. Go to the second row.)
d. Continue this manner, utilizing the smaller of the row total
and the column total, until you reach the lower right-hand
corner. You should place numbers in a number of cells equal
to the number of columns + the number of rows 1 {C+R-1};
unless the problem is degenerated.

## e. Set up the initial solution to the preceding tableau. For a

simpler reading of the tableau, express the source of
supply as 1, 2, and 3, and the destination as A, B, and C.
Hence, the initial solution or development tableau will look
like the one below:
A B C
8 16 16
1 56
56
32 48 32
(1)
2
82
16 66
16 32 48
77
3 36 41
72 102 41
The cells that contain a number at the lower left-hand corner are
called used cells or stone squares. Those that do not contain are the
unused cells or squares.

Step 3
The objective is to find out whether the solutionhas the least cost.

## For cell 1- A 56 x 8 = 448

2- A 16 x 32 = 512
2- B 66 x 48 = 3,168
3- B 36 x 32 = 1,152
3- C 41 x 48 = 1,968
Cost = 7,248
There are some other ways to reduce the cost of transportation. Here
are some steps:

## b. Starting from an unused cell, trace a closed path ( moving horizontal

and vertical only) via stone square back to the original square. Note that
only closed paths exist for each unused square in a given solution.

## c. Assign positive and negative signs alternately at each corner square of

the closed path, beginning with a plus sign at the first unused square. The
plus sign represents an addition of 1 unit and the negative sign represents a
subtraction of 1 unit. Start in either a clockwise or a counterclockwise
direction.
d. Determine the net change in cost or the improvement index.

## e. Repeat the steps until an improvement index has been determined

for unused squares.

The unused squares are 1-B, 1-C, 2-C, and 3-A. From here,
compute for the improvement index

2-A 2-B 2-C
3-A 3-B 3-C
-8 +16
-8 16
1-C +16
56

56
1-B +32 -48 32

+32 -48 16
66
16 +32 -48
16 66
36 41

## -32 +48 -48 +32

2-C
16 66 66
+16 -32 +32 -48

3- A 36 36 41
STEP 4
FROM TO

48 32 48 32

2-C 2-C
66 25 41
32 48 32 48

36 41 77
The new improvement tableau is:
A B C
8 16 16
1 56
56
32 48 32 (2)
2 82
16 25 41

16 32 48

3 77
77

72 102 41
Cost:
1- A 56 x 8 = 448
2- A 16 x 32 = 512
2- B 25 x 48 = 1,200
2- C 41 x 32 = 1,312
3- B 77 x 32 = 2,464

## Computation for the improvement index 2

For: 1- B 16 48 + 32 8 = -8
1- C 16 32 + 32 8 = 8
3- A 16 32 + 48 32 = 0
3- C 48 32 + 48 32 = 32
If you improve further the solution, the new entry in cell 1- B is as follows:

8 16 8 16

1- B 1- B
56 31 25
32 48 32 48

16 25 41
The new improvement tableau is:
A B C
8 16 16
1 56
31 25
32 48 32 (3)
2 82
41 41
16 32 48
3 77
77
72 102 41
Cost:
1- A 31 x 8 = 248
1- B 25 x 16 = 400
2- A 41 x 32 = 1,312
2- C 41 x 32 = 1,312
3- B 77 x 32 = 2,464
Cost = 5,736

## Computation for the improvement index 3

1- C 16 32 + 32 8 = 8
2- B 48 32 + 8 18 = 8
3- A 16 8 + 16 32 = -8
3- C 48 32 + 16 8 + 32 32 = 96 72 = 24
The closed path of 3- C goes in a zigzag direction because there is
no available rectangular way. The path is shown in the figure
below.

-8 16 +16

31 25
+32 48 -32

41 41
16 -32 +48

77 3- C
The process of transferring 31 to cell 3- A implies that 31 must be
subtracted from cell 3- B and added to cell 1- B. The new
improvement tableau is shown below.
A B C
8 16 16
1 56
56
32 48 32
2 41 41
82 (4)
16 32 48
3 77
31 46
72 102 41
Illustration of transfer to 3- A is shown in the figure below.

FROM TO
8 16 8 16

31 25 56
32 48 32 48

41 41
16 32 3 -A 16 32

3- A 77 31 46
Cost: 1- B 56 x 16 = 896
2- A 41 x 32 = 1,312
2- C 41 x 32 = 1,312
3- A 31 x 16 = 496
3- B 46 x 32 = 1,472
Cost = 5,488

## Computation for the index 4

1- A 8 16 + 32 16 = 8
1- C 16 32 + 32 16 + 32 = 16
2- B 48 32 + 16 32 = 0
3- C 48 32 + 32 16 = 32
The table of the improvement index 4 is shown on the next slide.
+8 -16 8 -16 +16
1- A 56 56 1- C
32 48 +32 48 -32

41 41 41
-16 +32 -16 +32 48

31 46 31 46
+32 48
-32 -32
+48

41
2-B 41
-16 32
41
+48
+16 -32

31 46 31 46
3-C
Decision: Transport form:
Plant 1 to Project B = 56 truckloads
Plant 2 to Project A = 41 truckloads
Plant 2 to Project c = 41 truckloads
Plant 3 to Project A = 31 truckloads
Plant 3 to Project B = 46 truckloads
Minimum Cost = P5,488.00
Summary of Transportation Tableau of GPP Gravel and Sand Company

Tableau 1 Tableau 2
A B C A B C
8 16 16 8 16 16
1 56 1 56
56 56
32 48 32 32 48 32
2 82 2 82
16 66 16 25 41
16 32 48 16 32 48
3 77 3 77
36 41 77
72 102 41 72 102 41
Tableau 3 Tableau 4 final
A B C A B C
8 16 16 8 16 16
1 56 1 56
31 25 56
32 48 32 32 48 32
2 82 2 82
41 41 41 41
16 32 48 16 32 48
3 77 3 77
77 31 46
72 102 41 72 102 41
MODIFIED
DISTRIBUTION MODEL
Inthis method, a new row is added above the tableau and a
new column is inserted to the left of tableau.
Let V and Wj represent the row and column, respectively,
where V is the ith row Wj is the jth column.
The key in using this method is to utilize the occupied cells
for each V and Wj values and then use these values to
calculate the net contribution of the vacant cells.
Example: Consider
the GPP Gravel and Sand
Company in the example earlier.
Step 1 Formulate the initial transportation tableau
A B C

1 8 16 16 56

56

2 32 48 32 82

16 66

3 16 32 48 77

36 41
72 100 41
STEP 2: DEVELOP AN INITIAL SOLUTION

## Let Cj be the shipping cost per unit to a particular square

or cell, then: Cj = V + Wj
a. V + W =8 W W W
b. V +W = 32 V 8 16 16

c. V + W = 48 56
V 32 48 32
d. V+W = 32
16 66
e. V + W = 48 V 16 32 48
36 41

72 100 41
Let V=0 then:

a. 0 + W = 8 then W= 8
b. V + W= 32 then V+ 8, so that V=24
c. V + W= 48 then 24 + W=48 so that W=24
d. V + W= 32 then V + 24=32 so that V=8
e. V + W=48 then 8 + W=48 so that W=40
The new tableau with the initial solution of the V row
and the Wj column is shown below.

W = 8 W= 24 W =
40
A B C
16 16
V= 0 1 8 56
56
32 48 32
V= 2 82
24
16 66
48
v=8 3 16 32 77

36 41

72 102 41
STEP 3 TEST THE SOLUTION FOR
IMPROVEMENT
Improvement index = Cj (cost of unused cells) - V - Wj
For: 1-B 16 0 24 = -8
1-C 16 0 24 =-24
2-C 32 24 -40 =-32
3-A 16 8 8 =0

## = The largest negative improvement index is -

32
Trace the closed path for the
unused squares having the largest
negative index.
From TO

## -48 +32 -48 +32

66 25 41
+32 -48 +32 -48

36 41 77
THE NEW IMPROVED TABLEAU IS SHOWN
BELOW
W= 8 W= 24 W= 8
A B C
V= 0 1 8 16 16 56

56
V= 2 32 48 32 82
24
16 25 41
V= 8 3 16 32 48 77

77
72 102 41
Step 4: Develop an improved
solution
Improvement index= Cj - V - Wj
For a. V + W= 8 d. V + W= 32
b. V + W= 32 e. V + W= 32
c. V + W= 48

## Let V=0 then:

1-B 16 0 24= -8
1-C 16 0 8= 8
3-A 16 8 8= 0
3-C 48 8 8= 32
From TO

-8 +16 -8 +16

56 31 25
+32 -48 +32 -48

16 25
41
The New improved tableau is shown
below
W= 8 W= 16 W= 8
A B C
V= 0 1 8 16 16 56

31 25
V= 2 32 48 32 82
24
41 41
V= 8 3 16 32 48 77

77
72 102 41
DEVELOP ANOTHER
IMPROVEMENT INDEX
Improvement index= Cj - V - Wj of the new
cells or squares
For a. V + W= 8 d. V + W= 32
b. V + W = 16 e. V + W = 32
c. V + W =32
Let V=0
a. 0 + W= 8 then W= 8
b. 0 + W= 16 then W= 16
c. V + 8= 32, then V = 24
d. 24 + W= 32 then W=8
e. V +16 = 32, then V= 16
Improvement index
1-C 16 0 8 = 8
2-B 48 24 24 = 8
3-A 16 16 8 = -8
3-C 48 16 8 =24
From To

8 16 8 16
31 25
56
32 48
32 48

41
41

3-A 16 32
16 32

77 31 46
The New improved tableau is shown
below (4)
W= 0 W= 16 W= 0
A B C
V= 0 1 8 16 16 56

56
V= 2 32 48 32 82
32
41 41
V= 3 16 32 48 77
16
31 46
72 102 41
Cost improvement
1-B 56 x 16 = 896
2-A 41 x 32 = 1,312
2-C 41 x 32= 1,312
3-A 31 x 16 = 496
3-B 46 x 32 = 1,472
Cost 5,488
Improvement index= Cj - V - Wj
For: a. V + W = 16 d. V + W = 16
b. V + W = 32 e. V + W =32
c. V + W =32
Let V= 0
a. 0 + W =32, then W =32
b. V + 0= 32, then V = 32
c. 32 + W =32 then W =0
d. 16 + W = 16 then W = 16
e. V + 16 = 32, then V = 16
Improvement index for the unused cells
1-A 8 0 0= 8
1-C 16 0 - 0= 16
2-B 48 -32 -16 = 0
3-C 48 16 0=32

## Since all the improvement indices are positive, then

tableau 4 is the final solution.
SUMMARY FOR THE STEPS IN THE
MODI METHOD
1. For each solution, complete V + Wj , where Cj is the cost of stone square j,
and row (V) is always equal to zero.
2. Calculate the improvement indices for all unused squares using:
Improvement index = Cj (cost of unused cells) - V - Wj
3. Select the unused square with the largest negative index.
Trace the closed path for the unused squares having the largest negative
index.
5. Develop an improved solution using the same procedure outlined in the stepping
stone method.
6. Repeat step 1-5 until an optimal solution has been found.
Unbalanced Transportation Problem

## Two kinds of UTP:

a. The demand is less than the supply

## Dummy = something that represents a non- entity.

= it is similar to a slack variable in the simplex method.

## Two ways of using a dummy:

If the demand is greater, a dummy supply is used and place in a row
If the D is less than the S, a dummy D is introduced and used in a column
EXAMPLE 1 of UTP

A B C Supply
8 16 16
1
76
56
32 48 32
2
82 (1)
41 41
16 32 48
3
77
31 46
235
Demand 72 102 41
215
The new tableau with the dummy demand and initial distribution units is
shown below.
A B C Dummy Supply
8 16 16 0
1 76
72 4
32 48 32 0 (2)
2 82
82
16 32 48 0
3 77
16 41 20
Demand 72 102 41 20
Example 2 of UTP
Demand is greater than supply
A B C Supply
8 16 16
1 56

32 48 32
2 82

16 32 48
3 77

215
Demand 80 102 41
223
Illustration of the initial transportation distribution
A B C Supply

8 16 16
1 56
56
32 48 32
2 82
24 58
16 32 48
3 77
44 33
0 0 0

8 8
Demand 80 102 41
Degenerate Transportation Problem

## A transportation problem that occurs when the total number of

used squares or cells is not equal to the number of row plus the
number of columns minus 1. It may occur in an initial solution.

## Occurs when, in using a northwest rule, both a column

requirement and a row requirement satisfied simultaneously,
breaking the stairstep pattern.

## To be resolved, a zero stone or entry is assigned to one of the

unused cells.
Degeneracy in a Initial Solution

Although it might look easier to choose unused square for the zero
stone, the general procedure in the northwest rule is to assign it to
a square in such a way that it maintains an unbroken chain of
stone squares or cells.

## An example of transportation initial tableau is shown in the

next slide:
A B C Supply
8 16 16
1 55
35 20
32 48 32 Unused with
2 25 degeneracy.
25 This is
16 32 48 breaking the
3 30 stairstep
pattern.
30
Demand 35 45 30
A zero entry may be assigned to cell 3- B or 2- C. New
tableau are shown next.
Degeneracy in a Subsequent Solution

## Degeneracy arise when a tie exists between two or more entries

that represent the smallest value on the path of improvement with
a negative sign.
The following tableau has an initial solution which is not
degenerated. Using the MODI method, the solution can be
improved by transferring some units to cell 3- B.
W1= 4 W2= 8 W3= 12 Supply
A B C
4 8 24
V1= 0 1 90
45 45
8 4 8 (1)
V2= -4 2 60
30 30
3 16 32 48 30
V3= 4
30
Demand 45 75 60
Computing for the improved cost of transportation, the following
formula is used:

## Cij Vi Wj = Improvement cost

For a. V1 + W1 = 4 c. V2 + W2 = 4 e. V3 + W3 = 16
b. V1 + W2 = 8 d. V2 + W3 = 8

Let V1 = 0.
From a. W1 = 4 c. V2 = 4 e. V3 = 4

b. 0 + W2 = 8 then W2 = 8 d. W3 = 8
Computing the cost of transportation of unused cells:

1- C 24 0 12 = 12
2- A 8 (-4) 4 = 8
3- A 16 4 4 = 8
3- B 32 4 8 = 20
The new tableau after the transfer from 3- C to 3- B is:
W1= 4 W2= 8 W3= 12 Supply
A B C
4 8 24
V1= 0 1 90
45 45
8 4 8
V2= -4 2 60 (1)
60
16 32 48
V3= 4 3 30
30
Demand 45 75 60
The preceding tableau is degenerated because only 4 cells are
occupied while the total number of rows and columns minus 1 is 5.
See the illustration below.

The affected cells are: After the transfer, the entries become:
4 8 4 8

30 60 60
4 16 4 16

30 30
The new improved tableau is:
W1= 4 W2= 8 W3= 12 Supply

A B C
4 8 24
V 1= 0 1 90
45 45
8 4 8
V 2= -4 2 60
0 60
16 32 48
V 3= 4 3 30
30
Demand 45 75 60
Summary for Solving an Iterative Transportation Problem Tableau
1. A transportation tableau is workable only if the total demand is
equal to the total supply and the number of occupied cells is equal
to the number of rows plus the number of columns minus one.
2. If the demand is greater than the supply, a dummy supply must
be added in a separate row. If the supply is greater than the
demand, a dummy demand is added in a separate column.
3. In case of degeneracy in the initial solution, a zero entry is inserted
in a vacant or unused cell that a stairstep chain remains.
4. In case of degeneracy in a subsequent solution, a zero difference is
retained in one of the cells where two equal entries are to be
subtracted.
METHODS IN ESTABLISHING THE
INITIAL FEASIBLE SOLUTION

## 1. Northwest Corner Rule

2. Greedy Method
3. VAM Method
MINIMUM COST METHOD
OR GREEDY METHOD

## A systematized procedure used to find an initial feasible

solution to a transportation problem; it is easy to use and
provides good ( but not optimal ) solution.
MINIMUM COST METHOD OR
GREEDY METHOD
Step 1
Beginning with the lowest cost X3B, in which the cost is 3, allocate 50 units.
Cross out that column and the demand, and we change the column to 30
units.
To A B C Supply
From
1 7 5 9 150
2 10 12 10 200
3 6 3 14
50
Demand 100 30 220 400
(80)
STEP 2
Of the cells that remain, X1B has the lowest cost. Allocate 30 units in cell X1B,
the cells in column B are crossed out along with the total. The remaining
demand for the row 1 is 120 units, so that column total must be adjusted
accordingly.
To A B C Supply
From
1 7 5 9 150
30
2 10 12 10 200
3 6
50
3 14
50
Demand 100 30 220 400
(80)
STEP 3
Of the remaining cells, X1A has the lowest cost. Assigned 100 units to that cell.
Because the column 1 has been satisfied, the cells in the column must be
crossed out, and 100 units must be subtracted from the supply of row 1.

To A B C Supply
From
1 7 5 9 150
100 30
2 10 12 10 200
3 6
50
3 14
50
Demand 100 30 220 400
(80)
STEP 4
Cell X1C has the next lowest cost, so it is next in line for allocation. The
remaining supply is 20 units, and the remaining demand is 220 units.
Consequently, the quantity 20 is placed in X1c. This completes the use of
supply of row 1, and leaves a demand of 200 units for column 3.

To A B C Supply
From
1 7 5 9 150
100 30 20
2 10 12 10 200
3 6
50
3 14
50
Demand 100 30 220 400
(80) (220)
STEP 5
The last remaining cell X2c, then, receives a quantity of 200 units, cancelling
the remaining supply and demand for both its row and column.

To A B C Supply
From
1 7 5 150
100 30 20
2 10 12 9 200
200
3 6
50
3 14
50
Demand 100 30 220 400
(80)
SUMMARY OF STEPS IN MINIMUM COST
METHOD (MCM) OR GREEDY METHOD
1. Identify the cell that has the lowest unit cost. If there is a tie, select one
arbitrarily. Allocate the quantity to this cell that is equal to the lower of the
available supply for the row and the demand for the column.
2. Mark out the cell in the row or column that has been exhausted(or both, if
both have been exhausted), adjust the remaining row or column total
accordingly.
3. Identify the cell with the lowest cost from the remaining cells. Allocate a
quantity to this cell that is equal to the lower available supply of the row
and the demand for the column.
4. Repeat steps 2 and 3 until all supplies and demands have been allocated.
Vogels Approximation Method of Allocation
An algorithm that finds an initial feasible solution to a problem by
considering the penalty cost of not using the cheapest
available route.

Five steps:

1. Determine the difference between the lower two cells in all rows
and columns (including dummies if they are unbalanced).

2. Identify the row column, with the largest difference ties that may be
broken arbitrarily.
3. Allocate as much as possible to the lowest- cost cell in the row or
column with the highest difference.

4. Stop the process if all row and column requirements are met. If
not, go to the next step.

## 5. Recalculate the difference between the two lowest cells remaining in

all rows and columns. Any row and column with zero supply or demand
should nit be used in calculating further differences. Then go to step 2.

## The Vogels Approximation Method (VAM) usually produces an

optimal or near- optimal starting solution. One study found that VAM
yields an optimum solution in 80% of the sample problems tested.
A B C
Table 1
8 4 7 Difference Iteration Columns
1 20 20
74 74 7-4
3 6 9 3 3 3
2 45
10 5 30
63 6-3 63
3 10 5 2 20 3 3 3
20
85 52 52
10 25 50 85 3 3 -
83 54 72
5 1 5
Difference
Iterations 83 64 97
Rows 5 2 5

64 9- 7
- 2 2
For 3- B: For 2- C:
A B C Supply A B C Supply
8 16 16 8 16 16
1 55 1 55
35 20 35 20
32 48 32 32 48 32
2 25 2 25
25 25 0
16 32 48 16 32 48
3 30 3 30
0 30 30
Demand 35 45 30 Demand 35 45 30
THE ASSIGNMENT METHOD

## Also known as flood technique or the Hungarian

method, is another special purpose of algorithm
used in linear programming
It is used if the following conditions are met: the
number of sources is equal to the number of
destinations; the amount of supply and the demand
is equal to one, and each variable is equal to zero or
one.
THREE MAIN STEPS IN
SOLVING AN ASSIGNMENT
PROBLEM
1. Determine the opportunity cost tableau
a. Subtract the lowest entry in each column of the given
cost tableau from all entries in that column.
b. Subtract the lowest entries in each row of the tableau
obtained in part (a) from all the entries in a row.

## 2. Determine whether an optimal assignment can be

The procedure is to draw straight lines (vertical and
horizontal) through the total opportunity cost tableau
in such manner as to minimize the number of lines
necessary to cover all zero squares. An optimal
assignment can be made when the number of lines
in the columns is equal to the number of rows.
If the number of lines drawn is fewer than the
number of rows an optimal assignment
cannot be made and a problem is not
solved.
3. Revise the total opportunity cost tableau.
a. Select the smallest number in the tableau
not covered by the straight line and
subtract this number from all numbers not
covered by line.
b. Add this number to the number lying at the
intersection of any two lines.
John is the division head of Jollibee in Western Europe. Three
branches were opened and he has to assign one manager to
each branch. He has shortlisted four candidates for the new
position and he has to assign them based on the minimum cost
possible. The cost of assigning a manager to each branch is
determined. The cost of assigning Claire to Oslo is \$10,000, \$20,000,
to Davos, and \$14,000 to Dublin. The cost of assigning Timmy to
Oslo is \$16,000, \$11,000 to Davos, and \$17,000 to Dublin. For
Jesselle, it will cost \$15,000 to be assigned to Oslo, \$12,000 to
Davos, and \$19,000 to Dublin Assigning Quirob to Oslo costs
\$13,000, \$18,000 to Davos, and \$21,000 to Dublin.
Which manager should be assigned to a new location? Who
should not be assigned to a new location? What is the least cost
of assignment?
THE DATA ARE SUMMARIZED IN THE TABLE
BELOW
(COST IN THOUSAND \$)
Manager Location
Oslo Davos Dublin
Claire 10 20 14

Timmy 16 11 17

Jesselle 15 12 19

Quirob 13 18 21
SOLUTION
STEP 1. DETERMINE THE OPPORTUNITY
COST TABLEAU
a. Subtract the lowest entry in each column from all
entries in the same column.

Manager Location
Oslo Davos Dublin
Claire 0 9 0
Timmy 6 0 3
Jesselle 5 1 5
Quirob 3 7 7
b. Subtract the lowest entry in each row from all
entries in the same row.

Manager Location
Oslo Davos Dublin
Claire 0 9 0
Timmy 6 0 3
Jesselle 4 0 4
Quirob 0 4 4
STEP 2. THE LINES IN THE COLUMNS ARE FEWER
THAN THE LINES IN ROWS ; HENCE, IT IS NOT YET
AN OPTIMAL SOLUTION AND THE PROBLEM IS
NOT YET SOLVED.
STEP 3. REVISE THE TOTAL
OPPORTUNITY COST TABLE
a. Select the smallest number in the tableau not covered
by the straight line and subtract this number from all
numbers not covered by line.

Manager Location
Oslo Davos Dublin
Claire 0 9 0
Timmy 6 0 0
Jesselle 4 0 1
Quirob 0 4 1
Assignment:
Claire will be assigned to Dublin.
Timmy will be assigned to Davos or Dublin.
Jeselle will be assigned to Davos.
Quirob will be assigned to Oslo.
Explanation: Timmy can no longer go to Dublin since Claire
is already there. Likewise, Jeselle can no longer go to
Davos since Timmy is already there; hence, Jeselle has no
ssignment.
The minimum table is shown below.
Manager Location
\$000 \$000 \$000
Oslo Davos Dublin
Claire x x 14
Timmy x 11 x
Jesselle x x x
Quirob 13 x x
The minimum cost is 14 + 11+13= \$38,000.
HUNGARIAN METHOD
The Hungarian method solves minimization assignment
problems with m workers and m jobs.
Special considerations can include:
number of workers does not equal the number of jobs --
add dummy workers or jobs with 0 assignment costs as
needed
worker i cannot do job j -- assign cij = +M
maximization objective -- create an opportunity loss
matrix subtracting all profits for each job from the
maximum profit for that job before beginning the
Hungarian method
HUNGARIAN METHOD
Step 1: For each row, subtract the minimum number in that
row from all numbers in that row.
Step 2: For each column, subtract the minimum number in that
column from all numbers in that column.
Step 3: Draw the minimum number of lines to cover all zeroes.
If this number = m, STOP -- an assignment can be made.
Step 4: Determine the minimum uncovered number (call it d).
Subtract d from uncovered numbers.
Add d to numbers covered by two lines.
Numbers covered by one line remain the same.
Then, GO TO STEP 3.
EXAMPLE: HUNGRY OWNER
A contractor pays his subcontractors a fixed fee plus mileage for work
performed. On a given day the contractor is faced with three electrical
jobs associated with various projects. Given below are the distances
between the subcontractors and the projects.
Projects
A B C
Westside 50 36 16
Subcontractors Federated 28 30 18
Goliath 35 32 20
Universal 25 25 14

## How should the contractors be assigned to minimize total costs?

EXAMPLE: HUNGRY OWNER
Initial Tableau Setup
Since the Hungarian algorithm requires that there be the
same number of rows as columns, add a Dummy column so
that the first tableau is:

A B C Dummy
Westside 50 36 16 0
Federated 28 30 18 0
Goliath 35 32 20 0
Universal 25 25 14 0
EXAMPLE: HUNGRY OWNER
Step 1: Subtract minimum number in each row from all
numbers in that row. Since each row has a zero, we would
simply generate the same matrix above.
Step 2: Subtract the minimum number in each column from all
numbers in the column. For A it is 25, for B it is 25, for C it is 14,
for Dummy it is 0. This yields:

A B C Dummy
Westside 25 11 2 0
Federated 3 5 4 0
Goliath 10 7 6 0
Universal 0 0 0 0
EXAMPLE: HUNGRY OWNER
Step 3: Draw the minimum number of lines to cover all zeroes. Although
one can "eyeball" this minimum, use the following algorithm. If a
"remaining" row has only one zero, draw a line through the column. If a
remaining column has only one zero in it, draw a line through the row.

A B C Dummy
Westside 25 11 2 0
Federated 3 5 4 0
Goliath 10 7 6 0
Universal 0 0 0 0

## Step 4: The minimum uncovered number is 2 (circled).

EXAMPLE: HUNGRY OWNER

## Step 5: Subtract 2 from uncovered numbers; add 2 to all numbers

covered by two lines. This gives:

A B C Dummy
Westside 23 9 0 0
Federated 1 3 2 0
Goliath 8 5 4 0
Universal 0 0 0 2
EXAMPLE: HUNGRY OWNER
Step 3: Draw the minimum number of lines to cover all zeroes.
A B C Dummy
Westside 23 9 0 0
Federated 1 3 2 0
Goliath 8 5 4 0
Universal 0 0 0 2

## Step 4: The minimum uncovered number is 1 (circled).

EXAMPLE: HUNGRY OWNER

## Step 5: Subtract 1 from uncovered numbers. Add 1 to numbers

covered by two lines. This gives:

A B C Dummy
Westside 23 9 0 1
Federated 0 2 1 0
Goliath 7 4 3 0
Universal 0 0 0 3
EXAMPLE: HUNGRY OWNER

Step 4: The minimum number of lines to cover all 0's is four. Thus, there
is a minimum-cost assignment of 0's with this tableau. The optimal
assignment is:

## Subcontractor Project Distance

Westside C 16
Federated A 28
Goliath (unassigned)
Universal B 25
Total Distance = 69 miles