Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Assignment ProblemsCompiled By: Group cSandeep Amin
The Hungarian method is acombinatorial optimization algorithm whichsolves the assignment problem inpolynomial time and whi...
Suppose there are two machines in the press and twooperators are engaged at different rates to operatethem. Which operator...
Phase 1: Row and column  reductionsStep 0: Consider the given cost matrixStep 1: Subtract the minimum value of eachrow fro...
The Hungarian Method Consider the assignment problem:                                     Row                       Job   ...
Step 1: From each entry of a row, we subtractthe minimum value in that row and get thefollowing reduced cost matrix:      ...
Step 2: From each entry of a column, wesubtract the minimum value in that columnand get the following reduced cost matrix:...
Step 3: Now we test whether an assignmentcan be made as follows. If such an assignmentis possible, it is the optimal assig...
Step 3(a) gives the following table.        2       0      0       1        2       1      0       0        2       3     ...
Step 3(b) gives the following table.       2       0      0       1       2       1      0       0       2       3      0 ...
If there is now a surrounded zero in each rowand each column, the optimal assignment isobtained.In our example, there is a...
If the final stage is reached (that is all thezeros are either surrounded or crossed) andif there is no surrounded zero in...
Since the problem is unbalanced, we add adummy worker 4 with cost 0 and get thefollowing starting cost matrix:            ...
3     1    4     0        1     2    3     0        1     0    2     1        0     0    0     0Now Step 2 is Not needed. ...
3      1     4     0        1      2     3     0        1      0     2     1        0      0     0     0Now all the zeros ...
Step 4(b) Select the smallest element, say, u, fromamong all elements uncovered by all the lines.In our example, u = 1Step...
Doing this, we get the table:         2       1      3       0         0       2      2       0         0       0      1  ...
Step 5: Reapply Step 3.We thus get the table                          2   1   3   0                          0   2   2   0...
MAXIMIZATION TYPE•Hungarian method is valid for balanced &minimization type•The  assignment problem can be convertedto min...
Consider the assignment problem  •Efficiencyof each professor to teach each  subject as follow :                     SUBJE...
Since the problem is unbalanced, we add a dummy professor D with cost 0 and get the following starting cost matrix:       ...
OPPORTUNITY LOSS MATRIX •Subtracting all the element of the matrix from the largest element that is 16 •We get this table ...
APPLY HUNGARIAN METHODApply Step 1 ,step 2 is not needed  Doing this, we get the table:                                  S...
NOW SUBTRACT MINIMUM ELEMENT FROM ALL UNCOVERED ELEMENTS BUT ADD THIS TO ALL ELEMENTS THAT LIE AT THE INTERSECTION OF     ...
Doing this, we get the table:                        SUBJECT                   1       2        3   4                    5...
•The  Optimal assignment is• Professor     Subject        Efficiency•   A             3             9•   B             4  ...
THANK YOU
Quantitative Analysis For Decision Making
Prochain SlideShare
Chargement dans…5
×

Quantitative Analysis For Decision Making

2 310 vues

Publié le

Hungarian Method To know Which Operator should operate which machine to maximise profit

  • Identifiez-vous pour voir les commentaires

Quantitative Analysis For Decision Making

  1. 1. Assignment ProblemsCompiled By: Group cSandeep Amin
  2. 2. The Hungarian method is acombinatorial optimization algorithm whichsolves the assignment problem inpolynomial time and which anticipated laterprimal-dual methods. It was developed andpublished by Harold Kuhn in 1955, who gavethe name "Hungarian method" because thealgorithm was largely based on the earlierworks of two Hungarian mathematicians:Dénes Kőnig and Jenő Egerváry.
  3. 3. Suppose there are two machines in the press and twooperators are engaged at different rates to operatethem. Which operator should operate which machine formaximizing profit?Similarly, if there are n machines available and npersons are engaged at different rates to operate them.Which operator should be assigned to which machine toensure maximum efficiency?While answering the above questions we have to thinkabout the interest of the press, so we have to find suchan assignment by which the press gets maximum profiton minimum investment.Such problems are known as "assignment problems"
  4. 4. Phase 1: Row and column reductionsStep 0: Consider the given cost matrixStep 1: Subtract the minimum value of eachrow from the entries of that row, to obtainthe next matrix.Step 2: Subtract the minimum value of eachcolumn from the entries of that column , toobtain the next matrix.Treat the resulting matrix as the input forphase 2.
  5. 5. The Hungarian Method Consider the assignment problem: Row Job Min 1 2 3 4 1 8 6 5 7 p1 = 5 2 6 5 3 4 p2 = 3Worker 3 7 8 4 6 p3 = 4 4 6 7 5 6 p4 = 5
  6. 6. Step 1: From each entry of a row, we subtractthe minimum value in that row and get thefollowing reduced cost matrix: 3 1 0 2 3 2 0 1 3 4 0 2 1 2 0 1Column q1=1 q2=1 q3=0 q4=1Minimum
  7. 7. Step 2: From each entry of a column, wesubtract the minimum value in that columnand get the following reduced cost matrix: 2 0 0 1 2 1 0 0 2 3 0 1 0 1 0 0
  8. 8. Step 3: Now we test whether an assignmentcan be made as follows. If such an assignmentis possible, it is the optimal assignment.•Examine the first row. If there is only one zeroin that row, then make an ( ) and cross ( )all the other zeros in the column passingthrough the surrounded zero and draw avertical line on that column•Then starting with the first column if there isone zero then make an ( ) cross all the zeroin that row & draw horizontal line on that rowcont till all zero are crossed or even assignment
  9. 9. Step 3(a) gives the following table. 2 0 0 1 2 1 0 0 2 3 0 1 0 1 0 0Step 3(b): Now repeat the above procedure forcolumns. (Remember to interchange row andcolumn in that step.)
  10. 10. Step 3(b) gives the following table. 2 0 0 1 2 1 0 0 2 3 0 1 0 1 0 0
  11. 11. If there is now a surrounded zero in each rowand each column, the optimal assignment isobtained.In our example, there is a surrounded zero ineach row and each column and so the optimalassignment is: HrsWorker 1 is assigned to Job 2 = 6Worker 2 is assigned to Job 4 = 4Worker 3 is assigned to Job 3 = 4Worker 4 is assigned to Job 1 = 6 Minimum total time = 20 hrs The optimal solution is unique
  12. 12. If the final stage is reached (that is all thezeros are either surrounded or crossed) andif there is no surrounded zero in each rowand column, it is not possible to get theoptimal solution at this stage. We have to dosome more work. Again we illustrate with anumerical example.Solve the following unbalanced assignmentproblem (Only one job to one man and onlyone man to one job): 7 5 8 4 5 6 7 4 8 7 9 8
  13. 13. Since the problem is unbalanced, we add adummy worker 4 with cost 0 and get thefollowing starting cost matrix: Job Row Min 7 5 8 4 p1=4Worker 5 6 7 4 p2=4 8 7 9 8 p3=7 0 0 0 0 p4=0 Dummy Applying Step 1, we get the reduced cost matrix
  14. 14. 3 1 4 0 1 2 3 0 1 0 2 1 0 0 0 0Now Step 2 is Not needed. We now applyStep 3(a) and get the following table.
  15. 15. 3 1 4 0 1 2 3 0 1 0 2 1 0 0 0 0Now all the zeros are either surrounded orcrossed but there is no surrounded zero inRow 2. Hence assignment is NOT possible.We go to Step 4.
  16. 16. Step 4(b) Select the smallest element, say, u, fromamong all elements uncovered by all the lines.In our example, u = 1Step 4(c) Now subtract this u from all uncoveredelements but add this to all elements that lie at theintersection of two lines 3 1 4 0 1 2 3 0 1 0 2 1 0 0 0 0
  17. 17. Doing this, we get the table: 2 1 3 0 0 2 2 0 0 0 1 1 0 1 0 1
  18. 18. Step 5: Reapply Step 3.We thus get the table 2 1 3 0 0 2 2 0 0 0 1 1 0 1 0 1Thus the optimum allocation is:W1 → J4 W2 → J1 W3 → J2 W4 → J3Hence Job 3 is not done by any (real) worker.And the optimal cost = 4+5+7+0 = 16 The optimal assignment is unique
  19. 19. MAXIMIZATION TYPE•Hungarian method is valid for balanced &minimization type•The assignment problem can be convertedto minimization by finding the opportunityloss•The opportunity loss matrix is found bysubtracting all the element of the matrix fromthe largest element
  20. 20. Consider the assignment problem •Efficiencyof each professor to teach each subject as follow : SUBJECT 1 2 3 4 10 5 9 15 AProfessor 6 - 3 12 B C 16 8 5 9Find which professor to be assigned to which subject sothat total efficiency can be maximize . (-) indicates thatprofessor b cannot be assigned to sub 2 also find sub forwhich we do not have professor
  21. 21. Since the problem is unbalanced, we add a dummy professor D with cost 0 and get the following starting cost matrix: SUBJECT 1 2 3 4 10 5 9 15 AProfessor B 6 - 3 12 C 16 8 5 9 0 0 0 0 Dummy D
  22. 22. OPPORTUNITY LOSS MATRIX •Subtracting all the element of the matrix from the largest element that is 16 •We get this table SUBJECT 1 2 3 4 6 11 7 1 AProfessor 10 - 13 4 B C 0 8 11 7 D 16 16 16 16
  23. 23. APPLY HUNGARIAN METHODApply Step 1 ,step 2 is not needed Doing this, we get the table: SUBJECT 1 2 3 4 A 5 10 6 0Professor B 6 - 6 0 C 0 8 11 7 0 0 0 0 DComplete assignment is not formed
  24. 24. NOW SUBTRACT MINIMUM ELEMENT FROM ALL UNCOVERED ELEMENTS BUT ADD THIS TO ALL ELEMENTS THAT LIE AT THE INTERSECTION OF TWO LINES SUBJECT 1 2 3 4 A 5 10 6 0Professor B 6 - 6 0 C 0 8 11 7 0 0 0 0 D
  25. 25. Doing this, we get the table: SUBJECT 1 2 3 4 5 4 0 0 A 6 - 3 0Professor B 0 2 5 7 C 6 0 0 6 D Complete assignment is formed
  26. 26. •The Optimal assignment is• Professor Subject Efficiency• A 3 9• B 4 12• C 1 16• D 2 0•Maximum total efficiency 37•The optimal assignment is unique•Subject 2 is not assigned to any professor
  27. 27. THANK YOU

×