Welcome to The Riddler. Every week, I offer up problems related to the things we hold dear around here: math, logic and probability. There are two types: Riddler Express for those of you who want something bite-size and Riddler Classic for those of you in the slow-puzzle movement. Submit a correct answer for either,^{1} and you may get a shoutout in next week’s column. If you need a hint or have a favorite puzzle collecting dust in your attic, find me on Twitter.

## Riddler Express

Choose three points on a circle at random and connect them to form a triangle. What is the probability that the center of the circle is contained in that triangle?

## Riddler Classic

From Ben Weiss, let’s take this problem to the next dimension:

Choose four points at random (independently and uniformly distributed) on the surface of a sphere. What is the probability that the tetrahedron defined by those four points contains the center of the sphere?

## Solution to last week’s Riddler Express

Congratulations to Filip Schneider of Prague, Czech Republic, winner of last week’s Riddler Express!

Last week, I showed you two shapes and asked you to calculate the colored area. One was a kite inside a circle that looked like this:

The area of the kite is **40**. First, imagine slicing the whole image in half with a vertical line down the middle. That leaves two blue triangles on either side, with two legs of length 5 and 8. Because they are each now inscribed in a semicircle, we know that they are both right triangles! (This is sometimes called Thales’s theorem.) Therefore, each has an area of ½ times the product of its shorter sides, or, in our case, ½×5×8 = 20. There are two of them, so the total area of the kite is 20+20 = 40.

The other shape was a rectangle inside a quarter circle that looked like this:

The area of the rectangle is **60**. We know from the labeled “5” and “8” lengths that the radius of the quarter circle is 13. That means that the diagonal length of the rectangle is also 13. We can now imagine a right triangle formed by two of the rectangle’s sides and its diagonal — call the length of the long side of the rectangle, which we don’t yet know, *x*.

We know from the Pythagorean theorem that the sum of the squares of two sides of a right triangle equals the square of its hypotenuse. In this case, that’s \(5^2 + x^2 = 13^2\). That means x equals 12. The area of a rectangle is the product of two of its sides, or, in our case, 5×12 = 60.

## Solution to last week’s Riddler Classic

Congratulations to Tess Huelskamp of East Lansing, Michigan, winner of last week’s Riddler Classic!

Last week, we took a trip to the dormitory shared by the seven dwarfs. In the dorm, each dwarf had his own assigned bed. Typically, they retired to bed one at a time, in the same sequential order, with the youngest dwarf retiring first and the oldest retiring last. However, one evening, the youngest dwarf was in a jolly mood. He decided not to go to his own bed but rather to choose one at random from among the other six beds. The other dwarfs then chose their own bed if it was not occupied, and otherwise chose another unoccupied bed at random. What was the probability that the oldest dwarf slept in his own bed? What was the expected number of dwarfs who did not sleep in their own beds?

The probability that the oldest dwarf slept in his own bed is **5/12**, or about 0.42. The expected number of dwarfs in unfamiliar beds is **343/120**, or about 2.86.

This is similar to the puzzle of the world’s worst airline passenger, which we posed in a Riddler column a couple of years ago. In that problem, the first passenger to board chose a seat on a plane at random, and you were asked what the chances were that you, the 100th and final passenger to board, would sit in your assigned seat. The difference, however, is that in the airline puzzle, the passenger at least had a chance of sitting in her own assigned seat. In this case, however, the youngest dwarf is a sure mischief-maker and always chooses an incorrect bed.

Let’s first work through the probability that the oldest dwarf sleeps in his own bed, dwarf by sleepy dwarf. The first, youngest dwarf is choosing randomly from six unfamiliar beds. There is a ⅙ chance that the youngest dwarf takes the oldest dwarf’s bed right away, in which case, of course, the oldest dwarf does not sleep in his own bed. There is a ⅚ chance that the youngest dwarf takes a bed that does not belong to the oldest. In this latter case, every dwarf is equally as likely to take the youngest dwarf’s bed (in which case the oldest gets his for sure)^{2} as he is to take the oldest dwarf’s bed (in which case the oldest doesn’t get his for sure).

Combining those two facts, there is a (⅙)(1)+(⅚)(½) = 7/12 chance the oldest dwarf doesn’t get his bed — or equivalently a 5/12 chance he does.

Now let’s work through the expected number of dwarfs who do not sleep in their own beds.

The first dwarf sleeps in a wrong bed for sure. The second dwarf runs a ⅙ chance of having his bed taken by the first dwarf. The third dwarf runs a ⅙ chance of his bed being taken by the first dwarf and a (⅙)(⅙) chance of it being taken by the second — the second dwarf’s bed would have to be taken first. That gives a 1/6 + 1/36 = 7/36 chance that the third’s bed is taken.

We continue similarly. The fourth dwarf runs a ⅙ chance his bed being taken by the first dwarf, a 1/36 chance of it being taken by the second, and a (7/36)(⅕) chance of it being taken by the third. That’s 1/6 + 1/36 + 7/180 = 7/30.

The fifth dwarf runs a ⅙ chance of his bed being taken by the first dwarf, a 1/36 chance of it being taken by the second, a 7/180 chance of it being taken by the third, and a (7/30)(¼) chance of it being taken by the fourth. That’s 1/6 + 1/36 + 7/180 + 7/120 = 7/24.

The sixth dwarf runs a ⅙ chance of his bed being taken by taken by the first dwarf, a 1/36 chance of it being taken by the second, a 7/180 chance of it being taken by the third, a 7/120 chance of it being taken by the fourth, and (7/24)(⅓) chance of it being taken by the fifth. That’s 1/6 + 1/36 + 7/180 + 7/120 + 7/72 = 7/18. And finally, we’ve already calculated the relevant figure for the seventh dwarf: 7/12.

Adding that all up: 1 + 1/6 + 7/36 + 7/30 + 7/24 + 7/18 + 7/12 = 343/120.

Friend-of-the-Riddler Laurent Lessard shared his typically excellent solution, in which he considers the problem in full generality, for some number, *n*, of dwarfs rather than just our traditional seven. It turns out that there is an elegant general solution. In an *n*-dwarf dorm, the probability that the oldest dwarf gets his own bed is

\begin{equation*}\frac{n-2}{2(n-1)} \end{equation*}

The expected number of dwarfs in strange beds is

\begin{equation*}1+\frac{n}{n-1}\left( \frac{1}{2}+\frac{1}{3}+\ldots + \frac{1}{n}\right) \end{equation*}

## Want to submit a riddle?

Email me at oliver.roeder@fivethirtyeight.com.