Unit 3 - Part 1 Assignment Problem
Unit 3 - Part 1 Assignment Problem
solution:
• Problem is balanced as number of row = number of columns i.e. 4=4
Solution
A B C D min
P 31 25 33 29 25
Q 25 24 23 21 21
R 19 21 23 24 19
S 38 36 34 40 34
A B C D
P 6 0 8 4
Q 4 3 2 0
R 0 2 4 5
S 4 2 0 6
Solution
• For columns: column reduction
A B C D
P 6 0 8 4
Q 4 3 2 0
R 0 2 4 5
S 4 2 0 6
min 0 0 0 0
A B C D
P 6 0 8 4
Q 4 3 2 0
R 0 2 4 5
S 4 2 0 6
Solution
A B C D
P 6 00 8 4
Q 4 3 2 0
R 0
0 2 4 5
S 4 2 0 6
A B C D
P 6 0 8 4
0
Q 4 3 2 0
0
R 00 2 4 5
S 4 2 00 6
assignment is,
P🡪 B 25
Q🡪 D 21
R🡪 A 19
S🡪 C 34
-------------------------
assignment cost : 99
Example:2
⦿ A automobile dealer whishes to put four repairmen to four jobs. The
different level of efficiency from one job to another. The dealer has
estimated the number of man hour that would be required for each
needed A B C D
1 5 3 2 8
2 7 9 2 6
3 6 4 5 7
4 5 7 7 8
Solution
• Problem is balanced
as no of rows = no of columns
• For rows : row reduction
A B C D min
1 5 3 2 8 2
2 7 9 2 6 2
3 6 4 5 7 4
4 5 7 7 8 5
A B C D
1 3 1 0 6
2 5 7 0 4
3 2 0 1 3
4 0 2 2 3
• For column: column reduction
A B C D
1 3 1 0 6
2 5 7 0 4
3 2 0 1 3
4 0 2 2 3
min 0 0 0 3
A B C D
1 3 1 0 3
2 5 7 0 1
3 2 0 1 0
4 0 2 2 0
• Draw min no of line to cover max zero
A B C D
1 2 0 0 2
2 4 6 0 0
3 2 0 2 0
4 0 2 3 0
• Again draw number of lines
A B C D
1 2 0 0 2
2 4 6 0 0
3 2 0 2 0
4 0 2 3 0
A B C D
assignment is,
1 2 00 X0 2
1🡪 B 3
2 4 6 00
X0 2🡪 C 2
3🡪 D 7
4🡪 A 5
3 2
X0 2 00
-------------------------
17
4 0 2 3
X
0
MULTIPLE SOLUTION: second solution
A B C D
assignment is,
1 2 X
0 00 2
1🡪 C 2
2 4 6
X
0 00 2🡪 D 6
3🡪 B 4
4🡪 A 5
3 2 00 2
X0 -------------------------
17
4 0 2 3
X
0
Practice Question
Solve the assignment problem using Hungarian method. Assign the jobs
to different machines so as to minimize the total cost.
A B C D E
1 13 8 16 18 19
2 9 15 24 9 12
3 12 9 4 4 4 Ans: Assignment
is,
4 6 12 10 8 13
5 15 17 18 12 20
1🡪 B 8
2🡪 E 12
3🡪 C 4
4🡪 A 6
5🡪 D 12
-------------------------
42
Example:3
⦿ A CARS HIRE COMPANY HAS ONE CAR AT EACH FIVE DEPOTS 1,2,3,4,5.
DISTANCE MATRIX .
A B C D E Min A B C D E
1 160 130 175 190 200 130 1 30 0 45 60 70
2 135 120 130 160 175 120 2 15 0 10 40 55
3 140 110 155 170 185 110 3 30 0 45 60 75
4 50 50 80 80 110 50 4 0 0 30 30 60
5 55 35 70 80 105 35 5 20 0 35 45 70
Solution:
column reduction :
A B C D E
A B C D E
1 30 0 45 60 70
1 30 0 35 30 15
2 15 0 10 40 55
2 15 0 0 10 0
3 30 0 45 60 75
3 30 0 35 30 20
4 0 0 30 30 60
4 0 0 20 0 5
5 20 0 35 45 70
5 20 0 25 15 15
min 0 0 10 30 55
Solution:
A B C D E
1 30 0 35 30 15
2 15 0 0 10 0
3 30 0 35 30 20
4 0 0 20 0 5
5 20 0 25 15 15
1 15 0 20 15 0
2 15 15 0 10 0
3 15 0 20 15 5
4 0 15 20 0 5
5 5 0 10 0 0
1 15 0 20 15 0
2 15 15 0 10 0
3 15 0 20 15 5
4 0 15 20 0 5
5 5 0 10 0 0
Assignment cost=
1 1🡪E 200
15 0 20 15 0
2🡪C 130
2 3🡪B 110
15 15 0 10 0 4🡪A 50
5🡪D 80
3 -------------------
15 00 20 15 5
570
4
0 15 20 0 5
5
5 0 10 0 0
Maximization problem
Example:4
• A captain of cricket team has to allot five middle batting position to five
I II III IV V
P 40 40 35 25 50
Q 42 30 16 25 27
R 50 48 40 60 50
S 20 19 20 18 25
T 58 60 59 55 53
Solution:
CONVERTED TO MINIMIZATION
• MAX=60
Solution
• Matrix after subtracting every cell from maximum cost i.e. 60
so that problem is converted into minimization problem
I II III IV V
P 20 20 25 35 10
Q 18 30 44 35 33
R 10 12 20 0 10
S 40 41 40 42 35
T 2 0 1 5 7
Solution
• Row reduction
I II III IV V I II III IV V
P 10 10 15 25 0 P 10 10 14 25 0
Q 0 12 26 17 15 Q 0 12 25 17 15
R 10 12 20 0 10 R 10 12 19 0 10
S 5 6 5 7 0 S 5 6 4 7 0
T 2 0 1 5 7 T 2 0 0 5 7
min 0 0 1 0 0
• Draw minimum number of lines to cover maximum
zeros
I II III IV V I II III IV V
P 10 10 14 25 0 P 10 6 10 25 0
Q 0 12 25 17 15 Q 0 8 21 17 15
R 10 12 19 0 10 R 10 8 15 0 10
S 5 6 4 7 0 S 5 2 0 7 0
T 6 0 0 9 11
T 2 0 0 5 7
P 10 6 10 25 0
Q 0 8 21 17 15
R 10 8 15 0 10
S 5 2 0 7 0
T 6 0 0 9 11
Assignment:
P-> v 50
Q-> I 42
R-> IV 60
S->III 20
T - > II 60
------------------------
COST = 232
problem
– There are 4 machine operator . Five jobs are offered with expected profits in
RS. For each operator on each job as follows. find the assignment of operator
to the job that will result in maximum profit . Which job should be declined
justify steps you take to solve the problem.
A B C D E
1 6.20 7.80 5.00 10.10 8.20
2 7.10 8.40 6.10 7.30 5.90
3 8.70 9.20 11.20 7.10 8.10
4 4.80 6.40 8.70 7.70 8.00
Solution
CONVERTED TO MINIMIZATION
• MAX= 11.20
MAX= 11.20 after subtracting every cell from 11.20
A B C D E
A B C D E
5 0 0 0 0 0
After Row Reduction
A B C D E
5 0 0 0 0 0
After Column Reduction
A B C D E
5 0 0 0 0 0
• Draw minimum number of lines to cover maximum zeros
A B C D E
1 3.9 2.30 5.10 0 1.90
2 1.30 0 2.30 1.10 2.50
3 2.50 2.00 0 4.10 3.10
4 3.90 2.30 0 1 0.70
5 0 0 0 0 0
4 3.2 2.30 0 1 0
4 3.2 2.30 0 1 0
⦿ N= 5 = number of rows
A B C D E
4 3.2 2.30 0 1 0
Assignment:
1-> D 10.10
2 -> B 8.40
3-> C 11.20
4-> E 8.00
5-> A 0.0
------------------------
COST = 37.70
Prohibited routes
• An airline has drown up a new flight scheduled involving five flight . To
assist in allocating five pilots to the flight they have ask them to state their
preference score by giving each flight a number out of 10 . The higher the
number, greater is the preference. Some of theses flight are unsuitable to
some pilots due to domestic problem, these are marked with (X).
what should be allocation of pilots to flight in order to meet as many
preference as possible
1 2 3 4 5
A 8 2 X 5 4
B 10 9 2 8 4
C 5 4 9 6 X
D 3 6 2 8 7
E 5 6 10 4 3
Solution
• Problem is to 1 2 3 4 5
maximize total
A 2 8 M 5 6
preference score
select max = 10
B 0 1 8 2 6
C 5 6 1 4 M
D 7 4 8 2 3
E 5 4 0 6 7
After Row Reduction
1 2 3 4 5
A 0 6 M 3 4
B 0 1 8 2 6
C 4 5 0 3 M
D 5 2 6 0 1
E 5 4 0 6 7
After Column Reduction
1 2 3 4 5
A 0 5 M 3 3
B 0 0 8 2 5
C 4 4 0 3 M
D 5 1 6 0 0
E 5 3 0 6 6
1 2 3 4 5
A 0 5 M 3 3
B 0 0 8 2 5
C 4 4 0 3 M
D 5 1 6 0 0
E 5 3 0 6 6
⦿ N= 4 ≠ number of rows
⦿ Select minimum uncovered element = 2
⦿ Subtract from uncovered element and add in element that
covered twice
1 2 3 4 5
A 0 5 M 1 1
B 0 0 8 0 3
C 4 4 0 1 M
D 7 3 8 0 0
E 5 3 0 4 4
A 0 5 M 1 1
B 0 0 8 0 3
C 4 4 0 1 M
D 7 3 8 0 0
E 5 3 0 4 4
⦿ N= 4 ≠ number of rows
⦿ Select minimum uncovered element = 1
⦿ Subtract from uncovered element and add in element
that covered twice
1 2 3 4 5
A 0 4 M 0 0
B 1 0 9 0 2
C 4 3 0 0 M
D 8 3 9 0 0
E 5 2 0 3 3
A 0 4 M 0 0 A->1 8
B->2 9
C->4 6
B 1 0 9 0 2 D-> 5 7
E -> 3 10
-----------------------------
C 4 3 0 0 M cost = 40
D 8 3 9 0 0
E 5 2 0 3 3
example
• A solicitor firm employs typist on hours basis for their daily work. There
earlier understanding , only one job is given to one typist and typist is
paid for all hours even when he works for a fraction of an hour .find
D 4 10 J4=298
E 4 11 J5=178
199/12=17*5=85
P Q R S T
A 85 75 65 125 75
B 90 78 66 132 78
C 75 66 57 114 69
D 80 72 60 120 72
E 76 64 56 112 68