BETA
This is a BETA experience. You may opt-out by clicking here

The Mathematics Behind Tic-Tac-Toe

Following

What is the mathematics in Tic-Tac-Toe? originally appeared on Quora: the place to gain and share knowledge, empowering people to learn from others and better understand the world.

Answer by Alex Ellis, Ph.D. in Mathematics from Columbia University, on Quora:

Besides game theory, there are at least two more areas of mathematics relevant to tic tac toe.

Symmetry

Up to equivalence, there aren’t nine distinct opening moves. There are only three.

If it isn’t immediately clear to you what “up to equivalence” means here, I urge you to try and figure it out yourself.

You can similarly analyze non-opening positions. For example, if the first player places an X in the center, how many distinct (up to equivalence) moves does the O player have for their next move? What if the opening move had been to a corner instead?

If you know what a group is in the mathematical sense: how do you find the symmetry group of a given a tic tac toe board position?

Topology

In Pac-Man, you’ve probably noticed that if you run off the edge of the screen, you reemerge on the opposite side. The game of Pac-Man is played on a (2-dimensional, real) torus. You can do the same thing with tic tac toe! In other words, in completing a line of three X’s (or O’s), you can walk off the edge of the board and finish on the other side.

Instead of including an image, I think it’s more fun to leave exploration of this as an exercise. In ordinary tic tac toe, there are three winning patterns: row, column, and diagonal. To find all winning patterns in torus tic tac toe, all you have to do is try shifting each of the ordinary winning patterns off each of the possible edges. You’ll find:

• Shifting a row just gives the same or another row, so there are no new winning patterns coming from rows.
• Ditto for columns.
• Shifting a diagonal gives a new sort of pattern. Shifting either of the two diagonal patterns in any of the four directions for either one or two squares will only yield four new patterns.

Having trouble visualizing this? See the links below.

You can also try and analyze tic tac toe on a cylinder, the real projective plane, and the Klein bottle. One of those is equivalent to tic tac toe on a torus. In another, any three spaces constitute a winning position.

Some games

Ready to play some 2D non-Euclidean games? Try these:

1. Torus Games by Jeff Weeks (iOS, Android, Windows, OS X)
2. A short page on torus tic tac toe
3. If you manage to track down any of the students from when I TAed undergraduate topology (Math 131) at Harvard (probably around 2006 or so), there is an infinitesimal chance they still have a copy of some notes I wrote on the game theory of tic tac toe on different surfaces (Euclidean plane, cylinder, Möbius strip, Klein bottle, torus, and projective plane). There may also be a copy somewhere on the internet archive, since the notes briefly lived on a past website of mine.

This question originally appeared on Quora. the place to gain and share knowledge, empowering people to learn from others and better understand the world. You can follow Quora on Twitter, Facebook, and Google+. More questions:
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}