Minimum Variance Huffman Codes in data compression

By performing the sorting procedure in a slightly different manner, we could have found a different Huffman code. In the first re-sort, we could place a4 higher in the list, as shown in Table 3.6.

Now combine a1 and a3 into a1, which has a probability of 04. Sorting the alphabet a2, a4, a1 and putting a1 as far up the list as possible, we get Table 3.7. Finally, by combining a2 and a4 and re-sorting, we get Table 3.8. If we go through the unbundling procedure, we get the codewords in Table 3.9. The procedure is summarized in Figure 3.3. The average length of the code is

l = 4 × 2 + 2 × 2 + 2 × 2 + 1 × 3 + 1 × 3 = 22 bits/symbol

T A B L E 3 . 6Reduced four-letter alphabet.
   
LetterProbabilityCodeword
    
a20.4c2
a40.2 1
a10.2c1
a30.2c3
T A B L E 3 . 7Reduced three-letter alphabet.
   
LetterProbabilityCodeword
    
a10.4 2
a20.4c2
a40.2 1

T A B L E 3 . 8 Reduced two-letter alphabet.

LetterProbabilityCodeword
   
a20.63
a10.42
T A B L E 3 . 9Minimum variance Huffman code.
   
LetterProbabilityCodeword
   
a10.210
a20.400
a30.211
a40.1010
a50.1011

Leave a Comment