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

From Chengyu Wu comes a puzzle that cuts right to the chase:

You have a square piece of paper. You fold it in half along an axis parallel to two of its sides. You then fold it in half along another axis that is perpendicular to the original one, so that you again have a square shape that is one-quarter the size of the original square.

At this point, you make three cuts along three straight lines, all the way through the folded paper. As you unfold the paper, what is the greatest number of separate pieces you could have?

*Extra credit:* Instead of three cuts, suppose you make *N* straight cuts. Now what is the greatest number of pieces you could have?

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

## Riddler Classic

Rumor has it that readers of The Riddler Ellora Sarkar and Daniel Gomez are getting married this weekend. Congratulations to you both! In keeping with the hexagonal design of your wedding backdrop, I thought you might enjoy the following puzzle. (Riddler Nation, this oneâ€™s for you, too!)

The larger regular hexagon in the diagram below has a side length of 1.

What is the side length of the smaller regular hexagon?

*Extra credit: *If you look very closely, there are two more, even smaller hexagons on top. Can you see them? No? Maybe this animation will help:

What are the side lengths of these two even smaller hexagons?

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

## Solution to last weekâ€™s Riddler Express

Congratulations to đź‘Ź Justin Ahmann đź‘Ź of Bloomington, Indiana, and đź‘Ź Ethan Levine đź‘Ź of Chicago, Illinois, winners of last weekâ€™s Riddler Express.

Last weekâ€™s Express was a visual puzzle. Out of the 100 squares in the 10-by-10 grid below, 99 were colored gray, yellow, green, red or blue. One square, in the top left corner, had not yet been colored.

What color should this final square have been: gray, yellow, green, red or blue, or perhaps another color entirely?

First off, I want to say that â€” given the (intentional) ambiguity in the puzzle â€” there were multiple correct answers. In fact, *any* of the color choices could be justified. Among the hundreds of solvers, about half said the final square should be blue, while more than a quarter said red. (The remaining choices were less popular.) A red square in the top left, along with the three existing red squares, would have formed the four corners of yet another square. Similarly, the blue squares were all separated from their nearest blue neighbor by four squares in one direction and two squares in the perpendicular direction. If the top left square were blue, it would have followed this pattern as well.

The lone hint I offered was that the diagram had something to do with mathematicians Pingala, Hemachandra and Fibonacci. In retrospect, I should have also mentioned another name Fibonacci went by: Leonardo Pisano. The Pisano period is how long it takes the *last digits* of the Fibonacci numbers to repeat. In base 10, the Pisano period is 60. As noted by Justin, it was no coincidence that the most common color in the diagram (gray) occurred in precisely 60 squares. Perhaps the puzzle was a visualization of the Pisano period?!

But first, itâ€™s worth recalling the first few Fibonacci numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 and 144. Their last digits, respectively, are 0, 1, 1, 2, 3, 5, 8, 3, 1, 4, 5, 9 and 4. So, what does it mean for these last digits to â€śrepeatâ€ť? After all, 1 has already occurred three times, but the sequence shows no signs of repeating.

Thatâ€™s because each Fibonacci number (after the initial 0 and 1) is determined by adding the *two* numbers that precede it in the sequence. So, once you have *two consecutive* digits that repeat, the entire sequence will then repeat. We can treat consecutive last digits as ordered pairs: (0, 1), (1, 1), (1, 2), (2, 3), (3, 5) and so on. If we plot them in a grid, reading the first coordinate as the row and the second coordinate as the column, we can visualize the Pisano period as the 60 gray squares. For reference, hereâ€™s the grid again, now with rows and columns labeled with the digits from 0 to 9:

What about the remaining 40 squares? Well, if you started with the digits 0 and 2 â€” instead of the Fibonacci sequenceâ€™s 0 and 1 â€” youâ€™d generate an entirely new sequence of ordered pairs: (0, 2), (2, 2), (2, 4), (4, 6), (6, 0), and so on. This time, the sequence repeated every 20 terms. These were the yellow squares in the grid.

The red, green and blue squares all represented other cycles of ordered pairs. The only outlier was the square in the top left. It had a cycle of length one, since (0, 0) repeated forever. In other words, if the Fibonacci sequence instead started with 0 and 0, it would just be a whole bunch of 0s (and not particularly interesting). That meant the top left square was a cycle unto itself, and therefore required **its own new color**. (I vote for #FF69B4.)

Finally, before you write to me to say how your interpretation of the puzzle was equally valid â€” I get it. There were *lots* of patterns at play here, which gave all sorts of interesting answers. I hope you at least found the connection to Pisano cycles interesting!

## Solution to last weekâ€™s Riddler Classic

Congratulations to đź‘Ź Jenny Mitchell đź‘Ź of Nashville, Tennessee, winner of last weekâ€™s Riddler Classic.

Over the last few weeks, Wordle has taken the puzzling world by storm. 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.

And so, last week, your goal was to devise a strategy to maximize your probability of winning Wordle in *at most three guesses*. To do this, I provided you access to 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 word lists from Wordleâ€™s source code and listed them alphabetically.)

Before we get to the solution, itâ€™s worth a reminder that Wordleâ€™s rules get a little hairy 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:

Okay, now letâ€™s get to the solution. But before trying to win in three guesses, letâ€™s try to win in two. (The math is very similar, but involves one less degree of complexity.)

With no information about the mystery word prior to your first guess, the optimal strategy (again, for winning in at most two guesses) always began with the same word. Upon guessing this word, you would see what I like to call a â€śconstellationâ€ť of yellow, green and uncolored letters. In the example above â€” MAGIC â€” I had a green in the first position and a yellow in the fourth position. At this point, you knew that the mystery word must have been among the cluster of words that produced this constellation for your first guess.

For simplicity, suppose there were 100 total mystery words and three possible constellations. Letâ€™s further suppose that 20 mystery words aligned with the first constellation, 30 words with the second and 50 with the third. So, with that first guess, the probability the first constellation shows up was 20/100, and then your probability of guessing correctly out of those 20 words was 1/20. Multiplying these probabilities together, the first constellation contributed 20/100Â·1/20, or 1/100, to your overall probability of guessing correctly. Meanwhile, the second constellation contributed 30/100Â·1/30, or another 1/100 to your overall probability. And the third constellation contributed 50/100Â·1/50, which was yet another 1/100. With 100 mystery words that corresponded to three constellations, your chances of guessing correctly were 3/100 â€” the number of constellations divided by the number of mystery words. It didnâ€™t matter how many words were in each constellation, just the total number of constellations. (This was a pretty awesome moment for those who figured this out!)

Applying this to Wordleâ€™s actual list of 2,315 mystery words, you can search for which word results in the greatest number of distinct constellations among the other 2,314 words (note that each word will always result in five greens when it is the mystery word itself). The optimal first word turned out to be TRACE, which resulted in a whopping 150 constellations. Keep in mind that the maximum number of constellations was 3^{5}, or 243, since each of the five letters was either yellow, green or uncolored â€” so 150 wasnâ€™t too shabby. And that meant your probability of guessing the word in at most two guesses was 150/2,315, or about 6.5 percent, a result that *was* a little shabby.

Surely, with *three* guesses, your chances improved. Also, as I mentioned before, your strategy needed an additional layer of complexity. Whatever your first guess was, you would get some number of constellations (as many as 150, as we just learned). Then, for each constellation, you had to determine the second word you could guess that would fracture it into â€śsub-constellations.â€ť Just as before, your probability of guessing correctly was equal to the total number of these sub-constellations divided by the total number of mystery words.

One wrinkle in all of this was that your second word didnâ€™t have to look anything like the words in the constellation. The only requirement was that it helped you discriminate among all the words in the constellation as much as possible.

And so an ideal strategy was to search across different first guesses. For each first guess, identify the constellations. Then, for each constellation, identify the second word that resulted in the greatest number of sub-constellations. In the end, the best first word turned out to be, once again, **TRACE**. (It wasnâ€™t a guarantee that the same word would be the best opener for winning in both two and three guesses, but it wasnâ€™t exactly a surprise, either.)

If you chose your second word optimally, then there were a grand total of 1,388 sub-constellations, which meant your probability of winning in at most three guesses was very nearly **60 percent**. This optimal strategy is summarized in the chart below:

To play along with this #SolveInThree strategy:

- First, guess TRACE.
- Then, locate your resulting constellation on the ring. Note that the constellations should be read inside-out, meaning theyâ€™re not always oriented left-to-right.
- Next, guess the corresponding second word.
- Finally, guess any mystery word that is consistent with what youâ€™ve seen so far.

The bars in the middle of the chart indicate how often you can expect to get each constellation, as well as how often youâ€™ll win (in green). As I said, if you follow these steps, your chances of winning in three or fewer guesses is about 60 percent.

It shouldnâ€™t be *too* surprising that your chances of guessing the mystery word skyrocketed when we moved from two turns to three. Thatâ€™s because the theoretical maximum number of constellations increased by another factor of 243, bringing the total to a whopping 59,049 â€” well in excess of the number of five-letter words. If the English language were a little more uniform in terms of its letters and their placement, Wordle would be a heck of a lot easier!

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