Welcome to The Riddler. Every week, I offer up problems related to the things we hold dear around here: math, logic and probability. Two puzzles are presented each week: the Riddler Express for those of you who want something bite-size and the Riddler Classic for those of you in the slow-puzzle movement. Submit a correct answer for either,^{1} and you may get a shoutout in next week’s column. Please wait until Monday to publicly share your answers! If you need a hint or have a favorite puzzle collecting dust in your attic, find me on Twitter.

## Riddler Express

From Christopher “CJ” Halverson comes a bibliophilic game of Secret Santa:

Every year, CJ’s family of five (including CJ) does a book exchange for Christmas. First, each person puts their name in a hat. The hat is shaken, and then each person draws a random name from the hat and gifts that person a book. However, if anyone draws their own name, they all put their names back into the hat and start over.

What is the probability that no one will draw their own name?

## Riddler Classic

From Dean Ballard come trials and tribulations of troublesome triangles:

Three friends are baking holiday cookies together. They have a flat layer of cookie dough in the shape of an isosceles right triangle (shown below). They want to design a cookie cutter that will cut out three identical (i.e., congruent) cookies. The cookies should be as large as possible while staying within the triangle and without overlapping each other.

Had there been two friends or four friends, they would have been able to use all of the cookie dough. But with three friends, there will unfortunately be some cookie dough that goes to waste.

What is the greatest percentage of cookie dough that can be made up by the three identical cookies? When explaining your work, please be as detailed as you can about the arrangement of your cookies so I can verify your work!

*Extra credit:* Instead of a right isosceles triangle, the three friends now want to make identical cookies from a sphinx of cookie dough. Again, what is the greatest percentage of cookie dough that can go into the three identical cookies?

## Solution to last week’s Riddler Express

Congratulations to 👏 Piotr L. 👏 of Newbridge, Ireland, winner of the most recent Riddler Express.

Depending on the year, there can be one, two or three Friday the 13ths. Several weeks ago happened to be the second Friday the 13th of 2020.

What was the *greatest* number of Friday the 13ths that could occur over the course of four consecutive calendar years?

The “four” years in this problem was intentional — it guaranteed that there was at most one leap year in the mix. It was also possible for there to be no leap years, since some years that are multiples of four — like 1900 and 2100 — are not leap years.

Most solvers turned to spreadsheets so they could efficiently track all the possibilities. And to simplify matters a bit, rather than look for months whose 13th days were Fridays, you could have equivalently found months whose first days were Sundays.

From here, many solvers, like Amy Leblang, used modular arithmetic. Amy renamed the days of the week A-day, B-day, C-day, D-day, E-day, F-day and G-day. We haven’t decided yet which of these days is Sunday — but if A-day were Sunday, then B-day would be Monday, C-day would be Tuesday, etc. Suppose the first year of our four-year interval was a leap year. Then if Jan. 1 was an A-day, that would mean Feb. 1 was a D-day, since January has 31 days (*three* more than a multiple of seven). And then March would be an E-day, because February has 29 days in a leap year (*one* more than a multiple of seven).

Continuing month by month over the four years, there were nine months that started with an A-day, six months that started with a B-day, seven months that started with a C-day, seven months that started with a D-day, six months that started with an E-day, six months that started with an F-day and seven months that started with an G-day. So when the first year was a leap year, A-day was the most frequent first day of the month, occurring nine times. And when A-day happened to be a Sunday, you’d have nine Friday the 13ths over four years.

Had the leap year been the second, third or fourth year in the interval — or if there had been no leap years — then none of the seven lettered days started a month more than eight times. That meant you could have at most **nine** Friday the 13ths over four years. Indeed, the last time this occurred was (checks notes) from 2012 to 2015. Sure enough, 2012 was a leap year that started on a Sunday.

For extra credit, you were asked about four-year intervals that could start on any day of the year. As it so happened, this maximum was again **nine**.

To be honest, riddles about leap years always make my head spin a little. We’ll have no more of these for at least another four years.

## Solution to last week’s Riddler Classic

Congratulations to 👏 Daniel Silva-Inclan 👏 of Chicago, Illinois, winner of the most recent Riddler Classic.

To celebrate Thanksgiving, you and 19 of your family members were seated at a circular table (socially distanced, of course). Everyone at the table wanted a helping of cranberry sauce, which happened to be in front of you at the moment.

Instead of passing the sauce around in a circle, you passed it randomly to the person seated directly to your left or to your right. They then did the same, passing it randomly either to the person to *their* left or right. This continued until everyone had, at some point, received the cranberry sauce.

Of the 20 people in the circle, who had the greatest chance of being the *last* to receive the cranberry sauce?

First off, this was essentially a repeat of a Riddler Express from several years ago. That puzzle was submitted by Chris Thornett of Brooklyn, New York, who — surprise, surprise — got the right answer once again!

Chris explained his solution by looking at a specific family member (other than you), whom we might as well call … Chris. Now for Chris to be the last person to receive the cranberry sauce, exactly one of two things had to happen:

- At some point, the person directly to Chris’s
*left*received the sauce. However, the sauce was*not*passed to Chris, instead making its way around the entire table until Chris received it from the person on his*right*. - At some point, the person directly to Chris’s
*right*received the sauce. However, the sauce was*not*passed to Chris, instead making its way around the entire table until Chris received it from the person on his*left*.

None of this depended on where the sauce had already been, which meant everyone at the table had the *same* chances of being last: **1/19**.

This was a rather surprising result! One might have expected that those sitting far away from you were more likely to have received the cranberry sauce last. A few solvers, like David Robinson and Quoc Tran, reached for their nearest computer and verified Chris’s results with thousands or even millions of simulations.

The animation below shows one simulation at first, with the cranberry sauce randomly bouncing its way around the table. It then speeds up, showing a grand total of 100,000 simulations. The pie chart (how appropriate for Thanksgiving!) in the middle reveals the relative frequencies with which each person is last to receive the sauce. Sure enough, the distribution appears to be uniform — exactly what Chris’s solution had predicted!

As you’d expect, this result was generalizable to any number of people in the circle. For any value of *N*, each person (other than you) had a 1/(*N*−1) chance of being the last to receive the cranberry sauce.

Solver Rajeev Pakalapati took the problem a step further and solved the general case when your family was right-leaning or left-leaning — that is, in which way the cranberry sauce was passed around the table. (Apologies for the attempt at political humor.) If each member of your family passed the sauce to the right with probability *p* > 0.5, then the person to your left was most likely to receive it last. According to Rajeev’s calculations, that maximum probability was *x*^{18}·(*x*−1)/(*x*^{19}−1), where *x* was defined as *p*/(1−*p*).

This nonlinear result was very sensitive to changes in *p*. Even when *p* was only slightly greater than 0.5 (as in the second animation above, where *p* was 0.51), there were tremendous shifts in the probability distribution of who was the last to receive the sauce.

Finally, I wanted to acknowledge that for most of us, the value of *N* for our Thanksgiving dinners last week was much smaller than 20. Here’s hoping this puzzle will be more realistic for Thanksgiving in 2021.

## Want more riddles?

Well, aren’t you lucky? There’s a whole book full of the best puzzles from this column and some never-before-seen head-scratchers. It’s called “The Riddler,” and it’s in stores now!

## Want to submit a riddle?

Email Zach Wissner-Gross at riddlercolumn@gmail.com