Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 70

Operations Research I

ST1202

Module 04:
Assignment Problems
1
ASSIGNMENT PROBLEMS cont…
Contents:
1. Learning Outcomes
2. Introduction
3. Formulating Assignment Models
4. Solving Assignment Problems
• Hungarian Method
5. Special Cases of Assignment Problems
• Unbalanced Assignment Problems
• Unacceptable Assignments
• Maximization Assignment Problems
6. Concluding Remarks
7. Review Questions 2
ASSIGNMENT PROBLEMS cont…
INTRODUCTION
The assignment model is a special case of a linear
programming model that is similar to the transportation
model.

 It is applied to situations where there are n supply sources


or facilities to be allocated and n demand uses or tasks in
which the objective is to minimize or maximize some
measures of effectiveness.

• Each thing must be assigned to one and only one


destination.
3
ASSIGNMENT PROBLEMS cont…
For example:
 A company is faced with the problem of assigning five
different machines to five different jobs with a view to
minimize total cost or to maximize total return/profit.

 Also it involves obtaining the most efficient assignment of:


• Sales representatives to different sales territories
• Operators to jobs
• Employees to machines
• People to projects
• Clerks to various desks or counters

4
ASSIGNMENT PROBLEMS cont…
FORMULATING ASSIGNMENT MODELS

SEE ATTACHED ARTICLE.

5
ASSIGNMENT PROBLEMS cont…
SOLVING THE ASSIGNMENT MODELS
In solving the assignment models we use the algorithm
developed by a Hungarian mathematician, D. Konig.

The algorithm for an assignment problem developed by him is


popularly known as the Hungarian Method.

 Also known as the Reduced Matrix Method.

6
ASSIGNMENT PROBLEMS cont…
Detailed steps are:
1.Prepare an opportunity cost table by first subtracting the
minimum value in each row (column) from all other row
(column) values and then repeating this process for each
column (row).

2.Apply LINE TEST to determine an optimal solution:

 The optimal solution occurs when the number of


independent unique assignments (i.e. minimum number
of lines that covers all the zeros) equals the number of
rows (or columns). 7
ASSIGNMENT PROBLEMS cont…
 If the number of unique assignments is less than the
number of rows (or columns):
o Subtract the smallest number not covered by lines
from itself and all other uncovered numbers, and
add it to the number(s) covered by two lines.
 Test for optimality using LINE TEST.
o If it is optimal move to step 3.
o If not, repeat step 2.

3. Obtain the optimal assignment (minimum-cost


assignment).
 Assignments are made to locations with zeros in the
opportunity cost table. 8
ASSIGNMENT PROBLEMS cont…
EXAMPLE 01:
A company is faced with the problem of assigning four
different jobs to four different machines with a view to
minimize total cost. The costs are estimated as follows
(thousands of shillings):
Machine
Job
A B C D
1 8 6 2 4
2 6 7 11 10
3 3 5 7 6
4 5 10 12 9
Solve the above assignment problem. 9
ASSIGNMENT PROBLEMS cont…
SOLUTION:
STEP 1: OPPORTUNITY COST TABLE
Row Reduction or Row Minimum
The smallest number in each row of the given matrix is
subtracted from all the entries in its row.
Machine
Job
A B C D
1 6 4 0 2
2 0 1 5 4
3 0 2 4 3
4 0 5 7 4 10
ASSIGNMENT PROBLEMS cont…
Column Reduction or Column Minimum
The smallest number in each column of the given matrix
obtained in row reduction is subtracted from all the entries in
its column.

Machine
Job
A B C D
1 6 3 0 0
2 0 0 5 2
3 0 1 4 1
4 0 4 7 2
11
ASSIGNMENT PROBLEMS cont…
Thus, the following table is called “opportunity cost matrix.”

Machine
Job
A B C D
1 6 3 0 0
2 0 0 5 2
3 0 1 4 1
4 0 4 7 2

12
ASSIGNMENT PROBLEMS cont…
STEP 2: TEST FOR OPTIMALITY
Apply Line Test
• Now, draw minimum number of lines to cover all the zeros.

• If the minimum number of lines crossing all zeros at least


once is equal to the number of rows (or columns),

THEN; there is optimal solution for the resulted


opportunity cost matrix.

OTHERWISE; it is not the optimal solution.


13
ASSIGNMENT PROBLEMS cont…
• If the minimum number of lines is less than the number of
rows (or columns):

We take the smallest number not covered by the lines,


then subtract that number from itself and all other
numbers not covered by the lines and add it to all
numbers covered by two lines to obtain a new matrix.

THEN, we apply the line test.

14
ASSIGNMENT PROBLEMS cont…
From opportunity cost matrix, the resulted solution after
unique assignment is:

Machine
Job
A B C D
1 6 3 0 0
2 0 0 5 2
3 0 1 4 1
4 0 4 7 2
The solution is not optimal since the number of lines crossing
all zeros is not equal to the number of rows (or columns).
15
ASSIGNMENT PROBLEMS cont…
After identifying the small number (i.e. 1) not covered by the
lines, then we subtract that entry to those entries (numbers
not covered by the lines) and add it to the number(s) covered
by two lines.
Then, the resulted assignment model is:

Machine
Job
A B C D
1 7 3 0 0
2 1 0 5 2
3 0 0 3 0
4 0 3 6 1 16
ASSIGNMENT PROBLEMS cont…
Applying the line test, we have:
Machine
Job
A B C D
1 7 3 0 0
2 1 0 5 2
3 0 0 3 0
4 0 3 6 1
The number of lines crossing all zeros is equal to the number
of rows (or columns).

Then, there is an optimal solution. 17


ASSIGNMENT PROBLEMS cont…
To obtain the optimal assignment (minimum-cost assignment):

─ Assignments are made to locations with zeros in the


opportunity cost table as follows:

Machine
Job
A B C D
1 7 3 0 0
2 1 0 5 2
3 0 0 3 0
4 0 3 6 1
18
ASSIGNMENT PROBLEMS cont…
Assignment Cost
1–C 2
2–B 7
3–D 6
4–A 5

Therefore, the total minimum cost = 2 + 7 + 6 + 5 = 20

Since the estimated cost is in thousands shillings, then we


have:
The total minimum cost of 20,000 shillings.
19
ASSIGNMENT PROBLEMS cont…
CLASS ACTIVITY 01
From EXAMPLE 01
Solve the given assignment problem by considering the
following steps :

Step 1: Establish opportunity cost matrix by first considering


column reduction then row reduction.
Step 2: Test for optimality.
State the optimal solution.

What is your observation?


20
ASSIGNMENT PROBLEMS cont…
EXAMPLE 02
Given the following cost table for an assignment problem:
Machine
Employee
A B C D E
1 2.5 5 1 6 2
2 2 5 1.5 7 3
3 3 6.5 2 8 3
4 3.5 7 2 9 4.5
5 4 7 3 9 6
Determine the optimal assignment and compute total minimum
cost. 21
ASSIGNMENT PROBLEMS cont…
SOLUTION:
STEP 1: OPPORTUNITY COST TABLE
Row Reduction or Row Minimum
Machine
Employee
A B C D E
1 1.5 4 0 5 1
2 0.5 3.5 0 5.5 1.5
3 1 4.5 0 6 1
4 1.5 5 0 7 2.5
5 1 4 0 6 3
22
ASSIGNMENT PROBLEMS cont…
Column Reduction or Column Minimum

Machine
Employee
A B C D E
1 1 0.5 0 0 0
2 0 0 0 0.5 0.5
3 0.5 1 0 1 0
4 1 1.5 0 2 1.5
5 0.5 0.5 0 1 2
23
ASSIGNMENT PROBLEMS cont…
STEP 2: TEST FOR OPTIMALITY
Apply Line Test
Machine
Employee
A B C D E
1 1 0.5 0 0 0
2 0 0 0 0.5 0.5
3 0.5 1 0 1 0
4 1 1.5 0 2 1.5
5 0.5 0.5 0 1 2
The number of lines crossing all zeros is less than number of
rows or columns; it indicates that the solution is not optimal.
24
ASSIGNMENT PROBLEMS cont…
After identifying the small number (i.e. 0.5) not covered by
the lines, then we subtract that entry to those entries
(numbers not covered by the lines) and add it to the
number(s) covered by two lines, we have:
Machine
Employee
A B C D E
1 1 0.5 0.5 0 0.5
2 0 0 0.5 0.5 1
3 0 0.5 0 0.5 0
4 0.5 1 0 1.5 1.5
5 0 0 0 0.5 2 25
ASSIGNMENT PROBLEMS cont…
Consequently; applying the line test, we have the following
improved tableau:
Machine
Employee
A B C D E
1 1 0.5 0.5 0 0.5
2 0 0 0.5 0.5 1
3 0 0.5 0 0.5 0
4 0.5 1 0 1.5 1.5
5 0 0 0 0.5 2
The number of lines crossing all zeros is equal to the number
of rows. Thus, there is an optimal solution.
26
ASSIGNMENT PROBLEMS cont…
The optimal assignment is shown below:
Machine
Employee
A B C D E
1 1 0.5 0.5 0 0.5
2 0 0 0.5 0.5 1
3 0 0.5 0 0.5 0
4 0.5 1 0 1.5 1.5
5 0 0 0 0.5 2
The optimal assignment with their respective costs is:
1D = 6, 2A = 2 3E = 3 4C = 2 5B = 7
Therefore, total minimum cost = 6 + 2 + 3 + 2 + 7 = 20 27
ASSIGNMENT PROBLEMS cont…
Alternatively; the optimal assignment is shown below:
Machine
Employee
A B C D E
1 1 0.5 0.5 0 0.5
2 0 0 0.5 0.5 1
3 0 0.5 0 0.5 0
4 0.5 1 0 1.5 1.5
5 0 0 0 0.5 2

The optimal assignment with their respective costs is:


1D = 6, 2B = 5 3E = 3 4C = 2 5A = 4
Therefore, total minimum cost = 6 + 5 + 3 + 2 + 4 = 20 28
ASSIGNMENT PROBLEMS cont…
CLASS ACTIVITY 02
From EXAMPLE OR_04_02
Solve the given assignment problem by considering the
following steps :

Step 1: Establish opportunity cost matrix by first considering


column reduction then row reduction.
Step 2: Test for optimality
Then write down the optimal solution.

What is your observation? 29


ASSIGNMENT PROBLEMS cont…
SPECIAL CASES OF ASSIGNMENT PROBLEMS
Like a transportation problems, an assignment problem can
have the following situations that need to be resolved.

In here, the special cases of assignment problems are listed


below:

1. Unbalanced Assignment Problems

2. Unacceptable Assignments

3. Maximization Problems 30
ASSIGNMENT PROBLEMS cont…
Unbalanced Assignment Models
We have two cases to be addressed:

(1) When demand exceeds supply,

and

(2) When supply exceeds demand.

31
ASSIGNMENT PROBLEMS cont…
These two cases they can be resolved by adding a dummy
variable with all costs elements as zeros to the given
assignment matrix to make it a square matrix as follows:

1. When Demand > Supply , a dummy row is added to the


assignment tableau.

2. When Supply > Demand a dummy column is added to


the assignment tableau.

Then, the Hungarian Method may be used to solve the


modified (balanced) assignment problem.
32
ASSIGNMENT PROBLEMS cont…
EXAMPLE 03
A company has four machines that are used for three jobs.
Each job can be assigned to one and only one machine. The
cost of each job on each machine is given in the following
Table.
Machine
Job
A B C D
1 20 25 22 28
2 15 18 23 17
3 19 17 21 24
Find the optimal solution.
33
ASSIGNMENT PROBLEMS cont…
SOLUTION:
• From the given assignment problem; the number of machines
exceeds the number of jobs.
─ Thus, we have to add dummy job to balance the problem.
─ The revised assignment problem is given below:
Machine
Job
A B C E
1 20 25 22 28
2 15 18 23 17
3 19 17 21 24
Dummy Job (4) 0 0 0 0 34
ASSIGNMENT PROBLEMS cont…
STEP 1: OPPORTUNITY COST TABLE

Row Reduction

Machine
Job
A B C E
1 0 5 2 8
2 0 3 8 2
3 2 0 4 7
Dummy Job (4) 0 0 0 0
35
ASSIGNMENT PROBLEMS cont…
Column Reduction
Column reduction is not necessary since all columns contain
zero value(s) as shown below.

Machine
Job
A B C D
1 0 5 2 8
2 0 3 8 2
3 2 0 4 7
Dummy Job (4) 0 0 0 0
36
ASSIGNMENT PROBLEMS cont…
STEP 2: TEST FOR OPTIMALITY
Machine
Job
A B C D
1 0 5 2 8
2 0 3 8 2
3 2 0 4 7
Dummy Job (4) 0 0 0 0

The number of lines crossing all zeros is less than the


number of rows or columns. It indicates that the assignment
is not optimal.
37
ASSIGNMENT PROBLEMS cont…
The revised assignment tableau is given below:

Machine
Job
A B C D
1 0 5 0 6
2 0 3 6 0
3 2 0 2 5
Dummy Job (4) 2 2 0 0
The revised assignment tableau indicates that there is
optimal solution since the minimum number lines crossing all
zeros is equal to the number of rows or columns.
38
ASSIGNMENT PROBLEMS cont…
The optimal assignment is shown below:
Machine
Job
A B C D
1 0 5 0 6
2 0 3 6 0
3 2 0 2 5
Dummy Job 2 2 0 0

From the above optimal assignment we have to compute the


total minimum cost by taking:
Total cost = 20 + 17 + 17 + 0 = 54 39
ASSIGNMENT PROBLEMS cont…
CLASS ACTIVITY 03
Consider the following assignment problem
Machine
Job
A B C D E
1 5 7 11 6 7
2 8 5 5 6 5
3 6 7 10 7 3
4 10 4 8 4 2
5 15 6 9 5 8
6 9 8 7 10 6

Determine the optimal assignment plan. 40


ASSIGNMENT PROBLEMS cont…
Unacceptable/Prohibited Assignments
Due to a number of reasons there is a possibility of
experiencing or facing unacceptable or prohibited
assignments.
For example:
A particular employee or machine is incapable of doing
certain job.

Like in the case of transportation models for any identified


unacceptable assignment is given a large cost of M or ∞ for
the cell representing unacceptable assignment so that it will
never be selected.
41
ASSIGNMENT PROBLEMS cont…
EXAMPLE 04
Five jobs are to be assigned to five men. The assignment has
restrictions that Job C cannot be performed by Man 4 and
Job D cannot be performed by Man 1. The cost of performing
the jobs by each man is given in the following matrix.
Job
Men
A B C D E
1 16 12 11 X 15
2 13 15 11 16 18
3 20 21 18 19 17
4 16 13 X 16 12
5 20 19 18 17 19 42
ASSIGNMENT PROBLEMS cont…
Required:

(a) Find the optimal assignment of job.

(b) Find the cost involved for the optimal assignment of job.

43
ASSIGNMENT PROBLEMS cont…
SOLUTION:
Since from the given assignment problem there are restricted
assignments. Then, we have to assign largest cost, M, for
such assignments as follows:
Job
Men
A B C D E
1 16 12 11 M 15
2 13 15 11 16 18
3 20 21 18 19 17
4 16 13 M 16 12
5 20 19 18 17 19 44
ASSIGNMENT PROBLEMS cont…
Row Reduction or Row Minimum

Job
Men
A B C D E
1 5 1 0 M 4
2 2 4 0 5 7
3 3 4 1 2 0
4 4 1 M 4 0
5 3 2 1 0 1
45
ASSIGNMENT PROBLEMS cont…
Column Reduction or Column Minimum

Job
Men
A B C D E
1 3 0 0 M 4
2 0 3 0 5 7
3 1 3 1 2 0
4 2 0 M 4 0
5 1 1 1 0 1

46
ASSIGNMENT PROBLEMS cont…
Now, we draw minimum number of lines to cover all the
zeros, as shown below:
Job
Men
A B C D E
1 3 0 0 M 4
2 0 3 0 5 7
3 1 3 1 2 0
4 2 0 M 4 0
5 1 1 1 0 1
Since the number of lines crossing all the zeros is equal to
the number of rows (or columns), then there is optimal
solution. 47
ASSIGNMENT PROBLEMS cont…
The optimal assignment is shown below:
Job
Men
A B C D E
1 3 0 0 M 4
2 0 3 0 5 7
3 1 3 1 2 0
4 2 0 M 4 0
5 1 1 1 0 1
From the above optimal assignment we have to compute the
total minimum cost by taking:
Total cost = 11 + 13 + 17 + 13 + 17 = 71 48
ASSIGNMENT PROBLEMS cont…
CLASS ACTIVITY 04
In a plant layout, four different machines M1, M2, M3 and M4
are to be installed in a machine shop. There are five vacant
areas A, B, C, D and E.

Because of limited space, Machine M2 cannot be installed at


area C and Machine M4 cannot be installed at area A.

The cost of installation of machines is given in the following


table.

49
ASSIGNMENT PROBLEMS cont…

Area
Machine
A B C D E
M1 4 5 9 4 5
M2 6 4 – 4 3
M3 4 5 8 5 1
M4 – 2 6 1 2

Obtain the optimal assignment schedule and total minimum


cost. 50
ASSIGNMENT PROBLEMS cont…
Maximization Cases
There are problems that we have to obtain assignment
schedule or plan so as to maximize the overall performance
(or say, profit).

The given maximization problem can be converted into a


minimization problem.
 Select the highest element in the entire assignment table
and subtract all the elements of the table from the identified
highest element.

 The optimal solution is obtained by substituting values from


original table into the assignment schedule or plan. 51
ASSIGNMENT PROBLEMS cont…
EXAMPLE 05
A certain firm has five sales areas and five sales
representatives.
Sales Area
Sales
Representative A B C D E
1 30 37 40 28 40
2 40 24 27 21 36
3 40 32 33 30 35
4 25 38 40 36 36
5 29 62 41 34 39
Find the assignment of sales representatives to sales areas
52
that will result in maximum sales.
ASSIGNMENT PROBLEMS cont…
SOLUTION:
From the given maximization assignment table, 62 is the
highest value. Thus, we subtract each value from 62.
The resulted minimization assignment table is:
Sales Area
Sales
Representative A B C D E
1 32 25 22 34 22
2 22 38 35 41 26
3 22 30 29 32 27
4 37 24 22 26 26 53
ASSIGNMENT PROBLEMS cont…
Row Reduction or Row Minimum

Sales Area
Sales
Representative A B C D E
1 10 3 0 12 0
2 0 16 13 19 4
3 0 8 7 10 5
4 15 2 0 4 4
5 33 0 21 28 23
54
ASSIGNMENT PROBLEMS cont…
Column Reduction or Column Minimum

Sales Area
Sales
Representative A B C D E
1 10 3 0 8 0
2 0 16 13 15 4
3 0 8 7 6 5
4 15 2 0 0 4
5 33 0 21 24 23
Now, we draw the minimum number of lines to cover all
zeros. 55
ASSIGNMENT PROBLEMS cont…
Sales Area
Sales
Representative A B C D E
1 10 3 0 8 0
2 0 16 13 15 4
3 0 8 7 6 5
4 15 2 0 0 4
5 of lines33
Since the number 0 all 21
crossing zeros 24
is less23than the
number of rows (or columns).

It indicates that the assignment is not optimal. 56


ASSIGNMENT PROBLEMS cont…
The revised assignment tableau is given below:
Sales Area
Sales
Representative A B C D E
1 14 3 0 8 0
2 0 12 9 11 0
3 0 4 3 2 1
4 19 2 0 0 4
5 37 0 21 24 23

Since the minimum number of lines crossing all zeros is equal


to the number of rows (or columns). It indicates that the
solution is optimal.
57
ASSIGNMENT PROBLEMS cont…
The optimal assignment is given below:
Sales Area
Sales
Representative A B C D E
1 14 3 0 8 0
2 0 12 9 11 0
3 0 4 3 2 1
4 19 2 0 0 4
5 37 0 21 24 23

Total maximum sales = 1C + 2E + 3A + 4D + 5B


= 40 + 36 + 40 + 36 + 62 = 214 58
ASSIGNMENT PROBLEMS cont…
CLASS ACTIVITY 05

A marketing manager has five salesmen and sales districts.

Considering the capabilities of the salesmen and the nature


of districts, the marketing manager estimates that sales per
month (in hundred dollars) for each salesman in each district
would be as follows:

59
ASSIGNMENT PROBLEMS cont…
District
Salesman
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 of salesmen to districts that will result in


maximum sales. 60
ASSIGNMENT PROBLEMS cont…
CONCLUDING REMARKS

• Why AP?

• The AP is considered a very useful and powerful tool.

• AP is certainly not a panacea for all management and


industrial problems.

61
ASSIGNMENT PROBLEMS cont…
REVIEW QUESTIONS
1. Develop an assignment plan that will minimize the processing cost
given the information shown and interpret your answer.

Machines
Jobs
A B C
1 12 8 11
2 13 10 8
3 14 9 14
4 10 7 12

62
ASSIGNMENT PROBLEMS cont…
2. The following table contains information on the cost to run three
jobs on four available machines.
a) Determine an assignment plan that will minimize opportunity
costs.
b) Compute the total costs.
c) Interpret the assignment plan.
Machines
Jobs
A B C D
1 12 16 14 10
2 9 8 13 7
3 15 12 9 11
63
ASSIGNMENT PROBLEMS cont…
3. Using the assignment method to obtain a plan that will minimize
the processing cost in the following table under these conditions:
a) The combination 2–D is undesirable
b) The combination 1–A and 2–D are undesirable.

Machines
Jobs
A B C D E
1 14 18 20 17 18
2 14 15 19 16 17
3 12 16 15 14 17
4 11 13 14 12 14
5 10 16 15 14 13
64
ASSIGNMENT PROBLEMS cont…
4. A company has 6 sales areas and 6 salesmen, from past experience
it is known that the salesman perform differently in the different
areas. The sales director has estimated sales (in Tshs”000”) for
each person in each area. These are given in the following table:
Sales Area
Jobs
1 2 3 4 5 6
A 68 72 75 83 75 69
B 56 60 58 63 61 59
C 35 38 40 45 25 27
D 40 42 47 45 53 36
E 62 70 68 67 69 70
F 65 63 69 70 72 68
65
ASSIGNMENT PROBLEMS cont…
How should you assign each salesman to each of these areas in
order to maximize total sales.

5. A shop has four machinists to be assigned to four machines.

The hourly cost (in $) of having each machine operated by each


machinist is as follows:

66
ASSIGNMENT PROBLEMS cont…
Machine
Machinist
A B C D
1 12 11 8 14
2 10 9 10 8
3 14 8 7 11
4 6 8 10 9

However, because he does not have enough experience, machinist


3 cannot operate machine B. Determine the optimal assignment
and compute total minimum cost.
67
Assignment Models

Any Questions?
CLASS ACTIVITY 06

• Work in groups of about 3

Explain, in brief, the usefulness of Assignment


models.

• Feedback to the class (05 minutes)


Operations Research I
ST1202

End of Module 04:


Assignment Problems

Thank you! 70

You might also like