This website uses cookies

Read our Privacy policy and Terms of use for more information.

In partnership with

Today let’s look at the mind-blowing math behind our favorite games. Tic-Tac-Toe, Rubik’s Cubes, shuffling cards, and chess can all teach us something about the unintuitive scale of the games we’ve been playing for years.

It turns out that when you combine a few simple rules with a series of human choices, you get a mathematical landscape that often dwarfs the physical universe itself.

Tic-Tac-Toe

Tic-Tac-Toe is one of the first games we outgrow, and that’s because it’s a "solved" game.

Because it's a zero-sum game with perfect information, it is always possible to force a draw without much trouble.

But the math behind that tiny 3x3 grid is still surprisingly complex.

To calculate the upper bound of possible games, we use factorials. On the first move, there are 9 open squares. On the second, 8. On the third, 7.

9! = 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 362,880

However, because the game ends when someone gets three in a row, many of these sequences never finish. When you filter out the wins and the symmetries (rotating the board doesn't make it a "new" game), there are only 255,168 possible legal games.

It’s a small enough number that your brain can map the optimal path intuitively by the time you're about ten years old.

The Rubik’s Cube

If you’ve ever been frustrated trying to solve a Rubik’s Cube, don’t feel bad. Turns out, it has over 43 quintillion (4.32 × 1019) combinations, so don’t beat yourself up.

The math comes from the permutations of the 8 corners and 12 edges:

(8! x 37) x (12! x 210) / 2 = 43,252,003,274,489,856,000

But here’s the kicker.

In 2010, researchers used Google's infrastructure to prove that every single one of those 43 quintillion positions can be solved in 20 moves or less.

This is called "God’s Number." It proves that while the number of "wrong" moves is astronomical, the path to the "right" solution is always incredibly short if you can see it.

Shuffling Cards

Every time you pick up a standard deck of cards and give it a thorough, honest shuffle, you have almost certainly created a sequence of cards that has never existed before in the history of the world. The number of ways to arrange 52 cards is 52!, which is a staggeringly large number.

52! ≈ 8.06 × 1067

That is an 8 followed by 67 zeros. To give that some scale, let’s run a thought experiment. Imagine you start a timer that will count down from 52! seconds to zero. To pass the time, you decide to go for a walk.

You pick a spot on the equator and begin walking around the Earth at a pace of one step every billion years. After you complete your first full trip around the globe (about 40,000 kilometers), you stop and remove exactly one drop of water from the Pacific Ocean. Then, you start walking again, one step every billion years.

You continue this until the Pacific Ocean is bone dry. Once you’ve removed every single drop, you place one sheet of paper flat on the ground. Then, you fill the ocean back up and start the entire process over again, walking around the world, one drop per lap, until the ocean is empty again. At that point, you add another sheet of paper to your stack.

You keep doing this until your stack of paper reaches all the way from the Earth to the Sun. If you take a glance at the timer now, you will see that the three left-most digits haven’t even changed. You still have roughly 8.06 × 1067 seconds to go.

If you take the stack of paper down and do the entire process over again one thousand times, you still are only about a third of the way through the countdown.

You are holding a unique piece of the universe's history every time you deal a hand of poker. There are more ways to arrange a deck of cards than there are atoms in the Milky Way, proving that even in a system with "simple" rules, the room for new possibilities is functionally infinite.

Chess

If shuffling cards is an ocean, Chess is the entire observable universe. Back in 1950, Claude Shannon (the father of information theory) wanted to see if a computer could ever truly "solve" Chess the way we solved Tic-Tac-Toe. To find out, he had to calculate the Game Tree Complexity.

He estimated that an average game lasts about 40 moves, and at any given moment, a player has roughly 30 to 35 legal choices. To find the total number of possible variations, you multiply at every single branch of the tree.

The resulting Shannon Number is:

10120

To understand how staggering that number is, let’s start with the estimate that there are about 1080 atoms in the entire observable universe.

This is why Chess will never be solved in the traditional sense. Even if we built a computer the size of a galaxy, we would literally run out of matter to build the memory banks before we finished mapping the first few stages of the game.

This is what’s called a Combinatorial Explosion. It’s the reason why chess grandmasters (and even the most powerful AIs like Stockfish) will never solve the game.

Prompt: A highly detailed, vibrant sci-fi concept art in a 16:9 cinematic aspect ratio, depicting an alien desert landscape at twilight, with preserved likeness and mythic sci-fi realism. A lone metallic, iridescent-armored astronaut stands in the mid-ground, seen from behind, observing the scene. They are positioned next to a detailed six-wheeled planetary exploration rover with a large, deployed satellite dish antenna. Multiple massive, monolithic crystalline spires rise from the rippled sand dunes, glowing from within with swirling internal iridescent lights in complex patterns of deep green, purple, and blue. The sky is a vast, dramatic, colorful deep-space nebula, like a cosmic aurora, swirling with vibrant curtains of purple, green, and blue gas. Countless stars and distant, stylized constellations are scattered across the nebula. High in the nebula, two large full moons, one prominent orange-gold moon and another smaller, distinct blue-white moon, are positioned close together. No UI. Motion is implied by the cosmic swirls and the textured sand. The entire scene is bathed in a magical, colorful light reflecting off the sand and the reflective surfaces of the armor and rover. The ground sand is detailed with ripples and tracks. A horizon of distant, indistinct alien terrain is visible.

That’s all for now!

Got a second? Give some feedback on today’s article so we can keep making improvements to The Manifold.

Keep building,
Max

PS—It’s amazing how the most basic games I played as a kid are so much more complex than I ever realized.