Unary coding: Difference between revisions

Content deleted Content added
STBotD (talk | contribs)
m robot Adding: ja:アルファ符号
No edit summary
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'' zeros followed by a one. The ones and zeros are interchangeable without loss of generality.
 
<table border="1" cellpadding="2">
<tr><th>n<th>coding
<tr><td>1<td>1
<tr><td>2<td>01
<tr><td>3<td>001
<tr><td>4<td>0001
<tr><td>5<td>00001
<tr><td>6<td>000001
<tr><td>7<td>0000001
<tr><td>8<td>00000001
<tr><td>9<td>000000001
<tr><td>10<td>0000000001
</table>
 
Unary coding is an optimally efficient encoding for the following discrete [[probability distribution]]