You are on page 1of 76

GROUP 3

SPECIAL TYPE OF THE LP MODEL: THE


ASSIGNMENT METHOD USING THE HUNGARIAN
TECHNIQUE
BY:
CABRERA, ALDRIAN A. PABUNAN, ALIANA
JANE M.
CONCEPCION, JOHN CYMON A. RIVERA, LARISSA B.
NAJERA, BERICK D. TATARO, JOHN PAUL A.
INTRODUCTION
• An assignment problem is special type of linear programming problem where the
objective is to minimize the cost or time of completing a number of jobs by a number
of assignees.
• One of the important characteristics of assignment problem is that each assignee must
only be assigned to one job/task and vice versa.
• An assumption in assignment problem is that the number of assignees and the number
of tasks are the same. Thus, it may be considered as a special type of transportation
problem in which number of sources and destinations are equal and the capacity of
each source and requirement of each destination are all equal to 1 (Supply = Demand).
COST MATRIX IN
ASSIGNMENT
PROBLEM
SUPPLY

1 Where:
1 i = specific person
1
j = specific job
1 C = cost of the i-th person
1 assigned for doing j-th job
n
DEMAND 1 1 1 1 1 n n = total number of jobs to be
performed and total number of
persons available for doing these
jobs.
SPECIAL CASES
• Unbalanced Assignment Problem – Number of assignees (rows) are not equal to the number of
jobs (columns) or vice versa.
• Multiple Unique Solutions – where there are 2 or more optimum solutions for the problem.
• Maximization Problem – there are problems where certain facilities must be assigned to a
number of jobs to maximize the overall performance of the assignment and to maximize profit.
• Restriction on Assignments – a certain assignee cannot do a certain job (M).
• Supply is not equal to demand.
• Any combination of cases mentioned above.
APPLICATIONS

• Allocating the proper number of employees to a machine or task.


• Allocating a machine or a manufacturing plant and the number of jobs that a given machine or
factory can produce.
• Assigning a number of salespersons to a given sale territory or territories.
• Assigning new computers, laptops, and other expensive high-tech devices to the areas that need
them the most while lower priority departments would get the older models.
• Assigning of sufficient workers to a given scope of work on a construction project.
APPLICATIONS

• Assigning accountants to account of the clients.


• Assigning Airplanes where to flight.
• Assigning teaching fellows to time slots.
• Assigning contracts to bidders by systematic bid evaluation.
• Assigning teachers to classes.
• Assigning couriers to delivery areas.
• Assigning the sequence of destinations where a traveler can minimize his/her cost of travelling.
HUNGARIAN TECHNIQUE
The Hungarian method of assignment provides us with an efficient means of finding the
optimal solution. This method was developed by D. Konig, a Hungarian mathematician
and is therefore known as the Hungarian method of assignment problem.

The Hungarian method is based upon the following principles:


(i)     If a constant is added to every element of a row and/or column of the cost
matrix of an assignment problem the resulting assignment problem has the same
optimum solution as the original problem or vice versa.

(ii)   The solution having zero total cost is considered as optimum solution.        


ASSIGNMENT PROBLEM
SUPPLY IS EQUAL TO DEMAND
STEPS IN SOLVING ASSIGNMENT PROBLEM
USING HUNGARIAN TECHNIQUE

STEP 1: Determine and Develop the Cost Table from the given Problem:
• If the no. of rows (assignees) are equal to the no. of columns (jobs), go to Step 3.
• If the no. of rows (assignees) are not equal to the no. of columns (jobs), go to Step 2.

STEP 2: Add a dummy row or dummy column, so that the cost table
becomes a square matrix. The cost entries of the added
dummy row/column are always zero.
STEP 3: Locate the smallest element in each row of the given cost
matrix and then subtract the same from each element of that row.

STEP 4: In the reduced matrix obtained in the Step 3, locate the


smallest element of each column and then subtract the same from each
element of that column. Each row and column now must have at least
one zero value.
STEP 5: In the modified matrix obtained in the Step 4, Search for the
optimal assignment as follows:
(a) Examine the rows successively until a row with a single zero is found.
Enrectangle this zero and cross off all other elements in its column. Continue in
this manner until all the rows have been taken care of.
(b) Repeat the same procedure at (a) for each column of the reduced matrix.
(c) If a row and/or column has two or more zeros, and one cannot be chosen by
inspection then assign arbitrary any one of these zeros and cross off all other
elements of that row / column.
(d) Repeat (a) through (c) above successively until the chain of assigning or cross
ends.

The aim of this step is to assign a specific job for a specific person while crossing out
all remaining unassigned zeros.
STEP 5: Assignment 1
(a) Examine the rows successively
until a row with a single zero is
found. Enrectangle this zero
and cross off all other zeros in Assignment 2
its column. Continue in this
manner until all the rows have
been taken care of.
(b) Repeat the same procedure at
(a) for each column of the
reduced matrix.
(c) If a row and/or column has two
or more zeros, and one cannot
be chosen by inspection then The number of assignment is equals to 2
assign arbitrary any one of
these zeros and cross off all STEP 6: If the number of assignment is equal to the
other zeros of that row /
column.
order of cost matrix, an optimum solution is reached.
(d) Repeat (a) through (c) above • If the number of assignment is less than the order of
successively until the chain of
assigning or cross ends.
matrix go to Step 7.
STEP 7: Draw the minimum number of Add

horizontal and/or vertical lines to cover all Subtract

the zeros of the reduced matrix.


Subtract

STEP 8: Develop the new revised cost Subtract

matrix as follows:
(a) Find the smallest element of the reduced matrix
not covered by any of the lines.
(b) Subtract this element from all uncovered elements Assignment 1
and add the same to all the elements laying at the
intersection of any two lines. Assignment 2

STEP 9: Assign optimal assignment (Step 5)


• If the number of assignment is equal to order of Assignment 3
matrix, an optimal solution is reached (Step 6).
• If not, go to Step 7 and repeat the procedure until an
The number of assignment is equals to 3.
optimum solution is attained.
Thus, this is an OPTIMAL SOLUTION.
SOLUTION 1 SOLUTION 2

Thus, Solution 1:
• Worker A will assign to do Job 3 at 37 cost
• Worker B will assign to do Job 1 at 47 cost
• Worker C will assign to do Job 2 at 92 cost MULTIPLE
or, Solution 2: UNIQUE
• Worker A will assign to do Job 1 at 53 cost SOLUTIONS!
• Worker B will assign to do Job 2 at 87 cost
• Worker C will assign to do Job 3 at 36 cost
TOTAL COST = 37 + 47 + 92 = 176 cost (Solution 1)
= 53 + 87 + 36 = 176 cost (Solution 2)
Assignment Method PROGRAMMES

Problem No. 1 (Balanced)


A B C D
A computer center has four expert
programmers and needs to develop four 1 120 100 80 90

PROGRAMMERS
application programmes. The head of the
computer center estimates the computer
time (in minutes) required by the 2 80 90 110 70
respective experts to develop the
application programmes as shown:
3 110 140 120 100

4 90 90 80 90
Assignment Method Problem No. 1 (Balanced)

The problem
At Step 3, wegives
do theanRow
equal number of rows to column,
hence, a square
Reduction matrix (balanced).
by determining the
Step 1element
lowest is satisfied,
on anow
row we
andcan proceed to Step 3.
subtract it to the rest of the element Transformed matrix after
on that row. Row Reduction

120 100 80 90 80 40 20 0 10

80 90 110 70 70 10 20 40 0

110 140 120 100 100 10 40 20 0

90 90 80 90 80 10 10 0 10
Assignment Method Problem No. 1 (Balanced)
After Row Reduction we can proceed to Step 4.

Same as Step 3, we need to determine the


lowest element, but this time we do it by
column. Using the resulting matrix from Row Transformed matrix after
Reduction we do the Column Reduction Column Reduction

40 20 0 10 30 10 0 10

10 20 40 0 0 10 40 0

10 40 20 0 0 30 20 0

10 10 0 10 0 0 0 10

10 10 0 0
Assignment Method Problem No. 1 (Balanced)

After Row and Column Reduction we can now proceed to Step 5, Row and Column Scanning

Looking into the resulting matrix, we can see that the first row
has a single zero. We will enclose the zero with a rectangle and
eliminate the column it corresponds.
Since there are no other rows with single zero, we will proceed 30 10 0 10
column-wise.
Examining the matrix, we can see that the only the second 0 10 40 0
column has a single zero. We will now enclose the zero with a
rectangle and eliminate the row that it corresponds.
0 30 20 0
Since there are no other columns with single zero, and other
rows has more than one zero. We can now assign arbitrary any
of the zero and delete the other one. This will result into other 0 0 0 10
alternative solution.
Assignment Method Problem No. 1 (Balanced)

Examining the second row of the resulting matrix, we can now


assign arbitrarily any of the two zero on the row.
In this case we will chose the first zero. Enclose the zero with a
30 10 0 10
rectangle and eliminate the column it correspond.

And for the third row, we can now choose the single zero that 0 10 40 0
has been left after the elimination that we do on the previous
scanning.
0 30 20 0
Since one programme has been assigned to a programmer, we
can now say that the solution is optimal.
0 0 0 10
Assignment Method Problem No. 1 (Balanced)

Note that the assignment of the job should be made based on


the cell corresponds to the zeroes enclosed by the rectangles.
Therefore, applying the matrix to the original table will be:
This means that Programmer 1 will do the Job C,
A B C D
Programmer 2 will do Job A, Programmer 3 will do
Job D and Programmer 4 will do the Job B.
1 120
30 100
10 80
0 10
90
Programmer Programme Time
1 C 80 mins
2 80
0 10
90 110
40 70
0
2 A 80 mins

3 110
0 140
30 120
20 100
0 3 D 100 mins
4 B 90 mins
4 90
0 90
0 80
0 10
90 Minimum time taken in developing the program is
350 mins
Assignment Method Problem No. 1 (Balanced)

Using the alternative solution

Now in this case we will chose the second zero. Enclose the
30 10 0 10
zero with a rectangle and eliminate the column it correspond.

And for the third row, we can now choose the single zero that 0 10 40 0
has been left after the elimination that we do on the previous
scanning.
0 30 20 0

0 0 0 10
Assignment Method Problem No. 1 (Balanced)

Applying the alternative matrix to the original table will be:

This means that Programmer 1 will do the Job C,


A B C D
Programmer 2 will do Job D, Programmer 3 will do
Job A and Programmer 4 will do the Job B.
1 120
30 100
10 80
0 90
10
Programmer Programme Time
1 C 80 mins
2 0
80 10
90 40
110 0
70
2 D 70 mins
3 0
110 30
140 20
120 0
100 3 A 110 mins
4 B 90 mins
4 0
90 0
90 0
80 10
90 Minimum time taken in developing the program in
alternative solution is also 350 mins
Example Problem 2 ( MAXIMIZATION):
• Five salesmen are to be assigned to five districts. Estimate of sales in revenue (in thousands of
pesos) for each salesman are given as follows:

A B C D E

1 32 38 40 28 40

2 40 24 28 21 36

3 41 27 33 30 37

4 22 38 41 36 36

5 29 33 40 35 39

Find the assignment pattern that maximizes the sales revenue.


• This problem calls for the maximization of profit. In order to solve this using the Hungarian
Method, we must first convert the given maximization problem into minimization form by
subtracting all the elements of the given matrix from the highest element. For this, we obtain
the opportunity loss matrix.
A B C D E

1 32
9 38
3 40
1 28
13 40
1

2 40
1 24
17 28
13 21
20 36
5

3 41
0 27
14 33
8 30
11 37
4

4 22
19 38
3 41
0 36
5 36
5

5 29
12 33
8 40
1 35
6 39
2

Subtract the elements from the highest number (41).


• We can then proceed with step number 3: row reduction

A B C D E

1 89 23 01 12
13 01 -1
2 01 16
17 12
13 19
20 45 -1
3 0 14 8 11 4 -0
4 19 3 0 5 5 -0
5 11
12 78 01 56 12 -1
• Step number 4, column reduction

A B C D E

1 8 20 0 12
7 0

2 0 16
14 12 19
14 4

3 0 14
12 8 11
6 4

4 19 31 0 5
0 5

5 11 75 0 5
0 1

-0 -2 -0 -5 -0
• Step 5 and 6, assignment and checking for optimality

A B C D E

1 8 0 0 7 0

2 0 14 12 14 4

3 0 12 8 6 4

4 19 1 0 0 5

5 11 5 0 0 1

Upon observation, the number of assignments is less than the order


of the matrix, which is 5, so we proceed to step number 7.
• Step 7 and 8, drawing the minimum number of lines and revision of the matrix

A B C D E
+4 • Subtract the lowest uncovered
1 12
8 0 0 7 0 element from all uncovered
-4 -4 -4 -4 elements
2 0 14
10 12
8 14
10 4
0
-4 -4 -4 -4
• Then add the that same element to
3 0 12
8 8
4 6
2 4
0 all elements in the intersection of
+4 two lines
4 19
23 1 0 0 5
+4
5 11
15 5 0 0 1

Lowest element = 4
• We then go back to step number 5, assignment • Thus, our assignments will be:
• Salesman A to District 2 = 40
• Salesman B to District 1 = 38
• Salesman C to District 4 = 41
• The number of assignments is A B C D E
equal to the order of the • Salesman D to District 5 = 35
1 12
32 0* 40
38 0 7
28 0
40 • Salesman E to District 3 = 37
matrix which indicates that the
solution is optimal 2 0
40 10
24 8
28 10
21 0*
36 40 + 38 + 41 + 35 + 37 = P 191K
• Note that there are multiple • Or,
3 0* 27
41 8 4
33 2
30 0
37 • Salesman A to District 3 = 41
ways we can assign elements
which will lead to the same 4 23
22 1
38 0
41 0* 36
36 5
• Salesman B to District 1 = 38
answer, another way of • Salesman C to District 5 = 40
assignments is marked with 5 15
29 5
33 0* 35
40 0 1
39 • Salesman D to District 4 = 36
* • Salesman E to District 2 = 36

41 + 38 + 40 + 36 + 36 = P 191K
ASSIGNMENT PROBLEM
SUPPLY IS NOT EQUAL TO DEMAND
Assignment Method
Problem No. 3 (Unbalanced)
To stimulate interest and provide an atmosphere for intellectual discussion, the faculty of mathematical
sciences in an institute decides to hold special seminars on four contemporary topics – Statistics,
Operations Research, Discrete Mathematics, Matrices. Each such seminar is to be held once a week.
However, scheduling these seminars (one for each topic and not more than one seminar per day) must
be done carefully so that the number of students unable to attend is kept to a minimum. A careful study
indicates that the number of students who cannot attend a particular seminar on a specific day is as
follows: Operations Discrete
Statistics Matrices
Research Mathematics
Monday 50 40 60 20
Tuesday 40 30 40 30
Wednesday 60 20 30 20
Thursday 30 30 20 30
Friday 10 20 10 30

Find an optimal schedule for the seminars. Also find the number of students who will be missing at least
one seminar.
Assignment Method
Problem No. 3 (Unbalanced)
As you can see on the table, there are 5 rows and 4 columns. Therefore, the given assignment problem
is Unbalanced.
Since the number of columns is one less than the number of rows, we will introduce one dummy column
to convert the given problem into a balanced problem. The number of students in each cell of the
dummy column will be taken as zero, thus, taking this new form:

Operations
Operations
Discrete Discrete
Statistics
Statistics Matrices Matrices
Dummy
ResearchResearch
Mathematics
Mathematics
Monday
Monday 50 50 40 40 60 60 20 200
Tuesday
Tuesday 40 40 30 30 40 40 30 300
Wednesday
Wednesday 60 60 20 20 30 30 20 200
Thursday
Thursday 30 30 30 30 20 20 30 300
Friday
Friday 10 10 20 20 10 10 30 300
Assignment Method
Problem No. 3 (Unbalanced)
Applying the Hungarian Method (Step 1 to 4)

At step 3, Row Reduction will make no difference on this example since “0” will be the lowest element
given per row. With this, we will proceed on Step 4, Column Reduction.

Operations Discrete
Statistics Matrices Dummy
Research Mathematics
Monday 50
40 40
20 60
50 20
0 0
Tuesday 40
30 30
10 40
30 30
10 0
Wednesday 60
50 20
0 30
20 20
0 0
Thursday 30
20 30
10 20
10 30
10 0
Friday 10
0 20
0 10
0 30
10 0

10 20 10 20 0
Assignment Method
Problem No. 3 (Unbalanced)
After we reduce the rows and column, we will now do row scanning and column scanning
We skip row 1, row 3, and row 5 since they have multiple zeros initially. Also, the zero in row 4 has
already been cross off.
We skip column 3 since the zero has already been cross off.

Operations Discrete
Statistics Matrices Dummy
Research Mathematics
Monday 40 20 50 0 0
Tuesday 30 10 30 10 0
Wednesday 50 0 20 0 0
Thursday 20 10 10 10 0
Friday 0 0 0 10 0
Assignment Method
Problem No. 3 (Unbalanced)
Looking at the resulting matrix, we can see that the assigned zero are one less than the order of matrix,
hence, we do Step 8.
We will revise the resulting matrix by subtracting the minimum element from amongst uncovered
elements, in this case is “10”.

Operations Discrete
Statistics Matrices Dummy
Research Mathematics
Monday 40 20 50 0 0
Tuesday 30 10 30 10 0
Wednesday 50 0 20 0 0
Thursday 20 10 10 10 0
Friday 0 0 0 10 0
Assignment Method
Problem No. 3 (Unbalanced)
We subtract the minimum element “10” from each uncovered element
We add the minimum element “10” for each elements lie in the intersections of the lines
Other covered elements will remain unaltered, thus resulting to this matrix:

Operations Discrete
Statistics Matrices Dummy
Research Mathematics
Monday 40 20 50 0 0
10
Tuesday 30
20 10
0 30
20 10
0 0
Wednesday 50 0 20 0 0
10
Thursday 20
10 10
0 10
0 10
0 0
Friday 0 0 0 10 0
10
Assignment Method
Problem No. 3 (Unbalanced)
Using the resulting matrix, we again do the row and column scanning

Operations Discrete
Statistics Matrices Dummy
Research Mathematics
Monday 40 20 50 0 10
Tuesday 20 0 20 0 0
Wednesday 50 0 20 0 10
Thursday 10 0 0 0 0
Friday 0 0 0 10 10
Assignment Method
Problem No. 3 (Unbalanced)
Now that each rows and columns of the matrix has only one assigned zero and the number of
assignment are also equal to the order of matrix. Thus, the optimum assignment is made.
Applying the resulting matrix to the original table will show the optimum assignment

Operations Discrete
Statistics Matrices Dummy
Research Mathematics
Monday 40
50 20
40 50
60 0
20 10
0
Tuesday 20
40 0
30 20
40 0
30 0
Wednesday 50
60 0
20 20
30 0
20 10
0
Thursday 10
30 0
30 0
20 0
30 0
Friday 0
10 0
20 0
10 10
30 10
0
Assignment Method
Problem No. 3 (Unbalanced)
Operations Discrete
Statistics Matrices Dummy
Research Mathematics
Monday 50 40 60 20 0
Tuesday 40 30 40 30 0
Wednesday 60 20 30 20 0
Thursday 30 30 20 30 0
Friday 10 20 10 30 0

This means that


Day Subject No. of students that missing at least one
seminar
Monday Matrices 20
Wednesday Operations Research 20
Thursday Discrete Mathematics 20
Friday Statistics 10
Total 70 students
Example Problem 4 (UNBALANCED WITH RESTRICTION):
• The JOB SHOP COMPANY has purchased three (3) new machines of different types. There
are four (4) available locations in the shop where a machine could be installed. Some of these
locations are more desirable than the others for particular machines because of their proximity
to work centers that will have a heavy work flow to and from these machines. (There will be no
work flow between the new machines.) Therefore, the objective is to assign the new machines
to the available locations to minimize the total costs of materials handling. The estimated cost
in dollars per hour of materials handling involving each of the machines is given in the table
for respective locations. Location 2 is not considered suitable for machine 2, so no cost is given
for this case.
Location

1 2 3 4

1 13 16 12 11

Machine 2 15 -- 13 20

3 5 7 10 6
• To formulate this problem as an assignment
problem, we must introduce a dummy machine,
machine 4(D), for the extra location.
• Also an extremely large cost could be attached to
Location
the assignment of machine 2 to location 2 to
prevent the assignment in the optimal solution
1 2 3 4

1 13 16 12 11

Machine
2 15 M 13 20

3 5 7 10 6

4(D) 0 0 0 0
• After assigning M and adding the dummy
machine we can now proceed in step number 3,
row reduction.

1 2 3 4
• Row 4(D) are all zeros
(0) so there is no need to 1 13
2 16
5 12
1 11
0 -11
do column reductions as
it will just result with the 2 15
2 M 13
0 20
7 -13
same table Note that M is an incredibly
large number that even you
3 50 72 10
5 61 -5 subtract any number it will
4(D) 0 0 0 0
still result in an incredibly
-0
large number, so we can
leave it as it is.
• Next is step 5, searching for the optimal
assignments
• Upon observation, all assignments have • Going back to the original
been made indicating that the solution is table values, we will get
optimal the following solution
1 2 3 4

1 13
2 16
5 12
1 11
0 Machine 1 to Location 4 = 11
Machine 2 to Location 3 = 13
2 15
2 M 13
0 20
7 Machine 3 to Location 1 =5
Machine 4(D) to Location 2 =0
3 50 72 10
5 61 Total Cost = 11+13+5+0

4(D) 0 0 0 0
= 29 dollars / hour
Example Problem 5 (UNBALANCED WITH RESTRICTION AND SPLITTING)
The BETTER PRODUCTS COMPANY has decided to initiate the production of four new
products, using three plants that currently have excess production capacity. The products
require a comparable production effort per unit, so the available production capacity of the
plants is measured by the number of units of any product that can be produced per day, as
given in the table. The bottom row gives the required production rate per day to meet
projected sales. Each plant can produce any of these products, except that plant 2 cannot
produce product 3. However, the variable costs per unit of each product differ from plant to
plant, as shown in the main body of the table. Management now needs to make a decision on
how to split up the production of the products among plants.
UNIT COST ($) FOR PRODUCT CAPACITY
1 2 3 4 AVAILABLE

PLANT 1 41 27 28 24 75
2 40 29 - 23 75
3 37 30 27 21 45
PRODUCTION RATE 20 30 30 40
THERE ARE 2 OPTIONS:

OPTION 1: PERMIT PRODUCT SPLITTING


- SPECIES THAT A SAME PRODUCT WILL BE PRODUCED BY
MORE THAN ONE PLANT.

OPTION 2: PROHIBIT PRODUCT SPLITTING


- SPECIFIES THAT ONE OF THE PLANTS SHOULD
PRODUCED AT LEAST TWO OF THE PRODUCTS.

OPTION 1 LEADS TO A TRANSPORTATION


PROBLEM.
OPTION 2 LEADS TO AN ASSIGNMENT PROBLEM.
UNIT COST ($) FOR PRODUCT CAPACITY
1 2 3 4 AVAILABLE

PLANT 1 41 27 28 24 75
2 40 29 - 23 75
3 37 30 27 21 45
PRODUCTION RATE 20 30 30 40
Step 1: Convert the cost table to a parameter table. Because plant 2
cannot produce product 3, such an allocation is prevented by
assigning to it a huge unit cost of M. Second, the total capacity
exceeds the total required production so a dummy destination with
a demand of 75 is needed to balance these two quantities.
SUPPLY: 75 + 75 + 45 = 195
DEMAND: 20 + 30 + 30 + 40 = 120
SUPPLY > DEMAND
COST TABLE
UNIT COST ($) FOR PRODUCT CAPACITY
1 2 3 4 AVAILABLE

x 20 x 30 x 30 x 40
PLANT 1 41 27 28 24 75
x 20 x 30 x 40
2 40 29 - 23 75
x 20 x 30 x 30 x 40
3 37 30 27 21 45
PRODUCTION RATE 20 30 30 40
PARAMETER TABLE (production rate x unit cost)
TASK (PRODUCT) CAPACITY
1 2 3 4 5 (D) AVAILABLE

ASSIGNEE 1 820 810 840 960 0 75


(PLANT) 2 800 870 M 920 0 75
3 740 900 810 840 0 45
PRODUCTION RATE 20 30 30 40 75
Step 2
4 PRODUCTS > 3 PLANTS
∴ one of the plants will need to be assigned two products
TASK (PRODUCT) CAPACITY
1 2 3 4 5 (D) AVAILABL
E

ASSIGNEE 1 820 810 840 960 0 75


(PLANT) 2 800 870 M 920 0 75
3 740 900 810 840 0 45
PRODUCTION RATE 20 30 30 40 75
Plant 3 has only enough excess capacity to produce one product,
so either plant 1 or plant 2 will take the extra product.
To make this assignment of an extra product possible within an assignment
problem formulation, plants 1 and 2 each are split into two assignees.
TASK (PRODUCT)
1 2 3 4 5 (D)
ASSIGNEE 1a 820 810 840 960 0
(PLANT)
1b 820 810 840 960 0
2a 800 870 M 920 0
2b 800 870 M 920 0
3 740 900 810 840 M

The number of assignees (now five) must equal the number of tasks (now four), so a dummy task (product) is
introduced into table as 5(D).

The reason for M in the last row is that plant 3 must be assigned a real
product (a choice of product 1, 2, 3, or 4), so the big M method is
needed to prevent the assignment of the fictional product to plant 3
instead.
1 2 3 4 5 (D)
1a 820 810 840 960 0
Step 3: Locate the smallest cost in
1b 820 810 840 960 0 each row
2a 800 870 M 920 0 and subtract it from each cost figure
2b 800 870 M 920 0 in that row.
3 740 900 810 840 M
Y 1 2 3 4 5 (D)
1a 820 810 840 960 0
This would result in at least one 1b 820 810 840 960 0
zero in each row. The new table is
2a 800 870 M 920 0
called reduced cost table.
2b 800 870 M 920 0
3 0 160 70 100 M
1 2 3 4 5 (D)
1a 820 810 840 960 0 Step 4: Locate the lowest cost in
1b 820 810 840 960 0 each column of the reduced cost
2a 800 870 M 920 0
table
subtract this figure from each cost
2b 800 870 M 920 0
figure in that column.
3 0 160 70 100 M

1 2 3 4 5 (D)
1a 820 650 770 860 0
This would result in at least one 1b 820 650 770 860 0
zero in each row and each column, 800 710 M 820 0
2a
in the second reduced cost table.
2b 800 710 M 820 0
3 0 0 0 0 M
Step 5: To make an optimal assignment, we should be in a position to
locate 5 zeros’ in the table. Such that 5 plants are assigned to 5
products and the total opportunity cost is zero.
Assign task by inspecting every row with a single zero, after finding a
single zero, enrectangle it and cross off all other elements in that
column (repeat this procedure but now with every column).

Step 6: If the number of assignments is equal to the number of


rows (or columns), it is possible to find optimal assignment.
If the number of assignments is less than the number of rows
(columns) N < n optimum assignment cannot be made (proceed
to step 7).
1 2 3 4 5 (D) To make an optimal assignment, select a row
1a 820 650 770 860 0
or column in which there is only one zero
element and box it. Assign the job
1b 820 650 770 860 0 corresponding to the zero element.
2a 800 710 M 820 0 Cross out the cells of all other elements lying
in the column (row) of the box zero so that
2b 800 710 M 820 0 other elements with zeroes cannot be
3 0 0 0 0 M considered for next assignment.

Again, select a row with one zero element


from the remaining rows or columns.
Make the next assignment continue in this
manner for all the rows.

∴ NOT OPTIMAL
1 2 3 4 5 (D) Step 7: Modify the second reduced cost
1a 820 650 770 860 0 table. Select the smallest number in the
table which is not covered by the lines.
1b 820 650 770 860 0
Subtract this number from all uncovered
2a 800 710 M 820 0 numbers as well as from itself.
2b 800 710 M 820 0
3 0 0 0 0 M

1 2 3 4 5 (D)
1a 170 0 120 210 0
Add this number to the element which is
at the intersection of any vertical and 1b 170 0 120 210 0
horizontal lines. 2a 150 60 M 170 0
2b 150 60 M 170 0
3 0 0 0 0 M
1 2 3 4 5 (D)
1a 170 0 120 210 0
Step 8: Repeat Step 5, Step 6 and Step 7
1b 170 0 120 210 0
until all the assignments are made and no
2a 150 60 M 170 0 unmarked zero is left.
2b 150 60 M 170 0
3 0 0 0 0 M

∴ NOT OPTIMAL 1 2 3 4 5 (D)


1a 50 0 0 90 0
1b 50 0 0 90 0
2a 30 60 M 50 0
2b 30 60 M 50 0
3 0 120 0 0 M
1 2 3 4 5 (D)
1a 50 0 0 90 0 Note: If a row/column has two or more
1b 50 0 0 90 0 zeroes, assign arbitrary any one of these
2a 30 60 M 50 0
zeroes and cross off all other elements of
that row/column.
2b 30 60 M 50 0
3 0 120 0 0 M

∴ NOT OPTIMAL 1 2 3 4 5 (D)


1a 20 0 0 60 0
1b 20 0 0 60 0
2a 0 60 M 20 0
2b 0 60 M 20 0
3 0 150 30 0 M
1 2 3 4 5 (D)
1a 20 0 0 60 0 Note: If a row/column has two or more
zeroes, assign arbitrary any one of these
1b 20 0 0 60 0
zeroes and cross off all other zeroes of
2a 0 60 M 20 0 that row/column.
2b 0 60 M 20 0
3 0 150 30 0 M
PLANT PRODUCT

Now, we will have one box zero in 1


3
each row and’ each column of the 2
cost matrix. 0
2
The assignment made in this 1
manner is optimal. 3 4
TASK (PRODUCT)
1 2 3 4 5 (D)
ASSIGNEE 1a 820 810 840 960 0
(PLANT)
1b 820 810 840 960 0
2a 800 870 M 920 0
2b 800 870 M 920 0
3 740 900 810 840 M

Plant 1 assign to Task 2 and 3.


Plant 2 assign to Task 1.
Plant 3 assign to Task 3.

TOTAL COST : 840 + 810 + 0 + 800 + 840 = $3290


SUMMARY AND CONCLUSIONS
• The assignment problem is a combinatorial optimization problem that is flexible as it can be
used as an approach to model any real-world problem.
• It is very important to choose the right approaches in solving the problem so as to obtain an
optimal or near optimal solution depending on the complexity of the problem.
• In an assignment problem, the number of operations is assigned to an equal number of
operators where each operator performs only one operation.
• In an assignment problem, the given matrix must necessarily be a square matrix in order to
solved it using Hungarian Method.
• The assignment problem wherein the number of rows is not equal to the number of columns is
said to be an unbalanced problem. Such problem is handled by introducing dummy row(s) or
column(s).
SUMMARY AND CONCLUSIONS
• There may be assignment problems where maximization is required to be done instead of minimization.
To handle such a problem, we find the opportunity loss matrix by subtracting the value of each cell from
the largest value chosen from amongst all the given cells, then solved it the same way as the minimization
problem.
• While assigning zeroes in an assignment problem, if we neither find any row nor any column which has
single zero, then we first move row-wise and then column-wise to locate a row/column having two (if not
two, then three or more) zeroes. Then a rectangle is formed arbitrarily around one of these zeroes and the
others are crossed. Alternatively, the zero around which the rectangle has been made could have been
crossed and the rectangle could have been formed around any of the other zeroes. This leads to
alternative optimum solutions or multiple unique solutions.
• Sometimes, there may be restriction on assigning a particular activity to a particular resource. Then a
very large cost (or time or anything else which is to be minimized) is considered and represented by ∞ or
M for such a restricted pair.
THANKYOU!!!
ASSIGNMENT PROBLEM
EXTRA EXAMPLES
UNIT COST ($) FOR WAREHOUSE CAPACITY
A B C D AVAILABLE

PLANT 1 41 27 28 24 75
2 40 29 - 23 75
3 37 30 27 21 45
PRODUCTION RATE 45 75 45 75

SUPPLY: 75 + 75 + 45 = 195
DEMAND: 45 + 75 + 45 + 75 = 120

DEMAND > SUPPLY


COST TABLE
UNIT COST ($) FOR WAREHOUSE CAPACITY
A B C D AVAILABLE

x 45 x 75 x 45 x 75
PLANT 1 41 27 28 24 75
x 45 x 75 x 75
2 40 29 - 23 75
x 45 x 75 x 45 x 75
3 37 30 27 21 45
PRODUCTION RATE 45 75 45 75
PARAMETER TABLE (production rate x unit cost)
TASK (WAREHOUSE) CAPACITY
A B C D AVAILABLE

ASSIGNEE 1 1845 2025 1260 1800 75


(PLANT) 2 1800 2175 M 1725 75
3 1665 M 1215 M 45
0 M 0 M 45
PRODUCTION RATE 45 75 45 75
A B C D

1 1845 2025 1260 1800

2 1800 2175 M 1725

3 1665 M 1215 M

4 0 M 0 M

A B C D

1 585 765 0 540

2 75 450 M 0

3 450 M 0 M

4 0 M 0 M
A B C D

1 585 765 0 540

2 75 450 M 0

3 450 M 0 M

4 0 M 0 M

A B C D

1 585 315 0 540

2 75 0 M 0

3 450 M 0 M

4 0 M 0 M
A B C D

1 585 315 0 540

2 75 0 M 0

3 450 M 0 M

4 0 M 0 M

∴ NOT OPTIMAL A B C D

1 585 0 0 225

2 390 0 M 0

3 450 M 0 M

4 0 M 0 M
A B C D
PLANT WAREHOUSE
1 585 0 0 225
1 B
2 390 0 M 0 2 D
3 450 M 0 M 3 C

4 0 M 0 M

The assignment made in this


manner is optimal.
PLANT 1 to WAREHOUSE B = $2025
PLANT 2 to WAREHOUSE D = $1725
PLANT 3 to WAREHOUSE C = $1215
TOTAL = $4965
Assignment Problem when Supply is not Equal to Demand

The Del Monte Corporation has three manufacturing plants at four locations: Cagayan de
Oro, Laguna, Bukidnon and Cebu. The company distributed pineapple canned goods
boxes through regional warehouses located in Manila, Bulacan, Batangas and
Pampanga. An estimate of the weekly production capacity at each manufacturing plant
and an estimate number of canned goods boxes that are needed each week at each of
the four warehouses are shown in the following table. Assign each manufacturing plant in
each regional warehouse in order to maximize profit and minimize the shipping cost.

UNIT COST (in Pesos) FOR EACH PRODUCT


  Supply
Manila Bulacan Batangas Pampanga
Cagayan de Oro 50 40 30 40 450
Laguna 80 70 30 50 500
Bukidnon 90 60 50 70 400
Cebu 80 60 60 90 300
Demand 500 300 450 300  
Step 1: Convert the cost table to a parameter table.
Multiply each demand in its corresponding column elements.

TOTAL COST (P) FOR EACH PRODUCT


  Supply
Manila Bulacan Batangas Pampanga
Cagayan de Oro M 12000 13500 12000 450
Laguna 40000 21000 13500 15000 500
Bukidnon M 18000 M 21000 400
Cebu M 18000 M 27000 300
Demand 500 300 450 300  

Since the number of rows is equal to the number of columns


it is a SQUARE MATRIX, proceed to step 3.
Step 3: Locate the smallest cost in each row and subtract it from each cost
figure in that row.
Reduced Cost table

  A B C D   A B C D

1 M 12000 13500 12000 1 M 0 1500 0

2 40000 21000 13500 15000 2 26500 7500 0 1500

3 M 18000 M 21000 3 M 0 M 3000

4 M 18000 M 27000 4 M 0 M 9000


Step 4: Identify the minimum element in each column and subtract it from
every element of that column.
Second Reduced Cost table

  A B C D   A B C D

1 M 0 1500 0 1 M 0 1500 0

2 26500 7500 0 1500 2 0 7500 0 1500

3 M 0 M 3000 3 M 0 M 3000

4 M 0 M 9000 4 M 0 M 9000
Step 5,6 and 7: Assigned task and cover all zeros with minimum
number of lines

To make an optimal • If the number of


  A B C D assignments is equal
assignment, select a row
or column in which there is to the number of
only one zero element and 1 M 0 1500 0 rows (or columns) (n)
box it. Assign the job i.e N = n it is possible
corresponding to the zero to find optimal
element. Cross out the 2 0 7500 0 1500 assignment.
cells of all other elements • If the number of
lying in the column (row) of assignments is less
the box zero so that these 3 M 0 M 3000 than the number of
other cells with zero rows (columns) N < n
elements cannot be optimum assignment
4 M 0 M 9000
assigned on the next cannot be made
assignment. (proceed to Step 8).
Step 8: Modify the second reduced cost table. Select the smallest number
in the table which is not covered by the lines. Subtract this number from all
uncovered numbers as well as from itself. Add this number to the element
which is at the intersection of any vertical and horizontal lines.

  A B C D   A B C D

1 M 0 1500 0 1 M 3000 1500 0

2 0 7500 0 1500 2 0 10500 0 1500

3 M 0 M 3000 3 M 0 M 0

4 M 0 M 9000 4 M 0 M 6000
Repeat Step 5 to Step 7 until all the assignments are made and no
unmarked zero is left.

  A B C D   A B C D

1 M 3000 1500 0 1 M 3000 0 0

2 0 10500 0 1500 2 0 12000 0 3000

3 M 0 M 0 3 M 0 M 0

4 M 0 M 6000 4 M 0 M 6000
Now, we will have one box zero in each row and each column of the
cost matrix. The assignment made in this manner is optimal.

TOTAL COST (P) FOR EACH PRODUCT


  Supply
Pampang
Manila Bulacan Batangas PLANT WAREHOUSE COST
a

Cagayan de Oro M 12000 13500 12000 450 CDO BATANGAS 13500


Laguna 40000 21000 13500 15000 500 LAGUNA MANILA 40000
BUKIDNON PAMPANGA 21000
Bukidnon M 18000 M 21000 400
CEBU BULACAN 18000
Cebu M 18000 M 27000 300
TOTAL (in PESOS) 92500
Demand 500 300 450 300  

You might also like