It’s summertime and my local swimming pool, which has exactly five swimming lanes (and no general swim area), may be opening in the coming weeks. It remains unclear what social distancing practices will be required, but it’s quite possible that swimmers will not be allowed to occupy adjacent lanes.

Under these guidelines, the pool could accommodate at most three swimmers — one each in the first, third and fifth lanes.

Suppose a queue of swimmers arrives at the pool when it opens at 9 a.m. One at a time, each person randomly picks a lane from among the lanes that are available (i.e., the lane has no swimmer already and is not adjacent to any lanes with swimmers), until no more lanes are available.

At this point, what is the expected number of swimmers in the pool?

*Extra credit*: Instead of five lanes, suppose there are *N* lanes. When no more lanes are available, what is the expected number of swimmers in the pool?

Just in time for the Fourth of July, this week’s Classic is about stars on the American flag:

The 50 stars on the American flag are arranged in such a way that they form two rectangles. The larger rectangle is 5 stars wide, 6 stars long; the smaller rectangle is embedded inside the larger and is 4 stars wide, 5 stars long. This square-like pattern of stars is possible because the number of states (50) is *twice* a square number (25).

Now that the House of Representatives has passed legislation that would make the District of Columbia the fifty-first US state — and renamed Washington, Douglass Commonwealth, in honor of Frederick Douglass — a natural question is how to aesthetically arrange 51 stars on the flag.

One pleasing design has a star in the middle, surrounded by concentric pentagons of increasing side length, as shown below. The innermost pentagon has five stars, and subsequent pentagons are made up of 10, 15 and 20 stars. All told, that’s 51 stars.

It just so happens that when *N* equals 50, *N* is twice a square and *N*+1 is a centered pentagonal number. After 50, what is the next integer *N* with these properties?

Congratulations to Josiah Kollmeyer of Baton Rouge, Louisiana, winner of last week’s Riddler Express.

Last week, you were driving north in Riddler City, whose streets run north-south and east-west. At every intersection, you randomly turned left or right, each with a 50 percent chance.

After driving through 10 intersections, what was the probability that you were still driving north?

One way to solve this was to look at what happened after the first few intersections. It wasn’t long before a pattern emerged.

After the first intersection, you had a 50 percent chance of turning east and a 50 percent chance of turning west. In the event you turned *east*, upon reaching the second intersection, you then had a 50 percent chance of turning north and a 50 percent chance of turning south. But in the event you turned *west*, you *still* had a 50 percent chance of turning north and a 50 percent chance of turning south. Putting these possibilities together, that meant that after the second intersection, you were definitely driving north or south, each with a 50 percent chance.

Following this reasoning, solver Lily Koffman realized that after every odd number of intersections, you were driving east or west with equal probability, and after every *even* number of intersections, you were driving north or south with equal probability. Since the given number of intersections, 10, was even, that meant there was a **50 percent** chance you were driving north in the end.

For extra credit, instead of just turning left or right, you now also had the option of driving straight — each with a one-third chance. After driving through 10 intersections, *now* what was the probability that you were still driving north?

This was certainly a trickier scenario. Mike Bourdaa solved it by looking at what would happen if there were fewer intersections, hoping to find a pattern. After *N* intersections, there were a total of 3^{N} equally likely sequences of turns you could make. Mike found that approximately 3^{N}/4 of these sequences — or, more precisely, the smallest whole number greater than 3^{N}/4 — resulted in you driving north.

But that certainly wasn’t the only approach that worked here. Juan Casaravilla solved it using linear algebra, by first lining up the probabilities of driving north, south, east or west into a vector, which was initially [1; 0; 0; 0]. Each intersection could be modeled as multiplying this vector by the transition matrix [1/3 0 1/3 1/3; 0 1/3 1/3 1/3; 1/3 1/3 1/3 0; 1/3 1/3 0 1/3], where the output of this multiplication was a new probability vector that revealed your updated chances of driving north, south, east or west.

But why would you ever want to go through the hassle of encoding an intersection as a matrix in the first place? Well, if each intersection was equivalent to multiplying by a matrix, then driving through 10 intersections was equivalent to multiplying by 10 identical copies of that matrix — or, better yet, multiplying by the matrix *raised to the 10th power*, an operation that any computer can do with ease.

It turned out that your chances of driving in each of the four directions rapidly approached 25 percent. After 10 intersections, your chances of driving north stood at precisely **4,921/19,683**, or about 25.00127 percent.

Just to be extra sure, a few solvers went ahead and checked their work via computer simulation. Daniel Silva-Inclan ran 1,000 trials and verified that after 10 intersections, the probabilities of driving in all four directions were very close to 25 percent.

There’s definitely a life lesson here. If you ever find yourself approaching an intersection and you really want to come out of it driving in a random direction — but you know that pulling a U-turn is illegal — then don’t lose heart. Instead, randomly drive straight or turn left or right at each intersection for a few minutes. Before you know it, you’ll be driving in a random direction.

Yes, that was definitely an important life lesson.

Congratulations to Eli Wolfhagen of Brooklyn, New York, winner of last week’s Riddler Classic.

Last week, Polly Gawn was playing “connect the dots.” She specifically wanted to connect six dots so that they formed the vertices of a hexagon. To her surprise, she found that there were many different hexagons she could draw, each with the same six vertices.

What was the *greatest* possible number of unique hexagons Polly could draw using six points?

If the question had ended there, then there would have been some ambiguity around the use of the word “hexagon.” If self-intersecting hexagons (meaning the edges coincided or crossed each other) were allowed, then all you had to do was count how many ways she could connect the six points, one at a time. She could pick any starting point and then choose among the remaining five points to connect it to, then pick four points, then three, then two, and finally one. But wait — each polygon was the same whether she traversed its points in one direction or the other, so she had double counted. Dividing by two, that meant there were 60 total hexagons Polly could have drawn.

But if you read the hint, you saw that Polly was only counting simple hexagons — that is, hexagons whose sides didn’t cross. This was decidedly harder, but was within the realm of possibility if you had a weekend to kill and a bountiful supply of scratch paper.

Many solvers came close, missing a few potential hexagons. In the end, it was three points that all lay within the triangle formed by the other three points that produced the most polygons. Solvers Laurent Lessard and Emma Knight both arrived at this arrangement by leaning on the work of Oswin Aichholzer. They looked at “untangled” complete graphs that had the minimal number of intersections, arguing that this would result in the maximal number of polygons.

Without further ado, here is one such arrangement of six points and all the polygons it produces:

Polly could draw at most **29 hexagons** — a far cry from the upper bound of 60.

For extra credit, you were asked to find the greatest possible number of unique heptagons Polly could draw using seven points. In this case, the upper bound was 420, suggesting this was beyond the realm of pencil, paper and patience. Indeed, the greatest possible number of heptagons was **92**.

As some solvers noted, there’s an OEIS sequence for that — sequence A063546, to be exact, which lists the “largest number of crossing-free Hamiltonian cycles of *n* points in the plane.” Or as Polly likes to call them, polygons. (Yes, *simple* polygons.)

According to the sequence, Polly could draw at most 339 octagons (drawn below, courtesy of solver Josh Silverman), 1,282 nonagons and 4,994 decagons.

While the precise pattern for this sequence remains unknown, it *is* known to grow exponentially. Erik Demaine has followed the literature on this problem and tracked the evolution of the upper and lower bounds. As of 2011, it was known that as the number of points *n* increases, the maximal number of polygons is somewhere between 4.642^{n} and 56^{n}.

Let’s not overlook that many of the polygons from the above animations would make awesome corporate logos. If your mountain biking startup is in need of some edgy graphic design, call me.

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!

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>It turns out, our staffers have very strong opinions on books — how many books one should own, what kinds of books, and most importantly, how to best organize those books on a bookshelf. With that in mind, we hope to answer that very question on this episode of Debate Club.

What’s your preferred organizational method? Be sure to tell us on YouTube or Twitter. And while you’re there, let us know what you’d like us to debate in the next episode.

]]>In Riddler City, the city streets follow a grid layout, running north-south and east-west. You’re driving north when you decide to play a little game. Every time you reach an intersection, you randomly turn left or right, each with a 50 percent chance.

After driving through 10 intersections, what is the probability that you are still driving north?

*Extra credit*: Now suppose that at every intersection, there’s a one-third chance you turn left, a one-third chance you turn right and a one-third chance you drive straight. After driving through 10 intersections, *now *what’s the probability that you are still driving north?

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

Polly Gawn loves to play “connect the dots.” Today, she’s playing a particularly challenging version of the game, which has six unlabeled dots on the page. She would like to connect them so that they form the vertices of a hexagon. To her surprise, she finds that there are many different hexagons she can draw, each with the same six vertices.

What is the *greatest* possible number of unique hexagons Polly can draw using six points?

(*Hint:* With four points, that answer is three. That is, Polly can draw up to three quadrilaterals, as long as one of the points lies inside the triangle formed by the other three. Otherwise, Polly would only be able to draw one quadrilateral.)

*Extra Credit*: What is the greatest possible number of unique heptagons Polly can draw using seven points?

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

Congratulations to Emma Knight of Toronto, Canada, winner of last week’s Riddler Express.

Last week, I had a coin with a sun on the front and a moon on the back. I claimed that on most days it was a fair coin. But once a year, on the summer solstice, the coin always came up the opposite side as the previous flip.

Of course, you were skeptical of my claim. You initially figured there was a 1 percent chance that the coin was magical and a 99 percent chance that it was just an ordinary fair coin. You then asked me to “prove” the coin was magical by flipping it some number of times.

How many successfully alternating coin flips would it have taken for you to think there was a 99 percent chance the coin was magical (or, more likely, that I had rigged it so it always alternated)?

Wow, there was a lot of disagreement about this problem! About 40 percent thought the answer was eight flips, 30 percent thought the answer was seven, 12 percent thought the answer was 15 and 8 percent thought the answer was 14. (The remaining 10 percent gave answers ranging from zero to 100.) But before revealing the correct result, let’s take a closer look at what was happening with these coin flips.

Suppose my first flip happened to be a sun, my second flip was a moon, and the outcome continued alternating with every subsequent flip. The more alternating flips I got in a row, the more confident you’d become that the coin was magical.

To quantify this level of confidence, you needed an assist from Bayes’ theorem: Given *N* alternating flips in the row, the probability that the coin was magical was equal to the probability that a magic coin would generate *N* alternating flips, multiplied by the prior probability that the coin was magical, then divided by the prior total probability of getting *N* alternating flips.

Some of these were easier to calculate than others. For example, the probability that a magical coin would generate *N* alternating flips was 1. (That’s what it meant for the coin to be magical; the flips would *always* alternate.) And the prior probability that the coin was magical — prior to any flipping to *prove* it was magical — was given in the statement of the problem: 1 percent, or 0.01. The challenge was to determine the final value to plug into Bayes’ theorem: the prior total probability of getting *N* alternating flips.

On the (1 percent) off chance the coin was magical, you would always get *N* alternating flips. But even if the coin wasn’t magical (the remaining 99 percent of the time), you could still get *N* alternating flips, with a probability that decreased with *N*. In fact, the probability was 1/2^{N−1}, since the first flip could be a sun or a moon, and the remaining *N*−1 flips each had a 50 percent chance of being different from the previous flip. All together, that meant the total prior probability of getting *N* alternating flips was 0.01+0.99/2^{N−1}.

At last, with all that deep thought behind us, it’s time to plug and chug. Given *N* alternating flips in a row, the probability that the coin was magical was 0.01/(0.01+0.99/2^{N−1}). Now your task was to find the first value of *N* where this probability exceeded 0.99, meaning you could be 99 percent sure the coin was magical.

Starting with the inequality 0.01/(0.01+0.99/2^{N−1}) ≥ 0.99, some careful rearrangement led to the simplified inequality 2^{N−1} ≥ 99^{2}. The smallest power of two that exceeded 99^{2}, or 9,801, was 2^{14}, or 16,384. While many thought the answer was 14, it was in fact *N*−1 that equalled 14, meaning the answer was **15 flips**.

And in calculating that tricky prior total probability of getting *N* alternating flips, if you forgot to account for the 1 percent of the time the coin was magic, you got the incorrect answer of eight flips (or seven, if you again forgot to add one to the exponent). Or you might have discarded the prior probability altogether and looked for the first power of 1/2 that was less than 0.01.

No doubt this was a challenging Express. And in case you were curious, yes, the coin really was magical.

Congratulations to Eric Widdison of Kaysville, Utah, winner of last week’s Riddler Classic.

Last week, King Auric was passing his most prized possession — perfect spheres of solid gold — to his three children. He had spheres with diameters of 1 centimeter, 2 centimeters, 3 centimeters, and so on. To be fair to his children, he wanted to give each an equal weight of gold.

After much trial and error, the king managed to divide his spheres into three groups of equal weight. He was further amused when he realized that his collection contained the *minimum* number of spheres needed for such a division. How many golden spheres did King Auric have?

An important detail from the puzzle was that the spheres were solid gold, meaning their weight was proportional to the cube of their diameter. In other words, you had to find a whole number *N* such that 1^{3}, 2^{3}, 3^{3}, … , *N*^{3} could be partitioned into three groups with the same sum.

A good place to start was to find the weights of each of those three groups. Summing the cubes from 1^{3} to *N*^{3} always equals *N*^{2}(*N*+1)^{2}/4, and since each group had a weight that was one-third of the total, the weight of each group was therefore *N*^{2}(*N*+1)^{2}/12.

You also knew that the largest sphere must have belonged to one of the three groups, and clearly its weight couldn’t be greater than the sum of its corresponding group. In other words, *N*^{3} had to be less than or equal to *N*^{2}(*N*+1)^{2}/12. With a little algebraic manipulation, this meant that *N* had to be 10 or greater.

Also, in order to evenly split the spheres into three groups, you knew that the total sum of the weights, *N*^{2}(*N*+1)^{2}/4, had to be divisible by three. That meant *N* had to either be a multiple of three or two more than a multiple of three. So possible values of *N* were now 11, 12, 14, 15, 17, 18, etc.

At this point, solver after solver turned to their computer for assistance. As this week’s winner Eric Widdison noted, this problem appeared to be a variant of the famous knapsack problem, which is NP-complete. So it was computers or bust.

Nevertheless, Eric was able to find that the smallest possible number of spheres was **23**. The fair division of the spheres was {1, 4, 7, 8, 12, 16, 20, 22}, {2, 5, 9, 11, 14, 15, 17, 23} and {3, 6, 10, 13, 18, 19, 21}. For all three groups, the sum of the cubes was 76,176. That’s a whole lotta gold!

Last week’s extra credit asked you to find the smallest number of spheres that could be evenly shared among other numbers of children, like two, four, five, six, etc.

Solver Allen Gu reported several of these results, along with how long it took his computer to generate each result. With two children, King Auric would need 12 spheres; with four or five children, he would need 24 spheres; with six children, he would need 35 spheres; with seven children, he would need 41 spheres, and with eight children, he would need 47 spheres. At this point, Allen’s computer failed him, and he upgraded to a “beefier” virtual machine. After several hours, he found that with nine children, King Auric would need 53 spheres. Allen is still waiting to hear back from his computer in the case of 10 children.

These results formed a rather unpredictable sequence of integers: 1, 12, 23 (this week’s answer), 24, 24, 35, 41, 47, 53, and so on. And now, thanks to the puzzle’s submitter, Dean Ballard, this sequence has been enshrined for all eternity in the On-line Encyclopedia of Integer Sequences as sequence A330212. While he was there, Dean apparently updated the related sequence, A240070, which looks at splitting up powers other than cubes into three equal groups.

As for the computational difficulty in cranking out these integer sequences, Emma Knight put it best, concluding that “[a]t this point I (and my poor CPU) would advise the royal couple to ease up on their procreation habit.”

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!

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>I have a coin with a sun on the front and a moon on the back. I claim that on most days, it’s a fair coin, with a 50 percent chance of landing on either the sun or the moon.

But once a year, on the summer solstice, the coin absorbs the sun’s rays and exhibits a strange power: It always comes up the opposite side as the previous flip.

Of course, you are skeptical of my claim. You figure there’s a 1 percent chance that the coin is magical and a 99 percent chance that it’s just an ordinary fair coin. You then ask me to “prove” the coin is magical by flipping it some number of times.

How many successfully alternating coin flips will it take for you to think there’s a 99 percent chance the coin is magical (or, more likely, that I’ve rigged it in some way so it always alternates)?

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

From Dean Ballard comes a riddle of radiant spheres and fatherhood, just in time for the summer solstice and Father’s Day:

King Auric adored his most prized possession: a set of perfect spheres of solid gold. There was one of each size, with diameters of 1 centimeter, 2 centimeters, 3 centimeters, and so on. Their brilliant beauty brought joy to his heart. After many years, he felt the time had finally come to pass the golden spheres down to the next generation — his three children.

He decided it was best to give each child precisely one-third of the total gold by weight, but he had a difficult time determining just how to do that. After some trial and error, he managed to divide his spheres into three groups of equal weight. He was further amused when he realized that his collection contained the *minimum* number of spheres needed for this division. How many golden spheres did King Auric have?

*Extra credit:* How many spheres would the king have needed to be able to divide his collection among other numbers of children: two, four, five, six or even more?

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

Congratulations to Christopher R. Green of Oxford, Mississippi, winner of last week’s Riddler Express.

Last week, you tried your hand at a technique for rolling dice called “bowling,” in which you placed your index finger and thumb on two opposite sides of the die and rolled it along the table. When done correctly, the die never landed on the faces on which you held the die, leaving you with a 25 percent chance of landing on each of the remaining four faces.

You had to apply this technique to optimize your chances of rolling a 7 or 11 in a game of craps. With a standard rolling technique, your chances were about 22.2 percent. But if you bowled the dice one at a time (i.e., you knew the outcome of the first die before rolling the second), what were your chances of rolling a 7 or 11?

If your first roll had been a 1, 2, 3 or 4, then the only way to win was to have the two rolls add up to 7 — 11 would have been out of reach, since the maximum roll was 6. But if your first roll was a 5, then you could win with a second roll that was a 2 or 6. And if your first roll was a 6, then you could win with a second roll that was a 1 or 5. So with the first roll, you wanted to get a 5 or 6, since that doubled your chances of winning.

At this point, it was helpful to write out the three possible strategies, which we’ll call A, B and C, keeping in mind that opposing faces of a standard die always add up to 7:

**A**: Place your fingers on the 1 and the 6, resulting in a 25 percent chance of rolling a 2, 3, 4 or 5.**B**: Place your fingers on the 2 and the 5, resulting in a 25 percent chance of rolling a 1, 3, 4 or 6.**C**: Place your fingers on the 3 and the 4, resulting in a 25 percent chance of rolling a 1, 2, 5 or 6.

As noted by solver Carolyn Phillips, strategy C gave you the best chances of rolling a 5 or 6, so that should have been your first roll. And the result of your first roll determined your strategy for the second roll:

- If you rolled a 1, then you needed a 6. Strategies B and C both had a 25 percent chance of resulting in a 6.
- If you rolled a 2, then you needed a 5. Strategies A and C both had a 25 percent chance of resulting in a 5.
- If you rolled a 5, then you needed a 2 or 6. Strategy C had a 50 percent chance of resulting in a 2 or 6.
- If you rolled a 6, then you needed a 1 or 5. Strategy C had a 50 percent chance of resulting in a 1 or 5.

Averaging these four equally likely cases together, your chances of winning were 3/8, or **37.5 percent**. That was quite the improvement over the 22.2 percent chance you had with a standard rolling technique.

For extra credit, you still wanted to roll a 7 or 11 (earning you a point), but you also wanted to avoid rolling a 2, 3 or 12 (losing you a point). With a standard rolling technique, your average score would have been one-ninth of a point. But if you “bowled” to maximize your expected score, what was that average?

Once again, you could determine the optimal strategy by determining your second roll based on your first. For example, if your first roll was a 6, you wanted your second roll to be a 1 or a 5 (giving you a total of 7 or 11), but not a 6 (giving you a total of 12). Your best bets for the second roll would have been strategies A or C; either netted you 0.25 points on average.

If you did this analysis for each of the first rolls, you found that if your first roll was a 1, you’d get 0 points on average. If your first roll was a 2, 3, 4 or 6, you’d get 0.25 points on average. And if you were fortunate enough to get a 5 on your first roll, you’d get 0.5 points on average.

Putting these all together, your best option for the *first *roll was Strategy A, netting you an average of **5/16 points**. That was about three times better than how you would have done with standard rolling.

Solver David Alpert took this problem one step further, wondering what would happen if you bowled non-standard dice where the numbers on opposing sides did *not* have to add up to 7. Based on his analysis, your average point total jumped up to 3/8 — the exact same result as the original problem.

If there’s a lesson to be learned in all this, it’s that it pays to cheat in dice games. No, that can’t be right.

Congratulations to Dan Upper of Corvallis, Oregon, winner of last week’s Riddler Classic.

Last week, you were studying a new strain of bacteria, *Riddlerium classicum*. Each *R. classicum* bacterium did one of two things: split into two copies of itself or die. There was an 80 percent chance of the former and a 20 percent chance of the latter.

If you started with a single *R. classicum* bacterium, what was the probability that it would lead to an everlasting colony (i.e., the colony would theoretically persist for an infinite amount of time)?

Sometimes a puzzle is so good that it’s worth solving twice. After posting this puzzle last week, I learned that a very similar variation — the extra credit, in fact, in which the 80 percent was replaced by probability *p* — previously appeared on the Riddler column. It’s also on page 83 of “The Riddler” book.

Nevertheless, it’s a truly excellent puzzle, and I would like to acknowledge a few solvers from this past week who had never seen it before.

First off, the first bacterium had a 20 percent chance of dying outright, which meant the answer was at most 80 percent. After that, things got hairy.

As with many Riddler Classics, it was tempting to start with simulations in order to gain some intuition for what was happening. However, how could a finite simulation truly determine whether a colony was “everlasting?” Solver Greg Y. and a team who identified as the “MassMutual Crew” both tried their hand at this, each running 1 million simulations and seeing how many times the colony lasted 100 generations. It turned out that approximately 750,000 of those 1 million colonies made it, suggesting the answer was close to 75 percent.

Meanwhile, Jason Ash modeled the problem as an absorbing Markov chain and assumed that once the colony reached a population of 500 it was effectively guaranteed everlasting survival. With this approach, along with some code to construct the transition matrix, Jason approximated the answer as 75.00000000000211 percent.

Emma Knight solved the problem analytically and head-on, directly solving for the probability that the colony dies out with each generation and then summing all those infinite probabilities. That sum is the total probability the colony dies out, so 1 minus the sum is the probability of survival.

But many solvers, including Alain Bruguières, Hector Pefo, Josh Silverman and the international team (from Manila, Philippines and Ottawa, Canada) of Erin and Nicole, discovered a roundabout method that got to the answer in far fewer steps. They first defined *x* as the probability of extinction, when starting from a single bacterium. Without yet knowing exactly what *x* was, you had enough information to determine the probability that *two* such bacteria would go both extinct. Since they were independent events, this probability was *x*^{2}.

Returning to our single bacterium, what was the probability it led to an everlasting colony? By definition, it was 1−*x*. But it was *also* the probability that it divided into two bacteria, which did not *both* go extinct. And that probability was 0.8(1−*x*^{2}). Setting those probabilities equal gave the equality 1−*x* = 0.8(1−*x*^{2}), which meant *x* was equal to 0.25 and 1−*x* was 0.75. Frankly, it was remarkable that any solvable equation popped out at all, given the infinities inherent to this puzzle. And sure enough, the answer turned out to be **75 percent**, just as the simulations predicted.

For extra credit, you were asked to solve the problem when the probability each bacterium divided was *p*, rather than 80 percent. The above reasoning worked just as well for this general case, leading to the equation 1−*x* = *p*(1−*x*^{2}). When *p* was between 0.5 and 1, the answer was 2−1/*p*. But when *p* was less than 0.5 (i.e., when the value of 2−1/*p* dipped negative), *x* was 1, meaning the colony never survived.

This was a truly bizarre result. Imagine two strains of bacteria, one with a 50 percent chance of dividing and the other with a 50.0000000001 percent chance of dividing. Only the latter has any chance of forming an everlasting colony. Until I apply some antibacterial soap, that is.

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!

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>From Dave Mattingly comes a high-rolling question of craps:

There’s a technique for rolling dice called “bowling,” in which you place your index finger and thumb on two opposite sides of the die and roll it along the table. If done correctly, the die will never land on the faces on which you were holding the die, leaving you with a 25 percent chance of landing on each of the remaining four faces.

You’d like to apply this technique to improve your chances of winning a simplified game of craps, in which your goal is simply to roll a 7 or 11 using two dice. With a standard rolling technique, your chances of rolling a 7 or 11 are 2/9, or about 22.2 percent.

Now suppose you’re using your bowling technique, and you roll the dice one at a time (i.e., you know the outcome of the first die before rolling the second). If you play to maximize your chances of rolling a 7 or 11, what will be your chances of winning?

*Extra credit:* Suppose you get one point for rolling a 7 or 11, but now you *lose* a point for rolling a 2, 3 or 12. With a standard rolling technique, you’d average 1/9 of a point. But if you “bowl” to maximize your expected score, what will that average be?

From Adam Wagner comes a curious case of colonies:

You are studying a new strain of bacteria, *Riddlerium classicum* (or *R. classicum*, as the researchers call it). Each *R. classicum* bacterium will do one of two things: split into two copies of itself or die. There is an 80 percent chance of the former and a 20 percent chance of the latter.

If you start with a single *R. classicum* bacterium, what is the probability that it will lead to an everlasting colony (i.e., the colony will theoretically persist for an infinite amount of time)?

*Extra credit:* Suppose that, instead of 80 percent, each bacterium divides with probability *p*. Now what’s the probability that a single bacterium will lead to an everlasting colony?

Congratulations to Paul Berger of Forest Hills, New York, winner of last week’s Riddler Express.

Last week, the astronomers on planet Xiddler, having recently invented the telescope, discovered a new planet in their solar system!

Like Earth, Xiddler orbits its star in a nearly circular path, with an average distance of 150 million kilometers. But *unlike* Earth, there weren’t any other known planets in the solar system … until now.

Moments after the Xiddlerian sun set below the horizon, three astronomers used their telescopes to find the new planet at the zenith of the evening sky. They then raced to Xiddler’s Grand Minister to deliver the news.

The first astronomer said that the newly discovered planet orbited their sun with a radius of 50 million kilometers; the second astronomer said the orbital radius was 300 million kilometers; the third astronomer said the orbital radius was 150 million kilometers.

Which astronomer should the Grand Minister have believed?

The keys to this riddle were the relative locations of Xiddler’s sun and the new planet. While one was near the horizon (the equator of the celestial sphere), the other was at the zenith (the north pole of the celestial sphere). That meant the angle between the sun, Xiddler and the new planet had to be 90 degrees. In other words, as noted by solver (and astrophysicist) Megan Pickett, the newly discovered planet was at quadrature.

If you’re not convinced, then here’s a helpful visual, courtesy of solver Travis Bishop:

On the left is the sun, while Xiddler is in the bottom right. Because it was sunset, that meant the astronomers were on Xiddler’s terminator, which was perpendicular to the line between Xiddler and the sun. The new planet was observed at the zenith, and so the sun, Xiddler and the new planet formed a right triangle.

The distance between Xiddler and the sun — 150 million kilometers — was one leg of this right triangle. Meanwhile, the distance between the new planet and the sun was the hypotenuse, which, by the Pythagorean theorem, had to be greater than 150 million kilometers.

The only astronomer who calculated an orbit greater than 150 million kilometers was **the second astronomer, who said the orbit was 300 million kilometers**. She was the one the Grand Minister should have believed.

By the way, this math works just as well in our own solar system as it does on planet Xiddler. For example, if you’ve ever wondered why Venus is called a “morning star” or “evening star,” it’s because Venus’s orbit lies within the Earth’s orbit, so it always appears relatively close to the sun in the sky. You can’t see any stars or planets when the sun is directly overhead — you can only see Venus when the sun is just below the horizon, at dawn or in the evening.

Anyway, the work of the Xiddlerian astronomers has only just begun. I’m sure we’ll be hearing from them again soon…

Congratulations to Harel Dor of Sunnyvale, California, winner of last week’s Riddler Classic.

Last week, you were filling in a sign’s letters by drawing horizontal lines with a marker. This marker had a flat circular tip with a radius of 1 centimeter, and you were holding the marker so that it was upright, perpendicular to the sign.

Since the diameter of the marker’s tip was 2 centimeters, you decided to fill in the letters by drawing lines every 2 centimeters. However, this was the pattern you got, with apparent gaps between the strokes:

Of course, if you drew many lines all bunched together, you’d have a more uniform shading.

But you didn’t have all day to make the sign. If the lines couldn’t overlap by more than 1 centimeter — the radius of the marker tip — what should this overlap have been, in order to achieve a shading that was as uniform as possible? And how uniform was this shading?

Before we even discuss the first solution, it’s worth taking a minute to better understand the problem. You might have thought that lines separated by the width of the marker would be nice and uniform. So why were there gaps between the strokes in the first place?

The answer came from the shape of the marker’s tip — a circle. Imagine moving a circular tip along a sign at a constant speed. For any given spot on the side, the amount of ink present is proportional to how long the marker was in contact with that point. Points along the midline of a stroke are in contact with the marker the longest, while points that are 1 centimeter away from the midline are only in contact for an instant.

If you looked at a vertical slice of the sign and measured the relative amount of ink along that line, you got a pattern of repeating semicircular “hills”:

As the strokes began to overlap and move closer together, the “valleys” between them combined until they overtook the hills, as shown in the animation below:

By the end of the animation, when the overlap was a full centimeter, the distribution of ink was once again quite bumpy. But somewhere along the way, the variance in the distribution of the ink was minimized. And if you thought understanding that there even was a minimum was a challenge, *finding *that minimum was even more challenging.

Solvers Emma Knight and David Zimmerman both used calculus to measure the standard deviation of the ink as a function of the overlap between strokes. Along the way, they both encountered some rather nasty elliptic integrals, turning to their computers for a solution. If the height of each original hill of ink was 1, then the minimum standard deviation of roughly 0.0859 occurred when the overlap between strokes was approximately **0.308 centimeters**.

Josh Silverman also found the same solution via a computational approach, while Jason Ash arrived at a similar result by (reasonably) assuming the sign had a finite number of horizontal strokes.

Instead of minimizing the standard deviation, some solvers instead minimized the *relative* standard deviation (also known as the coefficient of variation), which is the ratio of the standard deviation to the mean. This was minimized when the overlap between the strokes was approximately **0.319 centimeters**: the standard deviation was about 0.08615 and the mean was about 0.9345, which meant the relative standard deviation was roughly 0.0922. Given the ambiguity in the problem, I accepted this answer as equally correct. (Even if you subtracted either of these answers from 2, the diameter of the marker tip, I *still* counted it as correct.)

So what does this optimally uniform shading look like, in the end? Feast your eyes!

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>Of course, it’s not *just* black celebrities or *just* black former presidents who have spoken out — lots of Americans across races and parties have voiced concern about Floyd’s killing and what it says about the nation and its policies. And part of the black reaction can probably be explained by partisanship. The general position of the Democratic Party is that Floyd’s race was a factor in his death and that the criminal justice system is biased against black people. So it’s not surprising that black Americans are taking that view, as about 90 percent of them have voted for Democratic candidates in recent national elections.

Another factor, however, likely explains the collective black response to what has been happening in America over the past two weeks: The overwhelming majority of black Americans view their racial identity as a core part of their overall identity, and this black identity and kinship with other black people has likely been heightened by Floyd’s killing and the resulting debate over the status of black people in the United States.

About 52 percent of non-Hispanic black Americans said they viewed being black as “extremely important” to how they thought about themselves, according to a Pew Research Center poll conducted last year. Another 22 percent said it was “very important.” These numbers were considerably lower for non-Hispanic Asian, non-Hispanic white and Hispanic Americans. (More on the story with Asian and Hispanic Americans in a bit — it’s complicated.)^{5}

Pew polling from 2016 and 2017 also showed that black people were significantly more likely than other demographic groups^{6} to say that their race was central to their identities.

Similarly, Democracy Fund + UCLA Nationscape polling from last December found that 75 percent of black Americans said their ethnicity and race was “very important to their identity,” significantly higher than the share of Hispanic Americans (58 percent), Asian Americans and Pacific Islanders (40 percent) and white Americans (30 percent) who said the same. Another 15 percent of black Americans said that their race was “somewhat important.”^{7}

This heightened sense of black identity does not appear to be a particularly recent phenomenon — or one that was inspired by the Black Lives Matter movement, which began to emerge in 2013. In 2012, about 70 percent of black Americans said that being black was either extremely or very important to their identity, about the same proportion as in 2016, according to surveys conducted as part of the American National Election Studies. In both years, black Americans expressed much greater ties to their identity than white or Hispanic Americans did.^{8}

*[Related: Do You Know How Divided White And Black Americans Are On Racism?]*

Part of the story here is about ethnic and racial groups other than black Americans — why aren’t an overwhelming majority of white, Hispanic or Asian Americans saying that their race or ethnicity is very important to their personal identities? This is not a simple question, and we won’t try to unpack it all here. Penn State political science and African American studies professor Candis Watts Smith, who has written extensively about identity, said that “Asian” and “Hispanic” aren’t really the identities that some people who fall under these groups associate themselves with. Hispanic Americans, she argued, might think of themselves as Cuban or Mexican but not embrace the broader Latino or Hispanic labels. Similarly, some Americans of Chinese or Japanese ancestry might not describe themselves as Asian or feel much attachment to that identity. White Americans, Smith said, tend not to think of themselves racially, she said, because “whiteness is viewed as normal by white people.”

Some scholars, most notably Duke University political scientist Ashley Jardina, emphasize that a significant number of white Americans *do* define themselves by their race, though still at lower rates than black Americans. Her research suggests that people with high levels of white identity tended to vote for Trump in 2016, and you can imagine more liberal-leaning white Americans would avoid talking about their pride as white people to avoid being cast as racist. Also, at least one poll, the 2016 Collaborative Multi-Racial Post-Election Survey, suggests that Asian Americans and Latino Americans express fairly similar views to black Americans in terms of having a positive view of their association with their racial or ethnic group.

That said, experts agree that black Americans express high levels of connection to their blackness. Karyn Lacy, a University of Michigan sociology professor who wrote a book on black middle-class people living in the Washington, D.C., suburbs, said that the people she interviewed for her research wanted their children and grandchildren to be close to the broader black community.

“There is a lot of joy in being black,” Lacy said of the people she interviewed. “This is a really important point. Most of the media coverage of black people is negative. Scholars have spent a lot of time documenting the racial discrimination blacks experience. We do need to know about how and why discrimination persists. But there is very little attention to all the good things about being black.”

“We’re left with the impression that black people wake up every morning thinking, ‘Ugh, I’ve got to be black today, and it’s going to be awful.’ None of the people I interviewed held that view,” Lacy added. “They take a lot of pride in being black and worry that their kids might not embrace being black with the same enthusiasm.”

*[Related: How The Police See Issues Of Race And Policing]*

The centrality of racial identity to black Americans is important to consider in a lot of contexts. We mentioned earlier that black attitudes about policing could be explained in part by partisanship, namely that the overwhelming majority of black people vote Democratic. But that skips over something that’s extremely important to understand: Why are black people so much more Democratic-leaning than other ethnic and racial groups? Part of the answer sits in the power of black identity — scholars argue that, to some extent, black Americans vote as a collective to defend the broader group and sometimes shame and discourage other black people from voting Republican and breaking with that collective.

“Nobody likes Kanye right now,” Smith joked, noting that many black people have become frustrated with Kanye West since he started associating himself with President Trump and making controversial comments on racial issues.

Black NBA players’ doing everything they could to embrace Obama when he was president and then largely shunning Trump is no doubt related to those two presidents’ divergent personas and political stands, as well as to partisanship. But it’s tied to identity too — black NBA players took pride in a fellow black man being president and were angry after Trump slammed NFL players who knelt during the national anthem to protest racial inequality in America. Winfrey, in her decades as a celebrity, has generally avoided partisan politics. But she was very vocal in backing Obama during his 2008 presidential campaign and Stacey Abrams in her 2018 Georgia gubernatorial run. Obama became America’s first black president; Abrams would have been the nation’s first-ever black female governor.

“Their identity stems from lived experiences with discrimination, bias, violence, inequality, broken promises, empty rhetoric,” said Rosalee Clawson, a political science professor at Purdue University who studies the politics of race, class and gender. “I think we would be shocked if blacks didn’t share a sense of linked fate with their racial group.”^{9}** **

*[Related: 1968 Isn’t The Only Parallel For This Political Moment]*

So it’s worth considering Floyd’s killing and the black community’s reaction to it in that context. Police in the U.S. pull over, arrest and shoot and kill black people at much higher rates than their 13 percent share of the U.S. population. So perhaps men like Jordan and Obama see what happened to Floyd as something that could happen to them.

And it could. But it’s also likely that these famous black men and women, like most black Americans, view being black as a big part of who they are, and so feel that they should speak out when an issue related to being black is all over the news.

“Most of them were not always celebrities. And they have [black] friends and neighbors. And black celebrities face some of the same denigrating things [based on their race] as an average black person,” said Smith.

Even rich black people think, “It could have been me, it could have been my family member or my neighbor or a member of my community,” said Smith.

Being black, she said, “is always in their consciousness.”

]]>The astronomers on planet Xiddler have made several remarkable discoveries. After inventing the telescope, they quickly discovered a new planet in their solar system!

Xiddler is very much like Earth. The planet orbits its star in a nearly circular path, with an average distance of 150 million kilometers, a period of one Earth year and a day that lasts 24 hours. But *unlike* Earth, there weren’t any other known planets in the solar system…until now.

Moments after the Xiddlerian sun set below the horizon, three astronomers happened to focus their telescopes at the zenith of the evening sky, all seeing the same new planet. In their excitement, the astronomers race to Xiddler’s Grand Minister to deliver the momentous news.

The first astronomer says that, by her calculations, the newly discovered planet orbits their sun with a radius of 50 million kilometers. The second astronomer says that, by *her* calculations, the planet in fact orbits their sun with a radius of 300 million kilometers. The third astronomer disagrees with the other two — by *her* calculations, the planet has a very similar orbit to Xiddler, with a radius of 150 million kilometers.

Which astronomer should the Grand Minister believe?

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

Some friends have invited you to a protest, and you’ll be making a sign with large lettering. You’re filling in the sign’s letters by drawing horizontal lines with a marker. The marker has a flat circular tip with a radius of 1 centimeter, and you’re holding the marker so that it’s upright, perpendicular to the sign.

Since the diameter of the marker’s tip is 2 centimeters, you decide to fill in the letters by drawing lines every 2 centimeters. However, this is the pattern you get:

The shading doesn’t look very uniform — each stroke is indeed 2 centimeters wide, but there appear to be gaps between the strokes. Of course, if you drew many, many lines all bunched together, you’d have a rather uniform shading.

But you don’t have all day to make this sign. If the lines can’t overlap by more than 1 centimeter — half the diameter of the marker tip — what should this overlap be, in order to achieve a shading that’s as uniform as possible? And how uniform will this shading be, say, as measured by the standard deviation in relative ink on the sign?

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

Congratulations to Brian Leet of Burlington, Vermont, winner of last week’s Riddler Express.

Last week, I was playing one of my favorite video games, The Legend of Zelda: Breath of the Wild. Within the game, there were hundreds of hidden “Korok Seeds,” which I was having an increasingly difficult time finding.

Fortunately, I obtained a special mask that made a sound any time I was within a certain distance of a Korok Seed. While playing, I marked nine distinct locations on the game map, forming the 3-by-3 grid shown below:

Each leaf symbol was within range of a Korok Seed, while the point in the middle was *not* within range of a Korok Seed. Given this arrangement, what was the minimum possible number of Korok Seeds I could have detected?

There certainly could have been eight Korok Seeds, each near one of the eight leaves. But rather than start with larger numbers, many solvers jumped straight to the smaller ones. Was it possible to generate this pattern if there had been just one Korok Seed?

Solver Kiera Jones supposed for a moment that there *was* just one Korok Seed. It couldn’t have been at the center of the grid, since that would have resulted in a leaf icon in the middle. In fact, this one Korok Seed had to have been closer to all eight leaves than it was to the center. But the moment you were closer to one of the leaves, you’re farther away from its diametric opposite. For example, if you were closer to the leaf on the right than the middle, you *must* have been closer to the middle than the leaf on the left.

In short, Kiera proved there had to be at least two seeds. And as it turned out, the answer was indeed *exactly* **two**.

No information was given in the problem about what that “certain distance” was, within which the mask was able to detect a Korok Seed. You were left to assume it could be anything, and that meant the seeds could be arbitrarily far away from the nine points in the grid.

By placing the two seeds in opposite directions *outside* of the 3-by-3 grid, it was possible to have the eight points marked by leaves all be within some distance of a seed, while the middle point was outside that range. Here was one such placement of the two seeds, courtesy of Matt Jenny:

The large black circles show the regions where you would detect the Korok Seed at the center of the circle. Sure enough, the middle green point didn’t fall within one of the large black circles, while all eight surrounding green points fell within one of the two large circles. Countless other arrangements were also possible, but the key idea was to split the eight surrounding locations into two groups of four, each of which was in range of a single Korok Seed.

Raul Perera arrived at the same answer, but without the aid of any graphing technology. Instead, Raul dropped a disk onto some graph paper!

And even if you were to split the locations as Matt and Raul did, there were still many possible locations for the seeds. In the diagram below, the red and blue regions represent possible locations for the two seeds:

Those Koroks certainly are pesky. It may take me a few more years, but someday I will have found them all.

Congratulations to John Bullock of Lafayette, Indiana, winner of last week’s Riddler Classic.

Last week, everyone in the U.S. (about 330 million people) joined a single Zoom meeting between 8 a.m. and 9 a.m. — to discuss the latest Riddler column, of course.

The attendees all followed the same steps in determining when to join and leave the meeting. Each person independently picked two random times between 8 a.m. and 9 a.m. — not rounded to the nearest minute, mind you, but *any* time within that range. They then joined the meeting at the earlier time and left the meeting at the later time.

What was the probability that at least one attendee was on the call with everyone else (i.e., the attendee’s time on the call overlapped with everyone else’s time on the call)?

You don’t typically see a problem jump straight to the case of 330 million people unless something funny is going on. To understand what was happening here, many solvers first tried the case in which only two people were joining the meeting. What were the chances they’d be on at the same time?

You could have solved this with calculus, but you also could have skipped all the integrals with a combinatorial approach. With two people, there were four total times being randomly picked: two starting times and two ending times. Suppose these four times, in order from earliest to latest, were A, B, C and D. Then, there were six ways to split these times among the two attendees — the first person could have picked times A and B, A and C, A and D, B and C, B and D or C and D, while the other person would have been left with the remaining two times. The only time the two people didn’t meet up was when the first person picked A and B (leaving the other person with C and D) or C and D (leaving the other person with A and B) — two out of the six cases. That meant the chances they *did* meet up stood at four out of six.

So when there were two people in the meeting, the probability at least one attendee saw all the others was 2/3. But what if there were three people, or four — or 330 million?

This general problem is more involved, as there were way more than six cases to consider. Jim Crimmins, the puzzle’s submitter, along with solver Allen Gu, both referenced a 1990 paper that addressed this very problem. But before revealing the answer, let’s check in with those who took a computational approach.

John Bullock simulated 330 million attendees in Python and ran a whopping 364,000 total simulations. Among these, 242,919 — very nearly two-thirds of the simulations — had at least one attendee who was on the call with everyone else. Peter Ji, Matt Lee and Benjamin Phillabaum all kindly shared their code as well, and all three generated results that were remarkably close to 2/3 as well. Could it be that the answer was always 2/3, whether there were two attendees, 330 million or anything in between?

Indeed, the answer was **2/3**. Solver Josh Silverman proved this result with some powerful combinatorial reasoning and by swapping meeting times among certain attendees so that one could be on the call with everyone else.

For extra credit, you were asked to find the probability that at least *two* attendees were on the call with everyone else. Once again, a beautiful result was found by both the analysts and those using a computational approach: **2/5**.

As Josh explains, the probability of having exactly *k* attendees on the call with everyone else turned out to be (*k*+1)!/(2*k*+1)!! (The two exclamation points denote a double factorial — multiplying up all the evens or odds up to that number. In this case, since 2*k*+1 is always odd, it means multiplying all the odds from 1 to 2*k*+1.) Here’s what that probability distribution looks like, courtesy of Allen Gu:

One very cool consequence of this result is that, in the limit when there were many, many attendees (e.g., when there are 330 million of them), the *average* number of attendees who were on the call with everyone else approached 𝜋/2, or about 1.57.

Sometimes riddles just can’t help but circle back to 𝜋.

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>While spending more time at home in recent weeks, I’ve had the chance to revisit one of my favorite video games from recent years — The Legend of Zelda: Breath of the Wild. Within the game, there are hundreds of hidden “Korok Seeds,” which I’m having an increasingly difficult time finding.

Fortunately, there’s a special mask you can acquire in the game that makes a sound any time you’re within a certain distance of a Korok Seed. While playing, I marked nine distinct locations on the game map, forming the 3-by-3 grid shown below:

Each leaf symbol is within range of a Korok Seed, while the point in the middle is *not* within range of a Korok Seed. Given this arrangement, what is the minimum possible number of Korok Seeds I could have detected?

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

From Jim Crimmins comes a puzzle about what would presumably be the largest Zoom meeting of all time:

One Friday morning, suppose everyone in the U.S. (about 330 million people) joins a single Zoom meeting between 8 a.m. and 9 a.m. — to discuss the latest Riddler column, of course. This being a virtual meeting, many people will join late and leave early.

In fact, the attendees all follow the same steps in determining when to join and leave the meeting. Each person independently picks two random times between 8 a.m. and 9 a.m. — not rounded to the nearest minute, mind you, but *any* time within that range. They then join the meeting at the earlier time and leave the meeting at the later time.

What is the probability that at least one attendee is on the call with everyone else (i.e., the attendee’s time on the call overlaps with every other person’s time on the call)?

*Extra credit:* What is the probability that at least *two* attendees are on the call with everyone else?

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

Congratulations to David Goode of Kula, Hawaii, winner of last week’s Riddler Express.

When cutting a cylindrical muffin into quarters, an “X” pattern would have been sensible. But last week, you were asked to cut a muffin into quarters using an “A” pattern. If you were to produce quarters in this manner, what would have been the ratio of length of the A’s middle bar to the radius of the muffin?

Let’s start with an image of the correct solution, courtesy of Ethan Rubin:

This circle appears to be divided into four equal pieces. But to find the precise dimensions of those pieces required a deeper dive into geometry and trigonometry.

A good first step was to determine the size of the left- and rightmost regions, which we can call arcs of measure *φ*. We can find the areas of these circular segments by taking the area of their corresponding sectors and subtracting isosceles triangles. Assuming the muffin was a unit circle (i.e., it had a radius of 1), the area of each segment turned out to be (*φ* − sin*φ*)/2. Setting this equal to 𝜋/4 (since each of these segments had to be one quarter the area of the circle) meant that the arc measure *φ* was about 2.31 radians, or about 132 degrees.

So if the arcs on either side of the A measured 132 degrees, that only left about 96 degrees for the arc at the bottom. The angle at the top of the A, which subtends that bottommost arc, was then half that measure (by the Central Angle Theorem), or about 48 degrees.

At this point, the isosceles triangle that forms the top of the A had to have an area of 𝜋/4 and a vertex angle of 48 degrees. That was enough information to nail down the dimensions of this triangle, which was fortunate, because the original question asked for the *base* of this triangle.

If we said the base had a length of 2*x*, then we could split the triangle down the middle to produce two right triangles whose topmost angle was about 24 degrees and whose area was 1/8. In other words, *x*2/(2·tan(24°)) = 𝜋/8, which meant 2*x* = √(𝜋·tan(24°)), or about 1.18. Of course, we rounded the angles to the nearest degree along the way. The precise answer, as found by solver Ben Vollmayr-Lee, was closer to **1.177863**.

So that was the solution for an “A” cutting pattern. Solvers James Anderson and Brian Corrigan were further interested in what *other* letters could result in fairly sharing a muffin four ways. James found ways to split the muffin with patterns resembling the letters B, D, H, K and N, where the bumps for B and D were assumed to be semiellipses. Brian further found conditions for M and W cutting patterns.

However, this column wouldn’t be complete without an R (for “Riddler”), which can divide a circle into quarters as follows:

All these muffins made for a rather challenging Riddler Express. From now on, whenever I’m splitting a muffin four ways, I’ll stick to the “X” pattern.

Congratulations to Jason Weill of Seattle, Washington, winner of last week’s Riddler Classic.

Ohio is the only state whose name doesn’t share any letters with “mackerel.” It’s strange, but it’s true.

But that wasn’t the only pairing of a state and a word you could have said that about — it wasn’t even the only fish! Kentucky had “goldfish” to itself, Montana had “jellyfish,” and Delaware had “monkfish,” just to name a few.

What was the longest “mackerel?” That is, using this word list, what was the longest word that didn’t share any letters with exactly one state?

Most solvers turned to their computers for some assistance. The word list contained a total of 263,533 words to check — a large number, but not prohibitively large. With efficient code (e.g., encoding words and states as arrays of their unique letters, as Josh Silverman and Jason Ash describe), it was possible for a script to pop out the answer in a matter of seconds.

Or in this case, *answers* — there were two, each 23 letters long. Alabama was the only state to have no letters in common with **counterproductivenesses**, while Mississippi was the only state to have no letters in common with **hydrochlorofluorocarbon**.

Of course, the fun didn’t stop there. For extra credit, you had to find the state with the most “mackerels.” In total, across all 50 states, there were 45,385 mackerels. Solver Jenny Mitchell created a map, showing which states had the most mackerels:

And the winning state turned out to be the very first one mentioned in the original puzzle: The great state of **Ohio** had a whopping 11,342 mackerels, or 25 percent of the total. In second place was Alabama, with 8,274 mackerels, and in third place was Utah, with 6,619. Alas, there were also 18 states that were fishless (the lightest blue in Jenny’s map), without a single mackerel to show for themselves.

Finally, solver Michael Branicky decided to make mackerels a global phenomenon. According to Michael, the longest Canadian mackerel (among provinces and territories) was Quebec’s “otorhinolaryngologists.” And among the member states of the United Nations, Fiji claimed the longest mackerel with “electroencephalographers.” Fiji also had the most mackerels, with 18,614.

Go figure that an island nation would take all the glory in a puzzle about fish.

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>From Robert Richman comes some baffling breakfast bewilderment:

To share a cylindrical muffin equally with his two toddlers, Robert makes three vertical cuts in a “Y” pattern, producing three equal pieces.

The next morning, his wife wants in on the fun. But before he can cut the muffin into quarters with an “X” pattern, one of his children suggests using an “A” pattern. If Robert were to produce equal fourths in this manner, what would be the ratio of length of the A’s middle bar to the radius of the muffin?

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

From Mark Bradwin comes a fishy puzzle about state names:

Ohio is the only state whose name doesn’t share any letters with the word “mackerel.” It’s strange, but it’s true.

But that isn’t the only pairing of a state and a word you can say that about — it’s not even the only fish! Kentucky has “goldfish” to itself, Montana has “jellyfish” and Delaware has “monkfish,” just to name a few.

What is the longest “mackerel?” That is, what is the longest word that doesn’t share any letters with exactly one state? (If multiple “mackerels” are tied for being the longest, can you find them all?)

*Extra credit:* Which state has the *most* “mackerels?” That is, which state has the most words for which it is the only state without any letters in common with those words?

(For both the Riddler and the extra credit, please refer to Friend of the Riddler Peter Norvig’s word list.)

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

Congratulations to Stephen Bonnett of Brooklyn, New York, winner of last week’s Riddler Express.

Last week, you were passing the time with a sudoku puzzle when you noticed that the grid was oddly sparse — only a handful of numbers were initially filled in. But it got worse. While there weren’t any numbers that occurred more than once in the same row, column or square (i.e., the grid didn’t *ostensibly *break any of the sudoku rules), upon closer inspection, you could see that the puzzle was impossible.

What was the *smallest* possible sum of the initial numbers in the grid? (Note that multiple instances of the same number counted separately. So if your impossible grid happened to consist of eight 4s and two 5s, the sum would have been 42.)

Many solvers had the right idea — put some 1s into the grid so that a single cell was also constrained to be a 1, and then swap it out for a 2. Using this approach, here was how Goh Pi Han set up the grid:

Sure enough, this grid didn’t *ostensibly* break the rules of sudoku — no number appeared more than once in any given row, column or square. But because of the placement of the 1s in the left and right squares, the 1 in the central square had to occur in the middle row. Similarly, because of the 1s in the top and bottom squares, the 1 in the central square had to occur in the middle column.

In other words, the 1 had to be in the middle cell of the middle square — exactly where the 2 was! And so this was indeed an impossible sudoku, with no way to fill out the grid. The smallest possible sum of the initial numbers in the grid was 1+1+1+1+2, or **6**.

Meanwhile, some readers interpreted “impossible” to mean that there were multiple ways to fill out the grid, in which case the solution was zero — an empty grid could indeed be filled out many, many ways. I didn’t give credit for this interpretation because it wasn’t very interesting.

Finally, solvers Aron Fredrick and Timothy Svendsen both asked and answered their own extra credit problem: How many impossible sudokus were there whose initial numbers added up to the minimum possible value of six?

First, the 2 could be placed in any of the 81 cells. In the squares that were horizontally aligned with the square containing the 2, there were then 18 ways to place two 1s so that they were in different rows from each other and the 2. Similarly, in the squares that were vertically aligned with the square containing the 2, there were 18 ways to place two more 1s so that they were in different columns from each other and the 2. All in all, that meant there were 81×18×18, or 26,244 such arrangements.

That’s a whole lot of impossibilities to consider.

Congratulations to Danny Burke of Chicago, Illinois, winner of last week’s Riddler Classic.

Last week, you grappled with the system of “advantage and disadvantage” from Dungeons & Dragons. When you rolled a die “with advantage,” you rolled it twice and kept the higher result. Rolling “with disadvantage” was similar, except you kept the lower result instead. The rules further specified that when a player rolled with *both* advantage and disadvantage, they canceled out, and the player rolled a single die. Yawn!

There were two other, more mathematically interesting ways that advantage and disadvantage could have been combined. First, you could have “advantage of disadvantage,” meaning you rolled twice with disadvantage and then keep the higher result. Or, you could have “disadvantage of advantage,” meaning you rolled twice with advantage and then kept the lower result. With a fair 20-sided die, which situation produced the highest expected roll: advantage of disadvantage, disadvantage of advantage or rolling a single die?

As the puzzle’s submitter, Emma Knight, observed, you didn’t need to work out all the cases. Both advantage of disadvantage and disadvantage of advantage (try saying *that* 10 times fast!) required a total of four rolls. We can label those four rolls in (nonstrictly) increasing order 1, 2, 3 and 4. At this point, there are three equally likely pairings of these numbers, where each pair represents the two rolls of an advantage or disadvantage: (12)(34), (13)(24) and (14)(23).

For these three scenarios, advantage of disadvantage produced results of 3, 2 and 2, for an average of about 2.33. Meanwhile, disadvantage of advantage produced results of 2, 3 and 3, for an average of about 2.67. Finally, rolling a single die would result in the average of all four numbers, or 2.5. That meant you would have the highest expected roll with **disadvantage of advantage.**

But for Riddler Nation, this solution was just the beginning.

First, several solvers found the precise expected values for each of the three strategies. Rolling a single die was the most straightforward — there were 20 possible outcomes (1 through 20), each with a probability of 1/20, for an expected value of 10.5. Lily Koffman efficiently summated her way through the 20^{4} possible scenarios, finding that advantage of disadvantage gave an average roll of 9.8333375, while disadvantage of advantage had an average of 11.1666625. As with our simplified approach, disadvantage of advantage came out on top.

For those interested in the distribution of outcomes, computers came in handy. Julian Gerez ran 1 million simulations to measure the expected values with precision. Robert Sturrock ran 100,000 simulations, as did Quoc Tran in obtaining the following graph:

The flat green curve shows the distribution of rolls for a single die, the blue curve shows advantage of disadvantage, and the red curve shows disadvantage of advantage. The red curve was shifted to the right and had the greatest mean of the three distributions, once again confirming our answer.

For the extra credit, you needed to roll *N* or better with your 20-sided die. For each value of *N*, was it better to use advantage of disadvantage, disadvantage of advantage or rolling a single die?

To figure this out this, you needed a cumulative distribution function, summing the probabilities across values of *N* and up. There was a 100 percent chance that advantage of disadvantage, disadvantage of advantage and rolling a single die would all achieve the minimum possible value of 1 or better. But as *N *increased beyond 1, things got dicey.

Jason Ash found these cumulative distributions by coding, while Laurent Lessard found them analytically. Either way, disadvantage of advantage was the best strategy when 2 ≤ *N* ≤ 13, but rolling a single die was best when 14 ≤ *N* ≤ 20.

But what was so special about the numbers 13 and 14? Why did the switch happen *there*?

Laurent and Allen Gu took the problem a step beyond the extra credit, looking at not 20-sided dice, but *k*-sided dice. As they increased *k* to larger and larger values (i.e., in the continuous limit where the dice became random number generators), Laurent and Allen both found that the transition occurred when *N* was equal to 1 + (√5 − 1)/2·*k*. When *k* was 20, the expression was approximately 13.36, which was why the optimal strategy switched between 13 and 14. Also of note — the coefficient of *k* happened to be the reciprocal of the golden ratio. Neat!

Below is Laurent’s graph for the continuous case. The orange and green curves intersected where disadvantage of advantage gave way to rolling a single die as the optimal strategy for achieving a minimum target score.

Finally, for any readers who are *still* yawning, thinking even advantage of disadvantage and disadvantage of advantage are too simplistic when it comes to combining effects in Dungeons & Dragons, Benjamin Zev suggested another option, which he dubbed “middlevantage”: Roll three times, and take the middle value. Andrew Heairet answered this challenge, finding that middlevantage was never your best option.

And with that, I hope it’s a long time before I next have to type out the words advantage and disadvantage.

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>On this first episode, we debate an oft-argued topic here at FiveThirtyEight: What is the best state in the U.S. — or, more specifically, if you could live in only one state in America and never leave, which one would it be, and why?

Watch the video above to find out our favorite states, and be sure to tell us yours on YouTube or Twitter.

And for future episodes, let us know if you have a debate topic you’d like us to take on.

]]>From Scott O’Neil comes an impossible game of sudoku:

As you sit down to pass the time with a sudoku puzzle, you immediately notice that the grid is oddly sparse — only a handful of numbers are initially filled in. But it gets worse. While there aren’t any numbers that occur more than once in the same row, column, or square (i.e., the grid doesn’t *ostensibly *break any of the sudoku rules), upon closer inspection, you can see that the puzzle is impossible.

What is the *smallest* possible sum of the initial numbers in the grid? (Note that multiple instances of the same number count separately. So if your impossible grid happened to consist of eight 4s and two 5s, the sum would be 42.)

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

Since it was impossible to complete the game of sudoku, you might instead enjoy passing the time with a game of Dungeons & Dragons, courtesy of Emma Knight:

The fifth edition of Dungeons & Dragons introduced a system of “advantage and disadvantage.” When you roll a die “with advantage,” you roll the die twice and keep the higher result. Rolling “with disadvantage” is similar, except you keep the lower result instead. The rules further specify that when a player rolls with *both* advantage and disadvantage, they cancel out, and the player rolls a single die. Yawn!

There are two other, more mathematically interesting ways that advantage and disadvantage could be combined. First, you could have “advantage of disadvantage,” meaning you roll twice with disadvantage and then keep the higher result. Or, you could have “disadvantage of advantage,” meaning you roll twice with advantage and then keep the lower result. With a fair 20-sided die, which situation produces the highest expected roll: advantage of disadvantage, disadvantage of advantage or rolling a single die?

*Extra Credit*: Instead of maximizing your expected roll, suppose you need to roll *N* or better with your 20-sided die. For each value of *N*, is it better to use advantage of disadvantage, disadvantage of advantage or rolling a single die?

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

Congratulations to Matt Zefferman of Marina, California, winner of last week’s Riddler Express.

Last week, you were drawing tiles from a complete set of dominos, which had 28 total tiles. Each tile had two sides, with zero, one, two, three, four, five or six dots on each side.

*Question 1*: What was the probability of drawing a “double” from a set of dominos — that is, a tile with the same number on both sides?

*Question 2*: Now you picked a random tile from the set and uncovered only one side, revealing that it had six dots. What was the probability that this tile was a double, with six on both sides?

The first question was straightforward. Of the 28 total tiles, seven of them are doubles: zero-zero, one-one, two-two, three-three, four-four, five-five and six-six. So the probability of drawing a double was 7/28, or **1/4**.

The second question was where this puzzle got tricky. Just about 50 percent of submitters gave an answer of 1/7, while the other 50 percent said the answer was 1/4. What was going on here?

Many reasoned that there were seven tiles that had six dots on a side: six-zero, six-one, six-two, six-three, six-four, six-five and six-six. Among these seven, only one of them was a double — six-six. So, given that you picked a tile with at least one side of six, the probability of that tile being a double was 1/7 … right?

Wrong!

You were told that you “uncovered one side of the tile, revealing that it had six dots.” At this point, the “double” tile, with six dots on *both* sides, was *twice* as likely as the others to have been picked. Another way to think about it was to look at all the sides (rather than tiles) with six dots and count how many of their counterpart sides also had six dots. While there were seven *tiles* with six dots, there were eight *sides* with six dots. And two of those eight sides — the two on the tile with double sixes — had counterparts that also had six dots. So the probability was not 1/7, but rather 2/8, or **1/4**.

As many solvers noticed, the answers to the two questions were indeed the same. But how could that be? Raven Deerwater explained that the fact that you “uncovered one side of the tile, revealing that it had six dots” didn’t actually mean anything in the context of the puzzle. You could alternatively have uncovered that one side to find that it had zero, one, two, three, four or five dots. It made no difference — that side had to have *some* number of dots, and the chances of that tile being a double were not affected. Like Question 1, the answer to Question 2 was again 1/4.

As you can see, when dominos show up in the Riddler, the math is rarely black-and-white.

Congratulations to Jason Shaw of Topeka, Kansas, and Allen Gu of Melbourne, Australia, winners of last week’s Riddler Classic.

Last week, a certain 2-year-old was eating his favorite snack: an apple. But he ate it in a very particular way. When he first received the apple, and every minute thereafter, he rotated the apple to a random position, and then looked down. If there was any skin of the apple left in the spot where he planned to take a bite, then he would indeed take that bite. But if there was no skin there (i.e., he had already taken bites at that spot), he wouldn’t take a bite and would rotate the apple for another minute. Once he had bitten off all the skin of the apple, he was done eating.

Suppose the apple was a sphere with a radius of 4 centimeters, and that each bite of the apple was a circle of the sphere whose radius, as measured *along the apple’s curved surface*, was 1 centimeter. On average, how many minutes would it take this 2-year-old to eat the apple?

You could immediately find a lower bound for the answer by dividing the total surface area of the apple by the surface area of a single bite — there was no way the toddler could have removed all the skin in fewer bites than that. The surface area of the spherical apple was 4𝜋 times the square of the radius, or 64𝜋 square centimeters. Meanwhile, each bite had an area that was slightly less than 𝜋 centimeters (due to the curvature of the apple’s surface), which meant the toddler had to take *at least* 64 bites.

But that was just a lower bound, while you were asked to find the *average* number of bites needed. One common approach was computer simulation. You could place thousands of points across a sphere that represented the apple and then remove “bites” of points in random locations, until no points were left. Here is one such simulation, where 1 million red points were randomly scattered across the surface of a sphere:

As you can see, the first few bites removed a lot of the apple’s skin. But less and less skin was removed with each passing minute, since the toddler would only take a bite in the few locations where skin remained.

Now this particular simulation happened to take 392 minutes to remove all the skin. If you were to run this sort of simulation a few thousand times, then you’d have a pretty good sense of which results were likeliest. And that’s exactly what several solvers did:

- Jason Ash ran 10,000 simulations using 10,000 points on a sphere, and found an average of 550 minutes.
- Hector Pefo ran 10,000 simulations using 250,000 points on a square with periodic boundary conditions, and found an average of 565 minutes.
- Allen Gu ran 1,000 simulations using 500,000 points on a sphere, and found an average of 568 minutes.

While they were all close, none of these answers was quite right: They all *underestimated* the answer. While all the thousands of points in a simulation may have been “consumed” by the simulated bites, there could have still been tiny spaces between the points just outside of the bites. After all, each simulation was only tracking the points, rather than the actual surface of the sphere. Increasing the number of sampled points would have increased the simulation’s accuracy but required more processing power.

As it turned out, this problem — actually, a whole class of problems, including this one — had been asked before. If you think of the sphere’s surface as a set of points, and each bite as a randomly located subset of those points, the question becomes: On average, how many of these subsets are needed to “cover” the set?

To find this average, you needed the probabilities that different numbers of bites covered the sphere. While deriving these probabilities was beyond the scope of this column, it was done by Moran and Fazekas de St. Groth in 1962. Appropriately enough, the authors noted that “[t]his problem arises in practice in the study of the theory of the manner in which antibodies prevent virus particles from attacking cells.”

Winners Jason Shaw and Allen Gu applied these results, finding an average of about **584 minutes**. And, just as we expected, this result was slightly greater than the simulated averages reported by other solvers (again, because the simulations didn’t account for the spaces between the sampled points).

Putting these numbers back in context, this meant it would take the toddler almost *10 hours* to eat the apple. Yup, that sounds about right.

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

**CORRECTION (May 18, 2020, 12:16 p.m.): **A previous version of this article misstated the names of the authors of a 1962 paper. The authors were Moran and Fazekas de St. Groth.

From Dee Harley comes a devilish matter of dominos:

In a set of dominos, each tile has two sides with a number of dots on each side: zero, one, two, three, four, five or six. There are 28 total tiles, with each number of dots appearing alongside each other number (including itself) on a single tile.

Question 1: What is the probability of drawing a “double” from a set of dominoes — that is, a tile with the same number on both sides?

Question 2: Now you pick a random tile from the set and uncover only one side, revealing that it has six dots. What’s the probability that this tile is a double, with six on both sides?

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

A certain 2-year-old is eating his favorite snack: an apple. But he eats it in a very particular way. When he first receives the apple, and every minute thereafter, he rotates the apple to a random position and then looks down. If there’s any skin of the apple left in the spot where he plans to take a bite, then he will indeed take that bite. But if there’s no skin there (i.e., he’s already taken bites at that spot), he won’t take a bite and will rotate the apple for another minute. Here’s a photo of what the apple might look like after a while:

Once he has bitten off all the skin of the apple, he’s done eating.

Suppose the apple is a sphere with a radius of 4 centimeters, and that each bite of the apple is a circle of the sphere whose radius, as measured *along the apple’s curved surface*, is 1 centimeter. On average, how many minutes will it take this 2-year-old to eat the apple?

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

Congratulations to Peter Biggart of Los Angeles, California, winner of last week’s Riddler Express.

Last week, Dakota Jones had found a highly symmetric crystal in her pursuit of the Temple of Diametra. However, nefarious agents had gotten wind of her plans, and Dakota and the crystal were nowhere to be found.

It was up to you to recreate the crystal using the data from Dakota’s laser scanner, which takes a 3D object and records 2D cross-sectional slices along the third dimension. Here was the looping animation file the scanner produced for the crystal:

What sort of three-dimensional shape was the crystal?

While the cross sections in the animation were all rectangles, if you stacked them on top of each other, you found a solid with no apparent rectangles at all. That’s exactly what solver Jacob Kes did, finding that the resulting three-dimensional figure was a **tetrahedron:**

Peter Ji went so far as to build his own paper models and similarly arrived at a tetrahedral solution:

You would typically think of a tetrahedron as having triangular slices that shrink as you move along the altitude, from the base to the apex. But in this case, the cross sections were moving from one edge of the tetrahedron to the opposite edge, producing rectangles (and even a square) along the way.

Returning for a moment to the original puzzle, the crystal was described as “highly symmetric.” I have it on good authority that the crystal was in fact a *regular* tetrahedron, whose four faces were all equilateral triangles.

However, because the thickness of the slices in the 3D scan was never specified, slightly less symmetric answers were also possible. Solver Jenny Mitchell identified the solid as an “isosceles tetrahedron,” while Tim Tebbe called it a “disphenoid.” I didn’t pick hairs — as long as you said it was some kind of tetrahedron, I gave you credit!

And so Dakota Jones once again owes a debt of gratitude to Riddler Nation. Now it’s simply a matter of time before she successfully locates the Temple of Diametra. Stay tuned — she may need your help on her next adventure!

Congratulations to Gabe Martin of Hove, England, winner of last week’s Riddler Classic.

Last week, you were locked in a castle dungeon with three fellow prisoners, in separate cells with no means of communication. But it just so happened that all four of you were logicians.

To entertain themselves, the guards decided to give you all a single chance for immediate release. Each prisoner was given a fair coin, which could either have been fairly flipped one time or returned to the guards without being flipped. If all flipped coins came up heads, you would all be set free! But if any of the flipped coins came up tails, or if no one chose to flip a coin, you would all be doomed to spend the rest of your lives in the dungeon.

The only tools you and your fellow prisoners had to aid you were random number generators, which gave each prisoner a random number, uniformly and independently chosen between zero and one.

What were your chances of being released?

Since all four prisoners (including you) were “logicians,” but you couldn’t communicate with each other, it was fair to assume that you would all pursue the same optimal strategy. And without any further information, the best you could have done was pick some value *p* between zero and one — if your random number generator gave you a value less than or equal to *p*, you’d flip your coin and hope it came up heads. But if the generator gave you a number greater than *p*, you’d return to the coin to the guards and hope at least one other prisoner would flip a coin.

At this point, the entire puzzle boiled down to a single variable, *p*. And you immediately knew *p* shouldn’t be zero — then no one would flip a coin, and you’d have no chance at freedom. If *p* were one, then everyone would flip a coin, and the chances of exclusively getting heads would be small. So *p* was somewhere in between, and your task was to find the value that maximized your chances of freedom, presumably by keeping the number of flips close to one.

You can break the problem down into five cases, depending on how many prisoners decide to flip a coin:

- The probability that
*zero*prisoners flipped coins was (1−*p*)^{4}, and the resulting probability of freedom was zero. - The probability that exactly
*one*prisoner flipped a coin was 4*p*(1−*p*)^{3}, and the resulting probability of freedom was 1/2 — when that one coin came up heads. - The probability that exactly two prisoners flipped a coin was 6
*p*^{2}(1−*p*)^{2}, and the resulting probability of freedom was 1/4 — when both coins came up heads. - The probability that exactly three prisoners flipped a coin was 4
*p*^{3}(1−*p*), and the resulting probability of freedom was 1/8 — when all three coins came up heads. - The probability that exactly four prisoners flipped a coin was
*p*^{4}, and the resulting probability of freedom was 1/16 — when all four coins came up heads.

Putting this all together, when you and your fellow prisoners flipped your coins with probability *p*, your chances of freedom were 2*p*(1−*p*)^{3} + 3/2*p*^{2}(1−*p*)^{2} + 1/2*p*^{3}(1−*p*) + 1/16*p*^{4}.

To maximize this function, you had to take the derivative, 2 − 9*p* + 21/2*p*^{2} − 15/4*p*^{3}, and set it equal to zero. This occurred when *p* was equal to about 0.342. If you plugged this value back into the original expression, you got approximately 0.285, which meant that your chances of freedom stood at about **28.5 percent**. If you’re still not convinced, then I recommend checking out solver David Robinson’s millions of simulations, which gave the same result.

But that was just the case of four prisoners. Last week’s extra credit asked you to further solve the general case of *N* prisoners — and many readers were up to the challenge!

Rather than break the problem up into many cases, as we just did for *N* = 4, solvers Laurent Lessard and Josh Silverman both used the binomial theorem to more compactly write out your chances of freedom, which turned out to be (1−*p*/2)^{N} − (1−*p*)^{N}. Again taking the derivative and setting it equal to zero, Laurent found that the maximum occurred when *p* was equal to 1 − 1/(2^{N/(N−1)}−1). Finally, plugging in this value for *p* meant that your probability of being set free was **1/(2 ^{N/(N−1)}−1)^{N−1}**.

But what does all this algebra *mean*? Well, as you’d expect, when there were more prisoners (i.e., as the value of *N* increased), your chances at freedom went down — which makes sense, because it’s harder to guarantee that only one or two prisoners will flip their coins when there are many prisoners. But *how* your chances at freedom went down was arguably the most interesting part of this puzzle.

Here’s a graph of how the probability of freedom varied with *p* for different numbers of prisoners, courtesy of Jason Ash:

As the number of prisoners increased, the peak of the curves moved left, and your chances of freedom appeared to approach … 25 percent?!

Yes, it was 25 percent! As you plugged larger and larger values of *N* into the probability for freedom, it indeed approaches a value of 1/4. (Solver Emma Knight also offered some neat intuition as to why this happens.)

So if the guards ever planned on enacting this scheme in a dungeon with loads of imprisoned logicians, they would have been better off just flipping two coins themselves and seeing if they both came up heads. It certainly would have saved them a lot of time!

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>Dakota Jones is back in action. In her quest to locate the Temple of Diametra, she has found another highly symmetric crystal. However, nefarious agents have again gotten wind of her plans, and now Dakota and the crystal are nowhere to be found.

And so, you must once again recreate the crystal using the data from Dakota’s laser scanner. As a reminder, the scanner takes a 3D object and records 2D cross-sectional slices along the third dimension. Here’s the looping animation file the scanner produced for the crystal *this* time:

What sort of three-dimensional shape is the crystal? No pressure — Dakota Jones, nay, the entire world, is counting on you to locate the lost temple!

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

From Bart Wright comes a rhetorical question from a famed soliloquy, “To flip, or not to flip?”:

You are locked in the dungeon of a faraway castle with three fellow prisoners (i.e., there are four prisoners in total), each in a separate cell with no means of communication. But it just so happens that all of you are logicians (of course).

To entertain themselves, the guards have decided to give you all a single chance for immediate release. Each prisoner will be given a fair coin, which can either be fairly flipped one time or returned to the guards without being flipped. If all flipped coins come up heads, you will all be set free! But if any of the flipped coins comes up tails, or if no one chooses to flip a coin, you will all be doomed to spend the rest of your lives in the castle’s dungeon.

The only tools you and your fellow prisoners have to aid you are random number generators, which will give each prisoner a random number, uniformly and independently chosen between zero and one.

What are your chances of being released?

*Extra credit:* Instead of four prisoners, suppose there are *N* prisoners. Now what are your chances of being released?

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

Congratulations to Tony Jackson of Rohnert Park, California, winner of last week’s Riddler Express.

Last week, you and a friend were grilling two small square burger patties whose sides were 5 centimeters long. However, you only had one slice of cheese remaining, which was also square and whose sides were 7 centimeters long. You wanted to cut the slice so that all of the cheese was evenly split between the two patties, and no cheese was spilling over either patty and onto the grill.

What was the smallest number of cuts you needed to make? (You could only make straight cuts, and you were asked to assume that the cheese was stationary during the cutting process.)

First off, several solvers thought to stack layers of cheese on top of each other. If stacking had been allowed, then with just two cuts you could have sliced the larger square into four smaller squares, each of whose sides were 3.5 centimeters long. (You even could have made a single cut down the middle and then have folded each half into quarters.) While stacking wasn’t explicitly prohibited in the original puzzle, finding a solution that resulted in a single layer of cheese on the patty was a more interesting challenge.

If you restricted your cuts so they were parallel to the sides of the square, then you needed at least four cuts. Solver Michael Smith found one such way to do this:

But with diagonal slicing, you only needed **two cuts**. The puzzle’s creator, Andrew Heairet, cut along the main diagonals of the cheese and then rearranged the resulting quarters into two squares that each had an area of 24.5 square centimeters — just enough to fit onto a single patty. Andrew was even kind enough to illustrate this solution:

Solver Jason White arrived at the same result, but went the extra mile of cutting a real slice of cheese!

But that wasn’t the only way to cut the cheese! Solver Ethan Rubin found a whole class of additional two-cut solutions by rotating the diagonal cuts:

According to Ethan, as long as the diagonal cuts were within about 8.13 degrees of the diagonal, the resulting quarters could still be rearranged to form two cheesy toppings that stayed on the patties.

Delicious!

Congratulations to Matt Maron of Philadelphia, Pennsylvania, winner of last week’s Riddler Classic.

Last week, you tried your hand at a variation of the Monty Hall problem. This time, Monty randomly picked a number of goats to put behind the doors: zero, one, two or three, each with a 25 percent chance. After the number of goats was chosen, they were assigned to the doors at random, and each door had at most one goat. Any doors that didn’t have a goat behind them had an identical prize behind them.

At this point, you chose a door. If Monty was able to open another door, revealing a goat, he would do so. But if no other doors had goats behind them, he would tell you that was the case.

It just so happened that when you played, Monty was able to open another door, revealing a goat behind it. Should you have stayed with your original selection or switched? And what were your chances of winning the prize?

It helped to break the problem down into four cases, one for each possible number of goats:

- If there were three goats behind the doors, it didn’t matter if you switched or stayed — you’d always lose.
- If there were two goats behind the doors, then this reverted to the original Monty Hall problem. You had a two-thirds chance of winning the prize if you switched, but just a one-third chance of winning if you stayed.
- If there was one goat behind a door, then Monty just did you a huge favor by showing you which door it was behind. It didn’t matter if you switched or stayed — you’d always win.
- If there were zero goats behind the doors, then you’d always win.

Now you might have thought that each of these cases was equally likely — but wait just a minute! The fact that Monty was even *able* to open a door and reveal a goat meant you couldn’t have been in the zero-goat scenario. There had to have been at least one goat present.

But that wasn’t all. The trickiest part of the problem was around the relative likelihood of the one-goat scenario. If there had been two or three goats, then no matter which door you picked, Monty could always open a different door to reveal a goat. But if there was only one goat, then the one-third of the time you happened to pick that goat’s door, Monty wouldn’t have been able to open another door to reveal a goat.

All of that meant you were just two-thirds as likely to be in the one-goat scenario as you were to be in the two-goat or three-goat scenarios. In other words, the probability there were three goats was 3/8, the probability there were two goats was also 3/8, and the probability there was one goat was just 2/8.

By combining the probabilities of the different scenarios with your probability of winning the prize within each scenario, you found that, overall, you had a **50 percent chance of winning if you switched**, but just a 37.5 percent chance of winning if you stayed.

Solver Geoffrey Lovelace verified these results by running a few hundred thousand computer simulations. And David Zimmerman, meanwhile, extended the problem by looking at the general case where there were *N* doors (rather than just three), with anywhere from zero to *N* goats behind those doors. He found that switching always gave you a 50 percent chance of winning the prize, no matter how many doors there were. However, your probability of winning when you stayed with your original door was *N*/(2(*N*+1)) — a value that’s always less than 50 percent.

And so, as with the original Monty Hall problem, your best bet was to switch doors. That is, unless a goat happens to be your idea of a prize.

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>From Andrew Heairet comes a puzzle that is sure to whet your appetite:

You and a friend are grilling two small square burger patties whose sides are 5 centimeters long. However, you only have one slice of cheese remaining, which is also square and whose sides are 7 centimeters long. You want to cut the slice so that all of the cheese is evenly split between the two patties, and no cheese is spilling over either patty and onto the grill.

What is the smallest number of cuts you need to make? You can only make straight cuts, and you should assume that the cheese is stationary during the cutting process.

The Monty Hall problem is a classic case of conditional probability. In the original problem, there are three doors, two of which have goats behind them, while the third has a prize. You pick one of the doors, and then Monty (who knows in advance which door has the prize) will always open another door, revealing a goat behind it. It’s then up to you to choose whether to stay with your initial guess or to switch to the remaining door. Your best bet is to switch doors, in which case you will win the prize two-thirds of the time.

Now suppose Monty changes the rules. First, he will randomly pick a number of goats to put behind the doors: zero, one, two or three, each with a 25 percent chance. After the number of goats is chosen, they are assigned to the doors at random, and each door has at most one goat. Any doors that don’t have a goat behind them have an identical prize behind them.

At this point, you choose a door. If Monty is able to open another door, revealing a goat, he will do so. But if no other doors have goats behind them, he will tell you that is the case.

It just so happens that when you play, Monty is able to open another door, revealing a goat behind it. Should you stay with your original selection or switch? And what are your chances of winning the prize?

Congratulations to James Goodman of Göttingen, Germany, winner of last week’s Riddler Express.

Last week, you were asked to solve a royal murder mystery:

You were told that the white knight that took the black queen had moved exactly eight times. How was this possible?

At first glance, it appeared that the white knight in question originated from the lower left corner of the board. However, there just didn’t seem to be a way for the knight to have reached the black queen in exactly eight moves.

Indeed, with a key insight, you could *prove* this impossibility. As solver Jeevaka Dassanayake observed, every time a knight moves, it either goes from a white square to a black square or a black square back to a white square. So because this knight started on a white square, then after any even number of moves — yes, that means after eight moves — it must again be on a white square. However, the black queen was on a *black *square. So there was no way the white knight from the lower left could have killed the black queen in eight moves.

In submitting this puzzle, Yan Zhang pointed to a particular saying of Sherlock Holmes: “When you have eliminated the impossible, whatever remains, however improbable, must be the truth.” If the white knight that took the queen wasn’t the one from the lower left, it *must* have been the one from the lower right.

Sure enough, the white knight in the lower right started on a black square, meaning it could take the black queen in an even number of moves. But what about the knight that’s currently occupying that black square in the lower right? Well, that was our old friend — the knight that started in the bottom left — and it got there in an odd number of moves.

In the end, there were many sequences of moves that met the criteria stated in the puzzle. Here is one such sequence, courtesy of Andrew Heairet (the submitter of this week’s Express):

Lucas Yan, meanwhile, reverse-engineered the game in Python, finding another sequence of moves.

If this chess strategy didn’t have a name before, it does now — solver ♔ Oliver Roeder ♔, my predecessor here at FiveThirtyEight, named it the “Drunken Dressage Defense,” possibly due to all that horsing around.

Finally, for those of you who are interested in more retrograde analysis of chess games, I recommend the works of Raymond Smullyan.

Congratulations to Matthew Cowen-Green of New York, winner of last week’s Riddler Classic.

Last week, you looked at a version of Conway’s Game of Life on a square grid with three rows, *N* columns and periodic boundary conditions — that is, squares in the first row (or column) were considered to be neighbors with squares in the last row (or column).

Each square was also either alive or dead and had eight neighbors — the eight squares that surrounded it. After every step in time, or “tick,” all the cells were simultaneously updated according to the following rules:

- A living square with two or three living neighbors remained living.
- A living square with any other number of living neighbors died (due to under- or overpopulation).
- A dead square with exactly three living neighbors came alive (due to reproduction).

In the Game of Life, some formations of living squares are known as “oscillators,” which change form from one tick to the next, ultimately returning back to their original formation. What was the smallest value of *N*, the number of columns, that could support an oscillator?

Some solvers thought to check the simplest oscillator from the standard Game of Life, known as a “blinker,” which consists of three squares that alternate between horizontal and vertical arrangements. However, when the three squares were vertically aligned, the topmost square was neighbors with the bottommost square due to the periodic boundary conditions. This meant your everyday blinker simply couldn’t exist on our modified grid, and you had to hunt for more complicated oscillators.

The smallest value of *N* that supported an oscillator turned out to be **four**, and it had a period of two (i.e., it returned to its original arrangement every two ticks). For this oscillator, two adjacent columns would be alive on one tick, the other two columns would be alive on the next tick, and then the original two columns would be alive again. Here’s an animation of this solution, courtesy of Michael Branicky:

But the fun didn’t stop there. When hunting for oscillators, if you treated the three squares in a column as a single unit that were either all alive or dead together, a new set of rules emerged:

- A living column with no neighboring living columns remained living.
- A living column with one or two neighboring living columns died (due to overpopulation).
- A dead column with exactly one neighboring living column came alive (due to reproduction).

So what was once a 3 by *N* grid of squares was now effectively a 1 by *N* grid of columns, which made the analysis slightly more manageable. It also meant that this game behaved like one of Stephen Wolfram’s cellular automata rules — rule 22 to be precise.

With this in mind, several solvers discovered all sorts of larger oscillators. Michael found that after *N* = 4, the next smallest value of N that could support an oscillator was *N* = 7. Nine-year-old (!) Natesh Larkin found a period-4 oscillator when *N* = 9:

Allen Gu found a period-384 oscillator when *N* = 24. And Josh Silverman found a period-1215 oscillator when *N* = 27:

Finally, if you’d like to play around some more yourself, check out the applet Gabe Pezanoski-Cohen made, which lets you search for oscillators on grids of varying sizes with periodic boundary conditions.

Oh, and if anyone has figured out the general pattern of what periods are possible for a given value of *N*, do share!

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>From Yan Zhang comes a royal murder mystery:

Black Bishop: “Sir, forensic testing indicates the Queen’s assassin, the White Knight between us, has moved exactly eight times since the beginning of the game, which has been played by the legal rules.”

Black King: “So?”

Black Bishop: “Well, to convict this assassin, we need to construct a legal game history. But we just can’t figure out how he got there!”

Can *you* figure it out?

Riddler Nation was deeply saddened to hear of the loss of John Conway last week. It is only fitting that this week’s Classic is a spin on Conway’s Game of Life.

In the most common version of the game, there is an infinite grid of square cells, which are initially either alive or dead. Each square has eight neighbors — the eight squares that surround it. And after every step in time, or “tick,” all the cells are simultaneously updated according to the following rules:

- A living cell with two or three living neighbors remains living.
- A living cell with any other number of living neighbors dies (due to under- or overpopulation).
- A dead cell with exactly three living neighbors comes alive (due to reproduction).

These relatively simple rules lead to some startlingly complex, emergent behaviors. For example, some formations of living cells are known as “oscillators,” which change form from one tick to the next, ultimately returning back to their original formation.

Now suppose we were to replace the infinite grid with a finite grid that has periodic boundary conditions, so that cells in the first row are neighbors with cells in the last row, and cells in the first column are neighbors with cells in the last column. If there are three rows and *N* columns, what is the smallest value of *N* that can support an oscillator?

Congratulations to Rohit S. of Denver, Colorado, winner of last week’s Riddler Express.

Last week, you were seated in an audience, when T-shirts were being launched via cannon in your direction. The rows of seats in the audience were all on the same level, they were numbered 1, 2, 3, etc., and the T-shirts were being launched from directly in front of Row 1.

Additionally, there was no air resistance, and the particular model of T-shirt cannon being used was able to launch T-shirts to the very back of Row 100 in the audience, but no farther.

If the T-shirt was launched at a random angle between zero degrees (straight at the unfortunate person seated in Row 1) and 90 degrees (straight up), which row should you have been sitting in to maximize your chances of nabbing the T-shirt?

While some solvers took an analytical approach, there was no shortage of simulations. For example, if you were to launch a T-shirt at whole number values of degrees between zero and 90, and you recorded which rows they landed in, here’s what you’d find:

Each blue dot represents a T-shirt fired at a different angle, and the red bars show how many T-shirts landed in each row. (Some rows didn’t get any T-shirts because this simulation only used whole number values of the angles.)

Already, it appears that the last few rows received more T-shirts than the others. This result was confirmed by Eli Luberoff, Jason Shaw, Ravi Chandrasekaran and Angelos Tzelepis, the last of whom sampled the angles from zero to 90 degrees at 0.01-degree steps. Every single one of them found that Row 100 had the greatest chance of receiving a T-shirt.

So what’s going on here? As solver J. D. Roaden explained, it helped If we looked at a graph of launch angle *θ *versus row number *R*, which physics tells us are related by the equation *R* = 100·sin(2*θ*), shown by the blue curve in the graph below:

Meanwhile, the vertical red bar shows the range in angles that will launch a T-shirt to Row 100. Because the blue curve is flattest at the top, that means larger variations in angle have relatively little effect on row number. And so sure enough, Row 100 corresponds to the widest swath of angles. Solver Jonah Majumder specifically found that the chances of nabbing the T-shirt in Row 100 were just over 9 percent. Not bad!

Finally, as an aside, this phenomenon (whereby the maximum possible value is more likely because that’s where it’s changing the least), also explains why rainbows exist. Seriously!

Congratulations to Andy Quick of Kitchener, Ontario, Canada, winner of last week’s Riddler Classic.

Last week, you modeled the appearance of spam on the Riddler column. (Scroll down to the comments section — I dare you!)

Over the course of three days, suppose the probability of any spammer making a new comment on this week’s Riddler column over a very short time interval was proportional to the length of that time interval (i.e., the spammers followed a Poisson process).

Also, on average, the column got one brand-new comment of spam per day that was not a reply to any previous comments. Each spam comment or reply also got *its own* spam reply at an average rate of one per day.

After the three days were up, how many total spam posts (comments plus replies) could I have expected?

So rather than follow your run-of-the-mill Poisson process, these spammers were following what’s known as a nonhomogeneous Poisson process (as nicely illustrated by Josh Silverman), meaning the rate at which spam was being posted changed over time. With every new spam comment, a new stream of potential replies opened up. So while the average rate of comments was initially one per day, the moment a comment appeared the rate jumped to two per day (one for brand-new comments, and one for replies to that first comment). And when a third comment appeared, regardless of whether it was brand new or a reply to a previous comment, the average rate jumped again to three comments per day.

As it turned out, there was a rather direct way to solve for the average number of comments. Solver Austin Shapiro pointed out that the average rate at which new spam appeared was proportional to the number of comments that already existed. (Sadly, to make this math work out just right, that meant that the Riddler column itself had to be counted as spam — it was essentially the very first spam comment to which all others were replying.)

Writing this as a differential equation, if *S*(*t*) was the average number of spam comments at time *t*, then *dS*/*dt* = *cS*, for some constant *c*. In fact, *c* was just 1, since the problem stated that the initial rate of spam comments was 1 per day. And so d*S*/d*t* = *S*, which meant *S* = *e*^{t}. In other words, the spam count was growing *exponentially*. Yikes!

But let’s return to the original question: How many spam posts could I expect to have after three days? While there would have been *e*^{3} *total* posts, the Riddler column was, of course, never really spam to begin with. Subtracting that off meant there would be ** e^{3} − 1**, or about

Many solvers went ahead and simulated the scenario, finding similar results. David Robinson coded it up in R, finding that while the average number of spam comments was about 19.1, sometimes it could be much, much larger. Even in just 100 simulations, he found that one resulted in more than 115 spam comments:

Several solvers, like Emma Knight and David Zimmerman, went one step further, finding the precise probability distribution for the number of spam comments over time: The probability of having *N* comments after *t* days was *e*^{−t}·(1 − *e*^{−t})^{N}. For any given number of days, this probability distribution was a geometric sequence — so while having zero comments was technically the most likely, the long tail of the distribution meant it was also quite possible to be inundated with spam.

In the end, last week’s column had just four spam comments (some of which have since mysteriously disappeared). I’m thanking my lucky spam filters it wasn’t 115.

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>During a break at a music festival, the crew is launching T-shirts into the audience using a T-shirt cannon. And you’re in luck — your seat happens to be in the line of flight for one of the T-shirts! In other words, if the cannon is strong enough and the shirt is launched at the right angle, it will land in your arms.

The rows of seats in the audience are all on the same level (i.e., there is no incline), they are numbered 1, 2, 3, etc., and the T-shirts are being launched from directly in front of Row 1. Assume also that there is no air resistance (yes, I know, that’s a big assumption). You also happen to know quite a bit about the particular model of T-shirt cannon being used — with no air resistance, it can launch T-shirts to the very back of Row 100 in the audience, but no farther.

The crew member aiming in your direction is still figuring out the angle for the launch, which you figure will be a random angle between zero degrees (straight at the unfortunate person seated in Row 1) and 90 degrees (straight up). Which row should you be sitting in to maximize your chances of nabbing the T-shirt?

Last week’s Riddler column garnered six comments on Facebook. However, every single one of those comments was spam. Sometimes, spammers even reply to other spammers’ comments with yet more spam. This got me thinking.

Over the course of three days, suppose the probability of any spammer making a new comment on this week’s Riddler column over a very short time interval is proportional to the length of that time interval. (For those in the know, I’m saying that spammers follow a Poisson process.) On average, the column gets one brand-new comment of spam per day that is not a reply to any previous comments. Each spam comment or reply also gets *its own* spam reply at an average rate of one per day.

For example, after three days, I might have four comments that were not replies to any previous comments, and each of them might have a few replies (and their replies might have replies, which might have further replies, etc.).

After the three days are up, how many total spam posts (comments plus replies) can I expect to have?

Congratulations to Pat Walsh of Prospect Park, Pennsylvania, winner of last week’s Riddler Express.

Last week, you were walking along the middle of a wide sidewalk when you saw someone walking toward you from the other direction, also down the middle of the sidewalk, 12 feet away. Being responsible citizens, you passed each other while maintaining a distance of at least 6 feet at all times. By the time you reached each other’s original positions, you were back in the middle of the sidewalk again. You were asked to assume that the other person followed the same path you did, but flipped around (since they were walking in the opposite direction).

You wanted to know the *shortest *distance you and the other person could walk so that you could switch positions, all while staying at least 6 feet apart at all times. What was this distance? (Note: Although the problem didn’t explicitly say it, the following solutions all assume that you and your counterpart were always walking at the same speed.)

Many solvers thought the optimal path was a rhombus whose diagonals had lengths of 12 feet and 6 feet, as shown below:

While this path clocked in at 6√5, or about 13.42 feet, it was not the correct answer. In the above animation, the two circles each had radii of 3 feet. In other words, any time the circles overlapped, you and your counterpart had come within 6 feet of each other. Sure enough, this rhomboidal solution had a fair bit of overlap, and so it did not meet the puzzle’s social distancing requirement.

Another popular solution was a “do-si-do,” where you and your counterpart walked directly toward each other until you were exactly 6 feet apart. From there, you walked in opposite directions around a circle whose radius was 3 feet, before finally continuing down the middle of the sidewalk to your respective destinations:

As the animation shows, this path, which has length 6 + 3𝜋, or about 15.42 feet, respected social distancing. But was it the *shortest* path?

As it turned out, it was not. The optimal path had three parts: two tangent lines to that central circle whose radius was 3 feet, and a shorter arc of the circle itself. To show this was faster than the do-si-do, here they are in a race against each other:

With a little geometry, solver Len Chyall found the exact length of this path was **6√3 + 𝜋**, or approximately **13.53 feet**.

Last week’s extra credit asked what would happen if the person walking toward you had no intention of straying from the center of the sidewalk (sigh), and it was entirely up to you to maintain a distance of at least 6 feet.

In this case, the shortest path again had three parts: two tangent lines and an arc. But this time, because of the asymmetry in the problem (i.e., you and your counterpart were no longer following the similarly shaped paths), the lengths of the tangent lines had to be calculated separately, and the “arc” between them wasn’t a true arc — the circle it wrapped around was a moving target.

Solver Angela Zhou animated the solution, finding the shortest distance was about **17.45 feet**.

Steve Schaefer arrived at the same answer analytically, but there was a fair bit of calculus and at least one transcendental equation involved — beyond the scope of this column.

In the end, if the person walking toward you had any sense of decency and mirrored your path, you could have shaved about 4 feet off your journey. It pays to stay safe and keep your distance.

Congratulations to Greg Couillard of Ithaca, New York, winner of last week’s Riddler Classic.

Last week you were asked about a mysterious snowplow. From the moment it began snowing one morning, the snow fell at a constant rate, and it continued the rest of the day.

At noon, a snowplow began to clear the road. The more snow there was on the ground, the slower the plow moved. In fact, the plow’s speed was inversely proportional to the depth of the snow — if you doubled the amount of snow on the ground, the plow moved half as fast.

During its first hour on the road, the plow traveled 2 miles. During the second hour, the plow traveled only 1 mile.

When did it start snowing?

Several solvers recognized this problem — perhaps they were in the same calculus class as the puzzle’s submitter, Phil Imming. It’s more likely they saw it in their own calculus class. Indeed, this riddle has been attributed to Ralph Palmer Agnew’s differential equations textbook, published in 1942. There’s even a video with more than 300,000 views that walks through the solution.

Suppose it started snowing at time *t* = 0. For any time *t*, the height of the snow was proportional to *t*, which meant the speed of the plow was proportional to 1/*t*. We’re looking for two consecutive hours where the plow moved twice as much during the first hour as it did in the second. And we can find the distance the plow traveled in a given hour by taking the integral of its speed — again, proportional to 1/*t* — over time. (Some solvers tried a shortcut where they looked at the average amount of snow on the ground during the hour, but this led to incorrect solutions.) In other words, if the plow started at time *t*_{0}, then the integral of 1/*t* from *t*_{0} to *t*_{0}+1 was twice the integral of 1/*t* from *t*_{0}+1 to *t*_{0}+2.

The integral of 1/t is ln(*t*), the natural log of *t*. That meant for the plow to have gone twice as far in the first hour as the second, *t*_{0} had to satisfy the following equation: ln(*t*_{0}/(*t*_{0}+1)) = 2ln((*t*_{0}+1)/(*t*_{0}+2)). With the help of some logarithmic identities, this equation became *t*_{0}^{2} + *t*_{0} − 1 = 0 — a quadratic — whose positive solution was *t*_{0} = (−1 + √5)/2, or one divided by the golden ratio.

In other words, the plow started about 0.618 hours, or about 37 minutes, after the snow started falling. Since you were told the plow started at noon, that meant it started snowing 37 minutes before noon, at approximately **11:23 a.m.**

Looking back on this problem, what would have happened if the snowplow had started just before 11:23 a.m.? There would have been no snow on the ground, and since the plow’s speed was inversely proportional to the amount of snow … it would have momentarily been zipping around at an infinite speed. So I’m just glad it waited a few minutes before starting!

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>From Patrick Mayor comes a question about something we’re doing these days to keep ourselves and others safe: social distancing.

You’re walking along the middle of a wide sidewalk when you see someone walking toward you from the other direction, also down the middle of the sidewalk, 12 feet away. Being responsible citizens, you pass each other while maintaining a distance of at least 6 feet at all times. By the time you reach each other’s original positions, you should be back in the middle of the sidewalk again.

You should assume that the other person follows the same path you do, but flipped around (since they’re walking in the opposite direction). For example, you could both walk 3 feet to the left, 12 feet forward and finally 3 feet back to the right, walking a total of 18 feet before swapping positions.

Being lazy (I mean, *efficient*), you’d like to know the *shortest *distance you and the other person could walk so that you can switch positions, all while staying at least 6 feet apart at all times. What is this distance?

*Extra credit:* Now suppose the person walking toward you has no intention of straying from the center of the sidewalk (sigh), and it’s entirely up to you to maintain a distance of at least 6 feet. In this case, what is the *shortest* distance you would have to walk to reach the other person’s original position?

From Phil Imming comes his favorite riddle, which he was the only student in his calculus class to solve back in 1965:

One morning, it starts snowing. The snow falls at a constant rate, and it continues the rest of the day.

At noon, a snowplow begins to clear the road. The more snow there is on the ground, the slower the plow moves. In fact, the plow’s speed is inversely proportional to the depth of the snow — if you were to double the amount of snow on the ground, the plow would move half as fast.

In its first hour on the road, the plow travels 2 miles. In the second hour, the plow travels only 1 mile.

When did it start snowing?

Congratulations to Chesson Yauk of Kansas City, Missouri, winner of last week’s Riddler Express.

Last week, you helped me get exactly 10 gloves out of a box. It was difficult to pull exactly two gloves out of the box at a time — sometimes I’d pull out two gloves, other times three and yet other times four. Somehow, I never pulled out any other number of gloves at a time.

How many distinct ways were there for me to remove all 10 gloves from the box? Note that the order mattered here — for example, pulling out two gloves, then four gloves and then another four gloves was distinct from pulling out four gloves, another four gloves and then two gloves.

One approach to this puzzle was to simply list out all the possibilities. Solver Andrew Heairet used a tree to work through each case:

Sure enough, there were **17** distinct ways to remove the gloves two, three or four at a time.

Many solvers, meanwhile, used a recursive approach. Suppose you already knew that there were *f*(*N*−4), *f*(*N*−3), *f*(*N*−2) and *f*(*N*−1) ways to remove *N*−4, *N*−3, *N*−2 and *N*−1 gloves, respectively. So then how many were there to remove *N* gloves? There were three distinct ways to reach *N*:

- There were
*f*(*N*−4) ways to remove*N*−4 gloves, after which you could remove four gloves. - There were
*f*(*N*−3) ways to remove*N*−3 gloves, after which you could remove three gloves. - There were
*f*(*N*−2) ways to remove*N*−2 gloves, after which you could remove two gloves.

If you ever found yourself having removed *N*−1 gloves, however, then there was no way to remove *N*, since you couldn’t remove just one glove. That meant *f*(*N*), the number of ways to remove *N* gloves, was equal to *f*(*N*−4) + *f*(*N*−3) + *f*(*N*−2). Before applying this formula, you had to work out a few small cases: There was one way to remove zero gloves (you simply don’t remove any), zero ways to remove one glove, one way to remove two gloves and one way to remove three gloves.

From there, you could use the recursive formula to find that there were two ways to remove four gloves, two ways to remove five gloves, four ways to remove six gloves, five ways to remove seven gloves, eight ways to remove eight gloves, 11 ways to remove nine gloves and, sure enough, 17 ways to remove 10 gloves.

Finally, solver Benjamin Dickman used an advanced technique known as generating functions, looking at expressions like (*x*^{2} + *x*^{3} + *x*^{4})^{5}. If you expand this expression, the coefficient of the *x*^{10} term winds up being the number of ways you can combine *five* twos, threes and fours to get a sum of 10. Similarly, the coefficient of the *x*^{10} term in (*x*^{2} + *x*^{3} + *x*^{4})^{4} tells you how many ways you can combine *four* twos, threes, and fours, and the coefficient of the *x*^{10} term in (*x*^{2} + *x*^{3} + *x*^{4})^{3} tells you how many ways you can combine *three* twos, threes, and fours. Combining these results, Benjamin once again found that there were 17 ways in total.

In the end, I was able to remove the gloves I needed — and I wasn’t stuck with one glove left over.

Congratulations to Kyle Tripp of Concord, CA, winner of last week’s Riddler Classic.

Last week, you started with a fair 6-sided die and rolled it six times, recording the results of each roll. You then wrote these numbers on the six faces of *another*, unlabeled fair die. For example, if your six rolls had been 3, 5, 3, 6, 1 and 2, then your second die wouldn’t have had a 4 on it; instead, it would have two 3s.

Next, you rolled this second die six times. You took those six numbers and wrote them on the faces of *yet another* fair die, and you continued this process of generating a new die from the previous one.

Eventually, you’d have a die with the same number on all six faces. What was the average number of rolls it would take to reach this state?

This puzzle got hairy quickly — after just one round, there were many possibilities to consider: You could still have all six numbers, or you could have five, four, three or two; there was even a small chance — 1 in 6^{5}, or 1 in 7,776 — that you’d roll the same number six times in a row and be done after just one round!

Many readers broke the problem down into cases. For example, if you knew the average number of rounds it would take when you had only *two* numbers left, you could work backwards to figure out how many rounds it would take when you had *three* numbers left. However, not all cases of having two numbers left were the same. While having one number on five faces (e.g., 1, 1, 1, 1, 1 and 2) gave you a whopping 33 percent chance of ending on the next round, having two numbers on three faces each (e.g., 1, 1, 1, 2, 2 and 2) provided a minuscule 3 percent chance of ending the next round. All that is to say — there were many cases to consider here.

Nevertheless, Riddler Nation powered through. Some turned to their computers, running countless simulations to arrive at an approximate answer. Angelos Tzelepis ran 2 million simulations, finding the average number of rounds was approximately 9.66.

Others were able to find an exact answer using Markov chains and transition matrices. Solver Allen Gu found that the average number of rounds was precisely **31,394,023/3,251,248, or about 9.656**. (The original question asked for the number of rolls. Since each round had six rolls, I also accepted answers that were six times larger, or approximately 58.)

Last week’s extra credit went beyond 6-sided dice, asking you to consider *N*-sided dice. Again using Markov chains, Allen identified the average number of rounds up through 10-sided dice. Beyond that, things got … dicey. (Sorry.)

Angela Zhou went even further, demonstrating that the average number of rounds needed for an *N*-sided die was approximately 2*N*:

So if you had a fair 1,000-sided die, it would take a little under 2,000 rounds on average until all the faces were the same number.

If ever there was a time when you expected a linear relationship to appear in a Riddler Classic, this was *not* it.

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>These days I always have a pack of latex gloves nearby. But it’s notoriously difficult to pull exactly two gloves out of the box at a time. Sometimes I’ll pull out two gloves, other times three, and yet other times four. Somehow, I never pull out any other number of gloves at a time.

This morning, I noticed that there are 10 gloves left in the box. How many distinct ways are there for me to remove all 10 gloves from the box? Note that the order matters here — for example, pulling out two gloves, then four gloves and then another four gloves is distinct from pulling out four gloves, another four gloves and then two gloves.

From Chris Nho comes a question of rolling (and re-rolling) a die:

You start with a fair 6-sided die and roll it six times, recording the results of each roll. You then write these numbers on the six faces of *another*, unlabeled fair die. For example, if your six rolls were 3, 5, 3, 6, 1 and 2, then your second die wouldn’t have a 4 on it; instead, it would have two 3s.

Next, you roll this second die six times. You take those six numbers and write them on the faces of *yet another* fair die, and you continue this process of generating a new die from the previous one.

Eventually, you’ll have a die with the same number on all six faces. What is the average number of rolls it will take to reach this state?

*Extra credit:* Instead of a standard 6-sided die, suppose you have an *N*-sided die, whose sides are numbered from 1 to *N*. What is the average number of rolls it would take until all *N* sides show the same number?

Congratulations to Lloyd Kvam of Lebanon, New Hampshire, winner of last week’s Riddler Express.

Last week, a manager instructed his team to hold a sale on their widgets every morning, reducing the price by 10 percent. Every afternoon, he had them increase the price by 10 percent from the sale price, with the (incorrect) idea that it would return it to the original price.

After *N* days, the manager walked through the store in the evening, horrified to see that the widgets had been marked more than 50 percent off of their original price. What was the smallest possible value of *N*?

Reducing the price by 10 percent was the same as multiplying it by 9/10, while increasing the price by 10 percent was the same as multiplying it by 11/10. So if the starting price on a given day was *x*, then the sale price was 0.9*x*, while the final price was 1.1(0.9*x*), or 0.99*x*. In other words, the price was in fact *decreasing* by 1 percent every day. Also, recall that the manager had seen that day’s final price from the afternoon, rather than the sale price in the morning.

So the question was essentially asking how many incremental 1 percent decreases resulted in an overall 50 percent decrease — that is, what’s the smallest value of *N* for which 0.99^{N} is less than 0.5?

Some solvers, like Jake Russo, listed or graphed the various prices over time. Meanwhile, solver Sarry Al-Turk took a more direct approach. You wanted to find *N* such that 0.99^{N} < 0.5. Taking the logarithm of both sides gives the inequality log(0.99^{N}) = *N*log(0.99) < log(0.5). Dividing both sides by log(0.99) — a negative number, which means we have to flip our inequality — gives* N* > log(0.5)/log(0.99), which is approximately 68.97. The smallest *N* was therefore **69**.

A few solvers gave the correct answer to a slightly different question: What was the first time the price *ever* dipped below 50 percent of the original price? This happened on the morning of the 60^{th} day of the sale, when the sale price was 0.9(0.99)^{59}, or about 0.497, times the original value.

Anyway, if the manager had better number sense, he would have asked his team to lower the price by 10 percent each morning, and then raise it by 11.11… percent each afternoon. On the bright side, at least he was able to purchase widgets half-off.

Congratulations to Eric Widdison of Kaysville, Utah, winner of last week’s Riddler Classic.

Last week’s Riddler Classic was all about the game SET.

In SET, there are 81 total cards, and each card has four attributes:

*Number:*Each card has one, two or three shapes on it.*Shape:*Each shape on a card is identical, and can be oval, diamond or “squiggle.”*Color:*Each shape on a card is identical in color, which can be red, green or purple.*Shading:*Each shape on a card is identical in shading, which can be solid, shaded or outlined.

Importantly, a “set” (not to be confused with the game’s title) of cards consists of three cards that are either all alike or all different in each attribute; if two of the cards have a common attribute that is not shared by the third, they cannot be a set.

Before we get to the specific questions from last week, it’s worth pointing out that SET* is a very popular game*, and, as a result, these questions have been asked (and answered) before. In particular, I’d like to send a shoutout to Gary Gordon and Liz McMahon, who not only submitted correct solutions but also literally wrote the book on SET’s deeper math puzzles with their daughters.

In solving this puzzle, it was also helpful to first think about the total number of sets there were in a deck of 81 cards. The key here was to realize that, given any two cards in the deck, there was always exactly one card that would complete a set. For any attributes the first two cards shared, the third card in the set would have to be the same, and for any attributes the first two cards didn’t share, the third would have to be different from both. So knowing any two cards in the set told you what the third card had to be.

So to count up all the sets, you could choose any two cards, and there were 81·80/2, or 3,240 ways to do this. However, for any given trio of cards, there were three ways to pick two, meaning we triple counted each set. The grand total number of sets in a deck was 3,240/3, or 1,080 sets.

That’s a lot of sets! Here they are, visualized:

Each of the 81 points represents a card in the deck, and the 1,080 randomly colored triangles connecting the points are the sets.

Solver Laurent Lessard wrote some code to efficiently scour the 81 cards and 1,080 sets, ultimately building up a maximal board of **20 cards** with zero sets among them. There were many ways to pick these 20 cards, and here’s one of them, courtesy of Laurent:

Laurent also found a board of 12 cards with the maximal number of **14 sets**:

Can you find them all?

To find the probability of having at least one set among a random board of 12 cards, most solvers again turned to their computers. Steve Loomis kindly shared his code, finding that this probability was approximately **96.8 percent.**

Without the aid of a computer, this was indeed a very challenging Riddler Classic. For example, proving that the maximum number of cards with no sets (also known as the largest “cap set”) was 20 was only done in 1971, and it involved rather advanced algebraic theory. For more on these relatively recent developments, I suggest checking out this 2016 article from Quanta Magazine, which describes a new upper bound on the size of cap sets.

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>A manager is trying to produce sales of his company’s widget, so he instructs his team to hold a sale every morning, lowering the price of the widget by 10 percent. However, he gives very specific instructions as to what should happen in the afternoon: Increase the price by 10 percent from the sale price, with the (incorrect) idea that it would return it to the original price. The team follows his instructions quite literally, lowering and then raising the price by 10 percent every day.

After *N* days, the manager walks through the store in the evening, horrified to see that the widgets are marked more than 50 percent off of their original price. What is the smallest possible value of *N*?

This week’s Riddler Classic features several puzzles, independently submitted by Tyler Barron and Angela Zhou, about the game SET.

In SET, there are 81 total cards, and each card contains has four attributes:

*Number:*Each card has one, two or three shapes on it.

*Shape:*Each shape on a card is identical, and can be oval, diamond or “squiggle.”

*Color:*Each shape on a card is identical in color, which can be red, green or purple.

*Shading:*Each shape on a card is identical in shading, which can be solid, shaded or outlined.

Here is a “board” of 12 such cards:

Importantly, a “set” (not to be confused with the game’s title) of cards consists of three cards that are either all alike or all different in each attribute; if two of the cards have a common attribute that is not shared by the third, they cannot be a set.

For example, in the image above, the single diamond in the left column and the top and bottom cards in the right column form a set. They each have different numbers (one, two and three), different shapes (diamond, squiggle and oval), the same color (red) and the same shading (shaded). If you look carefully, you might also find other sets within this board of 12 cards.

*Question 1:* What is the maximum number of cards you could have (from a single deck of 81 cards) such that there are *no* sets among them?

*Question 2: *What is the largest number of sets one can possibly find among 12 cards? You are free to pick any board of 12 cards you like — your goal is to maximize the number of sets the board contains.

*Question 3:* If you pick 12 cards at random (again, from a single deck of 81 cards), what’s the probability that they contain *at least one* set?

Congratulations to Lazar Ilic of Austin, Texas, winner of last week’s Riddler Express.

Last week, you were looking for powers of 2 that came very close to powers of 10. For example, 2^{10} equals 1,024, which is very close to 1,000, or 10^{3}. After 2^{10}, what was the next (whole number) power of 2 that came even closer to a power of 10? (To be clear, “closer” didn’t refer to the absolute difference — it meant your power of 2 needed to differ from a power of 10 by less than 2.4 percent.)

One way to find the answer was by brute force: calculating powers of 2 and checking how close they came to a power of 10. Solver Eugene Tsai did exactly this, with a lengthy spreadsheet to show for it.

Another approach made use of logarithms. You were looking for whole numbers *A* and *B* such that 2*A* ≈ 10*B*. Taking the base 10 logarithm of both sides and rearranging gave the expression *B*/*A* ≈ log_{10}2. In other words, you were looking for a fraction that approximated log_{10}2, which itself is about 0.301, and you wanted the denominator of your fraction, *A*, to be as small as possible.

So what were some fractions that were good approximations for 0.301? Well, 1/3 came to mind, which meant 2^{3} ≈ 10^{1}. I mean, sure, 8 is pretty close to 10. The next, better approximation was 3/10, which was *quite* close to 0.301. That meant 2^{10} ≈ 10^{3}. However, at this point, we’ve merely caught up to the original puzzle. So what was the next, better fractional approximation for log_{10}2 after 3/10?

Solver Tejas Guruswamy used a technique known as “continued fractions,” which do exactly what we want — they tell you the best fractional approximations for different numbers, including irrational numbers like log_{10}2. Meanwhile, solvers Matthew Miller and Dennis Okon both noted that there’s an OEIS sequence for what we’re looking for. (Isn’t there always?) Any which way, the next approximation for log_{10}2 was 28/93, which meant 2^{93} ≈ 10^{28}. In fact, 2^{93} is approximately 0.9904 × 10^{28}, only 0.96 percent less than 10^{28} — and so **2 ^{93}** was the correct solution.

Many solvers offered an answer of 2^{103}, which was 1.4 percent greater than 10^{31}. However, the original problem didn’t specify that the power of 2 had to be *greater* than its corresponding power of 10, so 2^{103} was not the correct answer.

A final approach worth mentioning was to graphically analyze the problem using polar coordinates, inspired by 3Blue1Brown’s related video on prime numbers.

In the animation above, each point represents a power of 2. The point’s distance from the origin is its power of 2 (so, for example, 2^{7} is a distance of 7 from the origin). The point’s angle, meanwhile, indicates how close that power of 2 comes to a power of 10, with an angle of zero degrees meaning it’s an exact power of 10. Here, we’re interested in the points that came closest to the zero-degree axis, labeled in red. Reading them off, they were: 3, 10, 93, 196, 485, 2,136, 13,301, 28,738, 42,039, and 70,777. These were exactly the powers of 2 that came progressively closer to powers of 10 in the aforementioned OEIS sequence!

In case you were curious, 2^{70,777} equals 1.00000716 × 10^{21,306}. Pretty darn close to a power of 10!

Congratulations to Donald M. of Dallas, Texas, winner of last week’s Riddler Classic.

Last week, you paid another visit to Tiffany’s barbershop. But this time, the riddle was stated slightly less ambiguously than it had been during your first visit.

This time, all of Riddler City decided to get a haircut at Tiffany’s, and everyone lined up at the entrance in a random order a few minutes before the shop opened at 8 a.m. After opening, the shop’s four barbers started cutting hair for their first customers at random times between 8 a.m. and 8:15 a.m. Each haircut then lasted exactly 15 minutes.

Also, each person in line had a 25 percent of preferring Tiffany. Whenever such a person was at the front of the line, if a barber *other *than Tiffany became available, they’d allow the person behind them to skip them in line … unless, of course, that person *also* preferred Tiffany, in which case the third person in line would skip both of them … unless, of course that person *also* *also* preferred Tiffany — you get the idea.

Sadly, you found yourself toward the back of this very, very long line. To pass the time while you waited, you spent a long time thinking about last week’s Riddler column, completely unaware of the passage of time. The next thing you knew, you were second in line, with one person waiting in front of you. At this point, how long should you expect to wait for your haircut from Tiffany?

Now, you might have thought that the person in front of you had a 25 percent chance of preferring Tiffany. Surprisingly, that wasn’t right. Over time, as more people got their hair cut, a backlog of Tiffany fans built up at the front of the line, while the non-Tiffany customers were weeded out.

Think of the line of customers as a string of *T*s (the Tiffany fans) and *U*s (the non-Tiffany customers). Over the course of each 15-minute cycle, Tiffany and the other three barbers each took turns picking a customer — Tiffany took the next in line, regardless of whether that person was a *T* or a *U*, while the other three barbers took the next available *U*. After a few cycles, all the early *U*s would have been taken by the other three barbers, leaving a whole bunch of *T*s at the head of the line. Over time, the number of *T*s at the front continued to grow with the total number of customers. (The average number of leading *T*s after *N *15-minute cycles of four haircuts looked suspiciously like the square root of *N*. But asking you to prove that would have been worthy of yet another Riddler!)

That meant, as solver Jason Shaw verified with code, that as the number of customers in front of you went to infinity, the probability the person in front of you was also a *T* approached 1. Since Riddler City had a very, very large population, it was safe to assume that the person in front of you was *definitely* a Tiffany fan. Thus, you had to wait an average of 7.5 minutes for Tiffany to finish her current haircut, and then another 15 minutes for the person in front of you, for a grand total of **22.5 minutes**.

An alternate, even more challenging interpretation of the problem some readers had was that, after your long wait outside the barbershop, you found yourself second in line, with *all four barbers currently *cutting hair. This was indeed a different scenario, since after a long time you would have expected the other three barbers to have serviced all the *U*s in the line, leaving nothing but *T*s (i.e., only Tiffany was left cutting hair).

Needless to say, Tiffany and her team of barbers clearly specialize in mathematical extensions. (See what I did there?)

Email Zach Wissner-Gross at riddlercolumn@gmail.com.

]]>