Core Concepts
For any non-dyadic source, a Huffman code has a positive competitive advantage over a Shannon-Fano code.
Abstract
The paper analyzes the competitive advantage of Huffman and Shannon-Fano codes for lossless source coding. Key insights:
Huffman codes are expected length optimal and competitively optimal for dyadic sources, but not necessarily for non-dyadic sources.
The probability that a Huffman code is competitively optimal for a randomly chosen non-dyadic source converges to zero as the source size grows.
For any non-dyadic source, a Huffman code strictly competitively dominates the corresponding Shannon-Fano code. The Huffman code has a positive competitive advantage over the Shannon-Fano code.
The competitive advantage of any code over a Huffman code is strictly less than 1/3. However, for each source size n > 3, there exists a non-dyadic source and a code whose competitive advantage over the Huffman code can be arbitrarily close to 1/3.
For each source size n, there exists a non-dyadic source and a code whose competitive advantage over the Shannon-Fano code can become arbitrarily close to 1 as n goes to infinity.
The paper provides a comprehensive analysis of the competitive relationships between Huffman, Shannon-Fano, and other prefix codes for non-dyadic sources.