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.
From Taylor Firman comes an opportunity to make baseball history:
This year, Major League Baseball announced it will play a shortened 60-game season, as opposed to the typical 162-game season. Baseball is a sport of numbers and statistics, and so Taylor wondered about the impact of the season’s length on some famous baseball records.
Some statistics are more achievable than others in a shortened season. Suppose your true batting average is .350, meaning you have a 35 percent chance of getting a hit with every at-bat. If you have four at-bats per game, what are your chances of batting at least .400 over the course of the 60-game season?2 And how does this compare to your chances of batting at least .400 over the course of a 162-game season?
Extra credit: Some statistics are less achievable in a shortened season. What are your chances of getting a hit in at least 56 consecutive games, tying or breaking Joe DiMaggio’s record, in a 60-game season? And how does this compare to your chances in a 162-game season? (Again, suppose your true batting average is .350 and you have four at-bats per game.)
Extra extra credit: In a 60-game season, what are your chances of both batting at least .400 and getting a hit in at least 56 consecutive games?
The solution to this Riddler Express can be found in the following week’s column.
From Jason Shaw comes a new twist on an old fable:
The tortoise and the hare are about to begin a 10-mile race along a “stretch” of road. The tortoise is driving a car that travels 60 miles per hour, while the hare is driving a car that travels 75 miles per hour. (For the purposes of this problem, assume that both cars accelerate from 0 miles per hour to their cruising speed instantaneously.)
The hare does a quick mental calculation and realizes if it waits until two minutes have passed, they’ll cross the finish line at the exact same moment. And so, when the race begins, the tortoise drives off while the hare patiently waits.
But one minute into the race, after the tortoise has driven 1 mile, something extraordinary happens. The road turns out to be magical and instantaneously stretches by 10 miles! As a result of this stretching, the tortoise is now 2 miles ahead of the hare, who remains at the starting line.
At the end of every subsequent minute, the road stretches by 10 miles. With this in mind, the hare does some more mental math.
How long after the race has begun should the hare wait so that both the tortoise and the hare will cross the finish line at the same exact moment?
The solution to this Riddler Classic can be found in the following week’s column.
Solution to last week’s Riddler Express
Congratulations to 👏 Seth Weinberg 👏 of Columbus, Ohio, 👏 Ryan Quattlebaum 👏 of Holly Springs, North Carolina, 👏 Garland Castaneda 👏 of Modesto, California and 👏 Jake Hancock 👏 of Atlanta, Georgia, winners of last week’s Riddler Express.
Last week, you played the Riddler version of the 24 Game. Your goal was to make a numerical expression that equals 24, using each of four given numbers once, along with parentheses, addition, subtraction, multiplication, division and exponentiation — that last one being a fun wrinkle.
For example, if I had given you the numbers 1, 2, 3 and 8, then valid solutions would have been 8×3×(2−1) and (3+1)×(8−2), since they both equal 24. However, concatenation was not an allowed operation, which meant (32−8)×1 was not a solution — that is, you couldn’t smush the 3 and the 2 together to get 32.
Given the four numbers 2, 3, 3 and 4, how could you make 24?
As it turned out, there was no way to get 24 using just parentheses, addition, subtraction, multiplication and division. There were four different classes of solutions, and every single one of them involved exponentiation:
- (32−3)×4, which was found by Seth.
- (4−2)3×3, which was found by Garland.
- (4÷2)3×3, which was found by Ryan.
- 4(3/2)×3, which was found by Jake.
Each of these solutions could also be rearranged to find several more. For example, (4÷2)3×3 could also have been written as 3×(4÷2)3, or even as 3÷(2÷4)3.
I honestly thought that the last one, 4(3/2)×3, would stump most solvers. After all, noninteger exponents aren’t something most people encounter every day. But I was wrong — more than 10 percent of solvers answered with 4(3/2)×3 or an equivalent expression. I should never have doubted Riddler Nation!
A few solvers had some extra fun and submitted their own, even more challenging sets of numbers. How many ways can you make 24 with each of the following numbers?
- 2, 3, 10 and 10 (courtesy of Emma Knight)
- 3, 3, 8 and 8 (also courtesy of Emma Knight)
- 2, 3, 6 and 6 (courtesy of Andrew Heairet)
- 0, 0, 2 and 5 (courtesy of João Coelho)
Finally, while this seemed to be a conventional pencil-and-paper sort of riddle, a few solvers turned to their computers, having them generate every possible combination of the four numbers, the allowed operations and parentheses. For example, João’s C++ code and Scott Carr’s MATLAB code ran through the thousands of possibilities, finding every last expression that equals 24.
Scott and João further found that 37 was the smallest number you could not make with 2, 3, 3 and 4. Sounds like the makings of another riddle…
Solution to last week’s Riddler Classic
Congratulations to 👏 Tobias Tapirello 👏 of Budapest, Hungary, winner of last week’s Riddler Classic.
Last week, you were playing with a toy that had five rings of different diameters and a tapered column. Each ring had a “correct” position on the column, from the largest ring that fit snugly at the bottom to the smallest ring that fit snugly at the top.
When placed on the column, each ring slid down to its correct position, if possible. Otherwise, it rested on what was previously the topmost ring.
For example, if you stacked the smallest ring first, then you couldn’t stack any more rings on top. But if you stacked the second-smallest ring first, then you could stack any one of the remaining four rings above it, after which you couldn’t stack any more rings.
For example, here were four different stacks you could make:
How many unique stacks could you create using at least one ring?
First off, there were 31 stacks that resulted in each ring being in its correct position. That’s because each of the five rings could be on the stack or off it — two possibilities. So the number of such stacks was 2×2×2×2×2, or 32. Subtracting the one stack with no rings on it meant there were 31 unique stacks.
So then what about stacks with rings that were not in their correct position, but rather lying atop smaller rings? Counting up all these stacks, while being sure not to miss or double count any, got you to the heart of this puzzle.
One approach was to draw them all out, as solver Allen Gu did (with the help of his computer):
That’s all of them! It turned out there were a grand total of 65 unique stacks.
For extra credit, you were asked to find a general solution, the number of unique stacks given N rings. In working this out, many solvers tried their hand at stacks with fewer rings:
- With one ring, there was one possible stack.
- With two rings, there were three possible stacks.
- With three rings, there were eight possible stacks.
- With four rings, there were 22 possible stacks.
A pattern wasn’t immediately obvious. As noted by solver Meghan O’Keefe, the key was to divide the original problem up into five cases, depending on the number of rings you ultimately wanted on the stack.
There were five ways to place exactly one ring on the stack — one way for each ring. That wasn’t too hard. If you wanted exactly two rings on the stack, the first ring you placed couldn’t have been the topmost ring, because you couldn’t place a second ring above it. That meant you had four choices for the first ring. And the second ring could have been any ring except the one you already placed — again, four choices. So in all, there were 4×4, or 42, unique stacks with two rings.
What if you wanted a stack with three rings? Then the first ring couldn’t have been one of the top two rings, meaning it had to be one of the bottom three rings. Which ring could you have placed second? It couldn’t have been the ring you just placed, nor could it have been the topmost ring, which again left you with three rings to choose from. Which ring could you have placed third? It couldn’t have been either of the two rings you just placed, but the other three were all fair game. So in all, there were 3×3×3, or 33, unique stacks with three rings.
This pattern continued for any number of desired rings — with each ring you placed, it worked out that you still had the exact same number of rings to choose from. Including the cases with four or five desired rings, the total number of stacks was 51 + 42 + 33 + 24 + 15, which, sure enough, equals 65.
In general, given N rings, there are N1 + (N−1)2 + … + 2(N−1) + 1N unique stacks. This number grows rather quickly with N. And yes, these numbers have their own OEIS sequence.
I’m pleased to say there was no shortage of creative solutions to this extra credit. Josh Silverman arrived at the solution via recursion and telescoping, while Lucas Fagan impressively solved it using the inclusion-exclusion principle.
Oh, and just for fun, here are all 209 unique stacks when there are six rings (again courtesy of Allen Gu):
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.