SlideShare a Scribd company logo
1 of 28
Download to read offline
Assignment Problems
Compiled By: Group c
Sandeep Amin
The Hungarian method is a
combinatorial optimization algorithm which
solves the assignment problem in
polynomial time and which anticipated later
primal-dual methods. It was developed and
published by Harold Kuhn in 1955, who gave
the name "Hungarian method" because the
algorithm was largely based on the earlier
works of two Hungarian mathematicians:
Dénes Kőnig and Jenő Egerváry.
Suppose there are two machines in the press and two
operators are engaged at different rates to operate
them. Which operator should operate which machine for
maximizing profit?
Similarly, if there are n machines available and n
persons are engaged at different rates to operate them.
Which operator should be assigned to which machine to
ensure maximum efficiency?
While answering the above questions we have to think
about the interest of the press, so we have to find such
an assignment by which the press gets maximum profit
on minimum investment.
Such problems are known as "assignment problems"
Phase 1: Row and column
reductions
Step 0: Consider the given cost matrix
Step 1: Subtract the minimum value of each
row from the entries of that row, to obtain
the next matrix.
Step 2: Subtract the minimum value of each
column from the entries of that column , to
obtain the next matrix.
Treat the resulting matrix as the input for
phase 2.
The Hungarian Method
Consider the assignment problem:
8 6 5 7
6 5 3 4
7 8 4 6
6 7 5 6
Row
Min
p1 = 5
p2 = 3
p3 = 4
p4 = 5
Worker
Job
1
1
2
2
3
3
4
4
Step 1: From each entry of a row, we subtract
the minimum value in that row and get the
following reduced cost matrix:
3 1 0 2
3 2 0 1
3 4 0 2
1 2 0 1
Column
Minimum
q1=1 q2=1 q3=0 q4=1
Step 2: From each entry of a column, we
subtract the minimum value in that column
and get the following reduced cost matrix:
2 0 0 1
2 1 0 0
2 3 0 1
0 1 0 0
Step 3: Now we test whether an assignment
can be made as follows. If such an assignment
is possible, it is the optimal assignment.
•Examine the first row. If there is only one zero
in that row, then make an ( ) and cross ( )
all the other zeros in the column passing
through the surrounded zero and draw a
vertical line on that column
•Then starting with the first column if there is
one zero then make an ( ) cross all the zero
in that row & draw horizontal line on that row
cont till all zero are crossed or even assignment
Step 3(a) gives the following table.
2 0 0 1
2 1 0 0
2 3 0 1
0 1 0 0
Step 3(b): Now repeat the above procedure for
columns. (Remember to interchange row and
column in that step.)
Step 3(b) gives the following table.
2 0 0 1
2 1 0 0
2 3 0 1
0 1 0 0
If there is now a surrounded zero in each row
and each column, the optimal assignment is
obtained.
Worker 1 is assigned to Job 2 = 6
Worker 2 is assigned to Job 4 = 4
Worker 3 is assigned to Job 3 = 4
Worker 4 is assigned to Job 1 = 6
Minimum total time = 20 hrs
The optimal solution is unique
In our example, there is a surrounded zero in
each row and each column and so the optimal
assignment is: Hrs
If the final stage is reached (that is all the
zeros are either surrounded or crossed) and
if there is no surrounded zero in each row
and column, it is not possible to get the
optimal solution at this stage. We have to do
some more work. Again we illustrate with a
numerical example.
Solve the following unbalanced assignment
problem (Only one job to one man and only
one man to one job): 7 5 8 4
5 6 7 4
8 7 9 8
Since the problem is unbalanced, we add a
dummy worker 4 with cost 0 and get the
following starting cost matrix:
7 5 8 4
5 6 7 4
8 7 9 8
0 0 0 0
Applying Step 1, we get the reduced cost
matrix
p1=4
p2=4
p3=7
p4=0 Dummy
Row Min
Worker
Job
3 1 4 0
1 2 3 0
1 0 2 1
0 0 0 0
Now Step 2 is Not needed. We now apply
Step 3(a) and get the following table.
3 1 4 0
1 2 3 0
1 0 2 1
0 0 0 0
Now all the zeros are either surrounded or
crossed but there is no surrounded zero in
Row 2. Hence assignment is NOT possible.
We go to Step 4.
3 1 4 0
1 2 3 0
1 0 2 1
0 0 0 0
Step 4(b) Select the smallest element, say, u, from
among all elements uncovered by all the lines.
In our example, u = 1
Step 4(c) Now subtract this u from all uncovered
elements but add this to all elements that lie at the
intersection of two lines
2 1 3 0
0 2 2 0
0 0 1 1
0 1 0 1
Doing this, we get the table:
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 1
Thus the optimum allocation is:
W1 → J4 W2 → J1 W3 → J2 W4 → J3
And the optimal cost = 4+5+7+0 = 16
Hence Job 3 is not done by any (real) worker.
The optimal assignment is unique
MAXIMIZATION TYPE
•Hungarian method is valid for balanced &
minimization type
•The assignment problem can be converted
to minimization by finding the opportunity
loss
•The opportunity loss matrix is found by
subtracting all the element of the matrix from
the largest element
•Efficiency of each professor to teach each
subject as follow :
Consider the assignment problem
A
B
C
Professor
SUBJECT
1 2 3 4
Find which professor to be assigned to which subject so
that total efficiency can be maximize . (-) indicates that
professor b cannot be assigned to sub 2 also find sub for
which we do not have professor
10 5 9 15
6 - 3 12
16 8 5 9
10 5 9 15
6 - 3 12
16 8 5 9
0 0 0 0
Since the problem is unbalanced, we add a
dummy professor D with cost 0 and get the
following starting cost matrix:
A
B
C
D
Professor
1 2 3
4
SUBJECT
Dummy
OPPORTUNITY LOSS MATRIX
•Subtracting all the element of the matrix
from the largest element that is 16
•We get this table
6 11 7 1
10 - 13 4
0 8 11 7
16 16 16 16
A
B
C
D
Professor
1 2 3 4
SUBJECT
APPLY HUNGARIAN METHOD
5 10 6 0
6 - 6 0
0 8 11 7
0 0 0 0
A
B
C
D
Professor
1 2 3 4
SUBJECT
Complete assignment is not formed
Apply Step 1 ,step 2 is not needed
Doing this, we get the table:
NOW SUBTRACT MINIMUM ELEMENT FROM ALL
UNCOVERED ELEMENTS BUT ADD THIS TO ALL
ELEMENTS THAT LIE AT THE INTERSECTION OF
TWO LINES
5 10 6 0
6 - 6 0
0 8 11 7
0 0 0 0
A
B
C
D
Professor
1 2 3 4
SUBJECT
Doing this, we get the table:
5 4 0 0
6 - 3 0
0 2 5 7
6 0 0 6
Complete assignment is formed
A
B
C
D
Professor
1 2 3 4
SUBJECT
•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
THANK YOU

More Related Content

What's hot

Operational research on Assignment ppt
Operational research on Assignment pptOperational research on Assignment ppt
Operational research on Assignment ppt
Nirali Solanki
 
Synthetic division
Synthetic divisionSynthetic division
Synthetic division
swartzje
 
Completing the square (added and revised)
Completing the square (added and revised)Completing the square (added and revised)
Completing the square (added and revised)
Kate Rimando
 
Sept. 21, 2012
Sept. 21, 2012Sept. 21, 2012
Sept. 21, 2012
khyps13
 
Completing the square
Completing the squareCompleting the square
Completing the square
Ron Eick
 
4 ~ manale mourdi ~ chapter 4 outstanding project math
4 ~ manale mourdi ~ chapter 4 outstanding project math4 ~ manale mourdi ~ chapter 4 outstanding project math
4 ~ manale mourdi ~ chapter 4 outstanding project math
sharoncolette
 

What's hot (20)

Operational research on Assignment ppt
Operational research on Assignment pptOperational research on Assignment ppt
Operational research on Assignment ppt
 
Ap for b.tech. (mechanical) Assignment Problem
Ap for b.tech. (mechanical) Assignment Problem Ap for b.tech. (mechanical) Assignment Problem
Ap for b.tech. (mechanical) Assignment Problem
 
Assignment problem ppt
Assignment problem ppt Assignment problem ppt
Assignment problem ppt
 
Assignment problem
Assignment problemAssignment problem
Assignment problem
 
Assignment Poblems
Assignment Poblems Assignment Poblems
Assignment Poblems
 
Assignment Problem
Assignment ProblemAssignment Problem
Assignment Problem
 
Assignment model
Assignment modelAssignment model
Assignment model
 
Lesson 33: The Assignment Problem
Lesson 33: The Assignment  ProblemLesson 33: The Assignment  Problem
Lesson 33: The Assignment Problem
 
Random number generation
Random number generationRandom number generation
Random number generation
 
Pre algebra help
Pre algebra helpPre algebra help
Pre algebra help
 
Greedy
GreedyGreedy
Greedy
 
Functions
FunctionsFunctions
Functions
 
Synthetic division
Synthetic divisionSynthetic division
Synthetic division
 
Completing the square (added and revised)
Completing the square (added and revised)Completing the square (added and revised)
Completing the square (added and revised)
 
Mod 4 Project by Mateo C
Mod 4 Project by Mateo CMod 4 Project by Mateo C
Mod 4 Project by Mateo C
 
Sept. 21, 2012
Sept. 21, 2012Sept. 21, 2012
Sept. 21, 2012
 
Operation Research
Operation ResearchOperation Research
Operation Research
 
Graph of trigo diploma
Graph of trigo diplomaGraph of trigo diploma
Graph of trigo diploma
 
Completing the square
Completing the squareCompleting the square
Completing the square
 
4 ~ manale mourdi ~ chapter 4 outstanding project math
4 ~ manale mourdi ~ chapter 4 outstanding project math4 ~ manale mourdi ~ chapter 4 outstanding project math
4 ~ manale mourdi ~ chapter 4 outstanding project math
 

Similar to Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-phpapp02

Assignment problem
Assignment problemAssignment problem
Assignment problem
Abu Bashar
 
qadm-ppt-150918102124-lva1-app6892.pdf
qadm-ppt-150918102124-lva1-app6892.pdfqadm-ppt-150918102124-lva1-app6892.pdf
qadm-ppt-150918102124-lva1-app6892.pdf
Hari31856
 
Assignment problemAssignment problemAssignment problem
Assignment problemAssignment problemAssignment problemAssignment problemAssignment problemAssignment problem
Assignment problemAssignment problemAssignment problem
anveshakatti
 
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
22bcs058
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
hodcsencet
 

Similar to Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-phpapp02 (20)

Chapter 1 Assignment Problems (DS) (1).pptx
Chapter 1 Assignment Problems (DS) (1).pptxChapter 1 Assignment Problems (DS) (1).pptx
Chapter 1 Assignment Problems (DS) (1).pptx
 
Assignment problem notes
Assignment problem notesAssignment problem notes
Assignment problem notes
 
Decision Science.pdf
Decision Science.pdfDecision Science.pdf
Decision Science.pdf
 
Assignment problems
Assignment problemsAssignment problems
Assignment problems
 
Asssignment problem
Asssignment problemAsssignment problem
Asssignment problem
 
Assignment problem
Assignment problemAssignment problem
Assignment problem
 
qadm-ppt-150918102124-lva1-app6892.pdf
qadm-ppt-150918102124-lva1-app6892.pdfqadm-ppt-150918102124-lva1-app6892.pdf
qadm-ppt-150918102124-lva1-app6892.pdf
 
E1605_ASSIGNMENT_PROBLEM.ppt
E1605_ASSIGNMENT_PROBLEM.pptE1605_ASSIGNMENT_PROBLEM.ppt
E1605_ASSIGNMENT_PROBLEM.ppt
 
Assignment problemAssignment problemAssignment problem
Assignment problemAssignment problemAssignment problemAssignment problemAssignment problemAssignment problem
Assignment problemAssignment problemAssignment problem
 
Hungarian Assignment Problem
Hungarian Assignment ProblemHungarian Assignment Problem
Hungarian Assignment Problem
 
A0280115(1)
A0280115(1)A0280115(1)
A0280115(1)
 
Insider mathematical
Insider   mathematicalInsider   mathematical
Insider mathematical
 
A Comparative Analysis Of Assignment Problem
A Comparative Analysis Of Assignment ProblemA Comparative Analysis Of Assignment Problem
A Comparative Analysis Of Assignment Problem
 
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
Mastering Greedy Algorithms: Optimizing Solutions for Efficiency"
 
Simplex algorithm
Simplex algorithmSimplex algorithm
Simplex algorithm
 
data structures and algorithms Unit 4
data structures and algorithms Unit 4data structures and algorithms Unit 4
data structures and algorithms Unit 4
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
04-Unit Four - OR.pptx
04-Unit Four - OR.pptx04-Unit Four - OR.pptx
04-Unit Four - OR.pptx
 
Muzammil irshad.pptxhdududududiufufufufu
Muzammil irshad.pptxhdududududiufufufufuMuzammil irshad.pptxhdududududiufufufufu
Muzammil irshad.pptxhdududududiufufufufu
 
Management Science
Management Science Management Science
Management Science
 

More from Firas Husseini

More from Firas Husseini (20)

Ali M Fadel CV
Ali M Fadel  CVAli M Fadel  CV
Ali M Fadel CV
 
Transportation problems1
Transportation problems1Transportation problems1
Transportation problems1
 
Slides for ch08
Slides for ch08Slides for ch08
Slides for ch08
 
Slides for ch07
Slides for ch07Slides for ch07
Slides for ch07
 
Slides for ch06
Slides for ch06Slides for ch06
Slides for ch06
 
Slides for ch05
Slides for ch05Slides for ch05
Slides for ch05
 
Rsh qam11 ch10 ge
Rsh qam11 ch10 geRsh qam11 ch10 ge
Rsh qam11 ch10 ge
 
Rsh qam11 ch09 ge
Rsh qam11 ch09 geRsh qam11 ch09 ge
Rsh qam11 ch09 ge
 
Rsh qam11 ch08 ge
Rsh qam11 ch08 geRsh qam11 ch08 ge
Rsh qam11 ch08 ge
 
Rsh qam11 ch07 ge
Rsh qam11 ch07 geRsh qam11 ch07 ge
Rsh qam11 ch07 ge
 
Rsh qam11 ch06 ge
Rsh qam11 ch06 geRsh qam11 ch06 ge
Rsh qam11 ch06 ge
 
Rsh qam11 ch05 ge
Rsh qam11 ch05 geRsh qam11 ch05 ge
Rsh qam11 ch05 ge
 
Rsh qam11 ch04 ge
Rsh qam11 ch04 geRsh qam11 ch04 ge
Rsh qam11 ch04 ge
 
Rsh qam11 ch03
Rsh qam11 ch03Rsh qam11 ch03
Rsh qam11 ch03
 
Rsh qam11 ch03 ge
Rsh qam11 ch03 geRsh qam11 ch03 ge
Rsh qam11 ch03 ge
 
Rsh qam11 ch02
Rsh qam11 ch02Rsh qam11 ch02
Rsh qam11 ch02
 
Rsh qam11 ch01
Rsh qam11 ch01Rsh qam11 ch01
Rsh qam11 ch01
 
Render03 140622012601-phpapp02
Render03 140622012601-phpapp02Render03 140622012601-phpapp02
Render03 140622012601-phpapp02
 
Render03 140622012601-phpapp02 (1)
Render03 140622012601-phpapp02 (1)Render03 140622012601-phpapp02 (1)
Render03 140622012601-phpapp02 (1)
 
Render01edited 121120194704-phpapp02
Render01edited 121120194704-phpapp02Render01edited 121120194704-phpapp02
Render01edited 121120194704-phpapp02
 

Recently uploaded

Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
allensay1
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
daisycvs
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
vineshkumarsajnani12
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 

Recently uploaded (20)

Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Cannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 UpdatedCannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 Updated
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Kalyan Call Girl 98350*37198 Call Girls in Escort service book now
Kalyan Call Girl 98350*37198 Call Girls in Escort service book nowKalyan Call Girl 98350*37198 Call Girls in Escort service book now
Kalyan Call Girl 98350*37198 Call Girls in Escort service book now
 
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
 
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableBerhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptxQSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
WheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond InsightsWheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond Insights
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
 
Falcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business PotentialFalcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business Potential
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 

Quantitativeanalysisfordecisionmaking 13427543542352-phpapp02-120719222252-phpapp02

  • 1. Assignment Problems Compiled By: Group c Sandeep Amin
  • 2. The Hungarian method is a combinatorial optimization algorithm which solves the assignment problem in polynomial time and which anticipated later primal-dual methods. It was developed and published by Harold Kuhn in 1955, who gave the name "Hungarian method" because the algorithm was largely based on the earlier works of two Hungarian mathematicians: Dénes Kőnig and Jenő Egerváry.
  • 3. Suppose there are two machines in the press and two operators are engaged at different rates to operate them. Which operator should operate which machine for maximizing profit? Similarly, if there are n machines available and n persons are engaged at different rates to operate them. Which operator should be assigned to which machine to ensure maximum efficiency? While answering the above questions we have to think about the interest of the press, so we have to find such an assignment by which the press gets maximum profit on minimum investment. Such problems are known as "assignment problems"
  • 4. Phase 1: Row and column reductions Step 0: Consider the given cost matrix Step 1: Subtract the minimum value of each row from the entries of that row, to obtain the next matrix. Step 2: Subtract the minimum value of each column from the entries of that column , to obtain the next matrix. Treat the resulting matrix as the input for phase 2.
  • 5.
  • 6. The Hungarian Method Consider the assignment problem: 8 6 5 7 6 5 3 4 7 8 4 6 6 7 5 6 Row Min p1 = 5 p2 = 3 p3 = 4 p4 = 5 Worker Job 1 1 2 2 3 3 4 4
  • 7. Step 1: From each entry of a row, we subtract the minimum value in that row and get the following reduced cost matrix: 3 1 0 2 3 2 0 1 3 4 0 2 1 2 0 1 Column Minimum q1=1 q2=1 q3=0 q4=1
  • 8. Step 2: From each entry of a column, we subtract the minimum value in that column and get the following reduced cost matrix: 2 0 0 1 2 1 0 0 2 3 0 1 0 1 0 0
  • 9. Step 3: Now we test whether an assignment can be made as follows. If such an assignment is possible, it is the optimal assignment. •Examine the first row. If there is only one zero in that row, then make an ( ) and cross ( ) all the other zeros in the column passing through the surrounded zero and draw a vertical line on that column •Then starting with the first column if there is one zero then make an ( ) cross all the zero in that row & draw horizontal line on that row cont till all zero are crossed or even assignment
  • 10. Step 3(a) gives the following table. 2 0 0 1 2 1 0 0 2 3 0 1 0 1 0 0 Step 3(b): Now repeat the above procedure for columns. (Remember to interchange row and column in that step.)
  • 11. Step 3(b) gives the following table. 2 0 0 1 2 1 0 0 2 3 0 1 0 1 0 0
  • 12. If there is now a surrounded zero in each row and each column, the optimal assignment is obtained. Worker 1 is assigned to Job 2 = 6 Worker 2 is assigned to Job 4 = 4 Worker 3 is assigned to Job 3 = 4 Worker 4 is assigned to Job 1 = 6 Minimum total time = 20 hrs The optimal solution is unique In our example, there is a surrounded zero in each row and each column and so the optimal assignment is: Hrs
  • 13. If the final stage is reached (that is all the zeros are either surrounded or crossed) and if there is no surrounded zero in each row and column, it is not possible to get the optimal solution at this stage. We have to do some more work. Again we illustrate with a numerical example. Solve the following unbalanced assignment problem (Only one job to one man and only one man to one job): 7 5 8 4 5 6 7 4 8 7 9 8
  • 14. Since the problem is unbalanced, we add a dummy worker 4 with cost 0 and get the following starting cost matrix: 7 5 8 4 5 6 7 4 8 7 9 8 0 0 0 0 Applying Step 1, we get the reduced cost matrix p1=4 p2=4 p3=7 p4=0 Dummy Row Min Worker Job
  • 15. 3 1 4 0 1 2 3 0 1 0 2 1 0 0 0 0 Now Step 2 is Not needed. We now apply Step 3(a) and get the following table.
  • 16. 3 1 4 0 1 2 3 0 1 0 2 1 0 0 0 0 Now all the zeros are either surrounded or crossed but there is no surrounded zero in Row 2. Hence assignment is NOT possible. We go to Step 4.
  • 17. 3 1 4 0 1 2 3 0 1 0 2 1 0 0 0 0 Step 4(b) Select the smallest element, say, u, from among all elements uncovered by all the lines. In our example, u = 1 Step 4(c) Now subtract this u from all uncovered elements but add this to all elements that lie at the intersection of two lines
  • 18. 2 1 3 0 0 2 2 0 0 0 1 1 0 1 0 1 Doing this, we get the table:
  • 19. 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 1 Thus the optimum allocation is: W1 → J4 W2 → J1 W3 → J2 W4 → J3 And the optimal cost = 4+5+7+0 = 16 Hence Job 3 is not done by any (real) worker. The optimal assignment is unique
  • 20. MAXIMIZATION TYPE •Hungarian method is valid for balanced & minimization type •The assignment problem can be converted to minimization by finding the opportunity loss •The opportunity loss matrix is found by subtracting all the element of the matrix from the largest element
  • 21. •Efficiency of each professor to teach each subject as follow : Consider the assignment problem A B C Professor SUBJECT 1 2 3 4 Find which professor to be assigned to which subject so that total efficiency can be maximize . (-) indicates that professor b cannot be assigned to sub 2 also find sub for which we do not have professor 10 5 9 15 6 - 3 12 16 8 5 9
  • 22. 10 5 9 15 6 - 3 12 16 8 5 9 0 0 0 0 Since the problem is unbalanced, we add a dummy professor D with cost 0 and get the following starting cost matrix: A B C D Professor 1 2 3 4 SUBJECT Dummy
  • 23. OPPORTUNITY LOSS MATRIX •Subtracting all the element of the matrix from the largest element that is 16 •We get this table 6 11 7 1 10 - 13 4 0 8 11 7 16 16 16 16 A B C D Professor 1 2 3 4 SUBJECT
  • 24. APPLY HUNGARIAN METHOD 5 10 6 0 6 - 6 0 0 8 11 7 0 0 0 0 A B C D Professor 1 2 3 4 SUBJECT Complete assignment is not formed Apply Step 1 ,step 2 is not needed Doing this, we get the table:
  • 25. NOW SUBTRACT MINIMUM ELEMENT FROM ALL UNCOVERED ELEMENTS BUT ADD THIS TO ALL ELEMENTS THAT LIE AT THE INTERSECTION OF TWO LINES 5 10 6 0 6 - 6 0 0 8 11 7 0 0 0 0 A B C D Professor 1 2 3 4 SUBJECT
  • 26. Doing this, we get the table: 5 4 0 0 6 - 3 0 0 2 5 7 6 0 0 6 Complete assignment is formed A B C D Professor 1 2 3 4 SUBJECT
  • 27. •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