Skip to main content
Menu
Can You Corral Your Hamster?

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.

Riddler Express

From Josh Silverman comes a puzzle that’s out of this world:

When you started your doctorate several years ago, your astrophysics lab noticed some unusual signals coming in from deep space on a particular frequency — hydrogen times tau. After analyzing a trove of data measured at many regular intervals, you compute that you heard zero signals in 45 percent of the intervals, one signal in 38 percent of the intervals and two signals in the remaining 17 percent of the intervals.

Your research adviser suggests that it may just be random fluctuations from two sources. Each source had some fixed probability of emitting a signal that you picked up, and together those sources generated the pattern in your data.

What do you think? Was it possible for your data to have come from two random fluctuations, as your adviser suggests?

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

Riddler Classic

From Scott Ogawa comes a riddle about rodents of usual size:

Quarantined in your apartment, you decide to entertain yourself by building a large pen for your pet hamster. To create the pen, you have several vertical posts, around which you will wrap a sheet of fabric. The sheet is 1 meter long — meaning the perimeter of your pen can be at most 1 meter — and weighs 1 kilogram, while each post weighs k kilograms.

Over the course of a typical day, your hamster gets bored and likes to change rooms in your apartment. That means you want your pen to be lightweight and easy to move between rooms. The total weight of the posts and the fabric you use should not exceed 1 kilogram.

For example, if k = 0.2, then you could make an equilateral triangle with a perimeter of 0.4 meters (since 0.4 meters of the sheet would weigh 0.4 kilograms), or you could make a square with perimeter of 0.2 meters. However, you couldn’t make a pentagon, since the weight of five posts would already hit the maximum and leave no room for the sheet.

You want to figure out the best shape in order to enclose the largest area possible. What’s the greatest value of k for which you should use four posts rather than three?

Extra credit: For which values of k should you use five posts, six posts, seven posts, and so on?

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

Solution to last week’s Riddler Express

Congratulations to 👏 Alban 👏 of Jacksonville Beach, Florida, winner of last week’s Riddler Express.

Last week, you had a large pile of squares that each had a side length of 1 inch. One square was blue, while all the other squares were white. You wanted to arrange several white squares so they covered part of the blue square but didn’t overlap with each other. (The entire blue square did not have to be covered, while the blue area that each white square covered had to be nonzero.)

What was the greatest number of white squares you could have placed?

First, a quick acknowledgment that this was very similar to a problem posed by Martin Gardner some years ago. Special thanks to reader Brian Kell for pointing this out!

Nevertheless, this still proved to be a very challenging express, with a lot of disagreement: Among the hundreds of submitted responses, 2 percent said the answer was four, 3 percent said the answer was five, 14 percent said the answer was six, 56 percent said the answer was seven, 7 percent said the answer was eight, and 4 percent said the answer was nine. (There was a smattering of other answers as well, including readers who creatively wanted to stack paper-thin squares in the third dimension.)

Nine was not the answer. Remember, all the squares were the same size. So if you placed a 3-by-3 grid of white squares over the blue one and then rotated the grid about its center, at most five of the white squares would have an overlapping area with the blue square.

The majority of readers thought the answer was seven — there must be something to that. Solver Michael Branicky’s five-year-old (!) daughter Lydia may have been the youngest to attempt this puzzle. She got seven white squares to overlap with the blue square by arranging them in a rotated honeycomb pattern:

At this point, we’ve seen that seven squares were possible, while nine squares were not possible. So what about eight squares?

Solver Daniel Thompson illustrated different examples, from one white square all the way up to eight:

arrangement of eight white squares so they all overlap a blue square but not each other

It wasn’t as symmetric as the seven-square solution. But by tilting the various squares just right, it was possible to make room for that eighth white square in the middle.

While eight may not be a perfectly square number, this week it was a perfectly hip number.

Solution to last week’s Riddler Classic

Congratulations to 👏 Richard Guidry Jr. 👏 of Baton Rouge, Louisiana, winner of last week’s Riddler Classic.

Last week, the Riddler Manufacturing Company had an issue with their production of foot-long rulers. Each ruler was accidentally sliced at three random points along the ruler, resulting in four pieces. Looking on the bright side, that meant there were then four times as many rulers — they just happened to have different lengths.

On average, how long were the pieces that contained the 6-inch mark?

The problem as stated was slightly ambiguous. I have it on good authority that, for each ruler, the Riddler Manufacturing Company chose the three random points before doing any slicing. (If you assumed a slice was made after each point was selected, it was possible to get different and equally interesting results.)

Solver Quoc Tran declared that “math is for nerds,” before running 50,000 simulations of broken rulers like a total geek. He found that the length of the piece containing the 6-inch mark followed a rather curious distribution (shown below), with an average of approximately 5.621 inches.

Julian Gerez found a similar distribution, further noting that the unusual shape was due to the mashing together of two distinct cases, depending on whether the 6-inch mark was on one of the two middle pieces or on one of the two end pieces — but more on that in a moment!

So that was the computer geeks; now back to the math nerds. The most rigorous way to solve this is with calculus, integrating the product of each possible length multiplied by its relative probability — essentially calculating the mean value of the theoretical curve that Quoc Tran’s histogram approximates. Emma Knight fearlessly worked her way through those messy integrals, arriving at an answer of 5.625 inches.

An alternative approach was to break the problem down into two cases, depending on which of the four pieces contained the 6-inch mark. If the 6-inch mark was on one of the two end pieces of the broken ruler, that meant the three random breaks were all between the 0- and 6-inch marks (which occurred with a one-in-eight probability) or all between 6- and 12-inch marks (which also occurred with a one-in-eight probability). In other words, 25 percent of the time the three random breaks were all on one side of the 6-inch mark, while the other 75 percent of the time there was a single break on one side of the 6-inch mark and two breaks on the other side.

When all three breaks were on one side, the length of the piece with the 6-inch mark was 6 inches plus the average distance between the 6-inch mark and nearest of the three breaks. Regular solvers of Riddler Classics may know a thing or two about order statistics, particularly the result that when you choose N random values from a uniform distribution between 0 and 1, the expected value of the smallest number is 1/(N+1), the expected value of the second smallest is 2/(N+1), and so on up to the largest number, which has an expected value of N/(N+1). So when the three random breaks all occurred (uniformly) over a 6-inch range, the average distance between the 6-inch mark and the nearest break was one-fourth (since four is one more than three) of the total range, or 1.5 inches. Putting the two pieces together, that meant 25 percent of the time the average length was 6+1.5, or 7.5 inches.

But what about the other 75 percent of the time? As we said, there were two random breaks on one side of the 6-inch mark and one break on the other side. The average distance between the 6-inch mark and nearest among two breaks was one-third (since three is one more than two) of the length, or 2 inches. And the average distance between the 6-inch mark and the single break on the other side was one-half (since two is one more than one) of the length, or three inches. Putting these two pieces together, that meant 75 percent of the time the average length was 2+3, or 5 inches.

No integrals required, and we almost have our answer! Using the linearity of expectation, as solver Steve Gabriel did, the average length was 0.25(7.5) + 0.75(5), or 5.625 inches — the same answer we got from calculus!

But the fun didn’t stop there. Several readers took this puzzle to new heights, looking at how the average length of the piece with the 6-inch mark changed with the number of break points, as well as the average length of pieces containing other points on the ruler like the 1- or 2-inch mark. Laurent Lessard combined these into a single generalization, finding the expected length of the piece a fraction a along a ruler of length L broken at N random points. By computing the distribution for the number of breaks on either side of the selected point and applying order statistics, he found this length to be (2−aN+1−(1−a)N+1)L/(N+1).

One more thing: As N got very large — meaning there were many random breaks in the ruler — the average length Laurent found approached 2L/(N+1) for any value of a. In other words, as soon as you pick a point on the ruler and ask for the average length of the piece containing that point, the answer will be twice the length of the average piece. Again, that’s for any point you pick!

It’s a bizarre paradox, to be sure. My sense is this happens because you are looking for the next break in each of the two directions along the ruler. If anyone happens to make further headway on this, be sure to let Laurent (and me!) know.

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

Footnotes

  1. Important small print: In order to 👏 win 👏, I need to receive your correct answer before 11:59 p.m. Eastern time on Monday. Have a great weekend!

Zach Wissner-Gross leads development of math curriculum at Amplify Education and is FiveThirtyEight’s Riddler editor.

Comments