David Huffman

David Huffman (1925–1999) was an American computer scientist who solved one of computing's neatest puzzles while he was still a graduate student — as a way of dodging a hard final exam. His answer turned out to be provably the best possible, and it now hides inside almost every file you've ever compressed.

What made the name

Faced with the question "what is the most efficient way to represent symbols in bits?", Huffman invented Huffman coding: give the common symbols short codes and the rare ones long codes, built up by repeatedly merging the two least-likely symbols into a little tree. It shows up in ZIP files, JPEG images, MP3 audio, and countless other formats. Simple, elegant, and mathematically optimal.

Huffman's professor offered the class a deal: solve this coding problem, or sit the final exam. Huffman spent weeks getting nowhere and was about to give up and study for the exam — then, tossing his notes in the bin, the idea suddenly clicked. What he didn't know was that his professor had co-founded the whole field of information theory and had never cracked the problem himself. A student's shortcut beat the experts.