Inside Collection (Course): An Introduction to Source-Coding: Quantization, DPCM, Transform Coding, and Sub-band Coding
Summary: In this module, the concepts of entropy and variable-length coding are introduced, motivating the description of the Huffman encoder.
Consider the quantizer with
| output | Pk | code |
| y1 | 0.60 | 0 |
| y2 | 0.25 | 01 |
| y3 | 0.10 | 011 |
| y4 | 0.05 | 111 |
Given an arbitrarily complex coding scheme, what is
the minimum bits/sample required to transmit (store) the sequence
When random process
![]() |
In Aside 1, a Huffman code was constructed for the
output probabilities listed below.
Here
| output | Pk | code |
| y1 | 0.5 | 0 |
| y2 | 0.25 | 01 |
| y3 | 0.125 | 011 |
| y4 | 0.125 | 111 |
Notes:
Example: Entropy of Variable Length Code
Recalling the setup of Example 1, we find thatH y = - 0 . 6 log 2 0 . 6 + 0 . 25 log 2 0 . 25 + 0 . 1 log 2 0 . 1 + 0 . 05 log 2 0 . 05 = 1 . 49 H y = - 0 . 6 log 2 0 . 6 + 0 . 25 log 2 0 . 25 + 0 . 1 log 2 0 . 1 + 0 . 05 log 2 0 . 05 = 1 . 49 bits.
Assuming i.i.d. { y ( n ) } { y ( n ) } , we have R min = 1 . 49 R min = 1 . 49 bits/sample.
Compare to the variable length code on the right which gave
R = 1 . 55 R = 1 . 55 bits/sample.