## The Ultimate Answer to the Ultimate Question

Last week’s puzzle asked for the largest regular polygon in a “cycle,” or a collection of regular polygons all with side length 1 sharing a common central vertex, with consecutive pairs of polygons sharing exactly a common edge.  I had tackled a simpler version of this problem before, with exactly 3 polygons each with a distinct number of sides.  With this slight generalization– any number of polygons, possibly with equal numbers of sides– this already nice mathematical problem acquires a nice computational twist.

Following is Mathematica code that enumerates all possible cycles, unique up to permutations.  It is essentially a lexicographic enumeration of cycles of $m$ polygons, where $3 \leq m \leq 6$.  (We need at least 3 polygons, since the interior angle of any regular polygon is strictly less than 180 degrees.  There can be at most 6 polygons, since the smallest interior angle of any regular polygon is 60 degrees.)  The idea is to enumerate “candidate prefixes” of $m-1$ polygons, since the number of sides in the $m$-th polygon is determined by the others:

Do[
While[True,
s=Total[180-360/n]; (* Compute sum of interior angles *)
k=Length[n];        (* Usually we increment the last polygon *)
If[s>180,           (* Remaining polygon contributes < 180 deg *)
p=360/(s-180);  (* Compute number of sides of remaining polygon *)
If[p<Last[n],
t=Split[n]; (* Remaining polygon is too small *)
If[Length[t]>1,
k=k-Length[t//Last], (* Increment at last difference *)
Break[]              (* Stop if all polygons are equal *)
],
If[IntegerQ[p],Print[Append[n,p]]] (* Record valid cycles *)
]
];
n[[Range[k,Length[n]]]]=n[[k]]+1 (* Move to next candidate cycle *)
],
{m,3,6}
]


This yields the following output, where it turns out that the desired largest polygon is realized in the lexicographically first cycle:

{3,7,42}
{3,8,24}
{3,9,18}
{3,10,15}
{3,12,12}
{4,5,20}
{4,6,12}
{4,8,8}
{5,5,10}
{6,6,6}
{3,3,4,12}
{3,3,6,6}
{3,4,4,6}
{4,4,4,4}
{3,3,3,3,6}
{3,3,3,4,4}
{3,3,3,3,3,3}


Another reason that I like this problem– beyond the fact that its solution is the answer to “Life, the Universe, and Everything”– is that the answer, 42, is… well, large.  That is, my own intuition would not have suggested a cycle might involve a polygon with that many sides.

This phenomenon of “surprisingly large numbers” in mathematics is what reminded me of this problem and motivated the last couple of posts.  The subject of conversation was actually “surprisingly large minimal counterexamples,” or the dangers of “poor man’s induction:” observing a property for many values of n, and supposing that the property then holds for all n.

There are a lot of interesting examples of this sort of thing, from Polya’s conjecture (the smallest value of n for which the conjecture fails: 906,150,257) to the Chebyshev Bias or “prime race” (23,338,590,792).  And although Graham’s number is not exactly the same thing– it is “merely” a proven upper bound on a minimum solution to an easily stated problem in graph theory– as far as mathematically relevant large numbers go, it’s one of the more mind-blowing ones.

This entry was posted in Uncategorized. Bookmark the permalink.

This site uses Akismet to reduce spam. Learn how your comment data is processed.