TUTTEE ACADEMY LOGO
broken image
  • Home
  • About Us
  • Subjects 
    • CHEMISTRY
    • BIOLOGY
    • PHYSICS
    • MATHEMATICS
    • PSYCHOLOGY
    • ECONOMICS
    • BUSINESS
    • COMPUTER SCIENCE
    • CHINESE
    • ENGLISH
    • SPANISH
    • IBDP IA / EE
    • IBDP TOK
    • ONLINE TUTORIAL
  • Exam Boards 
    • IBDP
    • IBMYP
    • IGCSE & GCSE
    • HKDSE
    • GCE A-LEVELS
  • Courses 
    • IBDP Tuition
    • GCE A-Level Tuition
    • IBMYP Tuition
    • I/GCSE Tuition
    • HKDSE Tuition
  • Admission Test Prep 
    • PREDICTED GRADE
    • SAT / SSAT
    • UKISET (UK)
    • BMAT
    • UKCAT / UCAT
    • LNAT
    • TMUA (Cambridge)
  • Student Results 
    • IBDP STUDENT RESULTS
    • IGCSE & GCSE MATHEMATICS
    • A-LEVEL STUDENT RESULTS
    • IGCSE STUDENT RESULTS
    • GCSE STUDENT RESULTS (UK)
    • HKDSE STUDENT RESULTS
    • OUR STORIES
  • Question Bank
  • Resources
SCHEDULE A LESSON NOW

AS/A-Level Mathematics - Hungarian Algorithm

Hungarian Algorithm

· A-Level Maths,Hungarian Algorithm,algorithm,allocation,cost matrix

Let's learn about Hungarian Algorithm in A-Level Maths, which is:

  • Used for allocation problems 
  • Usually possible to match any 'person' to any 'task' 
  • with a 'cost' associated with each matching

The Algorithm: 

1. Find the opportunity cost matrix 

2. Test for an optimal assignment 

3. Revise the opportunity cost matrix and return to step 2. [IF OPTIMAL THEN STOP] 

e.g. Q)  Four workers A, B, C & D are assigned to tasks 1, 2, 3 & 4. The values in the matrix show the completion time in days for each worker when assigned to each task. Minimise the total time taken to complete all four tasks. 

We want to assign each worker to a task, and achieve the shortest time to complete all of the tasks. 

Starting with the given cost matrix: 

broken image

Reduce rows (subtract row min from each row)

NB. It does not matter whether you reduce the rows or the columns first, however exam questions may specify an order.

broken image

Reduce columns (subtract column min from each column)

[In this case, no reduction is possible]

You now have your first Opportunity Cost Matrix: 

broken image

Is It Optimal? 

Find the minimum number of lines needed to cover all of the ‘0’s in your opportunity cost matrix. 

(There may be different ways of doing this.) 

We want this number to equal the number of assignments (the number of rows and columns). 

i.e. in this case 4 (there are 4 rows and 4 columns)

broken image

Minimum number of lines needed = 3        

3 < 4      ∴ not optimal

Therefore we need to revise the opportunity cost matrix: 

  • Find the smallest number not covered by a line. Smallest uncovered number = 3 
  • Subtract this number from all the numbers not covered by a straight line. 
  • Add this number to all numbers at an intersection of two straight lines. 

Again, find the minimum number of lines needed to cover all of the ‘0’s in your opportunity cost matrix. 

broken image

Second Opportunity Cost Matrix : Minimum number of lines needed = 4 

 4 = 4      ∴ optimal 

Returning to the original cost matrix:

broken image

Making the final assignment: 

  • We make the final assignment using the ‘0’s in the matrix. 
  • Row 3 has only one ‘0’ so we must use it.  
  • Choose the other ‘0’s, so there is one in each row and column. 

(There may be several different possibilities; however they will all give the same optimal allocation.) 

Optimal Allocation: 

A ⇨ 2 

B ⇨ 1 

C ⇨ 3 

D ⇨ 4 

NB. You may be asked to find more than one optimal allocation. In this case, find the other possibilities of having a ‘0’ in each row and column.

CLICK HERE TO LEARN MORE ABOUT OUR A-LEVEL MATHS COURSES

SIGN UP FOR OUR A-LEVEL MATHS TRIAL NOW

Drafted by Eunice (Maths)

Subscribe
Previous
IBDP Biology - Glycolysis
Next
AS/A-Level Mathematics - Intro to limits
 Return to site
Profile picture
Cancel
Cookie Use
We use cookies to improve browsing experience, security, and data collection. By accepting, you agree to the use of cookies for advertising and analytics. You can change your cookie settings at any time. Learn More
Accept all
Settings
Decline All
Cookie Settings
Necessary Cookies
These cookies enable core functionality such as security, network management, and accessibility. These cookies can’t be switched off.
Analytics Cookies
These cookies help us better understand how visitors interact with our website and help us discover errors.
Preferences Cookies
These cookies allow the website to remember choices you've made to provide enhanced functionality and personalization.
Save