Unary coding: Difference between revisions

Content deleted Content added
Edited for style.
Forced P to be an operatorname in <math> expressions.
Line 3:
Unary coding is easily shown to be an optimally efficient encoding for the following discrete [[probability distribution]]
 
:<math>\operatorname{P}(n) = 2^{-n}\,</math>
 
for <math>n=1,2,3,...</math>. It is in fact optimal for any [[geometric distribution]]
 
:<math>\operatorname{P}(n) = (k-1)k^{-n}\,</math>
 
for which ''k'' &ge; &phi; = 1.61803398879&hellip;, the [[golden ratio]], or, more generally, for any distribution for which
 
:<math>\operatorname{P}(n) \ge \operatorname{P}(n+1) + \operatorname{P}(n+2)\, </math>
 
for <math>n=1,2,3,...</math>.