0% found this document useful (0 votes)
27 views33 pages

Unit - II - Assignment Problem

The assignment problem involves assigning a number of origins to an equal number of destinations at minimum cost, typically represented by a cost matrix. The Hungarian method is a computational procedure used to find the optimal assignment by modifying the cost matrix and covering zeros with lines. The document also discusses various types of assignment problems, including balanced and unbalanced problems, and provides examples with solutions.

Uploaded by

Seshaiah Turaka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views33 pages

Unit - II - Assignment Problem

The assignment problem involves assigning a number of origins to an equal number of destinations at minimum cost, typically represented by a cost matrix. The Hungarian method is a computational procedure used to find the optimal assignment by modifying the cost matrix and covering zeros with lines. The document also discusses various types of assignment problems, including balanced and unbalanced problems, and provides examples with solutions.

Uploaded by

Seshaiah Turaka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 33

ASSIGNMENT PROBLEM

DEFINITION :

The name “assignment problem” originates from the classical problems


. where the objective is to assign a no.of origins to equal no.of destinations at a minimum
cost or to assign the no.of jobs to equal no.of persons with a minimum profit.

MATHEMATICAL FORMATION OF ASSIGNMENT PROBLEM:

Suppose there are ‘n’ jobs to be performed and ‘n’ persons are
available for doing these jobs. Assume that each person can do each job .

Let Cij = the cost (payment) if the ith person is assigned to the jth job

The problem is to find as assignment problem so that the total cost for
performing all jobs is minimum.

EXAMPLES:

Further , such types of problems may consist of

a) Assigning men to offices


b) Classes to rooms
c) Drivers to trucks
d) Trucks to delivery routes
e) Problems to research teams etc.

TABLE REPRESENTATION:
The assignment problem can be stated in the form of
(n×m) cost matrix [ Cij ] of real numbers as given in the following table.

Jobs

1 2 3 …………….. j ………. n

1 C11 C12 C13 …………….. C1J ……….. C1n

2 C21 C22 C23 ….…………... C2J ……….. C2n

3 C31 C32 C33 ……………… C3J ………… C3n

. . . . .

. . . . .

. . . . .

. . . . .

i Ci1 Ci2 Ci3 …………….. Cij ………. Cin

. . . . .

. . . . .

. . . . .

n Cn1 Cn2 Cn3 …………… Cnj ……….. Cnn

Mathematically the assignment problem can be sated as minimize the total cost
n n
Z=∑ ∑ ❑Cij Xij ; i = 1,2, …..n ; j = 1,2,…..n 1
i=1 j=1

Subject to restrictions of the form

Xij = 1 If ith person is assigned to ith job

=0 If not

Σnj=1 Xij ( i.e one job is done by jth person ); j=1,2,……..n

Σni=1Xij ( i.e one job is done by ith person ); i=1,2,……..n

HUNGARIAN METHOD FOR ASSIGNMENT PROBLEM

ASSIGNMENT ALGORITHM

Various steps of the computational procedure for obtaining an


optimal assignment may be summarized as follows

Step-1: Subtract the minimum of each row of the effectiveness matrix , from all the
elements of the respective rows.

Step-2: further, modify the resulting matrix by subtracting the minimum element of
each column from all the elements of the respective coloumns . thus obtain the
1st modified matrx.

Step-3: Then, draw the minimum no.of horizontal and vertical lines to cover all the
zeros in the resulting matrix. Let the minimum no.of lines be ‘N’. now there
may be ‘2’ possibilities.
Case 1: If N=n , the no.of rows or columns of given matrix, then an optimum
assignment can be made. So, make the zero assignment to get the required
solution.

Case 2: If N<n , then proceed to step-4

Step-4: Determine the smallest element in the matrix, not covered by ‘N’ lines.
Subtract this minimum element from all uncovered elements. And add the
same element at the intersection of horizontal and vertical lines. Thus ,the 2nd
modified matrix is obtained.

Step-5: Again repeat steps-3 and 4 until minimum number of lines become equal to
the number of rows or columns of the given matrix. i.e N=n.

Step-6:

Zero assignment problem: Examine the rows successively until a row wise exactly
single ‘zero’ is found, mark this zero by ‘ ‘ to make the assignment.
Then, mark a cross( × ) over all zeros if lying in the column of the marked
‘’ zero , showing that they cannot be considered for further assignment.
Continue in this manner until all the rows have been examined. Repeat the
same procedure for columns also.

Step-7: Repeat the step-6 successively until one of the following situations a raise

Case1: If no unmarked zero is left , then the process ends.

Case2: If there lie more than one of the unmarked zeros in any column or
row ,then mark ‘ ’ one of the unmarked zeros orbitarily and mark a cross in ( ×
) in the cells of remaining zero’s in its row and coloumn.

Repeat the process until no unmarked zero is left in the matrix


Step-8: Thus exactly one marked ‘’ zero in each row and each column of the matrix is
obtained. The assignment corresponding to these marked ‘’ zeros will be give the
optimum assignment.

TYPES OF ASSIGNMENT PROBLEMS:

1) Balanced assignment problem


2) Unbalanced assignment problem

Minimum assignment problem:

A department head has 4 sub ordinates and 4 tasks have to be performed sub ordinates differ in
efficiently and tasks in their intrinsic difficulty time each men would take to perform each task is given
in the effectiveness matrix. How tasks should be allocated to each person so as to maximize the total
man hours.

Sub-ordinates

I II III IV

A 8 26 17 11
B 13 28 4 26
C 38 19 18 15
D 19 26 24 10
Solution:

Subtracting the smallest element in each row from every element of that row we get
the reduced matrix as follows

Sub-ordinates

I II III IV

A 0 18 9 3
B 9 24 0 22
C 23 4 3 0
D 9 16 14 0
Next subtract the smallest element from the every element of that column. We
get the reduced matrix as follows.

Sub ordinates

I II III IV

A 0 14 9 3
B 9 20 0 22
C 23 0 3 0
D 9 12 14 0

Sub ordinates

I II III IV

A 0 14 9 3
B 20 0 22 C
C 23 0 3 0
D 9 12 14 0

Since each row and each column has one and only one assignment and the
optimum solution has been reached

The optimal assignment schedule is given by

A → I

B → III

C → II

D → IV

The minimum total man-hours by using the Hungarian method for the
assignment schedule is given by

= 8+4+19+10

= 41 hours
PROBLEM 2: Solve the following assignment problem

1 2 3 4

A 18 26 17 11
B 13 28 14 26
C 38 19 18 5
D 19 26 24 10

Solution: subtract the minimum element in each rowfrom every element of that row we get
the reduced matrix as follows

1 2 3 4

A 7 15 6 O
B 0 15 1 13
C 23 4 3 0
D 9 16 14 0
Subtract the minimum element in each row from element of that column we get
the reduced matrix as follows

1 2 3 4

A 7 11 5 0
B 0 11 0 13
C 23 0 2 0
D 9 12 13 0
Draw the minimum number of lines to cover all the zeros at least once
1 2 3 4

A 7 11 5 0

B 0 11 0 13

C 23 C 0 2 0

D 9 12 13 0

N=3 ,n=4, N<n, 3<4

Since the minimum no.of lines drawn is less than the order of the matrix. Choose the smallest
element from the uncovered lines and subtract this element from all uncovered elements and add the
same element to all the elements lying at the intersection of the lines. We get the reduced matrix as
follows.

1 2 3 4

A 2 6 0 0

B 0 11 0 18

C 23 0 2 5

D 4 7 8 0

Since each row and each column has only one assignment and the optimum assignment solution has
been reached

The optimum assignment schedule is given by


A →3

B →1

C → 2

D→ 4

The minimum assignment cost for this assignment schedule is

17+13+19+10

=59

Problem 3:

Solve the assignment problem represented by the following matrix

a b c d e f

A 9 22 58 11 19 27
B 43 78 72 50 63 48

C 41 28 91 37 45 33

D 74 42 27 49 39 32
E 36 11 57 22 25 18

F 3 56 53 31 17 28

Solution:

Subtract the smallest element in each row from every element that row so we get reduced matrix as
follows
.a b c d e f

A 0 13 49 2 10 8

B 0 35 29 7 20 5

C 13 0 63 9 17 5

D 49 15 0 22 12 5

E 25 0 46 11 14 7

F 0 53 50 28 14 25

Subtract the smallest element in each column from every element in that column, we get the reduced
matrix as follows

.a b c d e f

A 0 13 49 0 0 13

B 0 35 29 5 10 0

C 13 0 63 7 7 0

D 47 15 0 20 2 0

E 25 0 46 9 4 2

F 0 53 50 26 4 20
Draw the minimum number of lines to cover at least once.
.a b c d e f

A 0 13 49 0 0 13
B 0 35 29 5 10 0

C 13 0 63 7 7 0

D 47 15 0 20 2 0

E 25 0 46 9 4 2

F 0 53 50 26 4 20

N=5, n=6, 5<6, N<n

Since the minimum no.of lines drawn is less than the order of the matrix

Choose the smallest element from the uncovered line and subtract this element from all uncovered
elements and add the same element to all the elements lying at the intersection of the lines. Thus, we
obtain the following new reduced matrix

.a b c d e f

A 4 17 49 0 0 17

B 0 35 25 1 6 0

C 13 0 59 3 3 0

D 51 19 0 20 2 4

E 25 0 42 5 0 2

F 0 53 46 22 0
20
Since each row and each column has only one assignment and the optimum solution has been
reached. The optimum assignment schedule is given by

A→d

B→f

C→b

D→c

E→e

F→a

The minimum assignment cost for this assignment schedule is given by

= 11+48+28+27+25+3

= 142

UNBALANCED PROBLEMS – MINIMUM ASSIGNMENT:

Problem1: A department head has 4 tasks to be performed and 3 subordinates. The subordinates differ in
efficiency of the time each subordinate would take to perform is given below in the atrix. How should be allocate
the tasks one to each men so as minimize the total men hours.

Men

1 2 3
I 9 26 15

II 13 27 6

III 35 20 15

IV 18 30 20

Solution: Here we have three sub ordinates who have to perform4 tasks so, the given problem is
unbalanced and therefore we add a “ dummy ” subordinate (column) with all its entries as zeros

The resulting balanced assignment problem as follows

1 2 3 4

I 9 26 15` 0

II 13 27 6 0

III 35 20 15 0

IV 18 30 20 0
Subtract the smallest element in each row from every element in that row. Then we get the row
reduced matrix as follows

1 2 3 4
I 9 26 15 0

II 13 27 6 0

III 35 20 15 0

IV 18 30 20 0
Subtract the smallest element in each column from every element in that column. Then we get the
column reduced matrix as follows

1 2 3 4

I 0 6 9 0

II 4 7 0 0

III 26 0 9 0

IV 9 10 14 0

1 2 3 4

I 0 6 9 0

II 4 7 0 0

III 26 0 9 0

IV 9 10 14 0

Since each row and each column has one and only zero assignment and the optimum solution
has been reached.

The optimum assignment schedule is given by


I→1

II → 3

III → 2

IV → 4

The minimum total man hours for this assignment schedule is given by

= 9+6+20+0

= 35

Problem 2:

Solve the assignment problem

R1 R2 R3 R4

C1 9 14 19 15

C2 7 17 20 19

C3 9 18 21 18

C4 10 12 18 19

C5 10 15 21 16
Solution: Here we have 5 rows and 4 columns so the given problem is un balanced assignment problem so
we add a “dummy “ columns problem is given by

R1 R2 R3 R4 R5
C1 9 14 19 15 0

C2 7 17 20 19 0

C3 9 18 21 18 0

C4 10 12 18 19 0

C5 10 15 21 16 0

Subtract the smallest element in each row from every element in that row then we get the row reduced
matrix as follows

R1 R2 R3 R4 R5

C1 9 14 19 15 0

C2 7 17 20 19 0

C3 9 18 21 18 0

C4 10 12 18 19 0

C4 10 15 21 16 0
Subtract the smallest element in each column from every element in that column then we get
the column reduced matrix

R1 R2 R3 R4 R5
C1 2 2 1 0 0

C2 0 5 2 4 0

C3 2 6 3 3 0

C4 3 0 0 4 0

C5 3 3 3 1 0
Draw the minimum no.of lines to cover at least once

R1 R2 R3 R4 R5

C1 2 2 1 0 0

C2 0 5 2 4 0

C3 2 6 3 3 0

C4 3 0 0 4 0

C5 3 3 3 1 0

N=4, n=5, 4<5 N<n

Since the minimum no of lines drawn is less than the order of two matrix element from all
uncovered elements and add the same element to all the elements lying at the intersection of the two
lines . thus we get the new reduced matrix as follows.

R1 R2 R3 R4 R5
C1 2 2 1 0 1

C2 0 5 2 4 1

C3 1 5 2 2 0

C4 3 0 0 4 1

C5 2 2 2 0 0

N=4, n=5, 4<5, N<n

Since the minimum no.of lines drawn is les than the order of the matrix .choose the smallest element
from all uncovered lines and subtract this from all uncovered elements and add the same element to all
the elements lying at the intersection of the lines. Thus we obtain the new reduced matrix as follows

R1 R2 R3 R4 R5

C1 1 1 0 0 1

C2 0 5 2 5 2

C3 0 4 1 2 0

C4 3 0 0 5 2

C5 1 1 1 0 0

The each row and each column has one and only one assignment and the optimum olution has been
reached.

The optimum assignment schedule is given by


C1 → R3

C2 → R1

C3 → R5

C4 → R2

C5 → R4

The minimum assignment cost for this assignment schedule is given y

= 19+7+0+12+16

MAXIMUM ASSIGNMENT PROBLEMS:

I - METHOD:

Problem: A marketing manager has 5 sales men and 5 sales districts considering the capabilities of the sales
man and the nature of districts. The marketing manager estimates the sales per month per each sales man in each
district would be as follows

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 problem of salesman to district that will results in a maximum sale.

Solution:
Since the given assignment problem is a maximum assignment problem converting this maximum
problem in to minimum problem.

Since the highest element is 41. so, subtracting all the elements from 41 then the following reduced
matrix is obtained.

A B C D E

1 9 3 1 13 1

2 1 17 13 20 5

3 0 14 8 11 4

4 19 3 0 5 5

5 12 8 1 6 2

Subtract the smallest element in each row from every element in that element in that respective
rows. Then, we get reduced matrix as follows.

A B C D E

8 2 0 12 0
1
2 0 16 12 19 4
3 0 14 8 11 4
4 19 3 0 5 5
5 11 7 0 5 1

Subtract the smallest element in each column from every element in that respective columns.
Then, we get reduced matrix as follows
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

1 8 0 0 7 2

2 0 14 12 14 4

3 0 12 8 6 4
4 19 1 0 0 5

5 11 5 0 0 1

N=4, n=5, 4<5,N<n

Since the no. of lines drawn is less than the order of the matrix

Choose the smallest element from the uncovered element and add the same element to all the elements
from all the uncovered elements and add the same element to all the elements lying at the intersection of the lines.
Thus, we obtain the following new reduced matrix s follows.
A B C D E

1 0 0 1 8 0
2 0 13 12 14 3
3 10 11 8 6 3

4 18 0 0 0 4
5 11 4 0 0 0

Since the minimum number of lines drawn is less than the oreder of the matrix. Choose the
smallest element from all the uncovered elements and add the same element to all the elements lying at the
intersection of the lines. Thus we obtain the following reduced matrix as follows.

A B C D E

1 12 0 1 8 0
2 0 10 9 11 0

3 0 4 5 3 0
4 22 0 0 0 4

5 14 4 0 0 0

Since each row and each column has one and only one assignment. And the optimum solution has
been obtained. The optimum solution has been obtained

The optimum assignment schedule is

1→B

2→A

3→E
4→ C

5→D

The maximum assignment scale for assignment schedule for the given assignment problem is
given by Maximize Z= 38+40+37+41+35

= 191

Problem 2: the captain of a cricket team has to allot ‘5’ middle batting positions to ‘5’ bats man. The average
runs scored by each bats man at this position are as follows

Bats man position

1 2 3 4 5

A 40 40 35 25 50

B 42 30 16 25 27

C 50 48 40 60 50

D 20 19 20 18 25

E 58 60 59 55 53

Find the assignment of bats man to batting positions which would gives the maximum no.of runs.

Solution: Since the given assignment problem is a maximum assignment problem. Converting this
maximum problem in to minimum problem.

Since the highest element is ‘60’. So,subtracting all the elements from ‘60’. Then the following
reduced matrix as follows.

A B C D E

A 20 20 25 35 10
B 18 30 44 35 33

C 10 12 20 0 10

D 40 41 40 42 35

E 2 0 1 5 7

Subtracting the smallest element in each row from every element in that respective rows. Then
we get the reduced matrix as follows

1 2 3 4 5

A 10 10 15 25 0
B 0 12 26 17 15

C 10 12 20 0 10
D 5 6 5 7 0

E 2 0 1 5 7

Subtracting the smallest element in each column from every element in that column. Then we
get the reduced matrix s follows

1 2 3 4 5
` A 10 10 14 25 0

B 0 12 25 17 15

C 10 12 19 0 10
D 05 06 04 7 0

E 2 0 0 5 7

since the minimum no of lines drawn is less than the order of the matrix.

Choose the smallest element from the uncovered lines and subtract this element from all
uncovered elements and add the same element to all the elements lying at the intersection of the lines. Thus we get
the reduced matrix as follows.

1 2 3 4 5

A 6 6 10 21 0
B 0 12 25 17 19
C 10 12 25 17 19

D 1 2 0 3 0
E 2 0 0 5 11

Since each row and each column has one and only one assignment and the optimum solution
has been reached.

The optimum assignment schedule is given by

A→5

B→1

C→4

D→3

E→2
The maximum runs for this assignment schedule is given by

= 50+42+60+20+60

= 232

Method II:

Problem: A company has 4 territories open and 4 sales man available for assignment. The territories are
not reach in their sales potential. It is estimated that a typical salesman operating in each territory would bring in
their annual sales as follows

I II III IV

A 42 35 28 21

B 30 25 20 15

C 30 25 20 15
D 24 20 16 12

If the criterion is maximum expected total sales then the initiative answer is to assign the best
sales man to the richest territory. The next salesman to the2nd richest and so on. Verify this answer by the
assignment technique.

Solution: the problem of maximizing can be converted in to minimization problem by simply multiplying the
each element of given matrix by –1. thus we get the resulting matrix as follows.

I II III IV

A --42 --35 --28 --21


B --30 --25 --20 --15
C --30 --25 --20 --15
D --24 --20 --16 --12
Subtract the smallest element in each element in each row from every element inthat rows. Thus , we
get the reduced matrix as follows.

I II III IV

A 0 7 14 21

B 0 5 10 15

C 0 5 10 15

D 0 4 8 12

Subtract the smallest element in each column from every element in that respective columns. Thus
we get the reduced matrix as follows

I II III IV

A 0 3 6 9
B 0 1 2 3

C 0 1 2 3
D 0 0 0 0

Since the minimum no.of lines less than the order of the matrix. Choose the smallest element from
the uncovered elements and the same element to all the elements lying at the intersection of thelines. Thus we get
the reduced matrix as follows.

I II III IV

A 0 2 5 8

B 0 0 1 2
C 0 0 1 2

D 1 0 0 0
Since the no.of lines is less than the order of the matrix. Choose the smallest element from the
uncovered lines and subtract this element from all the uncovered elements and the same element to all the elements
lying at the intersection of the lines. Thus, we get the reduced matrix as follows.

I II III IV

A 0 2 4 7
B 0 0 0 1
C 0 0 0 1
D 2 1 0 0

Since each row and each column has one and only assignment and the optimum has been
reached.

The optimum assignment schedule is given by

A→I

B → II

C → III

D → IV

The maximum sales for this assignment schedule is given by

= 42+25+20+12

= 99

Problem2: consider the problem of assigning four sales persons to 4 different regions of sales as shown below.
Such that the total sale is maximized
1 2 3 4

A 10 22 12 14
B 16 18 22 10

C 24 20 12 18

D 16 14 24 20

The cell entries represents annual sales figures in lakhs of rupees find the optimum allocation of
the sales person to different reigions.

Solution: the problem of maximization can be converted in to minimization by simply multiplying the each
element of given matrix by ‘--1’. Thus, the resulting matrix is as follows

1 2 3 4

1 --10 --22 --12 --14


2 --16 --22 --12 --14

3 --24 --20 --12 --18


4 --16 --14 --24 --20

Subtract the smallest element in each row from every element in that respective row. Then we get the
reduced matrix as follows.

1 2 3 4

1 12 0 10 8
2 6 4 0 12

3 0 4 12 6
4 8 10 0 4

Subtract the smallest element in each column from element in that respective column. Thus we get
the reduced matrix as follows.
1 2 3 4

1 12 0 10 4
2 6 4 0 8

3 0 4 12 2

4 8 10 0 0

Since each row and each column has one and only one assignment and the optimum solution has
been reduced

The optimum assignment schedule is given by

1→2

2→3

3→1

4→4

The maximum assignment sales for this assignment schedule is given by

= 22+22+24+20

=88

Special problem:

Find the minimum cost of solution for the following assignment problem

A B C D
1 4 5 3 4

2 1 4 --2 3

3 4 2 1 --5

Solution: since we have negative cost so add 5 to all costs so as to make them non-negative.

Min(--2,--5)= --5

A B C D

1 9 10 8 9

2 6 9 3 8
3 9 7 6 0
Since we have 3 rows and 4 columns so add a dummy row by taking its cost equals to zero , so as to
make the 4 persons.

A B C D

1 9 10 8 9
2 6 9 3 8
3 9 7 6 0
4 0 0 0 0
Subtract the smallest in each row from every element in that row thus we get reduced matrix as
follows.

A B C D

1 1 2 0 1
2 3 6 0 5

3 9 7 6 0
4 0 0 0 0
Subtract the smallest in each column from every element in that column thus we get reduced matrix
as follows.

A B C D

1 1 2 0 1

2 3 6 0 5
3 9 7 6 0

4 0 0 0 0

A B C D

1 1 2 0 1

2 3 6 0 5
3 9 7 6 0

4 0 0 0 0

Since the minimum no. of lines drawn is less than the order of the matrix .choose the smallest element
from uncovered element and subtract this element from all the uncovered elements and add element to the
intersection of the lines. Then we get the reduced matrix as follows.

A B C D
1 0 1 0 1
2 2 5 0 5

3 8 6 6 0

4 0 0 1 1

Since each row and column has one and only one assignment and the optimum solution has been
reached.

The optimum assignment schedule is given by

1→A

2→C

3→D

4→B

The minimum result for this assignment schedule is given by

= 9+3+0+0

= 12

You might also like