Professional Documents
Culture Documents
Assignment Problem
Audio 141
Special case of transportation, we are going to assign
people to places, robots to machines ......, project
managers to sites
Why here I am doing QA not economics?
Because it is the maximum profit, or the minimum cost
for the place
We will follow the Hungarian Method instead the
Solver, because it will take thousand of steps to reach the
solution.
The Hungarian Method depends on reduction of
Matrix, using Opportunity costs.
Opportunity Cost: Is the loss that I will incur if I send
you in the wrong place.
Instead of sending you in the wrong place I make the
correct allocation from the first time.
So we do some playing around using the stepping stone,
and then you will find that they are allocated
But , we don't have a supply and demand like the
previous one. all the supply and demand will be one to
one.
So it is a special case,
The following is a primitive case and then we will go to
exceptions.
Problem :
A Project Management Company wishes to assign three of its good
project managers FPMI, PM2 and FM3 each with different talents and
abilities, to three important projects 1, 2 and 3 such that they can
minimize their total costs.
The cost to the company is calculated from the rate per day of each of
these project managers and depends on the importance of the project they
are assigned to. The costs in $ are presented in the assignment table
below:
Projects
Project
Manage P1 P2 P3
rs
PM1 11 14 6
PM2 8 10 11
PM3 9 12 7
PM2 8 10 11
PM3 9 12 7
9 12 7
0 2 3
2 5 0
Step 1 b :
In the new table Subtract the Lowest value in each column from all values
in the same column
- Why :
o Trying to get more zeros , when I get more
zeros
o When I will get more zeros, this mean that I
will incur the Zero if I will send the person
there (it is better for me to send the person
the zero value place).
o If I have more than Zero , then I have
different allocations
Projects
Project
Manage 1 2 3
rs
5-0 8-2 0-0
PM1
5 6 0
0-0 2-2 3-0
PM2
0 0 3
2-0 5-2 0-0
PM3
2 3 0
OR Columns = Rows = 3
The Table should be square
Step 2 :
In the new table try to cover the zeros with the minimum number of lines
either horizontal or vertical
Managerial Logic :
The manager will tell himself, I have some zeros, why not we cross them
in order to decide where the Project managers will be located in the zeros.
Draw the minimum number of straight lines through each row and
column to cover the zeros in the matrix.
Projects
Project
Manage 1 2 3
rs
PM1 5 6
0
PM2 0 0 3
PM3 2 3 0
Step 3 :
If the minimum number of straight lines is equal to the number of rows or
equivalently columns in the matrix,
Why
Because you have to reach that the zeros around us will make sure that
everyone will go there with the minimum cost that I want to pay.
NOTE :
I have to begin the problem with a target: M = N = 3
My target is 3 lines
Step 4 :
It consist of 3 parts (very important)
1- Find the lowest value in the uncovered elements
2- Subtract these value from every other value in the uncovered elements
3- & add this value to any cell with intersection of 2 lines.
4- & Leave other values the same
PM1 5 6
0
PM2 0 0 3
PM3 2 3 0
PM2 0 0 3
2-2 3-2
PM3 0
0 1
Step 5 :
We will do the step of the lines chances again, same like
Step 2
Draw the minimum number of straight lines through each
row and column to cover the zeros in the matrix.
Projects
Project
Manager 1 2 3
s
PM1
3 4 0
PM2 0 0 5
PM3 0 1 0
The direction of choosing the lines doesnt matter, as long
as I am covering the zeros, with the minimum number of
lines.
If they are not the minimum, I have to repeat this again.
We will allocate
PM1 P3 = 6
PM3 P1 = 9
PM2 P2 = 10
Total Cost 25
Take it vertically :
Projects
Project
Manager 1 2 3
s
PM1
3 4 0
PM2 0 0 5
PM3 0 1 0
PM2 P2 = 10
PM3 P1 = 9
PM1 P3 = 6
Total Cost 25
Projects
Project
Manage 1 2 3
rs
PM1 11 14 6
PM2 8 10 11
PM3 9 12 7
Step : 1 a :
- Find the highest value in every row :
11 14 6
8 10 11
9 12 7
3 1 0
3 0 5
Managerial:
- Why :
o Trying to get more zeros , when I get more
zeros
o When I will get more zeros, this mean that I
will incur the Zero if I will send the person
there (it is better for me to send the person
the zero value place).
o If I have more than Zero , then I have
different allocations
Projects
Project
Manage 1 2 3
rs
Step 2 :
In the new table try to cover the zeros with the minimum number of lines
either horizontal or vertical
Projects
Project
Manage 1 2 3
rs
PM1 0 0 8
PM2 1 1 0
PM3 0 0 5
To begin allocation
PM1 0 0 8
To
begin
PM2 1 1 0 allocatio
n
PM3 0 0 5
PM2 P3 = 11
PM1 P2 = 14
PM3 P1 = 9
Total Profit 34
OR
PM2 P3 = 11
PM1 P1 = 11
PM3 P2 = 12
Total Profit 34
PM2 8 10 11
PM3 9 12 7
PM4 10 7 9
PM3 9 12 7 0
PM4 10 7 9 0
Step : 1 a :
Will not be done here
11 14 6 0
8 10 11 0
9 12 7 0
10 7 9 0
Step 1 b :
In the new table Subtract the Lowest value in each column from all values
in the same column
Projects
Project
Manage 1 2 3 4
rs
11 - 8 14 - 7 6-6 0-0
PM1
3 7 0 0
8-8 10 - 7 11 - 6 0-0
PM2
0 3 5 0
9-8 12 - 7 7 -6 0-0
PM3
1 5 1 0
10 - 8 7-7 9-6 0-0
PM4
2 0 3 0
25 Prof. Maged Morcos
Quantitative Analysis - Lec 5 7/02/2017
Step 2 :
In the new table try to cover the zeros with the minimum number of lines
either horizontal or vertical
Projects
Project
Manage 1 2 3 4
rs
PM1 3 7 0 0
PM2 0 3 5 0
PM3 1 5 1 0
PM4 2 0 3 0
I am sure that this is the minimum number of lines,
This is the trick of the Hungarian method
If you are sure that these are the minimum, you
can reach an assignment
If you are not sure, then the problem is not
developed yet.
We have to develop it more
Step 2 :
PM2 0 3 5 0
PM3 1 5 1 0
PM4 2 0 3 0
PM1 P3 = 6
PM2 P1 = 8
PM3 P4 = 0
PM4 P2 = 7
Total Profit 21
This means that PM3 will go home, because he has no project.
14 - 8 14 - 10 14 - 11 14 - 7
PM2
6 4 3 7
14 - 9 14 - 12 14 - 7 14 -10
PM3
5 2 7 4
PM4 0 0 0 0
Step 1 a :
- Find the minimum value in every row :
3 0 8 5
6 4 3 7
5 2 7 4
0 0 0 0
Projects
Project
Manage 1 2 3 4
rs
PM1 3 0 8 5
PM2 3 1 0 4
PM3 3 0 5 2
PM4 0 0 0 0
Step 1 b :
Step 2 :
In the new table try to cover the zeros with the minimum number of lines
either horizontal or vertical
Projects
Project
Manage 1 2 3 4
rs
PM1 3 0 8 5
PM2 3 1 0 4
PM3 3 0 5 2
PM4 0 0 0 0
- These are 3 only
- That means I will take the uncovered
NOTE :
I have to begin the problem with a target: M = N = 4
My target is 4 lines
Step 4 :
It consist of 3 parts (very important)
1- Find the lowest value in the uncovered elements
Projects
Project
Manage 1 2 3 4
rs
PM1 3 0 8 5
PM2 3 1 0 4
PM3 3 0 5 2
PM4 0 0 0 0
2- Subtract these value from every other value in the uncovered elements
3- & add this value to any cell with intersection of 2 lines.
4- & Leave other values the same
33 Prof. Maged Morcos
Quantitative Analysis - Lec 5 7/02/2017
Projects
Project
Manage 1 2 3 4
rs
3-2 5-2
PM1 0 8
1 3
3-2 3-1
PM2 1 0
1 2
3-2 3-2
PM3 0 5
1 1
2+0 2+0
PM4 0 0
2 2
Projects
Project
Manage 1 2 3 4
rs
PM1 1 0 8 3
PM2 1 1 0 2
PM3 1 0 5 1
PM4 0 2 2 0
PM1 P2 = 14
PM2 P3 = 11
PM3 P4 = 10
PM4 P1 = 0
Total Profit 35
Managerial Decision :