For any finite discrete source, the competitive advantage of prefix code $C_1$ over prefix code $C_2$ is the probability $C_1$ produces a shorter codeword than $C_2$, minus the probability $C_2$ produces a shorter codeword than $C_1$. For any source, a prefix code is competitively optimal if it has a nonnegative competitive advantage over all other prefix codes. In 1991, Cover proved that Huffman codes are competitively optimal for all dyadic sources. We prove the following asymptotic converse: As the source size grows, the probability a Huffman code for a randomly chosen non-dyadic source is competitively optimal converges to zero. We also prove: (i) For any source, competitively optimal codes cannot exist unless a Huffman code is competitively optimal; (ii) For any non-dyadic source, a Huffman code has a positive competitive advantage over a Shannon-Fano code; (iii) For any source, the competitive advantage of any prefix code over a Huffman code is strictly less than $\frac{1}{3}$; (iv) For each integer $n>3$, there exists a source of size $n$ and some prefix code whose competitive advantage over a Huffman code is arbitrarily close to $\frac{1}{3}$; and (v) For each positive integer $n$, there exists a source of size $n$ and some prefix code whose competitive advantage over a Shannon-Fano code becomes arbitrarily close to $1$ as $n\longrightarrow\infty$.
翻译:对于任何有限离散信源,前缀码$C_1$相对于前缀码$C_2$的竞争优势定义为:$C_1$生成比$C_2$更短码字的概率减去$C_2$生成比$C_1$更短码字的概率。若某个前缀码对所有其他前缀码均具有非负竞争优势,则称该前缀码为竞争最优的。1991年,Cover证明Huffman码对所有二元信源是竞争最优的。我们证明了如下渐近反命题:随着信源规模增大,随机选取的非二元信源的Huffman码为竞争最优的概率趋近于零。我们还证明了:(i) 对于任意信源,除非Huffman码是竞争最优的,否则不存在竞争最优码;(ii) 对于任意非二元信源,Huffman码相对于Shannon-Fano码具有正的竞争优势;(iii) 对于任意信源,任何前缀码相对于Huffman码的竞争优势严格小于$\frac{1}{3}$;(iv) 对每个整数$n>3$,存在一个规模为$n$的信源及某个前缀码,使其相对于Huffman码的竞争优势任意接近$\frac{1}{3}$;(v) 对每个正整数$n$,存在一个规模为$n$的信源及某个前缀码,使其相对于Shannon-Fano码的竞争优势随着$n\longrightarrow\infty$而任意接近$1$。