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

You and your infinitely many friends are sharing a cake, and you come up with two rather bizarre ways of splitting it.

For the first method, Friend 1 takes half of the cake, Friend 2 takes a third of *what remains*, Friend 3 takes a quarter of what remains after Friend 2, Friend 4 takes a fifth of what remains after Friend 3, and so on. After your infinitely many friends take their respective pieces, you get whatever is left.

For the second method, your friends decide to save you a little more of the take. This time around, Friend 1 takes 1/2^{2} (or one-quarter) of the cake, Friend 2 takes 1/3^{2} (or one-ninth) of *what remains*, Friend 3 takes 1/4^{2} of what remains after Friend 3, and so on. Again, after your infinitely many friends take their respective pieces, you get whatever is left.

Question 1: How much of the cake do you get using the first method?

Question 2: How much of the cake do you get using the second method?

*Extra credit:* Your friends are feeling rather guilty for not saving enough of the cake for you, so they try one more method. This time, they only take the fractions with even denominators from the second method. So Friend 1 takes 1/2^{2} of the cake, Friend 2 takes 1/4^{2} of what remains, Friend 3 takes 1/6^{2} of what remains after Friend 2, and so on. After your infinitely many friends take their respective pieces, how much of the cake do you get?

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

## Riddler Classic

From Matt Yeager comes a game that is immensely popular with his fourth-grade class:

Three of Matt’s students — Players A, B and C — are engaged in a game of *veinte*. In each round, players take turns saying numbers in order (Player A, then B, then C, then A again, etc.). The first player to go says the number “1.” Each number must be either one, two, three or four more than the number said by the previous player. When someone says “20,” the round is over and the *next* person is eliminated, with the following person beginning the subsequent round. For example, if Player A says “20,” then Player B is eliminated, while Player C begins the next round by saying “1.” At no point can anyone say a number greater than 20.

All three players want to be the winner (i.e., the only player remaining) after the two rounds. But if they realize they can’t win, then they will prioritize making it to the second round.^{2}

Player A starts things off by saying “1.” Which player will win?

*Extra credit:* Instead of three players, now suppose there are four — Players A, B, C and D — all of whom want to make it through as many rounds of the game as possible. Again, Player A starts things off by saying “1.” Which player will win?

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

## Solution to last week’s Riddler Express

Congratulations to 👏 Art Morris 👏, winner of last week’s Riddler Express.

Last week, in a puzzle I described as being “hopefully not too complex,” you had to find three distinct numbers such that the second was the square of the first, the third was the square of the second, and the first was the square of the third.

If you went hunting for numbers, you likely didn’t have much success. Squaring the first number gave you the second number, squaring the second number gave you the third, and squaring the third gave you the first number *again*. But when you square any number greater than 1, the results get bigger and bigger, while squaring a number between 0 and 1 gives you a smaller result. Meanwhile, squaring a negative number always gives you a positive number. So how could there possibly be three distinct numbers that met the criteria?

If we call the numbers *a*, *b* and *c*, then they had to satisfy the equations *b* = *a*^{2}, *c* = *b*^{2} and *a* = *c*^{2}. Putting these equations together meant that *a*^{8} = *a*, and dividing both sides by *a* meant that *a*^{7} = 1. While it was true that *a* = 1 was one solution to this equation, that didn’t help you find three distinct values for *a*, *b* and *c*.

At this point, many readers caught on to the clue from the beginning — “hopefully not too complex” was in fact suggesting that you explore complex numbers. The equation *a*^{7} = 1 has *seven* distinct solutions — the seven roots of unity. Solver Venk Natarajan wrote these out in standard form as cos(2𝜋*k*/7) + *i*·sin(2𝜋*k*/7), where *i* is the imaginary unit and *k* was any whole number less than 7 (i.e., 0, 1, 2, 3, 4, 5 or 6). Go ahead — pick a value for *k* and raise that complex number to the seventh power. You’ll get a value of 1!

Most solvers opted to write these complex roots of unity in polar form: exp(2𝜋*ik*/7). Squaring a complex number on the unit circle is equivalent to doubling its argument, or the angle it makes with the positive real axis. The number exp(2𝜋*i*/7) was one-seventh of the way around the unit circle; squaring gave you a number that was two-sevenths of the way around; squaring *that* gave you a number that was four-sevenths around; and squaring *that* gave you a number that was eight-sevenths around, which was equivalent to one-seventh — the original number!

So three distinct numbers that were squares of each other were **exp(2𝜋***i***/7), exp(2𝜋***i***·2/7) and exp(2𝜋***i***·4/7)**.

For extra credit, you had to find three other numbers with the same property. Solvers among The Hewitt School Problem Solving & Posing Class recognized that the answer above involved only three of the roots of unity — but what about the others?

The root exp(2𝜋*i*·3/7) was three-sevenths of the way around the unit circle; squaring gave you a number that was six-sevenths around; squaring *that* gave a number that was twelve-sevenths around, which was equivalent to five-sevenths; and squaring *that* gave you a number that was ten-sevenths around, which was equivalent to three-sevenths — the original number. That meant the other three distinct numbers that were squares of each other were **exp(2𝜋 i·3/7), exp(2𝜋i·6/7), and exp(2𝜋i·5/7)**.

Until the next time complex numbers make a surprise appearance in this column, remember to keep it real!

## Solution to last week’s Riddler Classic

Congratulations to 👏 Emma Knight 👏 of Toronto, Ontario, Canada, winner of last week’s Riddler Classic.

Last week, Martina and Olivia each secretly generated their own random real number, selected uniformly between 0 and 1. Starting with Martina, they took turns declaring (so the other could hear) who they thought probably had the greater number until the first moment they agreed. Throughout this process, their respective numbers did not change. So for example, their dialogue might have gone as follows:

Martina: My number is probably bigger.

Olivia: My number is probably bigger.

Martina: My number is probably bigger.

Olivia: My number is probably bigger.

Martina: Olivia’s number is probably bigger.

They were playing as a team, hoping to maximize the chances they correctly predicted who had the greater number.

For any given round with randomly generated numbers, what was the probability that the person they agreed on really did have the bigger number?

There was more than one way to interpret this puzzle. One way was to assume that Martina and Olivia were truthful with each other, always using “probably” to indicate what they believed had at least a 50 percent chance of being true. For now, let’s follow this interpretation and see where it led.

Suppose Martina’s number was *x* and Olivia’s was *y*, both chosen randomly, independently and uniformly between 0 and 1. The set of all possible ordered pairs (*x*, *y*) was defined as the unit square with vertices at (0, 0), (1, 0), (1, 1) and (0, 1). For which regions inside this square would Martina and Olivia correctly agree?

When *x* was greater than 0.5, Martina would say her number was probably bigger (which Olivia would understand to mean that *x* was greater than 0.5). Meanwhile, if *y* was less than 0.5, Olivia would correctly agree that Martina’s number was greater. Similarly, if *x* was less than 0.5 and *y* was greater than 0.5, the pair would correctly agree. Already, these two scenarios accounted for half the area of the unit square.

But what if *both* *x* and *y* were greater than 0.5? Again, Martina would initially say that she probably had the bigger number. If *x* and *y* were on either side of 0.75, they would agree correctly. If both *x* and *y* were greater than 0.75, they would disagree and continue with 0.875 (halfway between 0.75 and 1) as their next pivot.

However, if *x* and *y* were both between 0.5 and 0.75, then Martina would first say she probably had the bigger number, and then Olivia would agree, ending things right then and there. At this point, they both knew *x* and *y* were between 0.5 and 0.75. But without any additional information, each was equally likely to be the bigger number, meaning there was a 50 percent chance that their guess that Olivia had the bigger number was right.

Solver Austin Shapiro graphed the unit square, splitting it up into the cases we’ve been discussing (and using binary to indicate the values of the guesses). The top-right half shows when Olivia’s number is greater, while the bottom-left half shows when Martina’s number is greater. Meanwhile, squares and rectangles shaded green indicate when they agree Olivia’s number is probably bigger, while pink indicates when they agree Martina’s number is probably bigger.

The probability that they would guess correctly was the fraction of the area that was on the “correct” side of the diagonal dividing line. One way to calculate this was to add up the areas of the triangles on the “wrong” side. The two largest triangles in the middle each had area 1/32, while each next largest pair was four times smaller than the previous pair. Summing these areas gave you an infinite geometric series: 1/16 · (1 + 1/4 + 1/4^{2} + 1/4^{3} + …), which equaled 1/16 · 4/3, or 1/12. Again, this was the probability that Martina and Olivia would be *wrong*, which meant the probability they’d be right was **11/12**. Not bad, and way better than a coin flip!

As I said from the beginning, there was another way to interpret the puzzle: Martina and Olivia might not have always been truthful, but could have strategically lied along the way if it meant improving their chances of being right — if only they were allowed to agree upon this strategy beforehand. As observed by solver Laurent Lessard, Martina and Olivia might agree that their first statements told whether their respective numbers were greater than 0.01, the second as to whether their numbers were greater than 0.02, and so on. They could get unlucky if, say, both numbers were between 0.63 and 0.64. But with arbitrary precision, they could be as likely to succeed as they had the patience for.

For extra credit, you considered what would happen if Martina and Olivia stopped only when Olivia first agreed with Martina. It turned out that this didn’t affect the results. If Martina and Olivia were playing truthfully, their chances of being correct were still **11/12**. But if they were playing strategically, there was now a way for them to always be correct *without* any prior communication: Martina could reveal the binary representation of her number, one digit at a time, so Olivia would know exactly the right moment to agree.

## 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.