Information Theory and Coding Basics
Which of the following correctly describes the relationship between lossless compression and the entropy of a source?
- AWith a good enough lossless compression algorithm, any file, whatever its contents, can always be made smaller than the original
- BEven for a source that emits symbols independently, a cleverly designed lossless code can make the average code length smaller than the entropy
- CThe average code length of a lossless code cannot be made smaller than the entropy, but coding symbols together brings it closer
Show answer and explanation
Answer: C. The average code length of a lossless code cannot be made smaller than the entropy, but coding symbols together brings it closer
For a source that emits symbols independently, the average code length per symbol of a lossless code is at least the entropy, and coding symbols together brings it arbitrarily close to the entropy (the source coding theorem). Moreover, there are 2ⁿ files of n bits, but only 2ⁿ − 1 bit strings shorter than that in total, so no lossless compression can shorten every file. Lossless compression shortens data with skew or repetition at the cost of making other data slightly longer.
- A. By the pigeonhole principle, not every file can be shortened. Random data and data that are already compressed hardly shrink at all.
- B. The entropy is the lower bound of the average code length. Trying to go below it produces a code that cannot be decoded in only one way.
- C. Correct. The entropy sets the limit of lossless coding.
Continue: 9 more Information Theory and Coding Basics questions