← All experiments

Information, perception & statistics

Entropy and Huffman

Interactive lab: Type “aaaaaa” and watch information disappear.

intermediate Open experiment

What is this?

A visual, interactive experiment about Entropy and Huffman. Its main parameters update live and the simulation runs entirely in the browser.

How it works

Entropy H = −Σpᵢlog₂pᵢ measures average surprise. Huffman gives short codes to frequent symbols.

Scope and limitations

H is an asymptotic per-symbol limit for the chosen source model. Huffman is optimal among symbol-by-symbol binary prefix codes; a real file also needs a model, length and metadata.

It opens here, in this same tab. Use Back to return.

Open experiment