When One Letter Changes Everything: The Algorithms Behind Every Spell Checker

In 1961, Les Earnest at MIT built the first spell checker as part of a cursive handwriting recognition system. His program used a list of just 10,000 common words, comparing each handwritten recognition result against the dictionary. The system was rudimentary, but it established a pattern that would repeat for decades: spell checking is fundamentally a string matching problem, and the challenge lies in making it fast enough to be useful. ...

13 min · 2714 words

When One Bit Can Kill: How Error Correction Codes Save Your Data Every Day

In 1947, a mathematician at Bell Labs faced a frustrating problem. Richard Hamming was using the Model V relay computer to perform calculations, and every weekend the machine would grind to a halt when it encountered an error. The computer would simply stop, flashing its error lights, and Hamming would have to wait until Monday for the operators to reload his program. One Friday evening, staring at the silent machine, he asked himself a question that would change computing forever: “Why can’t the computer correct its own mistakes?” ...

14 min · 2877 words

How Consistent Hashing Scales Distributed Systems: The Mathematics Behind Minimal Rebalancing

When Amazon engineers published the Dynamo paper in 2007, they revealed a technique that had been quietly powering some of the world’s largest distributed systems. The core idea—consistent hashing—originated from a 1997 MIT paper by David Karger and colleagues, but it took a decade before the industry fully embraced its elegance. Today, consistent hashing underpins Apache Cassandra, Amazon DynamoDB, Discord’s messaging infrastructure, Netflix’s content delivery network, and virtually every modern distributed database. The algorithm solves a deceptively simple problem: how do you distribute data across servers when those servers keep joining and leaving? ...

9 min · 1786 words

What Makes ZIP Files Shrink: The Mathematics Behind Lossless Compression

In 1952, a graduate student at MIT named David Huffman faced a choice: write a term paper or take a final exam. His professor, Robert Fano, had assigned a paper on finding the most efficient binary code—a problem that had stumped both Fano and Claude Shannon, the father of information theory. Huffman, unable to prove any existing codes were optimal, was about to give up and start studying for the final. Then, in a flash of insight, he thought of building the code tree from the bottom up rather than the top down. The result was optimal, elegant, and would become one of the most widely used algorithms in computing history. ...

12 min · 2379 words