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.

## Riddler Express

This week’s Express is a visual puzzle. Out of the 100 squares in the 10-by-10 grid below, 99 have been colored gray, yellow, green, red or blue. One square, in the top left corner, has not yet been colored.

What color should this final square be? Should it be gray, yellow, green, red, or blue, or perhaps another color entirely?

(If you’re not sure how to get started here, you might want to check in with a few mathematicians by the names of Pingala, Hemachandra and Fibonacci.)

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

## Riddler Classic

Over the last few weeks, Wordle has taken the puzzling world by storm. Thousands of people (including yours truly) play daily, and the story of its creation has been well documented.

Wordle closely resembles the classic game show Lingo. In Wordle, you have six guesses to determine a five-letter mystery word. For each word that you guess, you are told which letters are correct and in the correct position (marked in green), which among the remaining letters are in the mystery word but are in the incorrect position (marked in yellow) and which letters are incorrect altogether.

This sounds straightforward enough. But things get a little hairier when the mystery word or one of your guesses has a letter that appears more than once. To brush up on the rules, you may want to check out the following example in which the mystery word is MISOS, taken from last year’s Lingo-inspired Riddler Classic:

In addition to the many people who play Wordle daily, some folks — including Friends-of-The-Riddler™ Laurent Lessard and Tyler Barron — have generated approaches for winning Wordle in relatively few guesses, no matter the mystery word. And this is closely related to the task for this week’s Riddler Classic.

Your goal is to devise a strategy to maximize your probability of winning Wordle in *at most three guesses*. After all, if Yvette Nicole Brown can do it, then so can your strategy! (No offense to Yvette Nicole Brown. She’s awesome.)

In particular, I want to know (1) your strategy, (2) the first word you would guess and (3) your probability of winning in three or fewer guesses.

To do this, you will need to access Wordle’s library of 2,315 mystery words as well as all 12,972 words you are allowed to guess. For the record, I pulled both of these word lists from Wordle’s source code and listed them alphabetically for your convenience.

**Spoiler alert!** If you enjoy playing Wordle daily and do not want to know the entire list of mystery words, then don’t look *too* closely at these lists. You have been warned!

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

## Solution to last week’s Riddler Express

Congratulations to ÐÐ¯Ð¡Ð Brett ÐÐ¯Ð¡Ð of Urbandale, Iowa, winner of last week’s Riddler Express.

Last week, you were the Riddler Football League’s Arizona Ordinals against your opponent, the Detroit Lines, and your team was down by 14 points. You could assume that you had exactly two remaining possessions (i.e., opportunities to score), and that Detroit would score no more points.

For those unfamiliar with American football, a touchdown is worth 6 points. After each touchdown, you could decide whether to go for 1 extra point or 2 extra points. You happened to have a great kicker on your team, and your chances of scoring 1 extra point (should you have gone for it) were 100 percent. Meanwhile, scoring 2 extra points was no sure thing — suppose that your team’s probability of success was some value *p*.

If the teams were tied at the end of regulation, the game proceeded to overtime, which you had a 50 percent chance of winning.

What was the minimum value of *p* such that you’d go for 2 extra points after your team’s first touchdown (i.e., when you were down 8 points)?

At first, you might have thought that *p* should have been at least 50 percent for you to go for 2. That’s because when *p* was 50 percent, you could expect to earn 1 point on average after each touchdown, whether you were going for 1 or 2 extra points. But the fact that you had *two* scoring opportunities was important here. So let’s play out what might have happened.

If *p* was sufficiently small, then you were better off always going for 1 extra point. After two touchdowns, this would have tied the game and sent it into overtime, which you had a 50 percent chance of winning.

But if *p* was large enough, it was (presumably) to your advantage to go for 2 extra points after the first touchdown. If you were successful, then you could guarantee victory by going for 1 extra point after your second touchdown. But if you were unsuccessful, you had another opportunity to go for 2: after your second touchdown. This would tie the game and send it into overtime, where you still had a 50 percent chance of winning.

So then, what were your chances of winning in terms of *p*? If you made that first 2-point conversion (with probability *p*), you were guaranteed victory. But if you missed the conversion (with probability 1−*p*), you’d have to make the second 2-point conversation (again with probability *p*) — and even then, your probability of winning was still 1/2. Mathematically, this total probability of victory came to *p*+(1−*p*)·*p*/2, or 3*p*/2−*p*^{2}/2.

Now, when this expression was greater than 1/2, or 50 percent, that meant you were more likely to win than if you had simply gone for 1 extra point. And 3*p*/2−*p*^{2}/2 was greater than 1/2 when *p*^{2}−3*p*+1 was less than zero. Solving this quadratic inequality, *p* had to be greater than (3−√5)/2, or about 0.382. In other words, when *p* was at least **38.2 percent**, you should have gone for 2 after your first touchdown.

In the Riddler Football League, the coaches always make decisions based on logic and probability. Alas, the same cannot be said for the NFL, in which even the prisoner’s dilemma is clearly a foreign concept.

## Solution to last week’s Riddler Classic

Congratulations to ÐÐ¯Ð¡Ð John Halmi ÐÐ¯Ð¡Ð of Annapolis, Maryland, winner of last week’s Riddler Classic.

Last week, Amare the ant was traveling within Triangle ABC, as shown below. Angle A measured 15 degrees, and sides AB and AC both had length 1.

Amare started at point B and wanted to ultimately arrive on side AC. However, the queen of his colony had asked him to make several stops along the way. Specifically, his path had to:

- Start at point B.
- Second, touch a point — any point — on side AC.
- Third, touch a point — any point — back on side AB.
- Finally, proceed to a point — any point — on side AC (not necessarily the same point he touched earlier).

What was the shortest distance Amare could travel to complete the queen’s desired path?

If Amare wanted to minimize the length of his trip’s first leg — from point B to side AC — he would have traveled along a line segment perpendicular to AC. With some trigonometry, that distance turned out to be sin(15°). Then, to minimize the length of the second leg, he would have traveled directly down to side AB, for an additional length of sin(15°)·cos(15°). Finally, his return to side AC would again have been perpendicular to that side, for a distance of sin(15°)·cos^{2}(15°). Adding these three lengths together gave a total distance of approximately 0.7503. But was there an *even more* efficient journey for Amare?

Indeed, there was. If Amare hadn’t initially taken the shortest route to side AC, instead veering a little closer to point A, then the last two legs of the trip would have been shorter. It turned out that this was a tradeoff worth making — walking a little farther on that first leg shortened the overall distance.

At this point, with this being a minimization problem and all, several solvers worked their way to a solution using calculus. For example, solver Jason Ash used three parameters to describe Amare’s journey — the distances from point A when he first touched side AC, when he next touched side AB and when he touched side AC again. With computer assistance, Jason found that the shortest such path had a length of approximately 0.7071. Not only was this an improvement over the “greedy” strategy of moving perpendicularly to each next line segment — it looked suspiciously like a rather well-known irrational number.

But first, I want to acknowledge that this puzzle was inspired by another problem I encountered several years ago from the American Mathematics Competitions. The original problem had a different triangle, with different side lengths and a different angle, but there was an elegant geometric solution, just like in this one.

As solvers Ed Parks, Laurent and nine-year-old (!) Mari Fujioka explain, you can imagine Amare’s second leg occurring in an identical triangle that was reflected across side AC. Meanwhile, you can imagine Amare’s third leg occurring in yet another identical triangle, this time reflected across leg AB’ (where point B’ is the reflection of point B in that second triangle). If you need a visualization, an animation by Colin Parker and this diagram from solver Emma Knight may help:

As we’ve been saying all along, the shortest distance to a line is perpendicular to that line. And so, the shortest distance from point B to line AC’ in Emma’s diagram is perpendicular to line AC. With three 15° angles stacked on top of each other, angle BAC’ is 45 degrees, and no advanced trigonometry (not to mention calculus!) is required. The shortest path had a total length of **1/√2**, which is indeed approximately 0.7071.

This wasn’t a brutal exercise in calculus after all. Or at least, it didn’t have to be.

That Amare is one clever ant, and I have it on good authority he traveled along the shortest path, much to the queen’s delight.

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

**CLARIFICATION (Jan. 14, 2022, 1:56 p.m.): **This story has been updated to include a color accessible image for the Riddler Express and links to full word lists in the Riddler Classic.