Welcome to The Riddler. Every week, I offer up problems related to the things we hold dear around here: math, logic and probability. Two puzzles are presented each week: the Riddler Express for those of you who want something bite-size and the 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 the next column. Please wait until Monday to publicly share your answers! If you need a hint or have a favorite puzzle collecting dust in your attic, find me on Twitter.

## Riddler Express

Help, there’s a cricket on my floor! I want to trap it with a cup so that I can safely move it outside. But every time I get close, it hops exactly 1 foot in a random direction.

I take note of its starting position and come closer. Boom — it hops in a random direction. I get close again. Boom — it takes another hop in a random direction, independent of the direction of the first hop.

What is the *most probable* distance between the cricket’s current position after two random jumps and its starting position? (Note: This puzzle is not asking for the *expected* distance, but rather the *most probable *distance. In other words, if you consider the probability distribution over all possible distances, where is the peak of this distribution?)

The solution to this Riddler Express can be found in the following column.

## Riddler Classic

Another week, another dice-y Classic!

When you roll a pair of fair dice, the most likely outcome is 7 (which occurs 1/6 of the time) and the least likely outcomes are 2 and 12 (which each occur 1/36 of the time).

Annoyed by the variance of these probabilities, I set out to create a pair of “uniform dice.” These dice still have sides that are uniquely numbered from 1 to 6, and they are identical to each other. However, they are weighted so that their sum is more uniformly distributed between 2 and 12 than that of fair dice.

Unfortunately, it is impossible to create a pair of such dice so that the probabilities of all 11 sums from 2 to 12 are *identical* (i.e., they are all 1/11). But I bet we can get pretty close.

The variance of the 11 probabilities is the average value of the squared difference between each probability and the average probability (which is, again, 1/11). One way to make my dice as uniform as possible is to minimize this variance.

So how should I make my dice as uniform as possible? In other words, which specific weighting of the dice minimizes the variance among the 11 probabilities? That is, what should the probabilities be for rolling 1, 2, 3, 4, 5 or 6 with one of the dice?

The solution to this Riddler Classic can be found in the following column.

## Solution to last week’s Riddler Express

Congratulations to 👏 Tim Curwick 👏 of Maple Grove, Minnesota, winner of last week’s Riddler Express.

Last week, you were very clever when it came to solving Riddler Express puzzles. You were so clever, in fact, that you were in the top 10 percent of solvers in Riddler Nation (which, as you knew, has a very large population). You didn’t know *where* in the top 10 percent you were — in fact, you realized that you were equally likely to be anywhere in the topmost decile. Also, no two people in Riddler Nation were equally clever.

One Friday morning, you walked into a room with nine members randomly selected from Riddler Nation. What was the probability that you were the cleverest solver in the room?

A number of readers tried to approximate the solution. If you were somewhere in the top decile, but you didn’t know where, then you might as well have been smack dab in the middle, cleverer than 95 percent of Riddler Nation. With this assumption, your probability of being the cleverest in the room was 0.95^{9}, or just over 63 percent.

But approximating wasn’t good enough. To find the *exact* solution, there were two different approaches — one of which was a lot more work than the other.

Let’s start with the more laborious approach, which broke down into cases depending on how many of the other nine people in the room were also in the top decile. For example, suppose three of the other nine were among the top 10 percent of solvers. You were guaranteed to be cleverer than the remaining six solvers, since none of them was in the top 10 percent. However, as far as you were concerned, you were indistinguishable from those top three — all of you were randomly situated somewhere in the top 10 percent. Since none of you was more likely to be cleverer than any of the others, your chances of being the cleverest among them was 1/4.

Again, that was just in the event there were three other solvers in the top 10 percent. What were the chances of this even happening in the first place? You could figure this out using a binomial distribution, which was the probability that three were in the top 10 percent — 0.1^{3} — times the probability that the other six were in the bottom 90 percent — 0.9^{6} — times the number of ways to choose three people from a group of nine — 9 choose 3, or 84.

Putting this all together, the probability that three solvers in the room were in the top 10 percent *and* you were the cleverest among them was 84·(0.1)^{3}·(0.9)^{6}·1/4, or about 1.12 percent.

But you still weren’t done. You had to similarly calculate these probabilities for when there were zero, one, two, etc., other solvers in the top 10 percent. If you added up all these distinct probabilities, you got the correct answer of approximately **65.13 percent**. (Not too far off the earlier approximation of 63 percent!)

That was certainly a lot of work for an Express.

Solver Caio Ishizaka Costa of São Paulo, Brazil, found a shorter (dare I say, cleverer?) route to the solution using calculus. Suppose you were cleverer than a fraction *p* of Riddler Nation. You knew *p* was uniformly distributed between 0.9 and 1. Meanwhile, your chances of being the cleverest in the room were *p*^{9}.

From there, you had to find the average value of this probability, *p*^{9}. To find the average value of a continuous variable or expression, you can integrate its probability distribution. In other words, you had to integrate *p*^{9} from 0.9 to 1 — a definite integral that equaled (1−0.9^{10})/10 — and then divide by the range of the integral, which was 0.1. Dividing by 0.1 was the same as multiplying by 10, which meant the probability was **1−0.9**** ^{10}**, or about 65.13 percent — the same result you got with the other approach!

To be fair, both of these approaches were quite clever. Therefore, in my estimation, everyone in Riddler Nation is in the top decile of cleverness. (Or, at the very least, more clever than average.)

## Solution to last week’s Riddler Classic

Congratulations to 👏 Michael DeLyser 👏 of State College, Pennsylvania, winner of last week’s Riddler Classic.

Last week, you had four standard dice, and your goal was simple: Maximize the sum of your rolls. So you rolled all four dice at once, hoping to achieve a high score.

But wait, there was more! If you weren’t happy with your roll, you could choose to reroll zero, one, two or three of the dice. In other words, you had to “freeze” one or more dice and set them aside, never to be rerolled.

You repeated this process with the remaining dice — you rolled them all and then froze at least one. You kept going until all the dice were frozen.

If you played strategically, what score did you expect to achieve on average?

To crack this Classic, Rohan Lewis solved versions of the puzzle with fewer dice to determine an optimal strategy with more dice. When rolling one die, you were equally likely to roll anywhere from a 1 to a 6, so your average score was 3.5.

Now suppose you were rolling two dice, which meant you had to freeze one or both. A quarter of the time they both came up 4 or more, in which case you’d freeze them both. (Otherwise, you would be rerolling for an average of 3.5, which was less than 4. And that would be a bad idea.) In this quartile of cases, your average score was a 10.

Half the time, one die was 4 or more, while the other die was 3 or less. In this case, you’d reroll the second die. The first die gave you an average score of 5, and the second gave you an average score of 3.5, for a total of 8.5.

Finally, the remaining quarter of the time both dice were 3 or less. Here, you’d freeze whichever was greater (or either one in the event of a tie) and reroll the other. One-ninth of the time both dice were 1, giving you a final average of 4.5; three-ninths of the time the greater die was 2, giving you a final average of 5.5; and five-ninths of the time the greater die was 3, giving you a final average of 6.5. So in this quartile, the overall average score was 107/18, or approximately 5.94.

Putting all these results together, the average score you could expect from rolling two dice was 593/72, or about 8.236.

As much work as it was to find the expected score for two dice, three dice were even hairier. On your first roll, you’d always freeze the greatest die (since you had to freeze at least one die). But then you had to look at the remaining two dice. As an illustration, suppose these two rolls were 5 and 3. You could freeze both of them and lock in their sum of 8. Or you could freeze the 5 and just reroll the 3, replacing it with an average score of 3.5, for a total average of 8.5. *Or* you could reroll both of them, which we just determined resulted in an average score of 8.236. Among these options (8, 8.5 and 8.236), 8.5 was the greatest, so you’d freeze the 5 and reroll the 3. However, if the dice had both been 4, you would have rerolled both of them.

Using this recursive strategy, solver Eric Dallal of Boston, Massachusetts, found the average score was approximately 13.42. And with four dice, the average score turned out to be about **18.84**.

There was no lack of other creative strategies readers submitted, such as always freezing the largest die or freezing any die that exceeded some function of the number of dice remaining. Such strategies often gave average scores in excess of 17 or even 18, but they all fell short of the optimal strategy.

For extra credit, instead of starting four dice, you started with more — five dice, six dice and *N* dice. While the optimal strategy again called for maximizing the remaining expected score with every roll, solver Jonathan of Lane Cove, Australia, noted that it behaved much like the following heuristic:

- Freeze every 6.
- Avoid freezing 1, 2 and 3.
- Reroll a 4 unless it is the only die you are rerolling.
- Reroll each 5 early on, unless more than half of remaining dice are 5.

Anyway, with five dice, the average optimal score was about **24.436**, and with six dice the average was about **30.152**. At this point, you might have noticed that each time we added another die, the average score increased by almost 6.

This was no coincidence. Suppose you had many, many dice. On your first roll, a sixth of them would come up 6, and you’d freeze all of these. On your second roll, a sixth of the remaining dice would come up 6, and you’d freeze this group as well — and so on. As the number of dice went to infinity, the probability that any given die could be frozen after coming up 6 approached one.

And so, for *N* dice, the average score was a shade under 6*N*. Solver Emily Boyajian found an even better approximation: 6*N* − *N*/(0.13*N*+0.27).

If there’s one thing I learned from all this, it was that any die that came up 6 was definitely a frozen asset.

## Want more riddles?

Well, aren’t you lucky? There’s a whole book full of the best puzzles from this column and some never-before-seen head-scratchers. It’s called “The Riddler,” and it’s in stores now!

## Want to submit a riddle?

Email Zach Wissner-Gross at riddlercolumn@gmail.com.