Unary coding: Difference between revisions

Content deleted Content added
Optimality
More general optimality
Line 9:
:<math>P(n) = (k-1)k^{-n}\,</math>
 
for which <math>k \ge \varphi \approx 1.618 033 989</math>, the [[golden ratio]]., or, more generally, any distribution for which
 
:<math>P(n) \ge P(n+1) + P(n+2)\, </math>
 
for <math>n=1,2,3,...</math>.
 
A modified unary encoding is used in [[UTF-8]].