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 or send me an email.
While walking down the street one day, you notice people gathering around a woman playing the shell game. With each game, she places a ball under one of three cups, and then swaps the positions of pairs of cups several times before asking passersby which cup they think the ball is now under.
You have it on good authority that she is playing fairly, performing all the moves in plain sight, albeit too fast for you to track precisely which cups she’s moving. However, you do have one additional key piece of information — every time she swaps cups, one of them has the ball. In other words, she never swaps the two empty cups.
When it’s your turn to guess, you note which cup she initially places the ball under. Then, as she begins to swap cups, you close your eyes and count the number of swaps. Once she is done, you open your eyes again. What is your best strategy for guessing which cup has the ball?
Having solved the shell game in this week’s Express, you are now ready to play the quantum shell game. Instead of a ball, you are now trying to capture an electron. Now, you’re not sure precisely where it is, but you know it’s somewhere on a two-dimensional surface. What’s more, you know that the probability distribution is a 2D Gaussian (or “normal”) distribution. More precisely, the probability the electron is a distance r units in any direction from some central point is proportional to exp(−r2/2).
You have four cylindrical cups, each of which has a radius of 1 unit. In this game, you want to place the cups over the surface to maximize the probability that the electron is in one of the cups.
How should you place the cups, and what is the probability you will catch the electron?
Extra credit: What if you have different numbers of cups, like three, five, six or even more? How would you place the cups, and what would be your chances of catching the electron in one of them?
Solution to last week’s Riddler Express
Congratulations to 👏 Daryl Morris 👏 of Seattle, Washington, winner of last week’s Riddler Express.
Last week, you and your team of cyclists were climbing a mountain with a constant gradient in the Tour de FiveThirtyEight. You made the climb single file, with one rider in front of the other. The first rider set the tempo for the rest to follow — that is, until that first rider ran out of energy, or “cracked.” Upon cracking, a rider could no longer maintain the tempo and fell well behind any riders who still had some remaining energy.
When you began the climb, there were eight riders on your team, and you started at the very back. The seven riders in front of you had exactly enough energy to make it up the entire climb, as long as they were not the first rider. Setting the tempo was hard work, and riding first in line was twice as exhausting as being one of the other riders.
At some point up the mountain, the first rider cracked. Then the next rider cracked, then the next. Eventually, the last rider in front of you cracked, leaving you to contend with the remaining portion of the mountain all on your own. What fraction of the mountain did you climb alone?
To get started, solver Emily Gordon figured out what happened to the first rider among the climbers, whom we’ll call Rider 1. Since they worked twice as hard as the others, Rider 1 only made it halfway up the mountain. Next, Rider 2 took up the pacemaking. Rider 2 had used half of their energy already (since the entire convoy was now halfway up the mountain), which meant Rider 2 used their remaining energy over the next quarter of the climb. In other words, Rider 2 cracked three-quarters of the way up.
From there, you might have noticed a pattern emerge involving powers of two. Rider 1 made it one-half of the way, Rider 2 made it three-quarters of the way, Rider 3 made it seven-eighths of the way and so on. In general, Rider N made it (2N−1)/2N of the way up the mountain. Using this formula, Rider 7 made it 127/128 of the way up, leaving the final 1/128 of the mountain for you to tackle solo.
Having watched this year’s edition of the Tour de France, the exponential decay of pacesetters peeling off the front in this puzzle certainly felt realistic to me. Jumbo-Visma, the team that ultimately claimed the overall fastest rider, often had many riders at the start of a final climb, only to see them peel off slowly at first and then more rapidly near the top, until there was only one rider left to help his team leader.
Solution to last week’s Riddler Classic
Congratulations to 👏 Mikey Mike 👏 of Madison, Wisconsin, winner of last week’s Riddler Classic.
At the Riddler Marble Shop, there were four enormous bags of marbles for you to acquire. They were labeled “red,” “green,” “blue,” and “assorted.” Being the purist that you are, you wanted to select two bags of marbles that were not assorted, and you would have settled for some combination of red, green or blue.
However, noticing your interest in the bags, the shopkeeper alerted you. “Buyer beware,” she warned. “Some jerk switched around the labels on all four bags. Right now, every single bag is incorrectly labeled.” To give you a chance of properly identifying the bags you wanted, she kindly allowed you to take two — and only two — marbles out of any of the bags, one at a time.
How could you guarantee that neither of the two bags you take was assorted?
Since you knew that all four bags were incorrectly labeled, the bag labeled “assorted” was definitely not the assorted bag, meaning it was one of the bags you chose. That was easy; the hard part was figuring out which other bag you should take.
Suppose you picked two marbles from a single bag, such as the one labeled “red.” If you happened to get a red marble, you were in luck — because every bag was mislabeled, this must have been the assorted bag. Simply pick two other bags and you were good to go. Similarly, if you picked a green marble and a blue marble you knew this was the assorted bag. But if you picked two greens or two blues, you couldn’t be absolutely sure whether this was the assorted bag. So you had better not pick two marbles from the same bag.
What if you picked a marble from two different bags with color labels, such as “red” and “green”? If you happened to draw a red marble from the red bag, then you knew it had to be assorted. The same went for the green bag if you drew a green marble from it. If you drew blue marbles from both bags, then that made things a little more interesting. At least one of them had to be the assorted bag. Without knowing which of the two it was, you could happily select the other two bags (“blue” and “assorted”). But if you drew, say, a green marble from the “red” bag and a red marble from the “green” bag, you had no way of knowing for sure which was assorted.
At this point, you clearly had to draw a marble from the bag labeled “assorted” (which, again, you knew was not actually assorted). Without loss of generality (or “WLOG,” as mathematicians like to say), assume this marble was red. That meant the bag labeled “assorted” contained only red marbles. At this point, you might have been tempted to check what was in the bag labeled “red.” If you drew a red marble, you could deduce that it was the assorted bag and you’d pick any two of the other bags. But suppose that second marble was instead green or blue. Without loss of generality (here we go again), suppose it was green.
That meant the bag labeled “red” was either the green bag or the assorted bag. If it was the assorted bag, then it was safe to pick either the bag labeled “green” or “blue.” And if it was the green bag, then the bags labeled “green” and “blue” had to in fact be (in some order) the assorted and blue bags. Since the bag labeled “blue” couldn’t actually be blue (because all the bags were mislabeled), it had to be the assorted bag, meaning the bag labeled “green” was actually blue. In this case, picking the bags labeled “red” or “green” were both safe.
And here came a flash of insight! Regardless of whether the bag labeled “red” was either the green bag or the assorted bag, either way the bag labeled “green” couldn’t have been assorted.
Zooming out from our two “WLOGs,” your strategy was this: First, draw a marble from the bag labeled “assorted” and note the color of this first marble. Then, draw a marble from the bag labeled with that first color, and note the color of this second marble. If that second marble has the same color as its bag’s label, avoid that bag! Otherwise, select the bag labeled with that second color, as well as the bag labeled “assorted.”
By the way, the fact that every bag was mislabeled did quite a bit of work in this problem. While there were 24 ways to assign labels to the four bags, there were only 9 ways to assign the labels so that every bag was mislabeled. With so few ways, drawing just two marbles was able to do the trick.
Want more puzzles?
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.