Skip to main content
Are You Hip Enough To Be Square?

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 Dean Ballard comes a sneaky sorting of squares:

You have a large pile of squares that each have a side length of 1 inch. One square is blue, while all the other squares are white. You want to arrange several white squares so they cover part of the blue square but don’t overlap with each other.

For example, here’s how you could arrange four white squares so they each cover part of the blue square.

four white squares partially overlapping with a blue square but not each other

What is the greatest number of white squares you can place so that each covers part of the blue square without overlapping one another? (The entire blue square does not have to be covered, while the blue area that each white square covers must be nonzero.)

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

Riddler Classic

From Angela Zhou comes one riddle to rule them all:

The Riddler Manufacturing Company makes all sorts of mathematical tools: compasses, protractors, slide rules — you name it!

Recently, there was an issue with the production of foot-long rulers. It seems that each ruler was accidentally sliced at three random points along the ruler, resulting in four pieces. Looking on the bright side, that means there are now four times as many rulers — they just happen to have different lengths.

On average, how long are the pieces that contain the 6-inch mark?

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

Solution to last week’s Riddler Express

Congratulations to 👏 Richard Dickerman 👏 of Dallas, Texas, winner of last week’s Riddler Express.

Last week, I was hiking on Euclid Island, which was perfectly rectangular and measured 3 miles long by 2 miles wide. I was especially interested in locating the point on the shore that was nearest to my position.

From where I had been standing, there were in fact two distinct points on the shore that were both the closest such points. It turned out the trail I was hiking along connected all such locations on the island — those with multiple nearest points on the shore.

What was the total length of this trail on Euclid Island?

The dead center of the island was a logical place for many solvers to start. It was just 1 mile along the width — in either direction. But before we looked for other such points, what did it mean, mathematically, for there to be multiple nearest points on the shore?

One way to think about it was to grow a circle (kind of like blowing up a balloon) centered at your current position. As the circle got larger and larger, it eventually touched (i.e., was tangent to) the shore. The moment the circle touched the shore, you had to look at how many places it touched the shore. If there was only one such point of tangency, then you weren’t on the trail. But if there were two or more such points, then you were indeed on the trail.

So what did Euclid Island’s trail actually look like? Rebekah Murphy noticed the trail included a segment of length 1 that ran east-west down the middle of the island. Every point on this segment was equidistant from the north and south shores. (Interestingly, the endpoints of this segment were equidistant from three distinct points along the shore.)

But the fun didn’t end there. Ishaan Bhatia noted that the trail also had four additional segments, which ran between the endpoints of the middle segment and the four corners of the island. (While the corners themselves were not part of the trail — after all, they were on the beach — the trail came infinitesimally close, which meant the exclusion of these points didn’t affect your length calculations.)

The animation below puts all five segments together, revealing the entire green hiking trail on Euclid Island. The circle that grows and shrinks demonstrates the points of tangency (i.e., the nearest spots on the beach) for each location on the trail.

At this point, we’re ready to answer the original question, which asked you to determine the total length of the trail. As we already said, the middle segment had a length of 1. Using the Pythagorean theorem (or, rather, the Babylonian Formula), the remaining four segments had a length of √2. That meant the total length of the trail was 1+4√2 miles, or about 6.657 miles.

For extra credit, you looked at Al-Battani Island, which was elliptical rather than rectangular. Al-Battani Island’s major axis was 3 miles long, while its minor axis was 2 miles long. Like Euclid Island, Al-Battani Island had a hiking trail that connected all locations with multiple nearest points on the shore. What was the total length of this trail on Al-Battani Island?

As with Euclid Island, a good place to start was the dead center, which was 1 mile from the two endpoints of the minor axis. And once again, there was a central horizontal segment that ran along the major axis. The challenge here was figuring out just where the trail ended.

It didn’t cover the entire major axis, because when it got too close to the endpoints, there was only a single point of tangency. In other words, you had to find when the circle — centered on an ellipse’s major axis and internally tangent to the ellipse — transitioned between one and two points of tangency, as illustrated below:

hiking trail on Al-Battani Island

And that’s where the math got hairy. If you assumed the ellipse was centered at (0, 0), then it was described by the equation x2/1.52 + y2 = 1. Meanwhile, the equation for a circle with radius R centered at h on the x-axis was (xh)2 + y2 = R2. From there, you had to find coordinates (x, y) that satisfied both equations, but you also needed to use calculus to ensure the circle and the ellipse had matching slopes at these points.

In the end, as long as the center of the circle was between (−5/6, 0) and (5/6, 0), the circle was tangent to the ellipse in two locations. That meant the distance between these two points — about 1.667 miles — was the length of the trail and the answer to the extra credit.

Quite the challenging hike, if you ask me. And if you’d like to explore this problem further, check out an interactive version of this graph on Desmos, courtesy of solver Hypergeometricx.

Solution to last week’s Riddler Classic

Congratulations to 👏 Bill Neagle 👏 of Springfield, Missouri, winner of last week’s Riddler Classic.

Last week, inspired by Kareem Carr, you looked at an alternative definition for addition and followed where it led. To compute the sum of x and y, you combined groups of x and y nematodes and left them for 24 hours. When you came back, you counted up how many you had — and that was the sum!

It turned out that, over the course of 24 hours, the nematodes paired up, and each pair had one offspring 50 percent of the time. (If you had an odd number of nematodes, they still paired up, but one was left out.) So if you wanted to compute 1+1, half the time you’d get 2, and half the time you’d get 3. If you computed 2+2, 25 percent of the time you’d get 4, 50 percent of the time you’d get 5, and 25 percent of the time you’d get 6.

We also redefined exponentiation: Raising a sum to a power meant leaving that sum of nematodes for the number of days specified by the exponent.

With this number system, what was the expected value of (1+1)4?

A good strategy here was to work your way up, one power at a time. First, what was the expected value of (1+1)1? You initially had two nematodes that paired up, and after 24 hours there was a 50 percent chance they’d have one offspring. So the expected value of (1+1)1 was 2.5.

Next, what was the expected value of (1+1)2? In other words, what was the expected number of worms after 48 hours? As we said, after 24 hours, there was a 50 percent chance there were two worms and a 50 percent chance there were three worms. After another 24 hours, the two-worm case had an expected value of 2.5. Meanwhile, the three-worm case resulted in two worms that paired up along with a third wheel. The pair of worms resulted in an expected value of 2.5, and adding the third worm gave an expected value of 3.5. Half the time there would be 2.5 worms, and the other half the time there would be 3.5 worms, which meant the expected value was an even 3.

Let’s do one more: What was the expected value of (1+1)3? Digging through the previous paragraph, we just saw that after 48 hours there was a 25 percent chance of having two worms, a 50 percent chance of having three worms and a 25 percent chance of having four worms. In the two-worm case, the expected number of worms after 72 hours was again 2.5. In the three-worm case, the expected number of worms after 72 hours was 3.5. The four-worm case was more complicated — 25 percent of the time there would still be four worms after 72 hours, 50 percent of the time there would be five worms, and 25 percent of the time there would be six worms. Putting all these cases (and sub-cases) together, the expected value of (1+1)3 was 0.25·2.5 + 0.5·3.5 + 0.25·(0.25·4 + 0.5·5 + 0.25·6), or 3.625.

I’ll spare you all the casework for (1+1)4. After 96 hours, there could be anywhere from two to nine worms. The expected value was 4.40625 worms. Andrew Heairet neatly visualized the breakdown of probabilities over the course of 96 hours:

Mark Girard went beyond 96 hours and found the expected number of nematodes more than two weeks later. This value appeared to increase exponentially over time, which is the perfect segue into the extra credit, which asked you how the expected value of (1+1)N behaved as N got larger and larger. As many solvers correctly observed, the expression goes off to infinity. But the real question was how.

The challenge here related to the “odd worms out,” which sat out reproductive cycles. Were it not for them, the math would have been more straightforward. For each pair of worms, their number either stayed the same or increased by 50 percent over each 24-hour period. Averaging those two possibilities meant the expected number increased by 25 percent every 24 hours. But again, this reasoning didn’t apply, thanks to the occasional one worm who didn’t pair up.

To figure this out, some solvers fit exponential models directly to the data. For example, Hypergeometricx found the growth was intriguingly close to 1.56·(1.23456789)N. Meanwhile, Josh Silverman showed that 2·(1.25)N−1 was in fact a pretty decent approximation.

But Rajeev Pakalapati took the cake, showing — analytically, mind you — that 2·(1.25)N−1 + 0.5 was the limiting behavior of nematode exponentiation. His work is shown below, and you can also follow along via Steve Gabriel’s helpful transcription.

Rajeev Pakalapati'

Indeed, this was a fun and challenging foray into an alternate set of operations. Only one submitter felt threatened enough to compare this riddle to an Orwellian dystopia. Needless to say, they didn’t get very far with the math.

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


  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.