17
a b c d e f g 0.40 0.18 0.10 0.10 0.07 0.06 0.05 h 0.04 CODAGE DE HUFFMAN DES LETTRES AVEC DES PROBABILITES D ’APPARITION Objectif : coder les lettres avec des longueurs fonction décroissante de leur probabil afin de réduire le débit moye de transmission

0.40

  • Upload
    jadyn

  • View
    29

  • Download
    0

Embed Size (px)

DESCRIPTION

a. CODAGE DE HUFFMAN. 0.40. Objectif : coder les lettres avec des longueurs fonction décroissante de leur probabilité afin de réduire le débit moyen de transmission. b. 0.18. c. 0.10. d. DES LETTRES AVEC DES PROBABILITES D ’APPARITION. 0.10. e. 0.07. f. 0.06. g. 0.05. h. - PowerPoint PPT Presentation

Citation preview

Page 1: 0.40

a

b

c

d

e

f

g

0.40

0.18

0.10

0.10

0.07

0.06

0.05h

0.04

CODAGE DE HUFFMAN

DES LETTRES AVEC DES PROBABILITESD ’APPARITION

Objectif : coder les lettresavec des longueurs fonctiondécroissante de leur probabilitéafin de réduire le débit moyende transmission

Page 2: 0.40

a

b

c

d

e

f

g

0.40

0.18

0.10

0.10

0.07

0.06

0.05h

0.04

(gh)0.09

a

b

c

d

e

0.40

0.18

0.10

0.10

0.07

f0.06

Regroupement des deux lettresde plus faible probabilitéla probabilité du regroupementest la somme des deux probabilités

Les autres lettres ne sont pas traitées

Première étape

Page 3: 0.40

a

b

c

d

e

f

g

0.40

0.18

0.10

0.10

0.07

0.06

0.05h

0.04

(gh)0.09

(ef)0.13

a0.40

b0.18

0.10

d0.10

c

Regroupement des deux lettresou groupements de lettresde plus faible probabilité

Même critèrepour les étapes suivantes

Page 4: 0.40

a

b

c

d

e

f

g

0.40

0.18

0.10

0.10

0.07

0.06

0.05h

0.04

(gh)0.09

(ef)0.13

a0.40

b0.18

c0.10

d0.10

(dgh)0.19

Page 5: 0.40

a

b

c

d

e

f

g

0.40

0.18

0.10

0.10

0.07

0.06

0.05h

0.04

(ef)0.13 (dgh)

0.19

(cef)0.23

a0.40

b0.18

c0.10

(gh)

d

Page 6: 0.40

a

b

c

d

e

f

g

0.40

0.18

0.10

0.10

0.07

0.06

0.05h

0.04

(dgh)

(cef)0.23 (bdgh)

0.37

a0.40

b0.18

0.19

(gh)

(ef)

c

d

Page 7: 0.40

a

b

c

d

e

f

g

0.40

0.18

0.10

0.10

0.07

0.06

0.05h

0.04

(cef)0.23

(bdgh)0.37

(cefbdgh)0.60

a0.40

Codage de Huffman(gh)

(ef)

(dgh)

b

c

d

Page 8: 0.40

a

b

c

d

e

f

g

0.40

0.18

0.10

0.10

0.07

0.06

0.05h

0.04

(gh)0.09

(ef)0.13 (dgh)

0.19

(cef)0.23

(bdgh)0.37

(cefbdgh)0.60

a0.40

b0.18c

0.10

d0.10

Probabilitédu regroupement

racine

Page 9: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(cefbdgh)

racinea

b

c

d

Codage des branches

(bdgh)

Page 10: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(bdgh)

(cefbdgh)

racinea

b

c

d

0

1

1

CODEDE LABRANCHE

Page 11: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(bdgh)

(cefbdgh)

racinea

b

c

d

0

1

1

00

01

CODEDE LABRANCHE

A chaque embranchement on complètele code par un bit marquant chacune des deux branches qui en sont issues

Page 12: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(bdgh)

(cefbdgh)

racinea

b

c

d

0

1

1

00

01

000

001

001

CODEDE LABRANCHE

Page 13: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(bdgh)

(cefbdgh)

racinea

b

c

d

0

1

1

00

01

000

001

001

011

011

010CODEDE LABRANCHE

Page 14: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(bdgh)

(cefbdgh)

racinea

b

c

d

0

1

1

00

01

000

001

001

011

011

010

0000

0001

CODEDE LABRANCHE

Page 15: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(bdgh)

(cefbdgh)

racinea

b

c

d

0

1

1

00

01

000

001

001

011

011

010

0100

0101

0000

0001

CODEDE LABRANCHE

Page 16: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(bdgh)

(cefbdgh)

racinea

b

c

d

0

1

1

00

01

000

001

001

011

011

010

0100

0101

0000

000100011

00010

CODEDE LABRANCHE

Page 17: 0.40

a

b

c

d

e

f

g

h(gh)

(ef)

(dgh)

(cef)

(bdgh)

(cefbdgh)

racinea

b

c

d 0

1

1

00

01

000

001

001

011011

010

0100

0101

0000

000100011

00010

début à la racine ;progression dansle message jusqu’àune feuille : lettre décodée.

Boucle du décodage