You are on page 1of 1

code symbol prob.

10 P(x1) 0.25 0
000 P(x2) 0.15 0
0.3 0.43
001 P(x3) 0.15 1 1
110 P(x4) 0.09 0
1
0 100 P(x5) 0.075 0 1 0
0.15 0.18
0 101 P(x6) 0.075 1 0
0.57
1110 P(x7) 0.045 0 1 0
0.09
1111 P(x8) 0.045 1 1
0.27
0 1110 P(x9) 0.025 0
0.05
0 1111 P(x10) 0.025 1 1
0 11000 P(x11) 0.0225 0 1
0.12
0 11010 P(x12) 0.015 0
0.03 0.04
0 11011 P(x13) 0.015 1 0
0 110011 P(x14) 0.0075 1 1 0
0.0175 0.07
0 1100100 P(x15) 0.0075 0 0
0.01
0 1100101 P(x16) 0.0025 1 1

The Entropy (H(s)) = 3.2954 bits/symbol, and the avrage length (L) = 3.3275 bits/symbol

The Efficincy = 3.2954 / 3.3275 = 0.99

Huffman coding example slide No.37

You might also like