What Linearity of Expectation Has to Do with Needles and Pi
Take a needle of length and drop it in a random position on a hardwood floor whose boards have the same width : There’s some probability that the needle crosses between two adjacent floorboards. It...
View ArticleThe World’s Simplest Interesting Algorithm
In this post, I want to tell you about what I think might be the world’s simplest interesting algorithm. The vertex cover problem. Given a graph , we want to find the smallest set of vertices such that...
View ArticleThe Many Quirks of Qsort
In 1973, the author of the C programming language Dennis Ritchie was such a fan of the quicksort algorithm that he decided to name the language’s sort function after it. In this post, I’m going to...
View ArticleMy favorite example of: the pigeonhole principle
This is part of a new sequence of posts titled, My favorite example of: , for different values of . Today, is the pigeonhole principle. The Erdös-Szekeres Theorem: Consider any sequence of distinct...
View ArticleMy favorite example of: the probabilistic method
The “probabilistic method” is the art of applying probabilistic thinking to non-probabilistic problems. Applications of the probabilistic method often feel like magic. Here is my favorite example:...
View ArticleWhat is the actual infection rate at universities?
Here’s a question: what fraction of students at MIT have COVID-19 right now? Since MIT tests students twice a week, this question should be pretty easy to answer. But it’s not. That’s because MIT,...
View ArticleI’m Above Average and So Are You
Derek Severs’ short essay “I Assume I’m Below Average” recently went viral on Hacker News. The article begins: Ninety-six percent of cancer patients claim to be in better health than the average...
View ArticleTrain Tracks with Gaps: Applying the Probabilistic Method to Trains (Best...
Some Context: This post is a shortened version of a paper that won the best-paper award at FUN 2020. The paper is ostensibly about trains but the real-world applicability may be somewhat… limited....
View ArticleA Hash Table that Uses Less Space Than the Items that it Stores
When people talk about “space-efficient hash tables”, they are usually talking about the following type of guarantee: If we are storing keys, each of which are bits, then the total space usage should...
View ArticleDriving Faster Takes Longer
I often drive between Boston and New Haven. While on the road, I find myself pondering a simple question: If my only goal is to arrive as fast as possible, how fast should I drive? Ignoring things...
View Article