← Arena
Practice0:00
Huffman · D4
Assign code lengths to minimise total encoded bits.
Frequent symbols deserve short codes. Lengths must form a valid prefix code (Kraft: Σ 2⁻ˡᵉⁿ ≤ 1). A fixed-length code wastes bits on the rare symbols.
Practice — no rating pressure. Get as close to the optimum as you can; each play teaches the pattern.
Total bits
291
Kraft
0.875
sym 3
f=30
3
sym 4
f=26
3
sym 2
f=23
3
sym 0
f=8
3
sym 5
f=5
3
sym 6
f=4
3
sym 1
f=1
3