1
7.8kviews
Construct Huffman code for the given symbols

{x1, x2 , . . . . . . x8} with probabilities

P(x) = {0.07,0.08,0.04,0.26,0.14,0.09,0.07,0.25}. Find the code efficiiency.

1 Answer
3
556views

enter image description here

Symbol f(x) Codeword length
$x_4$ 0.26 01 2
$x_8$ 0.25 10 2
$x_5$ 0.14 001 3
$x_6$ 0.09 001 3
$x_2$ 0.08 0000 4
$x_1$ 0.07 0001 4
$x_7$ 0.07 1100 4
$x_3$ 0.04 1101 4

$\text{Efficiency} = \frac{H(x)}{L}$

$H(x) = \sum_{x=0}^n p_x \ log_2 \frac{1}{P_x}$

$L = \sum_{x=0}^n \ …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.