Assignment Model: I. Objectives
Assignment Model: I. Objectives
Assignment Model
I. OBJECTIVES
Define and differentiate the Assignment Model and it two types through
downloading and studying the file uploaded by the teacher in EDMODO;
An Assignment Model is a problem that requires two sets of given items given a
set of paired costs/profits in such way that the total cost/profit of the pairings is
minimized or maximized. Hungarian Method or Floods Technique is an algorithm used
to determine an optimal solution to an assignment problem. The method is named after
a Hungarian mathematician, D. König. He proved a theorem required of the
development of Hungarian method development. The Hungarian method yields optimal
solutions to the assignment model. The method is based on a mathematically proven
algorithm for determining the optimal solution.
There are simple steps to follow for the execution of the Hungarian Method aa shown below:
a. Subtract the lowest entry in each row/column of the given cost table from all
entries in that row/column for minimization problem. For maximization problem
subtract each entry in the row/column from the highest entry in each row/column.
b. Subtract the lowest entry in each column/row of the table obtained in part from all
numbers in that column/row.
a. Select the smallest value of the uncovered line row/column and subtract this
number from all numbers not covered by a straight line.
b. Add this same number to the number to the numbers lying at the intersection of
any two lines.
c. Copy the entries covered by a single line, then return to step 2.
Example: A plant has 4 operators to be assigned to four machines. The time (in
minutes) required by each operator to produce a product on each machine is shown
below.
Machine
Operator A B C D
1 11 12 10 9
2 8 10 5 7
3 11 14 12 13
4 9 15 8 11
Determine the optimal operator-machine assignment and compute for the total
minimum time.
Solution:
Tableau 1
Row
Machine
Operator Reducer
A B C D
9
5 1 11 12 10
9
Lowest value in each row
1 2 8 10 5
7
1 3 11 14 12
13
8 4 9 15 8
11 We can now subtract each of the lowest values of
each row to every entry of each row as shown below.
Tableau 2 Tableau 2
Machine
Operator A B C D
1 2 3 1 0
2 3 5 0 2
3 0 3 1 2
4 1 7 0 3
Step 2: Select the minimum entry in each column and subtract it from every entry in that
column.
We have identified lowest entries in each column: for the first column is 0, second
column is 3, and third column is 0, and fourth column is 0. We can now subtract each of
the lowest values of each column to every entry of each column as shown below.
Tableau 3
Operator Machine
A B C D
1 2 0 1 0
2 3 2 0 2
3 0 0 1 2
4 1 4 0 3
Colum 0 3 0 0
reducer
Lowest value in each column
Tableau 3
Operator Machine
A B C D The three lines indicate that there are only three
1 2 0 1 0
unique assignments, whereas four are required for
2 3 2 0 2
3 0 0 1 2 an optimal solution.
4 1 4 0 3
Step 4: Identify the minimum value, which is 1.
Operator Machine
A B C D
1 2 0 1 0
2 3 2 0 2
3 0 0 1 2
4 1 4 0 3
Step 5: Subtract 1 from all values in Tableau 3 that is not crossed out. Then add 1 to
cells with intersecting lines intersect, and copy the rest of the values in the previous
tableau covered by a single line.
Tableau 4
Operator Machine
A B C D
1 2 0 2 0
2 2 1 0 1
3 0 0 2 2
4 0 3 0 2
Apply the line test again to determine if an optimal solution already exist.
The Second Iteration: The Opportunity Cost Tableau with the Line Test
Tableau 4
Operator Machine No matter how the lines are drawn, it will cover all
A B C D zeros using the least number of lines. Four lines are
required to cross out all the zeros. This indicates that
1 2 0 2 0
the four unique assignments can be made and that
2 2 1 0 1
an optimal solution has been reached.
3 0 0 2 2
4 0 3 0 2
Step 7: Identify the rows with zero entries in their respective columns.
Order of Assignment
Operator Machine
1 B, D
2 C
3 A, B
4 A, C
Operator Machine
1 D
2 C
3 B
4 A
Notice that row 2 has only 1 zero entry and the rest have two zero entries. In general,
we will select the least zero entry for the first allocation. Then, allocate the rest of the
rows to complete the assignment. The first assignment will be is to assign Operator 2 to
Machine C; second is to assign Operator 4 to Machine A; third is to assign Operator 3 to
Machine B; and lastly to assign Operator 1 to Machine D.
The assignment distribution shown result to the most efficient distribution of job
assignments of operators to machines.
Example: MSS Car Rental Agency plans to purchase five new automobiles to replace
five older vehicles. The older vehicles are to be sold in auction. The agency has
solicited from five individuals, each of whom wishes to buy only one vehicle but has
agreed to make a sealed bid on each of the five. The bids are as follows in terms of (10
000):
Buyer Automobile
Toyota Mitsubish Ford Nissan Mazda
i
1 12 20 10 8 7
2 10 13 11 9 14
3 5 6 10 7 5
5 9 7 10 9 11
5 10 14 12 10 6
The agency wishes to determine which bid to accept from each of the five bidders so
that each of them can buy one vehicle while the total of the five accepted bids is a
maximum.
Solution:
Before we start the solution set, we will replace the names of the automobiles by A, B,
C, D, and E for Toyota, Mitsubishi, Ford, Nissan, and Mazda, respectively for
computational convenience on the application of the Hungarian method.
Buyer Automobile
A B C D E
1 12 20 10 8 7
2 10 13 11 9 14
3 5 6 10 7 5
5 9 7 10 9 11
5 10 14 12 10 6
Step 1: Identify the highest value in each row. Then, subtract each row value from the
highest values. This will ensure a zero entry in each row of the tableau.
Tableau 1
Buyer Automobile
A B C D E
1 12 20 10 8 7
2 10 13 11 9 14
3 5 6 10 7 5
5 9 7 10 9 11
5 10 14 12 10 6
Tableau 2
Step 2: Select the minimum entry in each column and subtract it from every entry in that
column.
Tableau 3
Buyer Automobile
A B C D E
1 8 0 10 12 13
2 4 1 3 5 0
3 5 4 0 3 5
5 2 4 1 2 0
5 4 0 2 4 8
Tableau 3
Buyer Automobile
Buyer Automobile A B C D E
1 6 0 10 10 13
2 2 1 3 3 0
3 3 4 0 1 5
5 0 4 1 0 0
5 2 0 2 2 8
A B C D E
1 8-2 0-0 10-0 12-2 13-0
2 4-2 1-0 3-0 5-2 0-0
3 5-2 4-0 0-0 3-2 5-0
5 2-2 4-0 1-0 2-2 0-0
5 4-2 0-0 2-0 4-2 8-0
Tableau 3
Buyer Automobile
A B C D E
1 6 0 10 10 13
2 2 1 3 3 0
3 3 4 0 1 5
5 0 4 1 0 0
5 2 0 2 2 8
The four lines indicate that there are only four unique assignments, whereas five are
required for an optimal solution.
Tableau 3
Buyer Automobile
A B C D E
1 6 0 10 10 13
2 2 1 3 3 0
3 3 4 0 1 5
5 0 4 1 0 0
5 2 0 2 2 8
Step 5: Subtract 1 from all values in Tableau 3 that is not crosses out. Then add 1 to
cells with intersecting lines, copy the rest of the values in Tableau 3 covered by a single
line.
Tableau 4
Buyer Automobile
A B C D E
1 6-1 0 10 10-1 13
2 2-1 1 3 3-1 0
3 3-1 4 0 1-1 5
5 0 4+1 1+1 0 0+1
5 2-1 0 2 2-1 8
The Second Iteration: The Opportunity Profit Tableau with the Line Test
Buyer Automobile
A B C D E
1 5 0 10 9 13
2 1 1 3 2 0
3 2 4 0 0 5
5 0 5 2 0 1
5 1 0 2 1 8
There are only four lines which indicate only four unique assignments in Tableau 4,
whereas we need five lines for an optimal solution. Thus, we will return to step 4.
Tableau 4
Buyer Automobile
A B C D E
1 5 0 10 9 13
2 1 1 3 2 0
3 2 4 0 0 5
5 0 5 2 0 1
5 1 0 2 1 8
Step 5: Subtract 1 from all values in Tableau 3 that is not crosses out. Then add 1 to
cells with intersecting lines, copy the rest of the values in Tableau 3 covered by a single
line.
Buyer Automobile
A B C D E
1 4 0 9 8 13
2 0 1 2 1 0
3 2 5 0 0 6
5 0 6 2 0 2
5 0 0 1 0 8
The Third Iteration: The Opportunity Profit Tableau with the Line Test
Buyer Automobile
A B C D E
1 4 0 9 8 13
2 0 1 2 1 0
3 2 5 0 0 6
5 0 6 2 0 2
5 0 0 1 0 8
We already made use of five lines to cover the zero entries in Tableau 5, thus this
indicates that the optimal solution has been reached.
Step 7: Identify the rows with zero entry, therefore we will select Row 1 for the first
allocation. Then allocate the rest of the rows to complete the assignment.
Buyer Automobile
1 B
2 E
3 C
4 A
5 D
Order
of Assignment
The assignment distribution shown below resulted to the most efficient assignments of
buyers to automobiles.
Example: A dispatcher for the Metro Manila Taxi Company presently has five taxi cabs
at different locations and six customers who have called for service. The distance (in
kilometers) from each taxi's present location to each customer is shown below.
Customer
Cab A B C D E F
1 7 5 8 2 3 6
2 2 1 7 5 3 2
3 4 5 6 2 5 4
4 10 6 5 4 8 3
5 7 6 5 5 4 4
Determine the optimal assignment(s) that will minimize the total distance traveled.
Solution:
Step 1: Introduce a dummy row to balance the number of rows and columns, since
there are six columns and 5 rows to make it even to six-to-six.
Tableau 1
Cab Customer
A B C D E F
1 7 5 8 2 3 6
2 2 1 7 5 3 2
3 4 5 6 2 5 4
4 10 6 5 4 8 3
5 7 6 5 5 4 4
Dummy 0 0 0 0 0 0
Step 2: Select the minimum entry in each row and subtract it from every entry in that
row.
Tableau 1
Cab Customer
A B C D E F
1 7 5 8 2 3 6
2 2 1 7 5 3 2
3 4 5 6 2 5 4
4 10 6 5 4 8 3
5 7 6 5 5 4 4
Dummy 0 0 0 0 0 0
Step 3: Select the minimum entry in each column & subtract it from every entry in that
column.
Tableau 2
Cab Customer
A B C D E F
1 5 3 6 0 1 4
2 1 0 6 4 2 1
3 2 3 4 0 3 2
4 7 3 2 1 5 0
5 3 2 1 1 0 0
Dummy 0 0 0 0 0 0
Column Reducer 0 0 0 0 0 0
Tableau 3
Cab Customer
A B C D E F
Tableau 3
Cab Customer
A B C D E F
1 5 3 6 0 1 4
2 1 0 6 4 2 1
3 2 3 4 0 3 2
4 7 3 2 1 5 0
5 3 2 1 1 0 0
Dummy 0 0 0 0 0 0
Notice that there are only five lines, whereas six are required for an optimal solution.
Tableau 3
Cab Customer
A B C D E F
1 5 3 6 0 1 4
2 1 0 6 4 2 1
3 2 3 4 0 3 2
4 7 3 2 1 5 0
5 3 2 1 1 0 0
Dummy 0 0 0 0 0 0
Step 6: Subtract 1 from all the values in Tableau 3 that is not crossed out. Then add 1
to cells with intersecting lines, and copy the rest of the values in Tableau 3 covered by a
single line.
Tableau 4
Cab Customer
A B C D E F
1 4 3 5 0 1 4
2 0 0 5 4 2 1
3 1 3 3 0 3 2
4 6 3 1 1 5 0
5 2 2 0 1 0 0
Dummy 0 1 0 1 1 1
Step 7: Apply the line test again to determine if an optimal solution already exists.
The Second Iteration: The Opportunity Profit Tableau with the Line Test
Tableau 4
Cab Customer
A B C D E F
1 4 3 5 0 1 4
2 0 0 5 4 2 1
3 1 3 3 0 3 2
4 6 3 1 1 5 0
5 2 2 0 1 0 0
Dummy 0 1 0 1 1 1
There are only five lines which indicate five unique assignments in Tableau 4, whereas
we need six for an optimal solution. Thus, we will return to step 5.
Step 6: Subtract 1 from all the values in Tableau 3 that is not crossed out. Then add 1
to cells with intersecting lines, and copy the rest of the values in Tableau 3 covered by a
single line.
Tableau 5
Cab Customer
A B C D E F
1 3 2 4 0 0 4
2 0 0 5 5 2 2
3 0 2 2 0 2 2
4 5 2 0 1 4 0
5 2 2 0 2 0 1
Dummy 0 1 0 2 1 2
Step 7: Apply the line test again to determine if an optimal solution already exists.
The Third Iteration: The Opportunity Profit Tableau with the Line Test
Tableau 5
Cab Customer
A B C D E F
1 3 2 4 0 0 4
2 0 0 5 5 2 2
3 0 2 2 0 2 2
4 5 2 0 1 4 0
5 2 2 0 2 0 1
Dummy 0 1 0 2 1 2
No matter how the lines are drawn in Tableau 5, we will need at least six lines to cross
out all zeros. This indicate that the six unique assignments can be made and that an
optimal solution has been reached.
Step 8: Identify the rows with zero entries in their respective columns.
Example: A high school department head has five teachers to be assigned to four
different year levels. All of the teachers have taught the different year levels in the past
and have been evaluated by the students. The rating for each teacher for each year
level is given in the following table.
Teacher Customer
First Second Third Fourth
1 80 75 90 85
2 95 90 90 97
3 85 95 88 91
4 93 91 80 84
5 91 92 93 88
The department head wants to know the optimal assignment of teachers to year levels
that will maximize the overall average student evaluation rating. The teacher who is not
assigned to teach will be assigned as secretary. Solve this problem using the
assignment model.
Solution:
In order to solve an assignment model it is necessary to follow the following steps. But
before we start the Hungarian Method we will represent the year levels by A, B, C, and
D for First, Second, Third, and Fourth, respectively.
Step 1: Introduce a dummy column to balance the number of rows and columns to 5×5
matrix.
Tableau 1
Teacher Customer
A B C D Dummy
1 80 75 90 85 0
2 95 90 90 97 0
3 85 95 88 91 0
4 93 91 80 84 0
5 91 92 93 88 0
Step 2: Identify the highest value in each row. Then, subtract each row value from the
highest values. Thus will ensure a zero entry in each row of the tableau.
Tableau 1
Teacher Customer
Row
A B C D Dummy
Reducer
1 80 75 90 85 0
90
2 95 90 90 97 0
97
3 85 95 88 91 0
95 Highest value in each row
4 93 91 80 84 0
5 91 92 93 88 0 93
93
The Assignment Tableau with Row Reductions
Tableau 2
Tableau 2
Teacher Customer
A B C D Dummy
1 10 15 0 5 90
2 2 7 7 0 97
3 10 0 7 4 95
4 0 2 13 9 93
5 2 1 0 5 93
Column Reducer 0 0 0 0 90
Tableau 3
Teacher Customer
A B C D Dummy
1 10-0 15-0 0-0 5-0 90-90
2 2-0 7-0 7-0 0-0 97-90
3 10-0 0-0 7-0 4-0 95-90
4 0-0 2-0 13-0 9-0 93-90
Teacher Customer
A B C D Dummy
1 10 15 0 5 0
2 2 7 7 0 7
3 10 0 7 4 5
5 2-0 1-0 0-0 5-0 93-90 4 0 2 13 9 3
Step 4: Apply the line test for optimality 5 2 1 0 5 3
Tableau 3
Teacher Customer
A B C D Dummy
1 10 15 0 5 0
2 2 7 7 0 7
3 10 0 7 4 5
4 0 2 13 9 3
5 2 1 0 5 3
No matter how the lines are drawn in Tableau 3, at least five lines are required to cross
out all the zeros. This indicates that the five unique assignments can be made and that
an optimal solution has been reached.
Step 5: Identify the rows with zero entries in their respective columns. Then, allocate
the rest of the rows to complete the assignment
Order of Assignment
Teacher Year Level Teacher Year Level
1 C, Dummy 1 Dummy
2 D 2 D
3 B 3 B
4 A 4 A
5 C 5 C
Step 6: Make the assignments from the last tableau.
Example: The Kappa pharmaceutical firm has four salespersons, the firm wants to assign to
four regions. Given their various previous contracts, the salespersons are able to cover the
regions in different amounts of time. The amount of time (in days) acquired by each salesperson
to cover each city is shown below, except for Salesperson 1 who refuse to be assigned in
Region B with no time table. Which salesperson should be assigned to each region in order to
minimize total time? Identify the total assignment and compute for total minimum time.
Region
Salesperson
A B C D
1 70 M 64 80
2 54 58 55 52
3 68 64 58 56
4 70 67 62 60
Solution:
Step 1: Select the minimum entry in each row and subtract it from every entry in that
row.
Note that M is not used in any reduction, nor is any value added to it or subtracted from
it during the course of the analysis.
Tableau 1
Region Row
Salesperson Reducer
A B C D
1 70 M 64 80 64
2 54 58 55 52 52
Highest value in each row
3 68 64 58 56
56
4 70 67 62 60
60
The Assignment Tableau with Row Reductions
Tableau 2
Region
Salesperson
A B C D
1 6 M 0 16
2 2 6 3 0
3 12 8 2 0
4 10 7 2 0
Step 2: Select the minimum entry in each column & subtract it from every entry in that
column.
Tableau 2
Region
Salesperson
A B C D
1 6 M 0 16
2 2 6 3 0
3 12 8 2 0
4 10 7 2 0
Column Reducer 2 6 0 0
Lowest value in each
The Assignment Tableau with Column Reductions
Tableau 3
Region
Salesperson
A B C D
1 4 M 0 16
2 0 0 3 0
3 10 2 2 0
4 8 1 2 0
Step 3: Apply the first line test for optimality.
Tableau 3
Region
Salesperson
A B C D
1 4 M 0 16
2 0 0 3 0
3 10 2 2 0
4 8 1 2 0
Notice that there are only three lines in Tableau 3, whereas four are required for an
optimal solution.
Region
Salesperson
A B C D
1 4 M 0 16
2 0 0 3 0
3 10 2 2 0
4 8 1 2 0
Step 5: Subtract 1 from all values in Tableau 3 that is not crossed out. Then add 1 to
cells with intersecting lines, and copy the rest of the values in Tableau 3 covered by a
single line.
Tableau 4
Region
Salesperson
A B C D
1 3 M 0 16
2 0 0 4 1
3 9 1 2 0
4 7 0 2 0
Step 6: Apply the line test again to determine if an optimal solution already exists.
The Second Iteration: The Opportunity Profit Tableau with the Line Test
Tableau 4
Region
Salesperson
A B C D
1 3 M 0 16
2 0 0 4 1
3 9 1 2 0
4 7 0 2 0
No matter how the lines are drawn in Tableau 4, we need at least five lines to cross out
all the zeros. This indicates that the four unique assignments, thus, an optimal solution
has been reached.
Step 7: Identify the rows with zero entries in their respective columns
Order of Assignment
Salesperson Region Salesperson Region
1 C, 1 C
2 A, B 2 A
3 D 3 D
4 B, D 4 B
Observe that Row 1 and 3 have one zero entries, thus we will start the assignment with
these rows. Then, allocate the remaining assignments using elimination method.