0
2.6kviews
Examples for practice on Huffman and Shannon fano

Symbol count

A 45

B 13

C 12

D 16

E 9

F 5

Draw the Huffman tree and generate code.

1 Answer
0
40views

Answer

Symbol Huffman code

A 0

B 101

C 100

D 111

E 1101

F 1100

Shannon fano Encoding Example

• Symbol Probabilities

E 0.4

A 0.3

D 0.15

B 0.1

F 0.03

C 0.02

Draw Shannon fano tree and generate code

Symbol Shannon fano code

E 0

A 10

D 110

B 1110

F 11110

C 11111

Please log in to add an answer.