(Eq:Huffman) |
where is the length of the code-word assigned to the symbol .
(Eq:arithmetic) |
i.e. the number of bits of data (code-word) assigned by the encoder is equal to the number of bits of information that the symbol represent.
Imagine a binary sequence, where and . Compute the arithmetic code of the sequences A, B, AA, AB, BA y BB.
For example, when the symbol B is encoded, a code-bit 1 can be output because any sequence of symbols that start with B have a code-word that begins by 1.
Following with the previous example, the register shifting generates an ampliation of the interval to the .