Information theory
Warm-upHumanA source emits one of symbols, all equally likely. What is its entropy, in bits?
A source emits one of symbols, all equally likely. What is its entropy, in bits?
A binary prefix code already contains the codewords and . What is the largest number of further codewords of length exactly that can be added while keeping the code prefix-free?
Which statements about the mutual information of finite random variables are true? (Choose all that apply.)
In the proof of Gibbs' inequality we bound . Which fact justifies this step?
Build a Huffman code for four symbols with probabilities . What is the expected codeword length, in tenths of a bit (so bits would be )?
A binary symmetric channel flips each bit independently with probability . For which values of is its capacity exactly bit per use? (Choose all that apply.)
A start-up claims its lossless compressor shortens every file of exactly bits by at least one bit. What is wrong?
Which Lean statement formalises Kraft's inequality for prefix codes? (u <+: v means u is a prefix of v.)
Write entropy(probs) returning in bits (skipping zero probabilities), and kl(p, q) returning (also skipping terms with ). The tests check examples from the lesson, Gibbs' inequality on random distributions, and the asymmetry of relative entropy.