Professional Documents
Culture Documents
Arithmetic Coding
• Huffman Coding guarantees a coding rate R within 1 bit of the
entropy H i.e.
a = .2
f(a) = .0, f(b) = .2, f(c) = .7
The interval for a particular message will be called
the message interval (e.g for b the interval is [.2,.7))
Generating a Tag
• The procedure for generating the tag works by
reducing the size of the interval in which the
tag resides as more and more elements of the
sequence are received.
• first divide the unit interval into subintervals
of the form [FX(i−1), FX(i)), i = 1, . . . , m.
• Because the minimum value of the cdf is zero
and the maximum value is one, this exactly
partitions the unit interval.
• We associate the subinterval [FX(i−1), FX(i))
with the symbol ai.
• The appearance of the first symbol in the
sequence restricts the interval containing the
tag to one of these subintervals.
• Suppose the first symbol was ak.
• Then the interval containing the tag value will
be the subinterval [FX(k−1), FX(k)).
• This subinterval is now partitioned in exactly
the same proportions as the original interval.
Arithmetic Coding (sequence intervals)
b = .5 b = .5 b = .5
15-853 Page18
• The tag generation procedure works mathematically. We
start with sequences of length one.
• Suppose we have a source that puts out symbols from some
alphabet
• We can map the symbols ai to real numbers i.
• Define
Example: Tag Generation
• Let
• Suppose we wish to encode the sequence 1 3 2 1.
From the probability model we know that