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 the next 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.

This week, there are *three* puzzles: a Riddler Express, a Riddler Classic and a Bonus Riddler Express. Read on to learn more.

## Riddler Express

Many of you already know of Catriona Agg’s delightful felt-tip geometric puzzles (or as I like to call them, “Agg-onizers”). This past week, I reached out to her to let her know I planned to run a puzzle inspired by her brainteasers, and wouldn’t you know it — she offered to create a felt-tip drawing just for Riddler Nation!

Without further ado, I present a puzzle that has been hand-drawn by Catriona:

The two larger squares are congruent, and the smaller square makes a 45 degree angle with one of the larger squares. Both larger squares touch the circle at one corner, while the smaller square touches the circle at two corners.

How many times greater is the area of one of the larger squares than the area of the smaller square?

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

## Riddler Classic

A few weeks ago, Scott Matlick reached out to me with observations about the relative likelihood that a positive integer with a given number of digits would be a perfect square. And that got us both wondering. For some perfect squares, when you remove the last digit, you get another perfect square. For example, when you remove the last digit from 256 (16^{2}), you get 25 (5^{2}).

The first few squares for which this happens are 16, 49, 169, 256 and 361. What are the *next* three squares for which you can remove the last digit and get a different perfect square? How many more can you find? (Bonus points for not looking this up online or writing code to solve it for you! There are interesting ways to do this by hand, I swear.)

*Extra credit:* Did you look up the sequence and spoil the puzzle for yourself? Good news, there’s more! In the list above, 169 (13^{2}) is a little different from the other numbers. Not only when you remove the last digit do you get a perfect square, 16 (4^{2}), but when you remove the last *two* digits, you again get a perfect square: 1 (1^{2}). Can you find another square with *both* of these properties?

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

## Bonus Riddler Express

Congratulations to 👏John Goldsmith 👏 of Clearwater, Florida, winner of last week’s Riddler Express.

Last week, you were caring for an infant and trying to interpret their cry. Were they hungry? Were they tired? Did they need a diaper change?

Suppose you had an infant who napped peacefully for two hours at a time and then woke up, crying, due to hunger. After eating quickly, the infant played alone for another hour and then cried due to tiredness. This cycle repeated several times over the course of a 12-hour day. (Your rock star baby slept peacefully 12 hours through the night.)

You were working in an adjacent room when your partner walked out and handed you the baby monitor. You had completely lost track where in the day this happened. You continued working for another 30 minutes, then you heard the baby cry. What was the probability that your baby was hungry?

If you looked at one of the baby’s three-hour cycles, there were two times that came 30 minutes before the baby cried: once when they were hungry and again when they were tired. That meant that over the course of a 12-hour day, there were four times the baby was hungry and four times the baby was tired. Since you had no information about where in the day you presently were, the probability the baby was hungry was **4/8, or 50 percent**.

And now for this week’s *Bonus* Riddler Express: Once again, you are working in an adjacent room when your partner walks out and hands you the baby monitor. You completely lose track of where in the day this happens. You continue working for another 30 minutes, and this time you do *not* hear the baby cry. What is the probability that the next time your baby cries they will be hungry?

The solution to this Bonus Riddler Express can be found in the following column.

## Solution to last week’s Riddler Classic

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

This past Sunday, March 14, was Pi Day! To celebrate, you planned to bake a pie. You had a sheet of crust laid out in front of you. After baking, your pie crust was going to be a cylinder of uniform thickness (or rather, *thin*ness) with delicious filling inside.

To maximize the volume of your pie, what fraction of your crust should you have used to make the circular base (i.e., the bottom) of the pie?

First off, the problem was ambiguous as to whether there was crust atop the pie. As a result, I accepted two different answers! Either way, your goal was to maximize the volume of the pie given a fixed amount of crust, which you calculated as the surface area of the pie.

First, let’s assume the pie was a closed cylinder. In this case, for a pie with radius *r* and height *h*, the surface area *A* was 2𝜋*r*^{2}+2𝜋*rh*, while the volume *V* was 𝜋*r*^{2}*h*. Both *A* and *V* were functions of *r* and *h*, so how could you maximize *V* for a given value of *A*?

Solver Paulina Leperi did this by solving for *h* in terms of *A* and *r*, finding that *h* was (*A*−2𝜋*r*^{2})/(2𝜋*r*). Plugging this expression for height into the formula for volume meant that *V* was 𝜋*r*^{2}·(*A*−2𝜋*r*^{2})/(2𝜋*r*), or (*Ar*−2𝜋*r*^{3})/2. Assuming *A* was constant, you could maximize *V* as a function of *r* by taking the derivative with respect to *r* and setting it to zero. This happened when *A* was equal to 6𝜋*r*^{2}. In other words, the total surface area of the pie was six times the area of the circular base, which meant the base made up **one-sixth** of the crust. (This wound up being a rather tall pie, where the height equalled the diameter. When viewed from the side, it has a square profile.)

Meanwhile, solver Anna Engelsone assumed the pie was an open cylinder, consisting of a circular bottom and a shell around the side, but no top. In this case, the volume *V* was still 𝜋*r*^{2}*h*, but the surface area *A* was now 𝜋*r*^{2}+2𝜋*rh*. Solving for *h *gave you (*Ar*−𝜋*r*^{3})/2, which meant that *V* was (*Ar*−𝜋*r*^{3})/2. This time, the derivative was zero when *A* was equal to 3𝜋*r*^{2}, or three times the area of the circular base. So the optimal open pie had a base that made up **one-third** of the crust. (This optimal pie looked a little more reasonable. This time, the height equaled the radius instead of the diameter.)

Another way to solve this puzzle was using the method of Lagrange multipliers, a general approach when you are optimizing one function while constrained by another. Ali Farhat admitted this approach was a little heavy-handed, saying it was akin to “nuking the mosquito.”

Solver Laurent Lessard extended the problem, looking at what would happen if the pie were a frustum, with different-sized circles on top and bottom, rather than a cylinder. After some involved calculus, Laurent determined the optimal frustum was one in which the two circular bases were the same size, i.e., a cylinder!

And solver Mark Girard looked at a different generalization, where the thickness of the crust was nonzero. Mark made the rather surprising discovery that for a closed pie, no matter how thick the crust was, the volume was optimized when the height was equal to the diameter.

Finally, the *real* winners this week were Erik and Elena Larson of San Pedro, California, and Susan Carter of Houston, Texas (who was among the few to use Lagrange multipliers). Not only did they correctly solve the riddle, but they used their solution to bake an optimally filled pie. Alas, due to the unusual “optimal” dimensions in the problem, Susan was forced to use a casserole dish to bake her pie:

Still, it doesn’t get any sweeter than that!

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