ABC News
Can You Solve This Rather Pedestrian Puzzle?

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

Riddler City is a large circular metropolis, with countless square city blocks that each have a side length of 1 km. A small section of the city, composed of 36 blocks, is shown in the diagram below:

At the very center of the city lies Riddler City Hall. Its many employees all walk to and from work, and their homes are evenly scattered across the city. The sidewalks they walk along have always been adjacent to the streets โ but that may be changing.

Recently, several city hall employees submitted a petition, requesting that the sidewalks should no longer lie alongside the streets. Instead, they want the sidewalks to cut diagonally across the city, connecting nearby street intersections. These proposed sidewalks are represented by the thicker blue lines in the diagram below:

The mayor of Riddler City has tasked you with resolving this dispute in a mathematical manner. She would like you to answer the following question: What fraction of the city hall employees would have a shorter walk home (that is, to the street intersection nearest to their home) if the city replaced its traditional sidewalks with these diagonal sidewalks?

## Riddler Classic

From David Lewis comes an additional, original twist on Riddler Cityโs urban planning:

The mayor ultimately decided not to pursue diagonal sidewalks, but the petitioners havenโt given up yet. One of them recently visited Barcelona and was inspired by its octagonal city blocks.

Now, thereโs a second petition on the mayorโs desk, asking that the grid layout of the cityโs sidewalks be replaced with an octagonal pattern, represented by the thicker blue lines in the diagram below:

Under this second proposal, now what fraction of the employees would have a shorter walk home if the city replaced its traditional sidewalks with these new sidewalks?

## Solution to last weekโs Riddler Express

Congratulations to ๐ Andrew Yuan ๐ of Brisbane, Australia, winner of last weekโs recent Riddler Express.

Last week, you were asked to find how many more palindrome dates (in the MM/DD/YYYY format) there would be this century. The most recent occurrence was this past Groundhog Day, 02/02/2020.

As many solvers noted, the fact that the date had to occur in this century meant that it had to have the form MM/DD/20YY. Then, in order to be a palindrome โ meaning it reads the same forwards and backwards, if we ignore the slashes โ the form becomes MM/02/20YY.

At this point, the two last digits of the year are the same as the digits of the month, but flipped. And so Andrew went through the 12 months of the year to see which resulted in palindromes that hadnโt yet occurred. The 12 palindrome dates are:

• 02/02/2020 (just passed)
• 03/02/2030
• 04/02/2040
• 05/02/2050
• 06/02/2060
• 07/02/2070
• 08/02/2080
• 09/02/2090
• 12/02/2021

Of the 12 possible palindrome dates, four have already passed. That means there are eight palindrome dates remaining this century.

Solver Sami from London extended the riddle, looking also at palindrome dates in the DD/MM/YYYY format (which, appropriately enough, is used in London). Following a similar approach, Sami found 23 such palindrome dates. Interestingly, one of these is Feb. 29, 2092 โ a palindrome leap day!

Back in the American format, the next palindrome date will occur on Dec. 2, 2021, which sounds like the perfect time to ask this riddle again. (Spoiler alert: The answer will be seven.)

## Solution to last weekโs Riddler Classic

Congratulations to ๐ Bram Carlson ๐ of Fort Lauderdale, Florida, winner of last weekโs Riddler Classic.

Last week, you were introduced to an ambiguous mathematical expression with absolute values. Offered as an example, the expression |โ1|โ2|โ3| had two possible interpretations, and as a result, two corresponding values:

• The two left bars were a pair, and the two right bars were a pair. In this case, we had 1โ2ยท3 = 1โ6 = โ5.
• The two outer bars were a pair, and the two inner bars were a pair. In this case, we had |โ1ยท2โ3| = |โ2โ3| = |โ5| = 5.

That was all well and good. But instead of analyzing just two cases, you had to find how many different values the expression |โ1|โ2|โ3|โ4|โ5|โ6|โ7|โ8|โ9| could have. Yikes!

As you might have expected, some solvers used pencil and paper, while others turned to their computers. While this riddle seemed imposing, pencil and paper did an excellent job at providing an upper bound for the answer.

For the expression |โ1|โ2|โ3|, there were two ways to pair the absolute value bars, and it turned out there were two possible values โ one for each pairing. Similarly, finding the total number of ways to pair the absolute value bars in the expression |โ1|โ2|โ3|โ4|โ5|โ6|โ7|โ8|โ9| gives us all possible values for the expression. (However, not all of these values may be unique โ some may be duplicates of each other. But we can cross that bridge when we get to it โฆ in a few paragraphs).

To count up the number of pairings of absolute value bars, we could imagine each pair consisting of an โopenโ bar and a โcloseโ bar โ just like parentheses. In other words, the number of pairings of the 10 bars in |โ1|โ2|โ3|โ4|โ5|โ6|โ7|โ8|โ9| was the same as the number of ways to write out five pairs of โ or 10 total โ parentheses. Many solvers pointed out that this related problem is quite famous. Given N pairs of parentheses, the total number of valid sequences is known as the Nth Catalan number.

Catalan numbers show up all over the place in discrete mathematics and combinatorics. Donโt believe me? Well, try figuring out how many ways you can divide up a convex polygon into non-overlapping triangles by connecting the polygonโs internal diagonals. Go ahead, Iโll wait. Whatโs that? The answer turns out to be a Catalan number? You donโt say.

Since there were five pairs of absolute value bars in the original expression, |โ1|โ2|โ3|โ4|โ5|โ6|โ7|โ8|โ9|, that meant there were 42 (the fifth Catalan number) total ways to pair up the bars. A few solvers stopped here, satisfied with an answer of 42. Of course.

But, as we said earlier, 42 is just the upper bound for our answer. There canโt be more than 42 unique values, but if some pairings of the absolute value bars result in duplicate values, the answer will be less than 42.

Indeed, there were several such duplicates. Ian Rhile evaluated all 42 interpretations of the original expression and plotted them on a number line:

Of the 42, three were duplicates, meaning there were only 39 unique values for the expression. For anyone who wants to know, this weekโs winner, Bram, identified those pesky duplicates: โ375, โ25 and 105.

A few brave solvers tried their hands at evaluating even longer expressions, like |โ1|โ2|โ3|โ4|โ5|โฆ|โ37|, which Angela Zhou found to have 664,540,593 unique values. (Her poor computer.)

While the number of unique values closely matches the Catalan numbers for shorter expressions, Angela found that they drop off โ |โ1|โ2|โ3|โ4|โ5|โฆ|โ33| is the first such expression whose number of unique values isnโt even half of its corresponding Catalan number.

Finally, thereโs a tradition here at The Riddler of referencing The On-Line Encyclopedia of Integer Sequences (OEIS). There seems to be a known sequence out there that gives you the answer almost every week. Solver Tyler Barron was delighted to report that no one has yet submitted this sequence โ the number of unique values for |โ1|โ2|โ3|โ4|โ5|โฆ|โ(2Nโ1)| โ to OEIS.

And in true Riddler fashion, Tyler called dibs.

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

## Footnotes

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