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

Suppose you have a rope that goes all the way around the Earth’s equator, flat on the ground. (For the entirety of this puzzle, you should assume that the Earth is a perfect sphere with a radius of 6,378 kilometers.)

You want to lengthen the rope just the right amount so that it’s 1 meter off the ground all the way around the Earth. How much longer did you have to make the rope?

If you’ve never heard this puzzle before, the answer is surprisingly small — about 6.28 (i.e., 2𝜋) meters. Also, spoiler alert! (Darn, I was one sentence too late.)

Now, instead of tying the Earth up with *rope*, you’ve moved on to covering the globe with a giant *sheet* that lies flat on the ground. If you want the sheet to be 1 meter off the ground (just like the rope), by how much would you have to increase the area of your sheet?

*Extra credit:* What city, country, land mass or body of water has an area that is very close to your answer?

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

## Riddler Classic

From Duane Miller comes a riddle that is good for absolutely nothing:

Duane’s friend’s granddaughter claimed that she once won a game of War that lasted exactly 26 turns.

War is a two-player game in which a standard deck of cards is first shuffled and then divided into two piles with 26 cards each — one pile for each player. In every turn of the game, both players flip over and reveal the top card of their deck. The player whose card has a higher rank wins the turn and places both cards on the bottom of their pile. In the event that both cards have the same rank, the rules get a little more complicated, with each player flipping over additional cards to compare in a mini “War” showdown. Duane’s friend’s granddaughter said that for *every* turn of the game, she always drew the card of higher rank, with no mini “Wars.”

Assuming a deck is randomly shuffled before every game, how many games of War would you expect to play until you had a game that lasted just 26 turns with no “Wars,” like Duane’s friend’s granddaughter?

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

## Solution to last week’s Riddler Express

Congratulations to 👏 Jacob Herlin 👏 of Denver, Colorado, winner of last week’s Riddler Express.

Last week, you were analyzing some unusual signals from deep space, measured at many regular intervals. You computed 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 suggested that it may just have been 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.

Was your adviser right? Was it possible for your data to have come from two random fluctuations?

At first, this may have sounded like an astronomy question, but as many solvers noted, it was a probability question in disguise. Since there were two random signals, we can assign probabilities to them and see what happens.

Suppose that, for any given interval, the first source emitted a signal with probability *p*, and the second source emitted a signal with probability *q*. If you made the reasonable assumption that the sources were independent, then the probability you heard *two* signals was the product of these probabilities, *pq*. Since you heard two signals 17 percent of the time, that meant *pq* = 0.17. But that still wasn’t enough information to solve the problem.

Next, most solvers opted to analyze the 45 percent of intervals that had zero signals (although looking at the one-signal intervals was equally valid). The probability an interval had zero signals was the probability that the first source didn’t emit a signal, 1−*p*, times the probability the second source didn’t emit a signal, 1−*q*. In other words, (1−*p*)(1−*q*) = 0.45. Expanding the expression on the left gave you 1−*p*−*q*+*pq* = 0.45. Substituting the value 0.17 for *pq* and rearranging a little resulted in the equation *p*+*q *= 0.72.

At this point, there was good news and bad news. The good news was that we were looking for two values, *p* and *q*, knowing both their sum (0.72) and their product (0.17). Anytime that’s the case, we can turn to the quadratic formula. The values *p* and *q* were the solutions to the quadratic equation *x*^{2}−0.72*x*+0.17 = 0.

The bad news, as noted by solver Madeline Barnicle, was that this equation had no real solutions. In other words, **your adviser was mistaken**, and you had an opportunity to show them up. So maybe that was some good news after all.

Looking back, what were the possible probabilities of seeing zero, one or two signals? If we replaced the respective values of 0.45, 0.38 and 0.17 with *A*, *B* and *C* and performed the same analysis, the resulting quadratic equation was *x*^{2}−(1+*C*−*A*)*x*+*C* = 0. For this equation to have any real roots, it had to have a nonnegative discriminant, which meant (1+*C*−*A*)^{2} ≥ 4*C*. So only when that equation was true could you have attributed your data to two random sources.

It seemed like the case was closed.

But not so fast, said solver Daniel Taub, who read the puzzle with a different interpretation. Rather than assume each source emitted exactly zero or one signal, Daniel assumed that each source emitted signals randomly at some average rate — essentially a Poisson process — and then was baffled when no interval produced *three* signals. Solvers Reece Goiffon and Tyler James Burch ran with this interpretation, nevertheless proving that two Poisson processes cannot possibly explain the frequencies listed in the puzzle.

Well, if your data didn’t come from random noise, the truth must still be out there.

## Solution to last week’s Riddler Classic

Congratulations to 👏 Patrick Boylan 👏 of Alexandria, Virginia, winner of last week’s Riddler Classic.

Last week, you were building a large pen for your pet hamster. To create the pen, you had several vertical posts, around which you were wrapping a sheet of fabric. The sheet was 1 meter long — meaning the perimeter of your pen could be at most 1 meter — and weighed 1 kilogram, while each post weighed *k* kilograms.

You also wanted your pen to be lightweight and easy to move between rooms. The total weight of the posts and the fabric you used could not exceed 1 kilogram.

For example, if *k* were 0.2, then you could have made 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 have made a square with perimeter of 0.2 meters. However, you couldn’t have made a pentagon, since the weight of five posts would already hit the maximum and leave no room for the sheet.

You wanted to figure out the shape that enclosed the largest area possible. What was the greatest value of *k* for which you should have used four posts rather than three?

Three posts weighed 3*k*, which meant that you had 1−3*k* meters to build your triangular pen. Importantly, given a fixed perimeter, the triangle with the greatest area was an equilateral triangle (like courtesy of Keith from the United Kingdom). That meant each of the three sides was one-third of the total perimeter, or (1−3*k*)/3. With a little trigonometry, you found that area of this triangle was then (1−3*k*)^{2}√3/36.

Meanwhile, four posts weighted 4*k*, leaving you with 1−4*k* meters for a quadrilateral pen. Now, the shape that maximized the area was a square with sides of length (1−4*k*)/4, and with area (1−4*k*)^{2}/16.

At this point, it was just a matter of finding the values of *k* for which the square’s area was greater than the triangle’s area. The areas were equal when *k* was (3−2^{4}√3)/(12−6^{4}√3), or approximately **0.08964. **This was the answer — the greatest value of *k* for which four posts was a better choice than three posts.

For extra credit, you looked at pens with five posts, six posts, seven posts and so on. For which values of *k* did each number of posts provide the greatest area for your pen?

To solve this generalized version of the polygon, a good first step was to derive a general formula for the area of polygon with *N* sides and perimeter 1−*Nk* (since having *N* sides meant there would be *N* posts with a total weight of *Nk*). Like the triangle and the quadrilateral, the *N*-gon with the maximum area was a *regular N*-gon, with equal side lengths and angles.

First off, the central angle of a regular *N*-gon is 360/*N* (for those of you who prefer to work in degrees rather than radians). Then, using the fact that each of the *N* sides has a length of (1−*Nk*)/*N*, the area of the triangle formed by the central angle and its corresponding side was half the side length — (1−*Nk*)/(2*N*) — times the altitude of the triangle — (1−*Nk*)/(2*N*)·cot(180/*N*). Yes, that is the cotangent function.

But wait! That was the area for just one of the triangles. Since there were *N* of them, that meant the total area of the polygon was *N* times greater — *N*·(1−*Nk*)/(2*N*)·(1−*Nk*)/(2*N*)·cot(180/*N*), or (1−*Nk*)2/(4*N*)·cot(180/*N*).

Armed with this general formula for the area of an *N*-gon, all that remained was plugging in different values of *N* and *k* and seeing, for each *k*, which *N* resulted in the greatest area. Solver Mike Seifert plotted the graphs for the first few values of *N*, finding that as *k* decreased, the optimal number of posts went up incrementally.

So the extra credit was really asking for the points of intersection between the topmost curves from Mike’s graph. The formula for these points was quite messy, but if you’d like to see it nevertheless, check out the write-ups of Laurent Lessard, who found a condition on these values, and David Zimmerman, who attempted to find a closed-form solution.

While the rodent itself may have been of a usual size, I hope you took comfort in the fact that at least the pen could be of an unusual size — depending on your value of *k*.

## 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