1 research outputs found

    Asymptotic Analysis of Run-Length Encoding

    Full text link
    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(1βˆ’p)k\Pr[K=k] = p(1-p)^k for kβ‰₯0k\ge 0. We determine the asymptotic behavior of the expected length Ex[#ΞΊ(K)]{\rm Ex}[{\#\kappa(K)}] of these codes as pβ†’0p\to 0: Ex[#ΞΊ(K)]=log⁑21p+log⁑2log⁑2+2+f(log⁑21p+log⁑2log⁑2)+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)=4β‹…2βˆ’21βˆ’{z}βˆ’{z}βˆ’1,f(z) = 4\cdot 2^{-2^{1-\{z\}}} - \{z\} - 1, and {z}=zβˆ’βŒŠzβŒ‹\{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).Comment: i+5 p
    corecore