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 have a favorite puzzle collecting dust in your attic, find me on Twitter.
And one more thing … there’s going to be a Riddler book! We’re publishing it alongside W.W. Norton, and it will be a collection of Riddler puzzles, along with some brand new ones that have never been seen before. It won’t be out for a while, but amend your wish lists now and stay tuned! I’ll be sure to update you in Riddler columns to come. As we know, there is no Riddler without Riddler Nation.
Large numbers are great! I want to see the biggest ones you can come up with, within limits. In this week’s submission form, I’ve limited how long your answer can be to this Riddler Express problem. What is the largest number you can express in the 10 characters provided to you in the form? (I need to be able to determine precisely what your number is from your submission alone, so no “the highest number submitted + 1” allowed. No infinities allowed.)
From Robbie Ostrow, an a-mazing puzzle of friendship and programming:
You’re lost in a corn maze, which is bad enough, but it’s also winter, and sunset is rapidly approaching. You know that the corn maze is a grid of 10 cells by 10 cells. There can be a wall between any pair of cells, and the whole exterior is walled off. (You were dropped in the maze by a helicopter, as is traditional.)
You know that one cell is an “end square,” which will shoot up flares if anything steps on it. Only then will the corn be harvested so you can make your escape. You also know that it’s possible to reach the end square from your position.
You’re so tired that you can no longer walk. Luckily, though, you remembered to bring your robot pal along. The robot must be given a list of directions as instructions, and will attempt to read each instruction in order and move that direction. For example, “NNWES” will instruct the robot to move north, north, west, east, south. If an instruction is impossible to carry out (i.e., there is a wall in that direction), the robot will bump into the wall then move on to the next instruction as if nothing happened. The robot can’t do any computation or communicate with you after it leaves — it blindly follows the instructions given until it reaches the finish or it runs out of instructions. However, you can do as much computation as you want before sending the robot on its merry way. (Hint: The robot has lots, and lots, and lots of memory.)
What instructions do you feed your robot to guarantee that it will reach the end square somewhere along its journey?
Extra credit: What’s an upper bound for the minimum number of instructions you must feed your robot to guarantee that it reaches the end square?
Solution to last week’s Riddler Express
Congratulations to 👏 Dennis Roos 👏 of Leiden, the Netherlands, winner of last week’s Express puzzle!
You have nine gold coins, but one isn’t pure and is known to be heavier than the others. Using only a simple balance scale, how can you determine the impure coin with only two weighings?
Put three coins on each side of the scale. It will either tip or remain level. If it tips, you know the heavier coin is one of the three on the lower side of the scale. If it remains level, you know the heavier coin is one of the three you haven’t yet weighed. Either way, after one weighing you have three coins which could be heavier, and which we’ll call candidate coins.
Choose any two of those three candidates, and put one on either side of the scale. If it tips, the culprit coin is the one on the lower side of the scale. If it remains level, the culprit is the one of those three you didn’t weigh. And you’re done!
Solution to last week’s Riddler Classic
Congratulations to 👏 Nicholas Wren 👏 of St. Paul, winner of last week’s Classic puzzle!
You now have 12 gold coins, but again, one has been doctored. It’s known to have a different weight than the others, but it could be heavier or lighter. How can you determine the doctored coin, and whether it’s heavier or lighter, with only three weighings?
The goal is to tease out as much information as you can from a single weighing, so you can get down to three candidates that you can figure out in a single weighing, like we did in the Express.
Start by putting four coins on each side of the scale. Assume that your first weighing balances. You now have four impure candidates (the four coins you did not weigh) and eight control coins (the eight you did weigh). Weigh three of the candidates against three of the controls, setting aside one candidate. If your second weighing balances, you’re almost done: The culprit is the candidate you left aside and you can use your third weighing to test whether it’s heavier or lighter than the pure coins. If your second weighing tips, you know whether the culprit is heavier or lighter based on how it tips, and you know it is one of three candidate coins. Your third weighing is the same as in the Riddler Express: Weigh one candidate against one other. If they balance, the one you left aside is the culprit. If it tips, the culprit is the one causing the tipping, and you already know if it’s heavier or lighter.
But what if your first weighing tips? Things get a little trickier here, as the puzzle’s submitter, Josh Kaplan, explains. You now have four heavy candidate coins, four light candidate coins, and four control coins. Keep good track of these! For your second weighing, place the coins like so: HHLL vs. HLCC. If this second weighing balances, you are left with one heavy candidate coin and one light candidate coin. Use your third weighing to compare a heavy candidate with a control coin — if it tips, you found the culprit heavy coin, and if it balances, the culprit is a light coin you set aside. If this second weighing tips, it’ll tip either left-side up or right-side up. If it tips left-side up, you are left with only the two light candidates on the left and the one heavy candidate on the right. For the third weighing, pit the two light candidates against each other, and you’re done. If it tips right-side up, you are left with only the two heavy candidates on the left and the one light candidate on the right. For the third weighing, pit the two heavy candidates each other, and you’re done.
Want to submit a riddle?
Email me at email@example.com.