Jan. 10, 2020,

at

8:00 AM

# Can You Find A Number Worth Its Weight In Letters?

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. If you need a hint or have a favorite puzzle collecting dust in your attic, find me on Twitter.

## Riddler Express

To celebrate the new year, here’s a quick puzzle about the number 2020. Of all the fractions out there that are greater than 1/2020 but less than 1/2019, one has the smallest denominator. Which fraction is it?

(Before you ask, by “fraction” I mean that both the numerator and denominator should be whole numbers.)

## Riddler Classic

From Leonard Cohen comes a puzzle at the intersection of language and mathematics:

In Jewish study, “Gematria” is an alphanumeric code where words are assigned numerical values based on their letters. We can do the same in English, assigning 1 to the letter A, 2 to the letter B, and so on, up to 26 for the letter Z. The value of a word is then the sum of the values of its letters. For example, RIDDLER has an alphanumeric value of 70, since R + I + D + D + L + E + R becomes 18 + 9 + 4 + 4 + 12 + 5 + 18 = 70.

But what about the values of different numbers themselves, spelled out as words? The number 1 (ONE) has an alphanumeric value of 15 + 14 + 5 = 34, and 2 (TWO) has an alphanumeric value of 20 + 23 + 15 = 58. Both of these values are *bigger* than the numbers themselves.

Meanwhile, if we look at larger numbers, 1,417 (ONE THOUSAND FOUR HUNDRED SEVENTEEN) has an alphanumeric value of 379, while 3,140,275 (THREE MILLION ONE HUNDRED FORTY THOUSAND TWO HUNDRED SEVENTY FIVE) has an alphanumeric value of 718. These values are much *smaller* than the numbers themselves.

If we consider all the whole numbers that are *less than* their alphanumeric value, what is the largest of these numbers?

## Solution to last week’s Riddler Express

Congratulations to 👏 Quinn Rose 👏 of Des Moines, Iowa, 👏 Mike Cromwell 👏 of Novi, Michigan, and 👏 Mark Ritchie 👏 of Cleveland, Ohio, winners of last week’s recent Riddler Express.

Last week, you were presented with three images, in which different nations’ flags had their pixels randomly rearranged. You were tasked with figuring out which flag was which.

The first flag was an even mix of red, white and blue…

…or was it blue, white and red? Quinn correctly identified it as the flag of **France**:

While there are many national flags that make use of this color palette, about 40 percent of solvers correctly identified this as France’s flag. Solver Stew Schrieffer checked this by comparing the number of pixels of each color. There were approximately an equal number of blue, white and red pixels, and the precise colors perfectly matched France’s flag. The most popular (wrong) submissions were the United Kingdom, the United States of America and Russia, each at about 15 percent.

The second flag was mostly green, followed by a mix of yellow and blue, with a pinch of white.

Mike correctly identified this as the flag of **Brazil**:

I’m happy to report that most solvers got this right. It turns out that Brazil has a very identifiable color scheme. Who knew?

The third and final flag had the greatest variety of colors and had a relatively even mix of those colors. This made it more difficult to identify.

After studying the color profile of the pixels, Mark found that there were five colors: blue and green in “equal(ish)” amounts, as well as red, white and yellow in lesser amounts. The flag that best fit this bill was **Namibia**:

About a third of respondents correctly identified Namibia, with about 20 percent guessing South Africa, 15 percent guessing the Seychelles and 10 percent guessing Turkmenistan.

Overall, this was some excellent vexillological sleuthing by Riddler Nation. Sheldon Cooper would be proud!

## Solution to last week’s Riddler Classic

Congratulations to 👏 Peter Ji 👏 of Madison, Wisconsin, winner of the last week’s Riddler Classic.

Last week, you analyzed the Spelling Bee word game from The New York Times. In Spelling Bee, seven letters are arranged in a honeycomb lattice, with one letter in the center. The goal is to identify as many words that meet the following criteria:

- The word must be at least four letters long.
- The word must include the central letter.
- The word cannot include any letter beyond the seven given letters.

Note that letters can be repeated. Four-letter words are worth 1 point each, while five-letter words are worth 5 points, six-letter words are worth 6 points, seven-letter words are worth 7 points, etc. Words that use all of the seven letters in the honeycomb are known as “pangrams” and earn 7 bonus points (in addition to the points for the length of the word).

Your task was to find the seven-letter honeycomb that resulted in the highest possible game score. To be a valid choice of seven letters, no letter could be repeated, it couldn’t contain the letter S (that would have been too easy) and there had to be at least one pangram. For consistency, you were asked to use this word list (courtesy of computer scientist Peter Norvig) to check your game score.

The highest scoring honeycomb had an R in the center, with the letters AEGINT around it. This arrangement scored a whopping 3,898 points. If you don’t believe me, here’s a visualization showing each word in the honeycomb, with the letters in each word highlighted in pink:

There are some particularly high-scoring words contained in this honeycomb, like REAGGREGATING and REINTEGRATING (each worth 20 points).

As if finding this highest-scoring honeycomb wasn’t challenging enough, several members of Riddler Nation set out to write increasingly efficient algorithms for solving this puzzle.

At first, you might think there are countless letter combinations that you (that is, your computer) would have to sift through to find the best honeycomb. Out of 25 letters (remember, we excluded the S), there are more than 3 million possible ways to pick a central letter and then six other letters around it. Yikes! Solver Tyler Barron estimated that it would have taken his computer 584 days to crank through all those letter combinations.

But Peter Ji, our winner, didn’t try all 3 million honeycombs. He narrowed his search to letters that showed up most frequently in the word list. This approach didn’t *guarantee* the right answer, but it worked.

Meanwhile, solver Laurent Lessard definitively proved this was the best honeycomb by taking advantage of the fact that there had to be a pangram — that is, a word with exactly seven unique letters. In the given word list, there were only 14,741 pangrams, which corresponded to 55,902 possible honeycombs. It’s still a pretty big number, but it’s way smaller than 3 million. Along the way, Laurent also found the highest scoring honeycomb that *did *include an S (with an E in the center and AINRST around it, worth a cool 8,681 points) and the lowest scoring honeycomb (with an X in the center and CINOPR around it, worth a pathetic 14 points). Solver David Robinson wrote about a similar approach that also leveraged matrix operations.

Finally, Peter Norvig (the provider of the word list!) documented his incredibly efficient approach. By looking at the possible subsets of letters within a honeycomb, the final version of his program found the right answer in 2 seconds. Wow!

Solver Hector Pefo suggested that The New York Times use this highest-scoring honeycomb for the April Fools’ Day edition of Spelling Bee. It would surely drive the Spelling Bee community (also known as the #HiveMind) bonkers. How awesome would that be?

## 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 [email protected].

## Footnotes

Important small print: Please wait until Monday to publicly share your answers. In order to 👏 win 👏, I need to receive your correct answer before 11:59 p.m. Eastern time on Monday. Have a great weekend!

Zach Wissner-Gross leads development of math curriculum at Amplify Education and is FiveThirtyEight’s Riddler editor. @xaqwg