10.07.2015 Views

Les algorithmes voraces - UQAC

Les algorithmes voraces - UQAC

Les algorithmes voraces - UQAC

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8INF430 Algorithmes <strong>voraces</strong> 47✬✩Algorithme de Kruskalfonction Kruskal(G=(N,A))Trier A en ordre croissantT={}Initialiser n ensemblesTantque |T|< n-1 faire(u,v)=prochaine ar^eteurep=representant(u)vrep=representant(v)si urep != vrep alorsfusion(urep,vrep)ajouter (u,v) à T✫✪

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!