MYSIMULATOR LABS← All simulations
Interactive 2D laboratory · Algorithms & Information Theory

Huffman Coding Compression Tree

Build an optimal prefix-code tree by repeatedly merging the two least frequent symbols.

LIVE MODEL · 2D
SIMULATION VIEWPORTMODEL ACTIVE

THE SCIENCE

Huffman coding assigns shorter bit strings to frequent symbols and longer strings to rare symbols. The algorithm repeatedly merges the two lowest-frequency nodes, producing an optimal prefix-free binary code for the observed symbol frequencies.

Made with 🤖 ChatGPT