# FiveThirtyEight Riddler

## Can You Calculate the Product of Perpendicular Diagonals?

Lately, Rushabh has been thinking about very large regular polygons — that is, a polygon all of whose sides and angles are congruent. His latest construction is a particular regular 1,000-gon, which has 1,000 sides of length 2. Rushabh picks one of its longest diagonals, which connects two opposite vertices.

Now, this 1,000-gon has many diagonals, but only some are perpendicular to that first diagonal Rushabh picked. If you were to slice the polygon along all these perpendicular diagonals, you’d break the first diagonal into 500 distinct pieces. Rushabh is curious — what is the product of the lengths of all these pieces?

Extra credit: Now suppose you have a regular 1,001-gon, each of whose sides has length 2. You pick a vertex and draw an altitude to the opposite side of the polygon. Again, you slice the polygon along all the perpendicular diagonals, breaking the altitude into 500 distinct pieces. What’s the product of the lengths of all these pieces this time?

### Solution

To approach this problem, what I did first was to try to define the mathematical expression we would have to use to calculate the product of all the perpendicular diagonals.

Thinking about a smaller example first—say, 6 sides of length 2 instead of 1,000—I went about constructing the the component parts we want to multiply together to get the answer.

We need to figure out how far apart the vertices are from each other. If we can imagine an inscribed circle around this polygon, the radius would be $$\csc(\pi/n)$$. We can then calculate the length of the first (moving from 0 radians clockwise; i.e., the right-most) red line as $2\cdot\csc(\pi/n)\cdot\sin(2\pi/n)$

To calculate the product of every diagonal perpendicular to the longest (blue) one, we can generate a product of the following form: $\prod_{i=1}^{\frac{n}{2}-1}2\cdot\csc(\pi/n)\cdot\sin(i\cdot2\pi/n)$

To solve the original question–what is that value for a 1000-gon?–the number is so astronomically large, we need to articulate a closed-form expression for it, rather than waste digital ink typing out 1251 digits of a number nobody could possible process. As such, I set out to identify a pattern in the results as we escalate from smaller, more manageable $$n$$s to larger ones.

The following is the table of results for the first handful:

With this pattern, we can identify that the answer to the first question is $$500\csc^{499}(\pi/1000)$$ or approximately 1.835*101251.

To answer the extra credit question, we’ll adapt our product expression and lean on ever-helpful WolframAlpha to do the heavy lifting for us. The result is $\prod_{i=1}^{500}2\cdot\csc(\pi/1001)\cdot\sin(i\cdot2\pi/1001)\approx 1.3889*10^{1253}$

## Can You Break Max’s Wand?

Max the Mathemagician is calling for volunteers. He has a magic wand of length 10 that can be broken anywhere along its length (fractional and decimal lengths are allowed). After the volunteer chooses these breakpoints, Max will multiply the lengths of the resulting pieces. For example, if they break the wand near its midpoint and nowhere else, the resulting product is 5×5, or 25. If the product is the largest possible, they will win a free backstage pass to his next show. (Amazing, right?)

You raise your hand to volunteer, and you and Max briefly make eye contact. As he calls you up to the stage, you know you have this in the bag. What is the maximum product you can achieve?

Extra credit: Zax the Mathemagician (no relation to Max) has the same routine in his show, only the wand has a length of 100. What is the maximum product now?

### Solution

It’s pretty easy to prove that once you choose the number of times to break the wand, the product-maximizing approach to the size of the segments is to have equally-sized sections. Understanding this, to win the game, we have to figure out how many pieces we should end up with.

Evaluating each number of segments, we see that for a 10-unit long wand, the maximum product occurs at 4 segments (three divisions), with each segment having a length of 2.5 units. This gives a total product of 39.0625.

Extra Credit: With a 100-unit long wand, we can use the same process to identify that there should be 37 sections (36 divisions) of length 2.703 units. This gives a total product of (about) 94,740,61,716,781,810.

Extra Extra Credit: But wait; there’s more! Why 4 for the 10-unit and 37 for the 100? If we look at the lengths of the segments, we see that we’re approaching Euler’s number — e. Zach Wissner-Gross, Laurent Lessard, and Ollie Roeder probably know why this is the case, but I don’t. I look forward to finding out!

## Can You Decipher The Secret Message?

This week’s Classic comes courtesy of Alexander Zhang of Lynbrook High School, California. Alexander won first place in the mathematics category at this year’s International Science and Engineering Fair for his work at the intersection of topology and medicine. He developed his own highly efficient algorithms to detect and remove defects (like “handles” or “tunnels”) from three-dimensional scans (e.g., MRI). Alexander has long had an interest in topology, which just might be related to his submitted puzzle.

Consider the following image showing a particular uppercase sans serif font:

ABCDEFGHIJKLM
NOPQRSTUVWXYZ

Alexander thinks many of these letters are equivalent, but he leaves it to you to figure out how and why. He also has a message for you:

YIRTHA

It may not look like much, but Alexander assures me that it is equivalent to exactly one word in the English language.

What is Alexander’s message?

### Solution

There are two important hints embedded in this question — one obvious and one more subtle. The obvious one, Alexander has long had an interest in topology, which just might be related to his submitted puzzle, tells us to consider the shape of the letters rather than any lexicographical characteristics. The more subtle one, Consider the following image showing a particular uppercase sans serif font: (emphasis mine), is important because of the topographical nuances on which this question hinge.

Conventional topography rules would divide the letters provided into three groups: A’s, which have one hole (A, D, O, P, Q, R); B’s which have two (just B), and C’s which have no holes (C, E, F, G, H, I, J, K, L, M, N, S, T, U, V, W, X, Y, Z). The variations in the lines can be stretched or moved into or out of existence, but the holes must be preserved.

Looking for words (from the Scrabble dictionary) that match the ‘YIRTHA’ pattern (CCACCA) yielded 413 results, including ‘CHOKED’, ‘FIASCO’, and ‘WHACKO’.

In search of a more restrictive topographical definition, I recognized the hint in the phrase sans serif. Serifed fonts (like the one I use on this site) have ornamentation which give letters extra lines. If we impose the requirement that for shapes to belong to the same topographical class they must be equivalent only through the stretching and rearranging of lines, but that neither lines nor holes can be created nor destroyed, then we get seven distinct classes: A’s, which have one hole and two additional lines (A, R); B’s, which have two holes (B); C’s, which have no holes and only one undivided line (C, G, I, J, L, M, N, S, U, V, W, Z); D’s, which have one whole and no additional lines (D, O); E’s, which have one two-way fork (E, F, T, Y); H’s, which have two two-way forks (H, K, X); and P’s, which have one hole and one additional line (P, Q).

Searching for the new pattern — EIAEHA — we find only a single matching word: EUREKA!