This talk was delivered on October 20, 2016 for Princeton ACM / IEEE Computer
Society – as part of the “Celebration of Mind” program. The program also included
cupcakes and cookies.
## Who was Martin Gardner?

## Doomsday Algorithm

In 2012, our Martin Gardner celebration speaker was John Conway – emeritus mathematics
professor at Princeton.
Conway told a few interesting stories of his collaborations with Martin Gardner.
He showed us a part of
the *Doomsday algorithm*, which was a moderately complex heuristic for solving
the basic calendar puzzle: “What day of the week is a specific month-day-year?”
Conway and Gardner collaborated on refining this method over time, and
Conway still uses it today.
## Pentominoes

## Hexaflexagons

## Magic squares

## Soma cube

## What is the value of Mathematical Games?

## Learning more

This work is licensed under a Creative Commons Attribution 4.0 International License.

Last modified: Oct. 21, 2018

Dennis Mancl - http://manclswx.com

In this presentation, I summarized a few of Martin Gardner-related talks given for our organization in the previous years. It was a chance to review some mathematical games ideas related to the Doomsday algorithm, pentominoes, hexaflexagons, and magic squares.

Martin Gardner (1914-2010) was a very prolific author, especially in the area of “mathematical games.” His column in Scientific American (and books containing collections of these articles) was one of the ways that young students in the 1960s-1990s were introduced to some advanced mathematical concepts – mathematical ideas that go beyond the normal school curriculum.

For example, I learned about “trap door functions” (and the Rivest-Adelman-Shamir RSA public key encryption) from a Martin Gardner Mathematical Games column (before my university abstract algebra professor told us about it back in 1976).

The Mathematical Games column appeared in Scientific American from 1956 to 1981 - 297 monthly columns.

Gardner did a lot of things beyond the mathematical games area – books of word puzzles and science facts, for example. His biggest seller is his annotated version of the Lewis Carroll Alice books. Gardner also has written articles and books that “debunk claims of the paranormal” and that discuss other kinds of pseudoscience.

In this algorithm,
the “even numbered months” are the easy part – Conway and Gardner noticed that
in any given year, 4/4, 6/6, 8/8, 10/10, and 12/12 fall on the same day of the week.
It is also the day of the week for the last day of February (either
Feb. 28 or 29 – sometimes known as “March 0”).
In the Conway/Gardner algorithm, they call this day of the week **Doomsday**.
Each year has a different Doomsday.
(For 2016, Doomsday is a Monday – of course Monday is always pretty doomy.
For 2017, Doomsday will be a Tuesday.)
The other months aren’t too hard to fill in.
Conway and Gardner used two “flipped dates” for each pair of months: 5/9 –
9/5 and 7/11 – 11/7.
Of course, an American would immediately pick 7/4 – but Conway is British (so US Independence Day may be a bit sensitive!)

Halloween (10/31) is also a Doomsday, as is “Pi Day” (3/14).

Conway didn’t get into the method for determining the Doomsday for any given year. Of course, there is some modulo 28 arithmetic going on here... There is a pretty good description in the Wikipedia article on the Doomsday algorithm.

One interesting story about John Conway: he does daily “calendar drills” to keep himself sharp. His personal computer is set up to give him a couple of random dates when it starts up... and he tries to compute the “day of the week” in his head.

This brings up an important question: “Why do people work on mathematical games?”

One reason is that it is something to think about that takes you out of your day-to-day life... It’s not related to your job or your boss or the crisis in whatever foreign country is in the news. You can play around with some ideas, and you might come up with some fun insights.

In our 2013 Gardner program, Ronghao Chen gave a great presentation about pentominoes.

What are pentominoes? Well, a *domino* is a “2 square tile” (di-square).
A pentomino is a 5 square tile.
In fact, there are 12 distinct pentominoes – one of them is a straight
string of 5 boxes, some of them are “L”s,
there is one “cross”, and several odd zigzag shapes.

Ronghao created his own small company to manufacture a wooden puzzle (Super Pentominoes) based on the pentominoes puzzle. https://www.amazon.com/QiaoShi-Super-Pentominoes/dp/097499040X. The Super Pentominoes kit contains a high quality set of wooden pentominoes plus a booklet of “graded exercises”

Simple puzzles: Can we make a 4x15 rectangle from a full set of pentominoes? Maybe. The number of squares is correct – an essential condition. But it isn’t a guarantee.

Now... there is only so much you can do with analysis. Sometimes you just need to pick up some pieces and try moving them around.

This is another part of doing mathematical puzzles – using physical intuition in combination with thinking. The physical act of trying to solve a puzzle will sometimes help you discover some of the constraints for a solution... for example, in the problem above, you can’t put the “cross” piece in a corner. And it is probably easier to have the “straight” (5 cube) piece along one edge.

Pentominoes are a good puzzle for young people to get experience in how to explore or tinker with a problem. It is a geometric puzzle, so the solution process uses some different math than usual arithmetic problems.

In 2014 (Martin Gardner 100th birthday), part of my Gardner
presentation was about *flexagons* – special paper toys made by folding paper.
I showed off the most common “tri-hexaflexagon.”
A flexagon is constructed from a strip of paper, folded and glued into
a complex form that can “flex.”
Each flex will show off some of the hidden “faces.”

Arthur Stone invented flexagons in 1939, when he was a grad student at Princeton. He invented them by “fooling around” with paper strips. The story is that he came to America from the UK – and he bought some American paper to use in his European notebooks. The American paper was too wide (8.5 inches is about 0.25 inches too wide for a European notebook designed for A4 paper. So Arthur trimmed all of his paper, and he wound up with a lot of narrow paper strips. Like any enterprising student, he would play with them.... folding them into equilateral triangles, and twisting the strip to form the first “hexaflexagons.”

Arthur shared this discovery with his fellow students, notably Bryant Tuckerman (future famous coding theory expert), John Tukey (future famous topologist), and Richard Feynman (future famous... drummer... no, physicist). And the four of them started writing papers about flexagons (they became the “Flexagon committee”).

Note that 2014 (when I gave this presentation) was the 75th anniversary of the invention of flexagons... Also, Gardner’s first column for Scientific American was about flexagons (in December 1956).

For more information on flexagons (including instructions for folding them), see http://manclswx.com/talks/gardner_talk_oct2014.pdf.

We also talked about magic squares at the 2014 Gardner presentation. Magic squares are a great “arithmetic puzzle.” In a magic square, a square array is written down that contains all integers from 1 to N exactly once – and the “sum” of each row and each column is the same.

It is pretty easy to construct a magic square for any “odd” size – for even size, it is a bit more complex. (See constructing a magic square of odd order in Wikipedia.)

What should the sum of each row be for a 3x3 magic square? Well, the sum of the entire square is 1 + 2 + .... + 9 = (9 x 10) / 2 = 45. There are 3 rows, so each row has to sum to 45/3 = 15.

This is a very famous magic square – and 2014 was its 500 anniversary. It is a lithograph created by the famous German artist Albrecht Dürer. In the drawing, our angel is despondent, can’t get interested in his mathematical equipment (compass, sphere, other solid figures) – *and* the magic square on the wall on the upper right.

This particular 4x4 magic square is well known, but the normal form for this square has been slightly modified (by exchanging the second and third columns) – in order to put ‘15 14” (the year of the lithograph) as a kind of signature at the bottom of the square.

Magic squares are much older than 500 years old... there are examples from a thousand years ago.

Another interesting geometric puzzle is the *Soma cube*, a relatively simple
three dimensional puzzle.

This cube is composed of 7 pieces – all the possible irregular 3-D figures that can be made with 3 or 4 cubes. The puzzle was devised by Peter Hein (1905-1996) – mathemetician, scientist, and poet.

Here are the seven Soma pieces – notice that there are three “duck-shaped” (with the green cube as the “head and bill”).

(Note that two of the ducks are “mirror image” pieces. In the pentominoes, we don’t allow separate mirror image pieces, because you can always turn a piece over. On the other hand, for the Soma cube pieces, we can’t “turn pieces over in 4 dimensions” (at least with current technology – maybe someday in Star Trek). For that reason, we are allowed to have the “duck looking right” and the “duck looking left” as separate pieces.

Simple arithmetic shows us that the seven pieces are made up of a total of 27 small cubes, which is exactly the right number to make a 3x3 cube. But we actually need to try it out to make sure that we can construct the cube. It isn’t a difficult puzzle, but it is useful to try out various starting pieces, do a bit of analysis, and figure out how to leave just the right hole for the last piece to slip in.

OK – all of the fifth-graders in the crowd are completely with me in doing this “cube analysis.” The third-graders are a bit lost in this discussion. And the high schoolers and adults are all asking “why should I care?”

As I mentioned earlier, mathematical games are a great way to work on something outside of your normal world. And especially for young people, this is something that helps foster some creativity.

There are parents who ask me: “I want my child to become a computer programmer. Should I get him/her to learn Java? Python? some language used in programming robots?”

My answer is: “I have no idea. But of course by the time a 10-year-old is in the professional programming job market, Java will be long gone. Have you considered having your child explore mathematics and logic – outside of their normal school curriculum?”

The point is that games can make a difference. It’s better than the drudgery of studying for standardized tests and an inflexible school curriculum. And you learn that “fooling around with the pieces” will sometimes lead to some great insights.

Mathematical games didn’t start with Martin Gardner.

The pioneers of “mathematical and geometric recreations” lived a long time
ago: **W. W. Rouse Ball** (1850-1925) and **Sam Loyd** (1841-1911).
Some of their books of mathematical puzzles are still in print!

The tradition goes on... Today there is an impressive list of active mathematicians and authors involved in the puzzle world, including:

- Ian Stewart (1945- )
- A. K. Dewdney (1941- )
- Dennis Shasha (1955- )
- Simon Singh (1964- )
- Chris Maslanka (1956- )
- Will Shortz (1952- )
- Keith Devlin (1947- )
- Jordan Ellenberg (1971- )

This work is licensed under a Creative Commons Attribution 4.0 International License.

Last modified: Oct. 21, 2018

Dennis Mancl - http://manclswx.com