Real World Maths Busters

The Maths Behind Everyday Life

The story, the formula and a worked example — see exactly where this maths shows up in the world around you.

Back to all stories
Games & Chance 4 min read

Tic-Tac-Toe Total Games

How many possible games exist in noughts and crosses?

Each move reduces available squares. The game tree branches at each turn.

Upper bound

9 squares, so at most 9! = 362,880 sequences of play. But many games end before all 9 squares are filled.

9!=362,880 (upper bound)9! = 362,880 \text{ (upper bound)}

Accounting for early termination

Removing games that continue after a player has won reduces the count to 255,168 distinct games.

Distinct positions

  1. 1

    Step

    765 possible end states

  2. 2

    Step

    5,478 distinct board positions including intermediate ones

Answer

A small enough game for complete analysis

The formula behind it

Permutations (n!)

n!=n×(n−1)×⋯×1n! = n \times (n-1) \times \cdots \times 1
See the full formula, variables and more examples

The takeaway

With only 255,168 possible games, tic-tac-toe is one of the few games humans can completely solve.

Back to all stories