What are the word lengths associated to most and least frequent symbols, encoding a given source with the $n$-ary Huffman code?

78 Views Asked by At

There is n-ary Huffman code. Source has the following relative frequencies of t symbols: 1, $n$, $n^2$, $n^3$, . . . , $n^{t−1}$, where $t = 1 + k(n − 1)$ for some positive integer $k$. I need to find the number of symbols required for encoding of the most and the least frequent symbol.

1

There are 1 best solutions below

0
On

The most frequent symbol will obtain codeword 0 (by construction) and its length is 1. Code with totally ordered frequencies has unbalanced tree(by construction of Huffman code). There are n different symbols, so the tree will have n leafs and the longest codeword will have n-1 symbols (two last ones are of the same length). So the longest codeword will have length k(q-1) and the shortest one 1.