10.07.2015 Views

Les algorithmes voraces - UQAC

Les algorithmes voraces - UQAC

Les algorithmes voraces - UQAC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

AlgorithmeA est un alphabet contenant n caractèresOn associe à chaque caractère c une valeur f (c)Huffman(A,n)Q=creer_file(A,n)pour i=1 à n-1 fairez=creer_element()x=gauche(z)=extraire_min(Q)y=droite(z)=extraire_min(Q)f(z)=f(x)+f(y)inserer(Q,z)retourner extraire_min(Q)Temps d’exécution: O(n lg n)() February 12, 2013 32 / 48

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

Saved successfully!

Ooh no, something went wrong!