Read along with the audio summary
Picture an infinite number of hotel room keys muddled in a big old bucket, and ask yourself the question Dr. Tom Crawford raises: when you place them randomly on hooks, what is the probability that at least one key ends up on its correct room hook? In this episode, which came out on May 16, 2025, host Dr. Tom Crawford walks us through a variation of the classic hat check problem. By the end, you will learn how a seemingly impossible infinite probability puzzle simplifies into a single surprising number.
A thought experiment about infinite rooms gives this probability puzzle its setting. Infinity has counterintuitive properties, and Hilbert's Hotel Paradox is a famous thought experiment designed to illustrate them. Here, a hotel with an infinite number of rooms serves as a fun backdrop for an infinite probability problem. All the keys to those infinite rooms are muddled together in a bucket and placed at random onto the room hooks.
This infinite key mix up is actually a variation of a classic puzzle known as the derangement problem. In mathematics, a derangement is a rearrangement, or permutation, of the elements of a set where no single element ends up in its original position. Think of it as every hotel key landing on the wrong hook. Rather than finding the odds that every key is wrong, Dr. Crawford calculates the probability of the exact opposite outcome, where at least one key is placed on its correct hook.
To find that probability, you need a counting technique whose name tells you exactly what to do. When solving problems about getting at least one success, Dr. Crawford breaks the problem down for a finite number of keys, such as two or three, using the inclusion exclusion principle. This technique finds the combined size of multiple overlapping sets by systematically adding the sizes of the individual sets, subtracting the sizes of all pairs of overlapping sets, and then adding back the sizes of three way overlaps. By alternating between adding and subtracting these intersections, you can accurately calculate the probability of a union of events.
As the number of keys approaches infinity, that alternating pattern of additions and subtractions converges to a famous mathematical constant. Euler's number, denoted by the letter e, is a fundamental constant approximately equal to 2.718. The solution to the hotel key puzzle relies on a mathematical formula called the Taylor series expansion for powers of e, and specifically for e raised to the power of negative one, which equals one divided by e.
The reason the inclusion exclusion math links so neatly to Euler's number comes down to factorials. A factorial is the product of all positive whole numbers up to a given number, so five factorial is five times four times three times two times one. When you work through the probability calculations in the inclusion exclusion principle, the fractions simplify neatly into terms involving factorials, which then converge to the formula using Euler's number.
Even with an infinite number of randomly assigned items, the probability of at least one person getting the right item is not small, because many complex probability problems simplify neatly when extended to infinity. The probability that at least one key is correct is one minus one over e, which is about a sixty three percent chance.