English

Asymptotic Analysis of Run-Length Encoding

Information Theory 2015-04-17 v1 math.IT

Abstract

Gallager and Van Voorhis have found optimal prefix-free codes κ(K)\kappa(K) for a random variable KK that is geometrically distributed: Pr[K=k]=p(1p)k\Pr[K=k] = p(1-p)^k for k0k\ge 0. We determine the asymptotic behavior of the expected length Ex[#κ(K)]{\rm Ex}[{\#\kappa(K)}] of these codes as p0p\to 0: Ex[#κ(K)]=log21p+log2log2+2+f(log21p+log2log2)+O(p),{\rm Ex}[{\#\kappa(K)}] = \log_2 {1\over p} + \log_2 \log 2 + 2 + f\left(\log_2 {1\over p} + \log_2 \log 2\right) + O(p), where f(z)=4221{z}{z}1,f(z) = 4\cdot 2^{-2^{1-\{z\}}} - \{z\} - 1, and {z}=zz\{z\} = z - \lfloor z\rfloor is the fractional part of zz. The function f(z)f(z) is a periodic function (with period 11) that exhibits small oscillations (with magnitude less than 0.0050.005) about an even smaller average value (less than 0.00050.0005).

Cite

@article{arxiv.1504.04070,
  title  = {Asymptotic Analysis of Run-Length Encoding},
  author = {Nabil Zaman and Nicholas Pippenger},
  journal= {arXiv preprint arXiv:1504.04070},
  year   = {2015}
}

Comments

i+5 pp

R2 v1 2026-06-22T09:16:52.413Z