Question: Problem 4.2 (40 Pts) A source generates symbols a,b,c,d,e,f, and g, with probabilities P(a)=0.3,P(b)=0.25,P(c)=0.15,P(d)=0.10,P(e)=0.10,P(f)=0.05,P(g)=0.05. (a) Construct the Huffman code for these symbols. Calculate the average

Problem 4.2 (40 Pts) A source generates symbols a,b,c,d,e,f, and g, with probabilities P(a)=0.3,P(b)=0.25,P(c)=0.15,P(d)=0.10,P(e)=0.10,P(f)=0.05,P(g)=0.05. (a) Construct the Huffman code for these symbols. Calculate the average number of bits per symbol. Calculate the entropy of the source. Compare the entropy and the average number of bits per symbol. (b) Use the following code to construct the Huffman code for the symbols, average number of bits per symbol, and the entropy of the source. Compare the results with those you have found in part (a)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
