Nine Algorithms that Changed the Future: the Ingenious Ideas that Drive Today’s Computers, by John MacCormick. Princeton University Press, 2012.
I’m often wary of books written for general audiences on technical topics. It’s quite difficult to write in a way that is both accessible to a wide audience and technically accurate. Many such books end up sacrificing accuracy in the name of accessibility, trying to convey just the “intuition” or “general sense” of some topic, but often end up giving people the wrong idea instead.
I was quite happy to find, therefore, that John MacCormick nails it: “9 Algorithms that Changed the Future” is technically right on the money, but manages to explain things in ways that are both understandable and fun. Want to understand how Google ranks search results? Or how Amazon manages to never lose or mess up your order information, even though they get hundreds of thousands of orders each day and (as we all know) networks and hard drives are unreliable? Ever wonder how you can order something over the internet without your credit card number being stolen? Or how “zip” is able to make your files smaller, seemingly by magic? Even if you have never wondered about these things, perhaps I have made you wonder about them just now. And that’s exactly the point of this book: there are quite a few ingenious algorithmic ideas that most of us rely on every day that we rarely—or never—even stop to wonder about.
For example, I actually learned something new: I knew about public-key cryptography but had never really known much about Diffie-Hellman key exchange, which is what allows your web browser to talk to, say, Amazon’s servers securely even though they have never communicated before. It’s like having a secret conversation in code with a pen-pal whom you’ve never met, even though lots of people are reading your mail. How can you ever agree on a secret code in the first place without the people reading your mail finding out (and hence being able to read all your subsequent coded messages)? Sounds impossible, doesn’t it? But it turns out that it is possible, with some clever ideas, which MacCormick skillfully explains using a fun metaphor about mixing colors of paint.
Each chapter starts out very simply, gradually building up more complex examples until you reach a full understanding of the algorithm being explained. Along the way MacCormick introduces the “tricks”—the clever, central ideas—that make each algorithm work. The writing is excellent: clear, precise, and fun. I highly recommend this book to anyone curious about the ingenious mathematical and algorithmic ideas underlying some of today’s most ubiquitous technology.