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:

    n=Table[3,{m-1}]; (* Start with all triangles *)
        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 *)
                t=Split[n]; (* Remaining polygon is too small *)
                    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 *)

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


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.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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