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-sized 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 if you have a favorite puzzle collecting dust in your attic, find me on Twitter.

## Riddler Express

From Scott Cardell, a beach puzzle for your summer enjoyment:

Two long-distance swimmers are standing on a beach, right on the water’s edge. They begin 100 yards away from one another on the shore, which is a straight line of sand. Both swimmers swim at exactly the same speed. Swimmer A heads straight out to sea, directly perpendicular to the shore. At the same time, Swimmer B also heads out, swimming exactly in the direction of Swimmer A at all times. Over time, Swimmer B will approach a position directly in Swimmer A’s wake, where he will follow her at a fixed distance.

What is that distance?

(Hint: There is a neat and tidy method to finding the solution that is basically geometric.)

## Riddler Classic

Put yourself in an editor’s shoes with this puzzle from Luke Hutchinson:

You run a film magazine, Groovy Movies, and you have been invited to attend a new film festival. The festival organizers will screen 30 films evenly distributed across three different screens. Each film will premiere at this festival, and you want to get the scoop on which one was the best. The problem is, though, that because there are three screens, you don’t know which screen will show the best film. You could watch only Screen A, see the best movie there and report on it, but it may not be as good as one of the movies on Screen B or C.

Some more details you know from your many years of experience in the magazine biz:

- Whenever a film is playing on one screen, the other two screens also have a film playing. But there is enough time between each movie that one person can always watch the nth round on one screen and the n+1th round on another screen.
- The best movie on one screen will never play at the same time as the best movie on another screen. However, you don’t know what time slots they will occupy for each theater.
- All of your reviewers are good
*rankers*— they won’t have any disagreement about which movies are better than others that they’ve seen. (They’re ordinal reviewers, in other words.) - That said, all of your reviewers are terrible
*raters*, so they cannot give an objective measure of how good a movie was (a 9 out of 10, say) and compare it to another reviewer’s measure of how good a different movie was. (To put it another way: They aren’t cardinal reviewers.)

With all that in mind, if you want to know for sure what the best film at the festival was, what is the minimum number of reviewers you would need to send to the festival?

*Extra credit*: What if there were more movies shown per screen? What if there were more screens?

## Solution to last week’s Riddler Express

Congratulations to 👏 Rebecca Seasholtz 👏 of Atlanta, winner of the previous Express puzzle!

You’re driving a car down a two-mile track. For the first mile, you drive 30 miles per hour. How fast do you have to go for the second mile in order to average 60 miles per hour for the whole track?

Trick question, dear solvers. You can’t possibly drive fast enough.

A first instinct might be that you’d need to go 90 miles per hour. The average of 30 and 90 *is* 60, after all. But the problem with that calculation is that it’s averaging your speed over the units of distance (miles) you’ve traveled at each speed. To calculate average speed, we have to average over units of time (in this case, hours).

To average 60 miles per hour for a two-mile track, we know that we need to complete the track in exactly two minutes. But we also know that we puttered along at 30 miles per hour for the first mile, which took us exactly two minutes. We have exactly zero time left to complete the track — we’d have to travel at infinity miles per hour. Even if you hitched your car onto a laser beam and traveled at the speed of light for the track’s second mile, you’d only average about 59.999997 miles per hour for the whole track.

## Solution to last week’s Riddler Classic

Congratulations to 👏 Jonathan Fiat 👏 of Jerusalem, Israel, winner of the previous Classic puzzle!

A town of 1,000 households has a strange law intended to prevent wealth-hoarding. On January 1 of every year, each household robs one other household, selected at random, moving all of that house’s money into their own house. The order in which the robberies take place is also random and is determined by a lottery. First, what is the probability that a house is not robbed over the course of the day? Second, suppose that every house has the same amount of cash to begin with — say $100. Which position in the lottery has the most expected cash at the end of the day, and what is that amount?

First, the probability that our house is never robbed is equal to the probability that each other house does not rob our house. Each robber has 999 potential houses to rob (no robber is going to rob himself). The probability that a given other house doesn’t rob us is 998/999 — there are 999 options and 998 of them aren’t us. There are 999 other robbers we have to worry about, so we have to multiply that first calculation by itself 999 times. So, the probability of not being robbed is \((998/999)^{999}\), about **37 percent**.

(If the town grew, the number of households increasing toward infinity, this number would approach 1/e, where e is Euler’s number.)

Second, the best position in the lottery is last. The household that robs last ends up with about **$137** on average.

Why? To get a sense of what we should expect on that fateful night, and before doing any nitty-gritty math, many solvers turned to their computers. Victor Bible simulated an enormous rash of robberies, arriving at the cash results shown below:

And Tim Supinie animated how the distribution of wealth in this town changes over the course of the night:

It appears he who robs last robs best. But how can we show these results with nothing but pen, paper and probability theory? For each household, Bible explained, one of three things will happen.

- It never gets robbed.
- It gets robbed after its turn.
- It gets robbed before its turn but not after.

We’ve already calculated the probability that No. 1 happens — it’s about 37 percent for any given house.

The probability that No. 2 happens, for a house that goes nth in the robbing order, is given by \(P_2 = 1 - (998/999)^{1000-n}\). This is similar to our calculation above. The probability \((998/999)^{1000-n}\) is the chance of dodging being robbed by all those houses after you, and we’re subtracting it from 1 to get the chance you *are* robbed.

The probability of No. 3 happening for the same house is, similarly, \(P_3 = (1-(998/999)^{n-1})\cdot (998/999)^{1000-n}\).

If No. 1 happens, the house can expect to wind up with $200: its original $100 plus the average amount left in all the other houses it might rob from, also $100. If No. 2 happens, the house winds up with $0: it has been robbed and its opportunity to rob has passed. If No. 3 happens, the house can expect to wind up with about $100.10: the $0 it had after it was robbed plus the average $100,000/999 that remain in the houses it might rob.

To arrive at an overall expected value for a given house at the end of the night, we can multiply those probabilities by those expected values and add it all up. This gives

\begin{equation*}\left ( (998/999)^{999} \cdot 200 \right ) + \left ((1-(998/999)^{n-1})\cdot (998/999)^{1000-n} \cdot 100.10\right )\end{equation*}

This expression is increasing in n — that is, as n gets bigger, the dollar amount gets bigger — so you want to be as late in the lottery as possible. Plugging in 1,000 for n gives an expected amount of about $136.83.

## Want to submit a riddle?

Email me at oliver.roeder@fivethirtyeight.com.