Math, asked by PanduDeepak1011, 1 year ago

consider the probabilities of the letters m, n, o, p, q, r are 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. find the average length of huffman codes.

Answers

Answered by rjgolu
5
Assume that letters p, q, r, s, t and q have probabilities 1/2, 1/4, 1/8, 1/16, 1/ 32 and 1/32 respectively. The difference inĀ ...
Answered by Sidyandex
0

For this kind of problem we need to create the Huffman tree.

After applying the Huffman coding algorithm we will get the tree structure.

The letters m, n, o, p, q, r have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively.

The average length = (1*1/2 + 2*1/4 + 3*1/8 + 4*1/16 + 5*1/32 + 5*1/32) = 1.9375.

Similar questions