0% found this document useful (0 votes)
2 views

Module V

The document outlines the mathematical model for solving the assignment problem, which is a specific case of the transportation problem. It details the Hungarian method for finding optimal assignments and provides examples of both balanced and unbalanced assignment problems. The document also discusses the implications of multiple optimal solutions and strategies for maximizing and minimizing costs in assignments.

Uploaded by

pratickbajaj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Module V

The document outlines the mathematical model for solving the assignment problem, which is a specific case of the transportation problem. It details the Hungarian method for finding optimal assignments and provides examples of both balanced and unbalanced assignment problems. The document also discusses the implications of multiple optimal solutions and strategies for maximizing and minimizing costs in assignments.

Uploaded by

pratickbajaj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Module V

Assignment Problem
1 2 3 4

J1 5 9 3 6 Minimize Cij X ij
J2 8 7 8 2
X
j
ij =1 i
J3 6 10 12 7

J4 3 10 8 6
X
i
ij =1 j

X ij = 0,1
Xij = 1, if Job i goes to person j
Mathematical model of assignment problem
Assignment Problem is a special case of Transportation Problem
with m = n; and ai = bj = 1

Minimize Cij X ij

Xj
ij =1 i

X
i
ij =1 j

X ij = 0,1
1 2 3 4

J1 5 9 3 6
The solution of assignment
J2 8 7 8 2 problem provides:

J3 6 10 12 7 n2 variables
2n constraints
J4 3 10 8 6 n allocations at optimum.

It shows Assignment Problem as a degenerate transportation


problem as m = n and ai = bj = 1.
Hungarian method for solving assignment problem
1 2 3 4
Cij  0
J1 5 9 3 6

So, if we get feasible


J2 8 7 8 2
solution with z=0, the
solution obtained is
J3 6 10 12 7 optimal.
For obtaining row
J4 3 10 8 6 and column zero,
we subtract row and
By obtaining row and column zero, we change column minimum
objective function but optimal solution remains respectively.
same.
Row Minimum Column Minimum
1 2 3 4 1 2 3 4

J1 2 6 0 3 J1 2 2 0 3

J2 6 5 6 0 J2 6 1 6 0

J3 0 4 6 1 J3 0 0 6 1

J4 0 7 5 3 J4 0 3 5 3
1 2 3 4

J1 2 2 0 3

J2 6 1 6 0

J3 0 0 6 1

J4 0 3 5 3
1 2 3 4 1 2 3 4

J1 5 9 3 6 J1 2 2 0 3
J2 8 7 8 2 J2 6 1 6 0
J3 6 10 12 7 J3 0 0 6 1
J4 3 10 8 6 J4 0 3 5 3

So, Z = 3 + 2 + 10 + 3 = 18
Example - 2

1 2 3 4 5

J1 11 7 10 17 10

J2 13 21 7 11 13

J3 13 13 15 13 14

J4 18 10 13 16 14

J5 12 8 16 19 10
Row Minimum

1 2 3 4 5

J1 4 0 3 10 3

J2 6 14 0 4 6

J3 0 0 2 0 1

J4 8 0 3 6 4

J5 4 0 8 11 2
Column Minimum

1 2 3 4 5

J1 4 0 3 10 2

J2 6 14 0 4 5

J3 0 0 2 0 0

J4 8 0 3 6 3

J5 4 0 8 11 1
1. Tick an unassigned row
4 0 3 10 2 2. If a ticked row has a zero, then
tick the corresponding column.
6 14 0 4 5
3. If a ticked column has an
assignment, then tick the
0 0 2 0 0
corresponding row.
8 0 3 6 3 4. Repeat step 2 & 3 till no more ticking
is possible.
4 0 8 11 1 5. Draw lines through unticked rows
and ticked columns. The number of
lines represent the maximum number
of assignments possible.
1. Put minimum number that have no
lines, say θ
4 0 3 10 2
2. Add θ, if two lies pass through
it.
6 14 0 4 5
3. Subtract θ, if no lines pass
0 0 2 0 0 through it.
4. No change in value if one line
8 0 3 6 3 pass through it.

4 0 8 11 1
4 0 3 10 2 3 0 2 9 1

6 14 0 4 5 6 15 0 4 5
0 0 2 0 0 0 1 2 0 0
8 0 3 6 3
7 0 2 5 2
4 0 8 11 1
3 0 7 10 0

1. Put minimum number that have no 3. Subtract θ, if no lines pass


lines, say θ = 1 through it.
2. Add θ, if two lies pass through 4. No change in value if one line
it. pass through it.
1. Tick an unassigned row
3 0 2 9 1
2. If a ticked row has a zero, then
6 15 0 4 5 tick the corresponding column.
3. If a ticked column has an
assignment, then tick the
0 1 2 0 0
corresponding row.
4. Repeat step 2 & 3 till no more ticking
7 0 2 5 2 is possible.
5. Draw lines through unticked rows
3 0 7 10 0 and ticked columns. The number of
lines represent the maximum number
of assignments possible.
3 0 2 9 1 2 0 1 8 0

6 15 0 4 5 6 16 0 4 5

0 1 2 0 0 0 2 2 0 0

7 0 2 5 2 6 0 1 4 1

3 0 7 10 0 3 1 7 10 0
3. Subtract θ, if no lines pass
1. Put minimum number that have no through it.
lines, say θ = 1 4. No change in value if one line
2. Add θ, if two lies pass through it. pass through it.
2 0 1 8 0 1. Tick an unassigned row

2. If a ticked row has a zero, then


6 16 0 4 5 tick the corresponding column.
3. If a ticked column has an
0 2 2 0 0 assignment, then tick the
corresponding row.

6 0 1 4 1 4. Repeat step 2 & 3 till no more ticking


is possible.
5. Draw lines through unticked rows
3 1 7 10 0 and ticked columns. The number of
lines represent the maximum number
of assignments possible.
2 0 1 8 0 1 0 0 7 0

6 16 0 4 5 6 17 0 4 5

0 2 2 0 0 0 3 2 0 0

6 0 1 4 1 5 0 0 3 1

3 1 7 10 0 2 1 6 9 0

3. Subtract θ, if no lines pass


1. Put minimum number that have no through it.
lines, say θ = 1 4. No change in value if one line
2. Add θ, if two lies pass through it. pass through it.
1 0 0 7 0 1. Tick an unassigned row

2. If a ticked row has a zero, then


6 17 0 4 5 tick the corresponding column.
3. If a ticked column has an
0 3 2 0 0 assignment, then tick the
corresponding row.

5 0 0 3 1 4. Repeat step 2 & 3 till no more ticking


is possible.
5. Draw lines through unticked rows
2 1 6 9 0 and ticked columns. The number of
lines represent the maximum number
of assignments possible.
1 0 0 7 0 0 0 0 6 0

6 17 0 4 5 5 17 0 3 5

0 4 3 0 0
0 3 2 0 0
4 0 0 2 1
5 0 0 3 1
1 1 6 8 0
2 1 6 9 0

3. Subtract θ, if no lines pass


1. Put minimum number that have no through it.
lines, say θ = 1 4. No change in value if one line
2. Add θ, if two lies pass through it. pass through it.
0 0 0 6 0 11 7 10 17 10

5 17 0 3 5 13 21 7 11 13

0 4 3 0 0 13 13 15 13 14

4 0 0 2 1 18 10 13 16 14

1 1 6 8 0 12 8 16 19 10

So, Z = 11 + 7 + 13 + 10 + 10 = 51
Multiple Optimal Solution

3 1 1 4

4 2 2 5

5 3 4 8

4 2 5 9
Row Minimum Column Minimum

2 0 0 3 0 0 0 0

2 0 0 3 0 0 0 0

2 0 1 5 0 0 1 2

2 0 3 7 0 0 3 4
0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 1 2 0 0 1 2

0 0 3 4 0 0 3 4
1. Tick an unassigned row

0 0 0 0 2. If a ticked row has a zero, then


tick the corresponding column.
0 0 0 0 3. If a ticked column has an
assignment, then tick the
corresponding row.
0 0 1 2
4. Repeat step 2 & 3 till no more ticking
is possible.
0 0 3 4
5. Draw lines through unticked rows
and ticked columns. The number of
lines represent the maximum number
of assignments possible.
Maximization case

Maximize Minimize
3 1 1 4 -3 -1 -1 -4

4 2 2 5 -4 -2 -2 -5

5 3 4 8 -5 -3 -4 -8

4 2 5 9 -4 -2 -5 -9
Unbalanced Assignment Problem
Balanced Assignment Problem

5 9 3 5 9 3 0

8 7 8 8 7 8 0

6 10 12 6 10 12 0

3 10 8 3 10 8 0
Unbalanced Assignment Problem Balanced Assignment Problem

5 9 3 6 5 9 3 6

8 7 8 2 8 7 8 2

6 10 12 7 6 10 12 7

0 0 0 0
Restrictions on assignment problem

5 9 3 6 5 9 3 6

8 7 8 2 8 7 8 2

6 10 12 7 6 10 M 7

3 10 8 6 3 10 8 6
Traveling Salesman Problem

2 4 1-2-3-4-5-1

1 5
Traveling Salesman Problem

2 4 1-2-4-5-3-1

1 5
Traveling Salesman Problem

2 4 1-2-3-4-5

1 5
1 2 3 4 5
1 - 10 8 9 7
Branch &
2 10 - 10 5 6
Bound 3 8 10 - 8 9
Algorithm 4 9 5 8 - 6
5 7 6 9 6 -

31
1 2 3 4 5
1 - 10 8 9 7
2 10 - 10 5 6
3 8 10 - 8 9
4 9 5 8 - 6
5 7 6 9 6 -

C12 = 10 + 5 + 31
8 + 6 + 6= 35

35
1 2 3 4 5
1 - 10 8 9 7
2 10 - 10 5 6
3 8 10 - 8 9
4 9 5 8 - 6
5 7 6 9 6 -

C13 = 8 + 5 + 8 31
+ 5 + 6= 32

35 32
1 2 3 4 5
1 - 10 8 9 7
2 10 - 10 5 6
3 8 10 - 8 9
4 9 5 8 - 6
5 7 6 9 6 -

C14 = 9 + 6 + 8 31
+ 5 + 6= 34

35 32 34
1 2 3 4 5
1 - 10 8 9 7
2 10 - 10 5 6
3 8 10 - 8 9
4 9 5 8 - 6
5 7 6 9 6 -

C13 = 7 + 5 + 8 31
+ 5 + 6= 31

35 32 34 31
1 2 3 4 5 31
1 - 10 8 9 7

2 10 - 10 5 6 34 31
35 32
3 8 10 - 8 9

4 9 5 8 - 6

5 7 6 9 6 -
1 2 3 4 5
1 - 10 8 9 7 31
2 10 - 10 5 6
3 8 10 - 8 9
4 9 5 8 - 6 34 31
35 32
5 7 6 9 6 -

1-5-2
2 3 4 2 3 4
36
3 10 - 8 3 10 - 8
4 5 8 - 4 5 8 -
5 6 9 6 5 - 9 6 C15-21 = 7 + 10 + 8 + 5 + 6= 36
1 2 3 4 5
1 - 10 8 9 7 31
2 10 - 10 5 6
3 8 10 - 8 9
4 9 5 8 - 6 34 31
35 32
5 7 6 9 6 -

1-5-2-3
1 2 4 1 2 4
36 36
3 8 10 8 3 8 - 8
4 9 5 - 4 9 5 -
5 7 6 6 5 7 6 6 C15-23 = 7 + 10 + 8 + 5 + 6= 36
1 2 3 4 5
1 - 10 8 9 7 31
2 10 - 10 5 6
3 8 10 - 8 9
4 9 5 8 - 6 34 31
35 32
5 7 6 9 6 -

1-5-2-4
1 2 3 1 2 3
36 36 34
3 8 10 - 3 8 10 -
4 9 5 8 4 9 - 8
5 7 6 9 5 7 6 9 C15-24 = 7 + 5 + 8 + 8 + 6= 34
1 2 3 4 5
1 - 10 8 9 7
2 10 - 10 5 6
3 8 10 - 8 9 31
4 9 5 8 - 6
5 7 6 9 6 - X13 = 1
34 31
35
32
X21 = 1 X25 = 1 34
X24 = 1 36
36
1 2 3 4 5 31
1 - 10 8 9 7
X13 = 1
2 10 - 10 5 6
34 31
3 8 10 - 8 9 35
4 9 5 8 - 6 32
X21 = 1 X25 = 1 34
5 7 6 9 6 -
X24 = 1 36
36
1-3-2 37
2 4 5 2 4 5
3 10 8 9 3 - 8 9
4 5 - 6 4 5 - 6
5 6 6 - 5 6 6 -
C13-21 = 8 + 10 + 8 + 5 + 6= 37
1 2 3 4 5 31
1 - 10 8 9 7
X13 = 1
2 10 - 10 5 6
34 31
3 8 10 - 8 9 35
4 9 5 8 - 6 32
X21 = 1 X25 = 1 34
5 7 6 9 6 -
X24 = 1 36
36
1-3-2-4 37 33
1 2 5 1 2 5
3 8 10 9 3 8 10 9
4 9 5 6 4 9 - 6
5 7 6 - 5 7 6 - C13-24 = 8 + 5 + 8 + 6 + 6= 33
1 2 3 4 5 31
1 - 10 8 9 7
X13 = 1
2 10 - 10 5 6
34 31
3 8 10 - 8 9 35
4 9 5 8 - 6 32
X21 = 1 X25 = 1 34
5 7 6 9 6 -
X24 = 1 36
36
1-3-2-5 37 33 33
1 2 4 1 2 4
3 8 10 8 3 8 10 8
4 9 5 - 4 9 5 -
5 7 6 6 5 7 - 6 C13-25 = 8 + 6 + 8 + 5 + 6= 33
1 2 3 4 5 31
1 - 10 8 9 7
X13 = 1
2 10 - 10 5 6
34 31
3 8 10 - 8 9 35
4 9 5 8 - 6 32
X21 = 1 X25 = 1 34
5 7 6 9 6 -
X24 = 1 36
36
1 2 3 4 5 37 33 33
1 - 10 8 9 7 X34 = 1
X32 = 1 X35 = 1
2 10 - 10 5 6 X32 = 1
3 8 10 - 8 9
4 9 5 8 - 6
5 7 6 9 6 -
1 2 3 4 5 31
1 - 10 8 9 7
X13 = 1
2 10 - 10 5 6
34 31
3 8 10 - 8 9 35
4 9 5 8 - 6 32
X21 = 1 X25 = 1 34
5 7 6 9 6 -
X24 = 1 36
36
1-3-2-4-5-1 = 8+10+5+6+7 = 36 37 33 33
1-3-5-2-4-1 = 8+9+6+5+9 = 37 X32 = 1 X35 = 1 X34 = 1
X32 = 1
36 37
1-3-2- 1-3-5- 1-3-2- 1-3-4-
4-5-1 2-4-1 2-5-1
1 2 3 4 5 31
1 - 10 8 9 7
X13 = 1
2 10 - 10 5 6
34 31
3 8 10 - 8 9 35
4 9 5 8 - 6 32
X21 = 1 X25 = 1 34
5 7 6 9 6 -
X24 = 1 36
36
1-3-2-5-4-1 = 8+10+6+6+9 = 39 37 33 33
1-3-4-2-5-1 = 8+8+5+6+7 = 34 X32 = 1 X35 = 1 X34 = 1
X32 = 1
36 37 39 34
So, the optimal route is 1-3-2- 1-3-5- 1-3-2- 1-3-4-
1-3-4-2-5-1 with cost 34 4-5-1 2-4-1 2-5-1

You might also like