Compute Expected Code Length of 5 Nodes

AI Thread Summary
To compute the expected code length for the given nodes A, B, C, D, and E with frequencies of 0.1, 0.1, 0.2, 0.2, and 0.4, the average code length (L) can be calculated using the formula L = ∑(p_i * l_i), where p_i represents the probability of each symbol and l_i is the length of the corresponding code. The discussion clarifies that the expected code length reflects the average size of the encoded data in bits per symbol. After deriving the Huffman code, the next step is to apply the formula to find the expected code length. This calculation is essential for understanding the efficiency of the encoding scheme.
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)
= \sum_{i=0}^{n} p_i * l_i
where p_i is the probability of the symbol and l_i is the length of the symbol

-- AI
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...
Back
Top