Unary coding: Difference between revisions

Content deleted Content added
the first distribution *is* optimal. arithmetic compression is better only on the last two distributions.
m fix one/zero
Line 1:
'''Unary coding''' is an [[entropy encoding]] that represents a [[natural number]], ''n'', with ''n'' − 1 ones followed by a zero. For example 5 is represented as 11110. Some representations use ''n'' oneszeros followed by a zeroone. The ones and zeros are interchangeable without loss of generality.
 
Unary coding is an optimally efficient encoding for the following discrete [[probability distribution]]