Compute Expected Code Length of 5 Nodes

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 5K views
david90
Messages
311
Reaction score
2
The question ask me to compute the expected code length of

5 nodes A B C D E each of frequency .1 .1 .2 .2 .4 respectively.

I already did the tree and derive the huffman code.

What does it mean by " compute the expected code length ?"
 
Physics news on Phys.org
i guess it means the avg size of the encoded data in bits per symbol.
 
Last edited by a moderator:
expected code length is also called the average code length (L)
= [tex]\sum_{i=0}^{n} p_i * l_i[/tex]
where p_i is the probability of the symbol and l_i is the length of the symbol

-- AI