You are on page 1of 6
Hungarian Algorithm Pvt sing Sinan Porcing uti abe ‘© Convert diagram to a matrix prior to beginning the Hungarian algorithm Steps ‘Working ~ | Step 4: Row Reduction ‘+ Subtract the smallest number in each row from ‘every number in that row tae Laoeo i sont CHECK: (ross out er0's using the least amount of lines Iflines = rows ~ allocate Bes FV aws Cont atlecote ‘Step 2:.Column Reduction * Subtract the smallest number in each column from every number in that columo ‘+ Columns with 's won't change. CHECK: ‘Cross out 2ero's using the least amount of lines Iftines = rows -> allocate 3 Wes #4 vous Can't altecate - step 3: 44 + Add the smalestuncoverednumbertoevery | | covered number a '* Ifa number is covered by 2 lines add the smallest ua umber tice Step 4: 3 ‘Subtract the smallest number from every number 3 5 State allocation and time taken CHECK: wines = Wous Cross out zer0's using the least amount of ines Gon atiocote Iles # rows > repeat steps 3 and & Allocation 7 . + Task are allocated to people with azer0 ‘+ Canbe done from the final matrix ora graph ° ‘Time taken is found using original graph or matric le . P s Venta = Comng> 6 AS Simon = Purchasing» Bhs ’ Exam 2 2008 Question 3 ¥ ipartite Graphs & Allocation Problems Exam Examples Ech child isto be driven by his o her parent to one of four difeeit concerts. The following table shows the |. istaee that each car would have to travel i Kilometres, o cach of the four conc, | Concert 1 Concert? Concert3 ‘Concert 1 Tames 10) 16. if 20 Dante 9 im 19 is Tabla 1s = 20 is ‘Chane 10 15 21 16 ~The concerts wil be allocated soa to minimise the otal distance that mist be traveled to take the chien to | the concerts. The Hungarian algorithm it be usd to ind hie minimus value, & Step {ofthe Hungarian algorithm iso subtract the minimum entry in each ow om each element inthe Dow: Compete tpt for Tabla by wring the misting valus tthe ble below : Concert I Concert? Concert 3 Concert James 0 6 5 10) Dante o 5 iw 6 | Tabla [eS TEBE Zt Te ‘Chane a 5 i 6 After fre steps of the Hungarian algorithm have been appli the abe follows Concert 1 ‘Concert? Concert Concert James ° s o n Dante ° 4 2 0 Tabla 3 a o 0 = ‘Chane a “ z 0 [Wis now posse o allocate cach cil a cone. ‘Explain why ths tale shows that Tabla should tend Concer 2 «-Detemine the concerts that could be attended by James, Dante and Chanel to misinise the ttl distance ‘eavelled. Write your answers inthe tahle Blow. ‘Concert : Tames — Dante 1 "Talia 2 Chane Ok es IG = Soke 4 Determine the minimum total distance, in Llometres, traveled bythe four cr ‘Exam 2009 Question 7 Four workers, Ana, Bill, Clin and David, are each tobe atsignd a diferent ak. “The abl below gives the time, in minutes, that each worker aes fo complet each ofthe four asks. ‘ask f ask? [tasks [tak d 1 3 18 3 5 5 1s 4 6 2 David 7 a 16 10 ‘This toa time, in minutes, is a2 B28 cr er ES The ass ar allocated so ao minimise the total ine taken to complete te Tour ais efter 2006 ‘The bipartite graph below shows the sport each of four students have chosen Kir eon = oe ’ Pau soley! —— Cie sofa Ss one ofthe students ito be allocated to one sport only then a possible aloation would be a : — EE F le | == a, . =e ‘Andrew: ‘soccer 7 a = = - f ____ =A project network represents a set of _ochwites required to —vernces = stort fies pomnts eign = tne _to_compteit_ochwsty. ___ Ledges ore _lobejied tush letters. not _the verte t Jercy List] Achwity Tobie i]

You might also like