Skip to content
The Lumenary

Practice · Advanced undergraduate

Information theory

Information theory

Warm-upHuman

A source emits one of 88 symbols, all equally likely. What is its entropy, in bits?

Information theory

CoreHuman

A binary prefix code already contains the codewords 00 and 1010. What is the largest number of further codewords of length exactly 33 that can be added while keeping the code prefix-free?

Information theory

CoreHuman

Which statements about the mutual information I(X;Y)I(X; Y) of finite random variables are true? (Choose all that apply.)

Choose all that apply

Information theory

CoreHuman

In the proof of Gibbs' inequality we bound ∑xp(x)ln⁡q(x)p(x)≤∑x(q(x)−p(x))\sum_x p(x)\ln\frac{q(x)}{p(x)} \le \sum_x \big(q(x) - p(x)\big). Which fact justifies this step?

Choose one

Information theory

CoreHuman

Build a Huffman code for four symbols with probabilities 0.4,0.3,0.2,0.10.4, 0.3, 0.2, 0.1. What is the expected codeword length, in tenths of a bit (so 1.51.5 bits would be 1515)?

Information theory

CoreHuman

A binary symmetric channel flips each bit independently with probability pp. For which values of pp is its capacity exactly 11 bit per use? (Choose all that apply.)

Choose all that apply

Information theory

StretchHuman

A start-up claims its lossless compressor shortens every file of exactly 10001000 bits by at least one bit. What is wrong?

Choose one

Information theory

CoreFormal

Which Lean statement formalises Kraft's inequality for prefix codes? (u <+: v means u is a prefix of v.)

Choose one

Information theory

StretchComputational

Write entropy(probs) returning −∑plog⁡2p-\sum p\log_2 p in bits (skipping zero probabilities), and kl(p, q) returning D(p ∥ q)=∑plog⁡2(p/q)D(p\,\|\,q) = \sum p\log_2(p/q) (also skipping terms with p=0p = 0). The tests check examples from the lesson, Gibbs' inequality on random distributions, and the asymmetry of relative entropy.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.