Sie sind auf Seite 1von 30

Dr.

CVCs Lecture Material

Assignment Problem

Dr. CVCs Lecture Material

Assignment Problem
Introduction: * It is a special kind of transportation problem

Dr. CVCs Lecture Material

* In this case each source should have the capacity to fulfill the demand of any of the destinations * In other words, each resource (workers) can be assigned to ONLY ONE job and each job required ONLY ONE resource. Assignment model consists of assignment of m resource (workers, salesperson etc.,) to m resources (jobs) so as to minimize the overall cost or time in such a way that one unit of resource is associated with one and only one job.

Examples: Row entry Jobs Operators Drivers Teacher Physician Salesman

Column entry Operations Machine Routes Subject Treatment Sales area

cell entry Processing time Processing time Travel time Student pass % No. of cases handled Time
Dr. CVCs Lecture Material

Types of assignment

Balanced and Unbalanced

Dr. CVCs Lecture Material

HUNGERIAN METHOD:

Developed and published by Harold Kuhn in 1955

He gave the name "Hungarian method" because the algorithm was largely
based on the earlier works of two Hungarian mathematicians:

Dnes Knig and Jen Egervry


Hungerian method can be applied to solve the assignment problem in an easy way It consists of two phases: First phase: Second phase: row reductions and column reductions are carried out The solution is optimized on iterative basis

Dr. CVCs Lecture Material

Dr. CVCs Lecture Material

Algorithms to solve assignment problems:

Phase I: Row and column reductions

Step 0: write down the cost matrix of the given assignment problem
Step 1: Write down the minimum value of each row on the right side of the matrix. Obtain the next matrix by subtraction these minimum values from the entries of the row respectively Step 2: Write down the minimum value of each column at the bottom of the matrix. Obtain the next matrix by subtracting the minimum value of each column from the entries of that column.

Now, the matrix is ready for phase 2

Dr. CVCs Lecture Material

Dr. CVCs Lecture Material

Phase II: Optimization of the problem Step 3: Draw a minimum number of lines to cover all the zeros of the matrix. The procedure for drawing minimum number of lines involves the following steps:

3.1 Row scanning: 1. Starting from the first row, scan each row one by one. If you come across exactly one zero, mark a square around that zero and draw a vertical line passing through that zero; otherwise skip that row. 2. After scanning the last row, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do column scanning as explained below.
3.2 Column scanning: 1. Starting from the first column, scan each row one by one. If you come across exactly one zero, mark a square around that zero and draw a horizontal line passing through that zero: otherwise skip that column. 2. After scanning the last column, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do row scanning as explained above.
Dr. CVCs Lecture Material

Dr. CVCs Lecture Material

Step 4: Check whether the number of squares marked is equal to the number of rows of the matrix. If yes, go to step 7; otherwise, go to step 5. Step 5: Identify the minimum value of the undeleted cell values. Obtain the next matrix by following the steps mentioned below. 5.1 Copy the entries on the lines but not on the intersection points of the present matrix as such without any modification to the corresponding positions of the next matrix. 5.2 Copy the entries at the intersection points of the present matrix after adding the minimum undeleted cell value to the corresponding positions of the next matrix. 5.3 Subtract the minimum undeleted cell value from all the undeleted cell values and then copy them to the corresponding positions of the next matrix. Step 6: Go to step 3.

Step 7: Treat the solution as marked by the squares as the optimal solution.
(Note: In performing step 3, sometimes it will repeat endlessly when the number of zeros in the applicable rows as well as columns is more than one. Under such situation, one should mark squares on diagonally opposite cells having zeros. This means multiple optimal solutions exist.)
Dr. CVCs Lecture Material

Consider a assignment problem as shown below. In this problem 5 different jobs are to be assigned to 5 different operators such that the total processing time is minimized. The matrix entries represent processing time in hours

1
2 3 4 5

10
7 13 12 8

12
16 14 10 13

15
14 7 11 15

12
14 9 13 11

8
1 9 10 15

Develop a zero-one programming model and solve the problem by Hungerian method

Dr. CVCs Lecture Material

Phase I: Row and column reductions Step 0: write down the cost matrix of the given assignment problem

1 1 2 3 4 5 10 7 13 12 8

2 12 16 14 10 13

3 15 14 7 11 15

4 12 14 9 13 11

5 8 1 9 10 15

Dr. CVCs Lecture Material

Phase I: Row and column reductions..

Dr. CVCs Lecture Material

Row Reduction
Step 1: Write down the minimum value of each row on the right side of the matrix. Obtain the next matrix by subtracting these minimum values from the entries of the row respectively Matrix after Row Reduction 1 1 2 3 4 10 7 13 12 2 12 16 14 10 3 15 14 7 11 4 12 14 9 13 5 8 1 9 10 Row Min. 8 7 7 10 1 2 3 4 1 2 0 6 2 2 4 9 7 0 3 7 7 0 1 4 4 7 2 3 5 0 4 2 0

13

15

11

15

Dr. CVCs Lecture Material

Phase I: Row and column reductions..

Dr. CVCs Lecture Material

Column Reduction
Step 2: Write down the minimum value of each column at the bottom of the matrix.
Obtain the next matrix by subtracting the minimum value of each column from the entries of that column. Matrix after Column Reduction

1
1 2

2
4

3
7

4
4

5 0 1 2 3 4 5

1 2 0 6 2 0

2 4 9 7 0 5

3 7 7 0 1 7

4 2 5 0 1 1

5 0 4 2 0 7

2
3 4 5 Column Min.

0
6 2 0 0

9
7 0 5 0

7
0 1 7 0

7
2 3 3 2

4
2 0 7 0

Now, the matrix is ready for phase 2

Dr. CVCs Lecture Material

Dr. CVCs Lecture Material

Phase II: Optimization of the problem Step 3: Draw a minimum number of lines to cover all the zeros of the matrix. The procedure for drawing minimum number of lines involves the following steps:

3.1 Row scanning: 1. Starting from the first row, scan each row one by one. If you come across exactly one zero, mark a square around that zero and draw a vertical line passing through that zero; otherwise skip that row. 2. After scanning the last row, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do column scanning as explained below.
3.2 Column scanning: 1. Starting from the first column, scan each row one by one. If you come across exactly one zero, mark a square around that zero and draw a horizontal line passing through that zero: otherwise skip that column. 2. After scanning the last column, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do row scanning as explained above.
Dr. CVCs Lecture Material

Phase II: Optimization of the problem

Dr. CVCs Lecture Material

Step 3: Draw a minimum number of lines to cover all the zeros of the matrix. 3.1 Row scanning: 1. Starting from the first row, scan each row one by one. If you come across exactly one zero, mark a square around that zero and draw a vertical line passing through that zero; otherwise skip that row.
1 1 2 2 0 2 4 9 3 7 7 4 2 5 5 0 4

3
4 5

6
2 0

7
0 5

0
1 7

0
1 1

2
0 7

X - Two zeros X - No zeros

2. After scanning the last row, check whether all the zeros are covered with lines. If yes, go to step 4; otherwise, do column scanning. 3.2 Column scanning:

Dr. CVCs Lecture Material

Dr. CVCs Lecture Material

Step 4: Check whether the number of squares marked is equal to the number of rows of the matrix. If yes, go to step 7; otherwise, go to step 5.

Number of square marked is 4 and is NOT EQUAL Number of rows (5) 5

1
2 3 4

2
0 6 2

4
9 7 0

7
7 0 1

2
5 0 1

0
4 2 0 Therefore, we have to follow step 5 Hence, the solution is NOT Feasible and Optimal

Dr. CVCs Lecture Material

Step 5: Identify the minimum value of the undeleted cell values. Obtain the next matrix by following the steps mentioned below.

Dr. CVCs Lecture Material

5.1 Copy the entries on the lines but not on the intersection points of the present matrix as such without any modification to the corresponding positions of the next matrix.

1
1 2

2
4

3
7

4
2

5 0 1

1
2

2
4

5 0

2
3

0
6

9
7

7
0

5
0

4
2

2
3

9
0 0

4
5

2
0

0
5

1
7

1
1

0
7

4
5

2
0

0
5

0
7

Minimum value of the undeleted cell value


Dr. CVCs Lecture Material

Dr. CVCs Lecture Material

5.2 Copy the entries at the intersection points of the present matrix after adding the minimum undeleted cell value to the corresponding positions of the next matrix. 5.3 Subtract the minimum undeleted cell value from all the undeleted cell value and then copy them to the corresponding positions of the next matrix.

1 1 2 3 4 5 2 0 6 2 0

2 4 9 7 0 5

3 7 7 0 1 7

4 2 5 0 1 1

5 0 4 2 0 7 1 2

1 2 0

2 4 9

3 6 6

4 1 4

5 0 4

3
4 5

7
2 0

8
0 5

0
0 6

0
0 0

3
0 7

Minimum value of the undeleted cell value

Step 6: Go to step 3.
Dr. CVCs Lecture Material

Dr. CVCs Lecture Material

Step 3: Draw a minimum number of lines to cover all the zeros of the matrix. 3.1 Row scanning: 3.2 Column scanning:

1 1 2 3 4 2 0 7 2

2 4 9 8 0

3 6 6 0 0

4 1 4 0 0

5 0 4 3 0

Row Min. 0 0 0 0 1 2 3 4 5

1 2 0 7 2 0

2 4 9 8 0 5

3 6 6 0 0 6

4 1 4 0 0 0

5 0 4 3 0 7

5
Column Min.

0
0

5
0

6
0

0
0

7
0

Dr. CVCs Lecture Material

Dr. CVCs Lecture Material

Step 4: Check whether the number of squares marked is equal to the number of rows of the matrix. If yes, go to step 7; otherwise, go to step 5.

Yes, Number of square marked (5) is equal to the number of rows. Hence, the solution is optimal and feasible.

Optimal solution
Job 1 Operator 5 Time (Hrs.) 8

2
3 4

1
3 2

7
7 10

11
43
Dr. CVCs Lecture Material

Total processing time

Assignment Problem
Example 2:

Assignment Problem
Example 3:

-22 -22 -24 -24

- 12 -6 - 0 - 8

- 0

- 10

- 8

- 4
- 4 - 10

- 0
- 12 0

- 12
- 6 - 4

- 12 -6 - 0 - 8

- 0 - 4

- 10 - 0 - 12

- 4 - 8 - 2 - 0

- 4
- 10

- 12 -6

- 0 - 4 - 4 - 10

- 10 - 0 - 12 0

- 4 - 8 - 2 - 0

- 0
- 8

Final Solution

Assignment Problem
Example 4:

Assignment Problem
Example 5:

Assignment Problem
Example 6:

First Assignment: Unit I and II Entry in each indicates the question number

Part / Roll No. Part A

1-11

12-22

23-33

33-43

44-54

55-65

Part B

Part C

Part D

Das könnte Ihnen auch gefallen