1 / 15

EMI 2 – Matching problem

EMI 2 – Matching problem. Javier Belenguer Faguás Catalin Costin Stanciu Maria Cabezuelo Sepúlveda Jaime Barrachina Verdia. The problem:. Let G = {{a,b,c,d,e},{e,f,g,h,i,j}} be complete (this means that for every x from X and y from Y there exists a (x,y) that pertains to E)

afi
Download Presentation

EMI 2 – Matching problem

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EMI 2 – Matching problem Javier Belenguer Faguás Catalin Costin Stanciu Maria Cabezuelo Sepúlveda Jaime Barrachina Verdia

  2. The problem: Let G = {{a,b,c,d,e},{e,f,g,h,i,j}} be complete (this means that for every x from X and y from Y there exists a (x,y) that pertains to E) H is a weighted graph whose weights are given by:

  3. The graph:

  4. Step 1 → u = {a}; V(T) = {a}; E(T) = 0; V(T,E) = 0; Step 2 → Ad(a) = {g,h}; g → M-insaturated → go to Step 3 Step 3 → (a – g); V(T) = E(T) = 0; go to Step 1;

  5. Step 1 → u = {b}; V(T) = {b}; E(T) = 0; V(T,E) = 0; Step 2 → Ad(b) = {f,g,i,j}; f → M-insaturated → go to Step 3 Step 3 → (b-f); V(T) = E(T) = 0; go to Step 1;

  6. Step 1 → u = {c}; V(T) = {c}; E(T) = 0; V(T,E) = 0; Step 2 → Ad(c) = {g,h}; g → M-saturated ^ g pertains to V(T)→ go to Step 4; Step 4 → (g,a) edge; V(T)={a,c,g}; E(T)={cg,ga}; V(T,E)={g}; Go to Step 2; h → M-insaturated → Step 3 → (h,c) → go to Step 1

  7. Step 1 → u = {d}; V(T) = {d}; E(T) = {}; V(T,E) = {d}; Step 2 → Ad(d) = {g,h}; g → M-saturated ^g does not pertain to V(T); → go to 4 Step 4 → (g,a) edge → V(T) = {d,g,a}; E(T) = {dg,ga}; V(T,E) = {d,a}; h → M-saturated ^h does not pertain to V(T): → go to 4 Step 4 → (h,c) edge → V(T) = {a,c,d,g,h}; V(T,E) = {d,a,c}; E(T) = {dh,hc,dg,ga}; go to Step 2

  8. We choose a; Ad(a) = {g,h}; g → M-saturated ^h does not pertain to V(T) → go to Step 5; Step 5 → No perfect matching.

  9. Now we recalculate the labels: Odd → L(v) + alpha Even → L(v) - alpha alpha = min(L(x) + L(y) – p(x,y)) = 1

  10. Step 1 → u = {e}; V(T) = {d,g,h,a,c,e}; V(T,E) = {d,c,a,e}; Step 2 → Ad(e) = {i,j}; j → M-insaturated → go to Step 3 Step 3 → (e-j) →there's an M-augmenting path → Go to 1

  11. Step 1 → u = {d}; V(T) = {d}; V(T,E) = {}; Step 2 → Ad(d) = {g,h}; g → M-saturated ^ doesn't belong to V(T) → go to Step 4 Step 4 → (g,a) pertains to M → V(T)={g,a,d} V(T,E)={a,d} ; E(T)={dg,ga}; return to step 2 h→ M-saturated ^ doesn't belong to V(T) → go to Step 4 Step 4 → (h,c) pertains to M → V(T)={g,a,d,c,h} V(T,E)={a,d,c} ; E(T)={dg,ga,dh,hc}; return to step 2

  12. Step 2 →v= a; Ad(a) = {g,h,i}; i → M-insaturated → go to Step 3 Step 3 →There's a path d-g-a-i ^ (ga) belongs to M Delete the edge (ga) from M ; Add (ai) to M; Delete V(T) , E(T), V(T,E); go to Step 1;

  13. Step 1 → u=d; V(T)={d}; V(T,E)={d}; E(T)=0; Step 2 → v=d; Ad(d)={g,h}; g → M-insaturated → go to Step 3; Step 3 → (dg) is an M-augmenting path; Add (dg) to M; Delete V(T), V(T,E), E(T); Go to step 1;

  14. Step 2 →v= a; Ad(a) = {g,h,i}; i → M-insaturated → go to Step 3 Step 3 →There's a path d-g-a-i ^ (ga) belongs to M Delete the edge (ga) from M ; Add (ai) to M; Delete V(T) , E(T), V(T,E); go to Step 1;

  15. Step 1 → All x are saturated so M is a perfect matching

More Related