Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Chapter 1 Assignment Problems (DS) (1).pptx

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Assignment problem
Assignment problem
Wird geladen in …3
×

Hier ansehen

1 von 80 Anzeige

Weitere Verwandte Inhalte

Ähnlich wie Chapter 1 Assignment Problems (DS) (1).pptx (20)

Anzeige

Aktuellste (20)

Chapter 1 Assignment Problems (DS) (1).pptx

  1. 1. Assignment Problems
  2. 2. 2 Objectives After completion of this lesson you will be able to: • formulate the assignment problem • know Hungarian method to find proper assignment • employ Hungarian method to find proper assignment
  3. 3. 3 The Assignment Problem The Assignment Problem: Suppose we have n resources to which we want to assign to n tasks on a one-to-one basis. Suppose also that we know the cost of assigning a given resource to a given task. We wish to find an optimal assignment–one which minimizes total cost.
  4. 4. 4 Mathematical Model of Assignment Problem The Mathematical Model: Let 𝐶𝑖,𝑗 be the cost of assigning the 𝑖𝑡ℎresource to the 𝑗𝑡ℎ task. We define the cost matrix to be the n × n matrix C= 𝐶1,1 𝐶1,2 … … . 𝐶1,𝑛 𝐶2,1 𝐶2,2 … … 𝐶2,𝑛 … . . 𝐶𝑛,1 … . . 𝐶𝑛,1 … . 𝐶1,1 … … 𝐶𝑛,𝑛 An assignment is a set of n entry positions in the cost matrix, no two of which lie in the same row or column. The sum of the n entries of an assignment is its cost. An assignment with the smallest possible cost is called an optimal assignment.
  5. 5. 5 Mathematical Model of Assignment Problem The Mathematical Model: Mathematically, we can express the problem as follows: To Minimize z(cost)= 𝒊=𝟏 𝒏 𝒋=𝟏 𝒏 𝒄𝒊𝒋𝒙𝒊𝒋 ……… {i=1,2,3…….n , j=1,2,3…. n} Where 𝒙𝒊𝒋 = 1 ; 𝑖𝑓 𝑖𝑡ℎ 𝑝𝑒𝑟𝑠𝑜𝑛 𝑖𝑠 𝑎𝑠𝑠𝑖𝑔𝑛𝑒𝑑 𝑡𝑜 𝑗𝑡ℎ 𝑤𝑜𝑟𝑘 0 ; 𝑖𝑓 𝑖𝑡ℎ 𝑝𝑒𝑟𝑠𝑜𝑛 𝑖𝑠 𝑛𝑜𝑡 𝑎𝑠𝑠𝑖𝑔𝑛𝑒𝑑 𝑡𝑜 𝑗𝑡ℎ 𝑤𝑜𝑟𝑘 With the restrictions i) 𝒊=𝟏 𝒏 𝒙𝒊𝒋=1; j=1,2,….n, i.e. 𝑖𝑡ℎ 𝑝𝑒𝑟𝑠𝑜𝑛 will do only one work ii) 𝒋=𝟏 𝒏 𝒙𝒊𝒋=1; i=1,2,….n, i.e. 𝑗𝑡ℎ 𝑤𝑜𝑟𝑘 will be done only by one person.
  6. 6. 6 The Hungarian Method: The following algorithm applies the above theorem to a given n × n cost matrix to find an optimal assignment. Step 1. Subtract the smallest entry in each row from all the entries of its row. Step 2. Subtract the smallest entry in each column from all the entries of its column. Step 3. Draw lines through appropriate rows and columns so that all the zero entries of the cost matrix are covered and the minimum number of such lines is used. Step 4. Test for Optimality: (i) If the minimum number of covering lines is n, an optimal assignment of zeros is possible and we are finished. (ii) If the minimum number of covering lines is less than n, an optimal assignment of zeros is not yet possible. In that case, proceed to Step 5. Step 5. Determine the smallest entry not covered by any line. Subtract this entry from each uncovered row, and then add it to each covered column. Return to Step 3. The Hungarian Method
  7. 7. 7 Flowchart to solve Assignment Problem Start Prepare the Assignment Table Is it a balance Problem ? Add Dummy rows or columns It is a Maximization Problem ? Convert it into a minimization problem by subtracting all the elements from the largest element No No Yes Yes
  8. 8. 8 Flowchart to solve Assignment Problem Yes Obtain the reduced cost table. For this: 1) Subtract the Minimum element in each row from all the elements of that row and then 2) Subtract the Minimum element in each column from all the elements of that row and then Does the number of lines draw equal the order of the matrix ? Convert it Subtract the smallest uncovered element from all the uncovered elements. Add it to the elements that lies at the intersection of two lines. Keep the remaining elements unchanged in the revised cost table. No Draw minimum number of lines to cover all the zeroes in the table Optimum Solution is obtained Stop
  9. 9. 9 We must determine how jobs should be assigned to machines to minimize setup times, which are given below: Example 1 Job 1 Job 2 Job 3 Job 4 Machine 1 14 12 15 15 Machine 2 21 18 18 22 Machine 3 14 17 12 14 Machine 4 6 5 3 6
  10. 10. 10 Step 1: Find the minimum element in each row of the cost matrix. Form a new matrix by subtracting this cost from each row i.e. subtract 12 from 1st row, 18 from 2nd row, 12 from 3rd row and 3 from 4th row respectively Example 1 Job 1 Job 2 Job 3 Job 4 Machine 1 14 12 15 15 Machine 2 21 18 18 22 Machine 3 14 17 12 14 Machine 4 6 5 3 6 Job 1 Job 2 Job 3 Job 4 Machine 1 2 0 3 3 Machine 2 3 0 0 4 Machine 3 2 5 0 2 Machine 4 3 2 0 3 Row Reduction
  11. 11. 11 Step 2: Find the minimum element in each column of the cost matrix. Form a new matrix by subtracting this cost from each column i.e. subtract 2 from 1st col, 0 from 2nd col, 0 from 3rd col and 2 from 4th col respectively Example 1 Job 1 Job 2 Job 3 Job 4 Machine 1 2 0 3 3 Machine 2 3 0 0 4 Machine 3 2 5 0 2 Machine 4 3 2 0 3 Job 1 Job 2 Job 3 Job 4 Machine 1 0 0 3 1 Machine 2 1 0 0 2 Machine 3 0 5 0 0 Machine 4 1 2 0 1 Column Reduction
  12. 12. 12 Step 3: Cover all the zeroes of the matrix with the minimum number of horizontal or vertical lines. Example 1 Job 1 Job 2 Job 3 Job 4 Machine 1 0 0 3 1 Machine 2 1 0 0 2 Machine 3 0 5 0 0 Machine 4 1 2 0 1 1 2 3 4 Step 4: Since the minimal number of lines is 4, an optimal assignment of zeroes is possible. No. of Rows / Columns = No of Lines 4 = 4
  13. 13. 13 Step 5 : Once the No. of Rows / Columns = No of Lines conditions are satisfied Find out the optimum solution Process to Find out Optimum Solution: Select the row or column which contain exactly one zero If you found single zero in row then cut all the zeroes in their column and If you found single zero in Column then cut all the zeroes in row. In the given example it can be seen that there is single 0 in the row 4th and col 4th . If you select the 0 from row 4th then cancel all zeroes in the 3rd col. Example 1 Job 1 Job 2 Job 3 Job 4 Machine 1 0 0 3 1 Machine 2 1 0 0 2 Machine 3 0 5 0 0 Machine 4 1 2 1 0 Job 1 Job 2 Job 3 Job 4 Machine 1 0 0 3 1 Machine 2 1 0 0 2 Machine 3 0 5 0 0 Machine 4 1 2 1 0
  14. 14. 14 Similarly you can perform the operation for Remaining Matrix Example 1 Job 1 Job 2 Job 3 Job 4 Machine 1 0 3 1 Machine 2 1 0 2 Machine 3 0 5 0 Machine 4 1 2 1 0 0 0 0 Step 6: Once we perform the allocation final assignment is as follows Note: For Time Kindly check Original Matrix in given question Machine Jobs Time Machine 1 1 14 Machine 2 2 18 Machine 3 4 14 Machine 4 3 03 Total Time 49 Hrs
  15. 15. 15 Solve the following assignment problem for minimization Example 2 Job 1 Job 2 Job 3 Job 4 Job 5 Workers A 8 8 8 11 12 B 3 9 18 13 6 C 10 7 2 2 2 D 7 11 9 7 12 E 7 9 10 4 12
  16. 16. 16 Step 1: Find the minimum element in each row of the cost matrix. Form a new matrix by subtracting this cost from each row i.e. subtract 8 from 1st row, 3 from 2nd row, 2 from 3rd row, 7 from 4th row and 4 from 5th row respectively Example 2 Row Reduction Job 1 Job 2 Job 3 Job 4 Job 5 A 8 8 8 11 12 B 3 9 18 13 6 C 10 7 2 2 2 D 7 11 9 7 12 E 7 9 10 4 12 Job 1 Job 2 Job 3 Job 4 Job 5 A 0 0 0 3 4 B 0 6 15 10 3 C 8 5 0 0 0 D 0 4 2 0 5 E 3 5 6 0 8
  17. 17. 17 Step 2: Find the minimum element in each column of the cost matrix. Form a new matrix by subtracting this cost from each column i.e. subtract 0 from 1st col, 0 from 2nd col, 0 from 3rd col, 0 from 4th col and 0 from 5th respectively Example 2 Col Reduction Job 1 Job 2 Job 3 Job 4 Job 5 A 0 0 0 3 4 B 0 6 15 10 3 C 8 5 0 0 0 D 0 4 2 0 5 E 3 5 6 0 8 Job 1 Job 2 Job 3 Job 4 Job 5 A 0 0 0 3 4 B 0 6 15 10 3 C 8 5 0 0 0 D 0 4 2 0 5 E 3 5 6 0 8
  18. 18. 18 Step 3: Cover all the zeroes of the matrix with the minimum number of horizontal or vertical lines. Example 2 1 2 3 4 Step 4: Since the minimal number of lines is 4, and total number of rows/ columns are 5 hence we need to perform improvement. No. of Rows / Columns ≠ No of Lines 5 ≠ 4 ( Note: Kindly check the difference in Ex. 1 and Ex.2) Job 1 Job 2 Job 3 Job 4 Job 5 A 0 0 0 3 4 B 0 6 15 10 3 C 8 5 0 0 0 D 0 4 2 0 5 E 3 5 6 0 8
  19. 19. 19 Note: The numbers which are covered with the red lines are called as covered element and remaining are called as uncovered elements Step 5: Process for Improvement: Select the smallest no from all uncovered element. Subtract this smallest no from all uncovered elements and add only at intersection of two line are happened and keep all other covered element as it is. Example 2 1 2 3 4 Job 1 Job 2 Job 3 Job 4 Job 5 A 0 0 0 3 4 B 0 6 15 10 3 C 8 5 0 0 0 D 0 4 2 0 5 E 3 5 6 0 8 In the above example 2 can be subtracted from all uncovered elements and add only at cell A-Job1, A-job4, C-Job1 and C-Job 4.
  20. 20. 20 Improvement 1: Example 2 1 2 3 4 Job 1 Job 2 Job 3 Job 4 Job 5 A 0 0 0 3 4 B 0 6 15 10 3 C 8 5 0 0 0 D 0 4 2 0 5 E 3 5 6 0 8 In the above example 2 can be subtracted from all uncovered elements and add only at cell A-Job1, A-job4, C-Job1 and C-Job 4. Job 1 Job 2 Job 3 Job 4 Job 5 A 2 0 0 5 4 B 0 4 13 10 1 C 10 5 0 2 0 D 0 2 0 0 3 E 3 3 4 0 6 After Improvement Note: After Improvement start the repeat process with cover zeroes
  21. 21. 21 Improvement 1: Example 2 1 2 3 4 Since the minimal number of lines is 5, an optimal assignment of zeroes is possible. No. of Rows / Columns = No of Lines 5 = 5 Job 1 Job 2 Job 3 Job 4 Job 5 A 2 0 0 5 4 B 0 4 13 10 1 C 10 5 0 2 0 D 0 2 0 0 3 E 3 3 4 0 6 5
  22. 22. 22 Step 6 : Once the No. of Rows / Columns = No of Lines conditions are satisfied Find out the optimum solution Example 2 Job 1 Job 2 Job 3 Job 4 Job 5 A 2 0 5 4 B 4 13 10 1 C 10 5 0 2 D 0 2 0 3 E 3 3 4 6 0 0 0 0 0 Step 7: Once we perform the allocation final assignment is as follows Note: For Time Kindly check Original Matrix in given question Worker Jobs Time A 2 05 B 1 03 C 5 02 D 3 09 E 4 04 Total Time 23 Hrs
  23. 23. 23 Examples For Practice Solve the following assignment problem for minimization Machines 1 2 3 4 5 Jobs A 8 8 8 11 12 B 4 5 6 3 4 C 12 11 10 9 8 D 18 21 18 17 15 E 10 11 10 8 12 Job Machines A B C D E 1 2 3 4 5 30 37 40 28 40 40 24 27 21 36 40 32 33 30 35 25 38 40 36 36 29 62 41 34 39 Ans: 45 Hrs Note: You have to perform Improvement till the following condition has to be satisfied No of Rows/ Columns = No. of Lines Ans: 149 Hrs
  24. 24. 24 1) Unbalanced Problem 2) Multiple Optimum Solution 3) Maximization Problem 4) Prohibited Assignment Problem ( Restricted Problem) Special Cases in Assignment Problem
  25. 25. 25 1) Unbalanced Problem: When the number of rows is not equal to the number of columns it is called as an unbalanced assignment problem. Here we add required numbers of dummy rows or columns with all its element as 0, to the matrix so as to make it square matrix (i.e. balanced). Eg: Special Cases in Assignment Problem 1 2 3 4 5 6 A 12 10 15 22 18 8 B 10 18 25 15 16 12 C 11 10 3 8 5 9 D 6 14 10 13 13 12 E 8 12 11 7 13 10 1 2 3 4 5 6 A 12 10 15 22 18 8 B 10 18 25 15 16 12 C 11 10 3 8 5 9 D 6 14 10 13 13 12 E 8 12 11 7 13 10 F 0 0 0 0 0 0 As you can seen in the above example total number of rows are 5 and columns are 6 hence its is unbalanced problem. We can balance the problem after adding dummy row i.e. F with all its elements as ‘0’ After Balance
  26. 26. 26 Let consider the previous example after balancing the problem matrix look like this Example on Unbalanced Problem 1 2 3 4 5 6 A 12 10 15 22 18 8 B 10 18 25 15 16 12 C 11 10 3 8 5 9 D 6 14 10 13 13 12 E 8 12 11 7 13 10 1 2 3 4 5 6 A 12 10 15 22 18 8 B 10 18 25 15 16 12 C 11 10 3 8 5 9 D 6 14 10 13 13 12 E 8 12 11 7 13 10 F 0 0 0 0 0 0 Note: Before Solving any problem in assignment make sure that it has to be balance i.e. No of Rows = No of Columns if it is not then balance it. After Balance
  27. 27. 27 Example on Unbalanced Problem 1 2 3 4 5 6 A 12 10 15 22 18 8 B 10 18 25 15 16 12 C 11 10 3 8 5 9 D 6 14 10 13 13 12 E 8 12 11 7 13 10 F 0 0 0 0 0 0 Row Subtraction Step 1: Find the minimum element in each row of the cost matrix. Form a new matrix by subtracting this cost from each row i.e. subtract 8 from 1st row, 10 from 2nd row, 3 from 3rd row, 6 from 4th row ,7 from 5th row and 0 from th 6th row respectively 1 2 3 4 5 6 A 4 2 7 14 10 0 B 0 8 15 5 6 2 C 8 7 0 5 2 6 D 0 8 4 7 7 5 E 1 5 4 0 6 3 F 0 0 0 0 0 0
  28. 28. 28 Example on Unbalanced Problem Column Subtraction Step 2: Find the minimum element in each column of the cost matrix. Form a new matrix by subtracting this cost from each column. As you can seen in the matrix each column has smallest element is ‘0’ 1 2 3 4 5 6 A 4 2 7 14 10 0 B 0 8 15 5 6 2 C 8 7 0 5 2 6 D 0 8 4 7 7 5 E 1 5 4 0 6 3 F 0 0 0 0 0 0 1 2 3 4 5 6 A 4 2 7 14 10 0 B 0 8 15 5 6 2 C 8 7 0 5 2 6 D 0 8 4 7 7 5 E 1 5 4 0 6 3 F 0 0 0 0 0 0
  29. 29. 29 Example on Unbalanced Problem Step 3: Cover all the zeroes of the matrix with the minimum number of horizontal or vertical lines. 1 2 3 4 5 6 A 4 2 7 14 10 0 B 0 8 15 5 6 2 C 8 7 0 5 2 6 D 0 8 4 7 7 5 E 1 5 4 0 6 3 F 0 0 0 0 0 0 1 2 3 4 Step 4: Since the minimal number of lines is 5, and total number of rows/ columns are 6 hence we need to perform improvement. No. of Rows / Columns ≠ No of Lines 6 ≠ 5 5
  30. 30. 30 Example on Unbalanced Problem 1 2 3 4 5 6 A 4 2 7 14 10 0 B 0 8 15 5 6 2 C 8 7 0 5 2 6 D 0 8 4 7 7 5 E 1 5 4 0 6 3 F 0 0 0 0 0 0 1 2 3 4 Step 5: Process for Improvement: Select the smallest no from all uncovered element. Subtract this smallest no from all uncovered elements and add only at intersection of two line are happened and keep all other covered element as it is. In the given example 2 can be subtracted from all uncovered elements and add only at cell E1,E3,E6 and F1,F3,F6. Keep remaining covered element as it is 5
  31. 31. 31 Example on Unbalanced Problem 1 2 3 4 5 6 A 4 2 7 14 10 0 B 0 8 15 5 6 2 C 8 7 0 5 2 6 D 0 8 4 7 7 5 E 1 5 4 0 6 3 F 0 0 0 0 0 0 1 2 3 4 5 Improvement 1: 1 2 3 4 5 6 A 4 0 7 12 8 0 B 0 6 15 3 4 2 C 8 5 0 3 0 6 D 0 6 4 5 5 5 E 3 5 6 0 6 5 F 2 0 2 0 0 2 After Improvement Note: After Improvement start the repeat process with cover zeroes
  32. 32. 32 Example on Unbalanced Problem 1 2 3 4 5 Improvement 1: 1 2 3 4 5 6 A 4 0 7 12 8 0 B 0 6 15 3 4 2 C 8 5 0 3 0 6 D 0 6 4 5 5 5 E 3 5 6 0 6 5 F 2 0 2 0 0 2 Step 6: Since the minimal number of lines is 5, and total number of rows/ columns are 6 hence we need to perform improvement number 2. No. of Rows / Columns ≠ No of Lines 6 ≠ 5
  33. 33. 33 Example on Unbalanced Problem 1 2 3 4 5 Improvement 2: 1 2 3 4 5 6 A 4 0 7 12 8 0 B 0 6 15 3 4 2 C 8 5 0 3 0 6 D 0 6 4 5 5 5 E 3 5 6 0 6 5 F 2 0 2 0 0 2 Step 7: Process for Improvement: Select the smallest no from all uncovered element. Subtract this smallest no from all uncovered elements and add only at intersection of two line are happened and keep all other covered element as it is. In the given example 2 can be subtracted from all uncovered elements and add only at cell A1,A4,C1,C4,F2 and F4. Keep remaining covered element as it is
  34. 34. 34 Example on Unbalanced Problem 1 2 3 4 5 Improvement 2: 1 2 3 4 5 6 A 4 0 7 12 8 0 B 0 6 15 3 4 2 C 8 5 0 3 0 6 D 0 6 4 5 5 5 E 3 5 6 0 6 5 F 2 0 2 0 0 2 1 2 3 4 5 6 A 6 0 7 14 8 0 B 0 4 13 3 2 0 C 10 5 0 5 0 6 D 0 4 2 5 3 3 E 3 3 4 0 4 3 F 4 0 2 0 0 2 After Improvement Note: After Improvement start the repeat process with cover zeroes
  35. 35. 35 Example on Unbalanced Problem 1 2 3 4 5 Improvement 2: 1 2 3 4 5 6 A 6 0 7 14 8 0 B 0 4 13 3 2 0 C 10 5 0 5 0 6 D 0 4 2 5 3 3 E 3 3 4 0 4 3 F 4 0 2 0 0 2 6 Since the minimal number of lines is 6, an optimal assignment of zeroes is possible. No. of Rows / Columns = No of Lines 6 = 6
  36. 36. 36 Example on Unbalanced Problem Step 8 : Once the No. of Rows / Columns = No of Lines conditions are satisfied Find out the optimum solution 1 2 3 4 5 6 A 6 0 7 14 8 0 B 0 4 13 3 2 0 C 10 5 0 5 0 6 D 0 4 2 5 3 3 E 3 3 4 0 4 3 F 4 0 2 0 0 2 0 0 0 0 0 0 Step 9: Once we perform the allocation final assignment is as follows Note: For Time Kindly check Original Matrix in given question Worker Jobs Time A 2 10 B 6 12 C 3 03 D 1 06 E 4 13 F 5 00 Total Time 38 Hrs
  37. 37. 37 Step 8 : Once the No. of Rows / Columns = No of Lines conditions are satisfied Find out the optimum solution Example 2 Job 1 Job 2 Job 3 Job 4 Job 5 A 2 0 5 4 B 4 13 10 1 C 10 5 0 2 D 0 2 0 3 E 3 3 4 6 0 0 0 0 0 Step 7: Once we perform the allocation final assignment is as follows Note: For Time Kindly check Original Matrix in given question Worker Jobs Time A 2 05 B 1 03 C 5 02 D 3 09 E 4 04 Total Time 23 Hrs
  38. 38. 38 1) Unbalanced Problem Solve the following assignment problem ? Special Cases in Assignment Problem J O B S Workers M1 M2 M3 M4 A 17 23 27 31 B 7 12 16 18 C 9 14 18 21 J O B S Workers M1 M2 M3 M4 A 17 23 27 31 B 7 12 16 18 C 9 14 18 21 D 0 0 0 0 After Balance
  39. 39. 39 1) Unbalanced Problem Step 1: Row Subtraction Special Cases in Assignment Problem J O B S Workers M1 M2 M3 M4 A 17 23 27 31 B 7 12 16 18 C 9 14 18 21 D 0 0 0 0 After Row Subtraction J O B S Workers M1 M2 M3 M4 A 0 0 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0
  40. 40. 40 1) Unbalanced Problem Step 1: Column Subtraction Special Cases in Assignment Problem After Column Subtraction J O B S Workers M1 M2 M3 M4 A 0 0 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 J O B S Workers M1 M2 M3 M4 A 0 0 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0
  41. 41. 41 1) Unbalanced Problem Step 3 : Cover zeroes Special Cases in Assignment Problem No of Rows ≠ 𝑵𝒐 𝒐𝒇 𝑳𝒊𝒏𝒆𝒔 4 ≠ 3 J O B S Workers M1 M2 M3 M4 A 0 0 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 1 2 3
  42. 42. 42 1) Unbalanced Problem Improvement No. 1 Special Cases in Assignment Problem After Improvement J O B S Workers M1 M2 M3 M4 A 0 0 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 1 2 3 J O B S Workers M1 M2 M3 M4 A 5 0 10 14 B 0 0 4 6 C 0 0 4 7 D 0 0 0 0
  43. 43. 43 1) Unbalanced Problem Improvement No. 1 Special Cases in Assignment Problem No of Rows ≠ 𝑵𝒐 𝒐𝒇 𝑳𝒊𝒏𝒆𝒔 4 ≠ 3 1 2 3 J O B S Workers M1 M2 M3 M4 A 5 0 10 14 B 0 0 4 6 C 0 0 4 7 D 0 0 0 0
  44. 44. 44 1) Unbalanced Problem Improvement No. 2 Special Cases in Assignment Problem After Improvement 1 2 3 J O B S Workers M1 M2 M3 M4 A 5 0 10 14 B 0 0 4 6 C 0 0 4 7 D 0 0 0 0 J O B S Workers M1 M2 M3 M4 A 5 0 6 10 B 0 0 0 2 C 0 0 0 3 D 4 4 0 0
  45. 45. 45 1) Unbalanced Problem Improvement No. 2 Special Cases in Assignment Problem No. of Rows= No of line 4 = 4 2 1 3 J O B S Workers M1 M2 M3 M4 A 5 0 6 10 B 0 0 0 2 C 0 0 0 3 D 4 4 0 0 4
  46. 46. 46 1) Unbalanced Problem Optimum Solution Special Cases in Assignment Problem J O B S Workers M1 M2 M3 M4 A 5 0 6 10 B 0 0 0 2 C 0 0 0 3 D 4 4 0 0 0 0 0 0 0 0 Worker Jobs Time A M2 23 B M1 07 C M3 18 D M4 0 Total Time 48 Hrs Solution 1 Worker Jobs Time A M2 23 B M3 16 C M1 09 D M4 00 Total Time 48 Hrs Solution 2
  47. 47. 47 2) Multiple Optimum Solution After making the assignment (ie. after making the zeroes with square ) to the single unmarked in all possible rows and columns, it is found that the two or more rows or columns still contain more than one unmarked zeroes then the problem has multiple optimal solution. To get alternate solutions: i) Select the row or column containing maximum number of unmarked zeroes (after making assignments to the single unmarked zeroes.) ii) Select one of the zeros and mark it with a square ( ). iii) Cancel all other zeros in its row as well as column. iv) Proceed further in usual manner to make other assignments. v) Repeat the procedure by making assignment to each of the zeroes in the row or column selected in (i) above separately to get the alternate solutions. vi) All these alternate solutions gives the same optimal value. Special Cases in Assignment Problem
  48. 48. 48 As we can find that the given problem is un balanced ( No of Rows ≠ 𝑁𝑜 𝑜𝑓 𝐶𝑜𝑙𝑢𝑚𝑛𝑠) hence here we add dummy row i.e. D with all its element as ‘0’. Example On Multiple Optimum Solution Machine M1 M2 M3 M4 Jobs A 17 23 27 31 B 7 12 16 18 C 9 14 18 21 Machine M1 M2 M3 M4 Jobs A 17 23 27 31 B 7 12 16 18 C 9 14 18 21 D 0 0 0 0
  49. 49. 49 Example On Multiple Optimum Solution Step 1: Find the minimum element in each row of the cost matrix. Form a new matrix by subtracting this cost from each row i.e. subtract 17 from 1st row, 7 from 2nd row, 9 from 3rd row and 0 from 4th row respectively Machine M1 M2 M3 M4 Jobs A 17 23 27 31 B 7 12 16 18 C 9 14 18 21 D 0 0 0 0 Machine M1 M2 M3 M4 Jobs A 0 6 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 Row Reduction
  50. 50. 50 Example On Multiple Optimum Solution Step 2: Find the minimum element in each column of the cost matrix. Form a new matrix by subtracting this cost from each column i.e. subtract 0 from 1st col, 0 from 2nd col, 0 from 3rd col, and 0 from 4th respectively Machine M1 M2 M3 M4 Jobs A 0 6 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 Machine M1 M2 M3 M4 Jobs A 0 6 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 Column Reduction
  51. 51. 51 Example On Multiple Optimum Solution Machine M1 M2 M3 M4 Jobs A 0 6 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 Step 3: Cover all the zeroes of the matrix with the minimum number of horizontal or vertical lines. 1 2 Step 4: Since the minimal number of lines is 5, and total number of rows/ columns are 6 hence we need to perform improvement number 1. No. of Rows / Columns ≠ No of Lines 4 ≠ 𝟐
  52. 52. 52 Example On Multiple Optimum Solution Machine M1 M2 M3 M4 Jobs A 0 6 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 1 2 Step 5: Process for Improvement: Select the smallest no from all uncovered element. Subtract this smallest no from all uncovered elements and add only at intersection of two line are happened and keep all other covered element as it is. In the above example 5 can be subtracted from all uncovered elements and add only at cell D-M1
  53. 53. 53 Example On Multiple Optimum Solution Machine M1 M2 M3 M4 Jobs A 0 6 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 1 2 Step 5: Process for Improvement: Select the smallest no from all uncovered element. Subtract this smallest no from all uncovered elements and add only at intersection of two line are happened and keep all other covered element as it is. In the above example 5 can be subtracted from all uncovered elements and add only at cell D-M1
  54. 54. 54 Example On Multiple Optimum Solution Machine M1 M2 M3 M4 Jobs A 0 6 10 14 B 0 5 9 11 C 0 5 9 12 D 0 0 0 0 1 2 Improvement No 1 Machine M1 M2 M3 M4 Jobs A 0 1 5 9 B 0 0 4 6 C 0 0 4 7 D 5 0 0 0 Improvement No 1 Note: After Improvement start the repeat process with cover zeroes
  55. 55. 55 Example On Multiple Optimum Solution 1 2 Improvement No 1 Machine M1 M2 M3 M4 Jobs A 0 1 5 9 B 0 0 4 6 C 0 0 4 7 D 5 0 0 0 3 Step 6: Since the minimal number of lines is 3, and total number of rows/ columns are 4 hence we need to perform improvement number 2. No. of Rows / Columns ≠ No of Lines 4 ≠ 𝟑
  56. 56. 56 Example On Multiple Optimum Solution 1 2 Improvement No 2 Machine M1 M2 M3 M4 Jobs A 0 1 5 9 B 0 0 4 6 C 0 0 4 7 D 5 0 0 0 3 Step 7: Process for Improvement: Select the smallest no from all uncovered element. Subtract this smallest no from all uncovered elements and add only at intersection of two line are happened and keep all other covered element as it is. In the given example 4 can be subtracted from all uncovered elements and add only at cell D-M1 and D-M2. Keep remaining covered element as it is
  57. 57. 57 Example On Multiple Optimum Solution 1 2 Improvement No 2 Machine M1 M2 M3 M4 Jobs A 0 1 5 9 B 0 0 4 6 C 0 0 4 7 D 5 0 0 0 3 Machine M1 M2 M3 M4 Jobs A 0 1 1 5 B 0 0 0 2 C 0 0 0 3 D 9 4 0 0 Improvement No 2 Note: After Improvement start the repeat process with cover zeroes
  58. 58. 58 Example On Multiple Optimum Solution 1 2 Improvement No 2 3 Machine M1 M2 M3 M4 Jobs A 0 1 1 5 B 0 0 0 2 C 0 0 0 3 D 9 4 0 0 4 Since the minimal number of lines is 4, an optimal assignment of zeroes is possible. No. of Rows / Columns = No of Lines 4 = 4
  59. 59. 59 Example On Multiple Optimum Solution Machine M1 M2 M3 M4 Jobs A 0 1 1 5 B 0 0 0 2 C 0 0 0 3 D 9 4 0 0 Step 6 : Once the No. of Rows / Columns = No of Lines conditions are satisfied Find out the optimum solution 0 0 As you can seen in above matrix we did not find the single ‘0’ either in row or column. Such type of problem has multiple solution (i.e. More than one solution) Note: Multiple Optimum Solution problem can be identified only at the time of final allocation
  60. 60. 60 Example On Multiple Optimum Solution Machine M1 M2 M3 M4 Jobs A 0 1 1 5 B 0 0 0 2 C 0 0 0 3 D 9 4 0 0 Here Job B can be assigned to either Machine M2 or M3. If you assign Job B to Machine M2 then Job C can be assigned to M3 or you can assign Job B to Machine M3 and Job C can be assigned to M2. This can be represented in and 0 0 0 0 0 0
  61. 61. 61 Example On Multiple Optimum Solution Machine M1 M2 M3 M4 Jobs A 0 1 1 5 B 0 0 0 2 C 0 0 0 3 D 9 4 0 0 0 0 0 0 0 0 Step 7: Once we perform the allocation final assignment is as follows Jobs Machine Time A M1 17 B M2 12 C M3 18 D M4 00 Total Time 47 Hrs Solution No-1 Jobs Machine Time A M1 17 B M3 16 C M2 14 D M4 00 Total Time 47 Hrs Solution No-2
  62. 62. 62 Examples For Practice Q. Solve the following assignment problem for minimization Ans: 55 Hrs Note: You have to perform Improvement till the following condition has to be satisfied No of Rows/ Columns = No. of Lines Ans: 32 Hrs Worker A B C D E Jobs I 16 13 17 19 20 II 14 12 13 16 17 III 14 11 12 17 18 IV 5 5 8 8 11 V 5 3 8 8 10 Q. In a particular plant there are 4 machines to be installed. There are 5 vacant places available. The costs of installation of machines at different vacant places are given in the following table. Find the optimum assignment. Places Machines A B C D E M1 9 11 15 10 11 M2 12 9 10 15 9 M3 10 13 14 11 7 M4 14 8 12 7 8
  63. 63. 63 3) Maximization Problem Hungarian method can be used for maximization problem as follows: converting it into equivalent minimization problem as follows: i) Convert the given profit matrix into relative loss matrix. By subtracting all its element from the largest element including it. ii) Add a dummy row or column to it ( with 0 unit profit for its cells) if necessary. iii) Locate the largest per unit profit figure in the table and subtract all profit figure ( including itself ) from it to get an equivalent relative loss matrix. iv) Solve it further as a normal Hungarian method to get optimum assignment v) To find the total maximum profit consider the original profit elements for the respective assignment. Maximization Keyword: Profit, Sales, Production, Revenue Minimization Keyword:- Loss, Time, Space, Expenditure, Cost, Defects Special Cases in Assignment Problem
  64. 64. 64 Ques. The data given in the table refer to production in certain units: Solve the following assignment problem Example on Maximization Problem OPE RAT OR MACHINES A B C D 1 10 5 7 8 2 11 4 9 10 3 8 4 9 7 4 7 5 6 4 5 8 9 7 5 As we can find out that the given problem is not balanced. Hence here we add dummy column i.e E with all its element as ‘0’ Note: Before Solving any problem in assignment make sure that it has to be balance i.e. No of Rows = No of Columns if it is not then balance it.
  65. 65. 65 Step 1: Balance the given problem Example on Maximization Problem Note: Before Solving any problem in assignment make sure that it has to be balance i.e. No of Rows = No of Columns if it is not then balance it. After Balance A B C D 1 10 5 7 8 2 11 4 9 10 3 8 4 9 7 4 7 5 6 4 5 8 9 7 5 A B C D E 1 10 5 7 8 0 2 11 4 9 10 0 3 8 4 9 7 0 4 7 5 6 4 0 5 8 9 7 5 0
  66. 66. 66 Step 2: To solve the maximization problem first it has to be converted in to minimization by subtracting all its element from the largest element. In given problem the largest element in matrix is 11 hence we can subtract all the element from 11 Example on Maximization Problem Once the problem is convert into minimization remaining process is same as we have done in earlier examples Maximization to Minimization A B C D E 1 1 6 4 3 11 2 0 7 2 1 11 3 3 7 2 4 11 4 4 6 5 7 11 5 3 2 4 6 11 A B C D E 1 10 5 7 8 0 2 11 4 9 10 0 3 8 4 9 7 0 4 7 5 6 4 0 5 8 9 7 5 0
  67. 67. 67 Step 3: Find the minimum element in each row of the cost matrix. Form a new matrix by subtracting this cost from each row i.e. subtract 1 from 1st row, 0 from 2nd row, 2 from 3rd row, 4 from 4th row and 2 from 5th row respectively. Example on Maximization Problem A B C D E 1 1 6 4 3 11 2 0 7 2 1 11 3 3 7 2 4 11 4 4 6 5 7 11 5 3 2 4 6 11 A B C D E 1 0 5 3 2 10 2 0 7 2 1 11 3 1 5 0 2 9 4 0 2 1 3 7 5 1 0 2 4 9 Row Subtraction
  68. 68. 68 Step 4: Find the minimum element in each column of the cost matrix. Form a new matrix by subtracting this cost from each column. i.e. subtract 0 from 1st col, 0 from 2nd col, 0 from 3rd col, 1 from 4th col and 7 from 5th row respectively. Example on Maximization Problem A B C D E 1 0 5 3 2 10 2 0 7 2 1 11 3 1 5 0 2 9 4 0 2 1 3 7 5 1 0 2 4 9 Column Subtraction A B C D E 1 0 5 3 1 3 2 0 7 2 0 4 3 1 5 0 1 2 4 0 2 1 2 0 5 1 0 2 3 2
  69. 69. 69 Step 5: Cover all the zeroes of the matrix with the minimum number of horizontal or vertical lines Example on Maximization Problem 1 3 2 A B C D E 1 0 5 3 1 3 2 0 7 2 0 4 3 1 5 0 1 2 4 0 2 1 2 0 5 1 0 2 3 2 4 5 Step 6: Since the minimal number of lines is 4, and total number of rows/ columns are 5 hence an optimal assignment of zeroes is possible. No. of Rows / Columns = No of Lines 5 = 5
  70. 70. 70 Example on Maximization Problem Step 7 : Once the No. of Rows / Columns = No of Lines conditions are satisfied Find out the optimum solution 0 0 A B C D E 1 0 5 3 1 3 2 0 7 2 4 3 1 5 0 1 2 4 0 2 1 2 0 5 1 2 3 2 0 0 0 Step 8: Once we perform the allocation final assignment is as follows Note: For Time Kindly check Original Matrix in given question Operator Machine Production 1 A 10 2 D 10 3 C 09 4 E 00 5 B 09 Total Time 38
  71. 71. 71 Q.1 The following table gives the profit of assignment in Rupees. Also give the optimal profit. Examples For Practice on Maximization Ans: 280 Jobs J1 J2 J3 J4 J5 M1 50 60 40 30 45 M2 35 55 45 55 40 M3 40 45 50 35 35 M4 60 40 55 40 30 M5 45 35 45 50 55 Q.2 The marketing director of a multi unit company is faced with a problem of assigning 5 senior managers to 6 zones. From past experience he knows that the efficiency percentage judged by sales, operating cost etc.. depends on manager zone combination. The efficiency of different managers is given below M A N A G E R ZONES 1 2 3 4 5 6 A 73 91 87 82 78 80 B 81 85 69 76 74 85 C 75 72 83 84 78 91 D 93 96 86 91 83 82 E 90 91 79 89 69 76 Find out which zone will be managed by a junior manager due to non-availability of a senior manager
  72. 72. 72 4) Prohibited Assignment Problem: • A prohibited assignment problem is a problem which contains one or more constraints. It is also know as restricted assignment problem. Suppose in case 𝑖𝑡ℎ person is restricted to perform 𝑗𝑡ℎ then constrained assignment occur in the cell (i,j) of the cost matrix. This are indicated by putting a dash (-) or cross (x) at the positions. To solve the problem: i) For minimization problem we assume ( +M or + ∞ ) for the prohibited positions and solve further as usual. ii) For maximization problem we assume ( -M or - ∞ ) for the prohibited positions and solve further as usual. This are indicated by : -, X, M, ∞ Eg. Special Cases in Assignment Problem Clerk s Jobs A B C D 1 4 7 8 6 2 * 8 7 4 3 3 * 8 3 4 6 6 4 2 As it can be seen in the given example clerk 2 is not able to perform job A and clerk 3 is not able to perform job B hence there is no point to assign Job A and Job to Clerk 1 and 2 respectively that’s why it can be denoted as *
  73. 73. 73 Step 1: Find the minimum element in each row of the cost matrix. Form a new matrix by subtracting this cost from each row i.e. subtract 4 from 1st row, 4 from 2nd row, 3 from 3rd row and 2 from 4th row respectively. Example on Prohibited Roots Clerks Jobs A B C D 1 4 7 8 6 2 * 8 7 4 3 3 * 8 3 4 6 6 4 2 Row Reduction Clerks Jobs A B C D 1 0 3 4 2 2 * 4 3 0 3 0 * 5 0 4 4 4 2 0
  74. 74. 74 Step 2: Find the minimum element in each column of the cost matrix. Form a new matrix by subtracting this cost from each column i.e. subtract 0 from 1st col, 3 from 2nd col, 2 from 3rd col and 0 from 4th col respectively Example on Prohibited Roots Column Reduction Clerks Jobs A B C D 1 0 3 4 2 2 * 4 3 0 3 0 * 5 0 4 4 4 2 0 Clerks Jobs A B C D 1 0 0 2 2 2 * 1 1 0 3 0 * 3 0 4 4 1 0 0
  75. 75. 75 Step 3: Cover all the zeroes of the matrix with the minimum number of horizontal or vertical lines. Example on Prohibited Roots Clerks Jobs A B C D 1 0 0 2 2 2 * 1 1 0 3 0 * 3 0 4 4 1 0 0 1 2 3 4 Step 4: Since the minimal number of lines is 4, and total number of rows/ columns are 4 hence we need to perform improvement. No. of Rows / Columns = No of Lines 4 = 4
  76. 76. 76 Step 8 : Once the No. of Rows / Columns = No of Lines conditions are satisfied Find out the optimum solution Example on Prohibited Roots Clerks Jobs A B C D 1 0 0 2 2 2 * 1 1 0 3 0 * 3 0 4 4 1 0 0 0 Step 9: Once we perform the allocation final assignment is as follows Note: For Time Kindly check Original Matrix in given question Clerks Jobs Time 1 B 07 2 D 04 3 A 03 4 C 04 Total Time 18 Hrs 0 0 0
  77. 77. 77 Q.1 Solve the following assignment problem Examples For Practice on Prohibited Roots Ans: 66 PER SON JOBS J1 J2 J3 J4 J5 P1 27 18 * 20 21 P2 31 24 21 12 17 P3 20 17 20 * 16 P4 20 28 20 16 27 Q.2 Solve the following assignment problem Task Machines X Y X W P A 19 21 25 20 21 B 27 24 * 25 24 C * 24 27 24 20 D 22 16 20 15 16
  78. 78. 78 Extra Problems for Practice Q.1 Solve the following assignment problem: 1 2 3 4 5 A 4 6 10 5 6 B 7 4 8 5 4 C 12 6 9 6 2 D 9 3 7 2 3 E 6 5 5 3 8 Q.2 Five jobs are to be assigned to five persons A,B,C,D, E, The time taken (in Minutes) by each of them on each job is given below. Workout the optimal assignment as the minimum total time taken. Jobs 1 2 3 4 5 Perso n A 16 13 17 19 20 B 14 12 13 16 17 C 14 11 12 17 18 D 5 5 8 8 11 E 3 3 8 8 10 Q.3 Solve the following assignment problem and obtain minimum cost that job can be performed 1 2 3 4 5 A 25 18 32 20 21 B 34 25 21 12 17 C 20 17 20 32 16 D 20 28 20 16 27
  79. 79. 79 • Assigning teaching fellows to time slots • Assigning airplanes to flights • Assigning project members to tasks • Determining positions on a team • Assigning brides to grooms (once called the marriage problem) • Machine allocation for optimum space utilization Applications of AP
  80. 80. 80 1. A job assignment problem is unbalanced when A) Each worker can perform only one job B) A worker can not perform all the jobs but can do only some of the jobs C) The number of jobs and the number of workers are the same D) The number of jobs is not same as the number of workers Multiple Choice Questions 2. In case multiple zeroes are obtained in all rows and columns A) No solution is possible for the problem B) A unique solution is exist for the problem C) The problem has infeasible solutions D) The problem has multiple solutions 3. Balancing of an unbalanced assignment problem involve A) The introduction of dummy column B) The introduction of dummy row C) The introduction of dummy row or a dummy column D) All the above 4. In assignment problem at what condition optimum solution is occurred A) No of rows / columns = no of lines B) No of rows = no of columns C) No of rows / columns ≠ no of lines D) No of the above

×