Professional Documents
Culture Documents
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
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.
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
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
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
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
90 90 80 90 80 10 10 0 10
Assignment Method Problem No. 1 (Balanced)
After Row Reduction we can proceed to Step 4.
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)
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)
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)
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)
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
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
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
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
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:
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
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).
∴ 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
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
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
3 1665 M 1215 M
4 0 M 0 M
A B C D
2 75 450 M 0
3 450 M 0 M
4 0 M 0 M
A B C D
2 75 450 M 0
3 450 M 0 M
4 0 M 0 M
A B C D
2 75 0 M 0
3 450 M 0 M
4 0 M 0 M
A B C D
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 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.
A B C D A B C D
A B C D A B C D
1 M 0 1500 0 1 M 0 1500 0
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
A B C D A B C D
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
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.