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 next week’s 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.
The Riddler Isles are a chain of small islands on the Constant Sea. One of them, Euclid Island, is perfectly rectangular and measures 3 miles long by 2 miles wide. While walking across the island on a recent vacation, I was often interested in locating the point on the shore that was nearest to my current position.
One morning, I realized that from where I was standing there were two distinct points on the shore that were both the closest such points. I was excited by my discovery, only to realize it had been made years earlier. It turned out I was on a hiking trail that connected all such locations on the island — those with multiple nearest points on the shore.
What is the total length of this trail on Euclid Island?
Extra credit: Al-Battani Island is another of the Riddler Isles, but it’s elliptical rather than rectangular. Al-Battani Island’s major axis is 3 miles long, while its minor axis is 2 miles long. Like Euclid Island, Al-Battani Island has a hiking trail that connects all locations with multiple nearest points on the shore. What is the total length of this trail on Al-Battani Island?
The solution to this Riddler Express can be found in the following week’s column.
This week’s Riddler Classic is inspired by Kareem Carr:
We usually think of addition as an operation applied to a field like the rational numbers or the real numbers. And there is good reason for that — as Kareem says, “Mathematicians have done all the hard work of figuring out how to make calculations track with reality. They kept modifying and refining the number system until everything worked out. It took centuries of brilliant minds to do this!”
Now suppose we defined addition another (admittedly less useful) way, using a classic model organism: the nematode. To compute the sum of x and y, you combine groups of x and y nematodes and leave them for 24 hours. When you come back, you count up how many you have — and that’s the sum!
It turns out that, over the course of 24 hours, the nematodes pair up, and each pair has one offspring 50 percent of the time. (If you have an odd number of nematodes, they will still pair up, but one will be left out.) So if you want to compute 1+1, half the time you’ll get 2 and half the time you’ll get 3. If you compute 2+2, 25 percent of the time you get 4, 50 percent of the time you’ll get 5, and 25 percent of the time you’ll get 6.
While we’re at it, let’s define exponentiation for sums of nematodes. Raising a sum to a power means leaving that sum of nematodes for the number of days specified by the exponent.
With this number system, what is the expected value of (1+1)4?
Extra credit: As N gets larger and larger, what does the expected value of (1+1)N approach?
The solution to this Riddler Classic can be found in the following week’s column.
Solution to last week’s Riddler Express
Congratulations to 👏 David Daly 👏 of Glendale, Arizona, winner of last week’s Riddler Express.
Last week, you made it to the final round of the Riddler Rock, Paper, Scissors tournament.
The rules were simple: Rock beat scissors, scissors beat paper, and paper beat rock. Moreover, the game was “sudden death,” so the first person to win a single round was immediately declared the grand champion. (If both players chose the same object, then you simply played another round.)
Fortunately, your opponent was someone you had studied well. Based on the motion of their arm, you could tell whether they would (1) play rock or paper with equal probability, (2) play paper or scissors with equal probability or (3) play rock or scissors with equal probability. (Every round fell into one of these three categories.)
If you strategized correctly, what were your chances of winning the tournament?
Well, if you strategized like solver Carenne Ludeña, you won the tournament a whopping 100 percent of the time. When your opponent played rock or paper with equal probability, you knew with certainty they wouldn’t play scissors, and that meant if you played paper you couldn’t lose. You also had a 50 percent chance of winning the round, i.e., whenever your opponent played rock.
Each of the three scenarios listed in the problem had a corresponding response. As we just said, when your opponent played rock or paper, you should play paper. When your opponent played paper or scissors, you should play scissors. And when your opponent played rock or scissors, you should play rock. With this strategy, you would win half the time, draw half the time, and lose … never.
At this point, many solvers recognized this meant you were guaranteed to win the tournament eventually, as the probability of drawing infinitely many games was vanishingly small. Solver Stephen Paisley formally demonstrated this with the geometric series 1/2 + 1/4 + 1/8 + 1/16 + … (your chances of having won in each successive round), which indeed sums to 1, or 100 percent.
Finally, as some readers observed, the original puzzle was slightly ambiguous as written. When you were told that your opponent would “play rock or paper with equal probability,” most solvers assumed that meant both probabilities were 50 percent, rather than being equal but less than 50 percent. While that was the intent of the puzzle, it wasn’t explicitly stated.
If these equal probabilities were close to 50 percent, then your strategy wouldn’t change (although your chances of winning the tournament would go down). For example, if you knew there was a 40 percent chance your opponent would play rock, a 40 percent chance they’d play paper and a 20 percent chance they’d play scissors, then your best bet would still be to play paper. But instead of always winning the tournament, your chances of victory would be 0.4 + 0.42 + 0.43 + …, or 2/3.
But once the equal probabilities dipped below one-third, you needed to adjust your strategy. Suppose you knew there was a 10 percent chance your opponent would play rock, a 10 percent chance they’d play paper and an 80 percent chance they’d play scissors. Now your best bet was to play rock, and your chances were 0.8 + 0.8(0.1) + 0.8(0.1)2 + 0.8(0.1)3 + …, or 8/9.
Any which way, it seems like you’re pretty good at rock, paper, scissors. My winning move against you would be not to play.
Solution to last week’s Riddler Classic
Congratulations to 👏 Rick 👏 of Cloverdale, California, winner of last week’s Riddler Classic.
Last week, the inaugural graduating class of Riddler High School, more than 100 students strong, received their diplomas. They were lined up along the circumference of the giant circular mosaic on the plaza in front of the school, while their principal, Dr. Olivia Rhodes, stood atop a tall stepladder in the middle.
Dr. Rhodes observed that every one of the N graduates — all except Val, the valedictorian — was standing in the wrong place. Moreover, Dr. Rhodes said that no two graduates were in the correct position relative to each other. (Two graduates would be in the correct position relative to each other if, for example, graduate A was supposed to be 17 positions counterclockwise of graduate B and was indeed 17 positions counterclockwise of graduate B — even if both graduates were in the wrong positions.)
But Val corrected Dr. Rhodes. Given the fact that there were N students, there must have been at least two who were in the correct position relative to each other.
Given that there were more than 100 graduates, what was the minimum number of graduates who were posing for the class photo?
That was a lot of information to take in. To summarize, there were N students arranged in a circle. Exactly one of them was in the correct position, while N−1 were not. Furthermore, this value of N guaranteed that at least two students were in the correct position relative to each other.
The puzzle’s submitter, Dave Moran, solved this by looking at how far apart each student was from their correct position (say, in the clockwise direction) as a function of their correct position, x. Let’s call this function E(x). So because Val was correctly in the first position, E(1) = 0, meaning she was zero spots away from her correct position. But E(2), E(3), and so on, all the way to E(N), were nonzero, since all the other students were in the wrong position.
But what if no students had been in the correct position relative to each other? Well, imagine if there had been two students with correct positions a and b, such that E(a) = E(b). That would have meant they were shifted the same number of spots clockwise from their correct positions, and so they would have been in the correct position relative to each other! To avoid this situation, no two students could have had the same value of E(x).
Now recall that there were N students. That meant E(x) could take on exactly N distinct values, from 0 to N−1. And because no two students could have the same value of E(x), every value from 0 to N−1 had to be taken by one and only one student.
We’re getting there — but first, a slight detour. Solver Eric Dallal looked at the sum of all the errors, E(1) + E(2) + E(3) + … + E(N). If you started with a correct arrangement of the entire class, this sum would be zero. You could also swap different pairs of students over and over again to get any desired overall arrangement of the class. But every time you swapped two students, the sum either didn’t change, or it increased or decreased by N. And that meant this sum had to be a multiple of N.
Okay, we’re in the home stretch. For there to have been no students who were in the correct position relative to each other, we needed the sum of the errors — that is, the sum of the numbers from 0 to N−1, or N(N−1)/2 — to be a multiple of N. This was true whenever N was odd.
To summarize, it was only possible to arrange students so that no two were in the correct position relative to each other when N was odd.
Want an example of such an arrangement? Well, you’re in luck, thanks to solver Inga. Consider a class with 101 students — an odd number. Val was in the correct position, but suppose everyone else was reflected across the line connecting Val and Dr. Rhodes. If the salutatorian was supposed to be directly clockwise from Val, they now found themselves in position 101, meaning E(2) was 101−2, or 99. Working your way around the circle, you’d see that each student indeed had a unique value of E(x).
At last, we return to the original question that was posed. What was the smallest class size such that at least two students had to have been in the correct relative position? That would be the smallest even number greater than 100, and so the answer was 102.
In addition to this week’s winner, Val from the inaugural graduating class really knew her number theory. The other seniors, including Zach, need to step up their game.
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 firstname.lastname@example.org