Mathematics7 min read

Sudoku Combinatorics: Counting the Grid

Sudoku combinatorics asks a deceptively simple question: how many different completed grids exist, and what hidden structure lives inside every board once you look closely?

The vocabulary: bands, stacks, and boxes

Before counting anything, Sudoku combinatorics needs precise words. A box is one of the nine 3 by 3 regions. A band is a horizontal group of three boxes, so the grid has three bands stacked vertically. A stack is the vertical counterpart, three boxes side by side, so the grid has three stacks. Rows, columns, and boxes are the units that must each contain the digits 1 through 9 exactly once. These simple divisions are what make the enormous counting problem tractable, because you can reason about one band at a time.

How many completed grids exist?

The number of fully completed, valid Sudoku grids is 6,670,903,752,021,072,936,960, roughly 6.67 sextillion. Bertram Felgenhauer and Frazer Jarvis computed this in 2005. They did it by fixing the contents of the top band, counting how many ways the rest of the grid could be completed, and using symmetry to collapse the many equivalent top bands into a manageable number of cases. Even with those shortcuts the calculation needed a computer, which tells you how quickly Sudoku combinatorics explodes.

Why bands make counting tractable

The trick that tames the count is fixing the first band and grouping equivalent starting configurations. Once the top three rows are set, the number of valid completions depends only on the band's pattern, not on the exact digits, so many different first bands share the same completion count. By enumerating a small number of representative bands and multiplying by how many real bands each represents, the total becomes computable. This is the essence of clever combinatorial counting: exploit structure so you never enumerate all 6.67 sextillion boards directly.

Symmetry and essentially different grids

Many grids are really the same puzzle in disguise. You can relabel the digits, and there are 9 factorial, or 362,880, ways to do that. You can also permute rows within a band, columns within a stack, swap whole bands or stacks, and transpose the board. Those geometric moves form a group of 3,359,232 transformations. Counting grids that are genuinely different under all of these, Ed Russell and Frazer Jarvis found 5,472,730,538 essentially different solutions, using Burnside's counting lemma to handle the symmetry correctly.

The minimum-clue result

A closely related combinatorial question is how few givens can still force a unique solution. The answer is 17. In 2012 Gary McGuire, Bastian Tugemann, and Gilles Civario proved, through an enormous exhaustive computer search, that no 16-clue Sudoku has a single unique solution, while many 17-clue puzzles do. It is a striking result because it was settled not by a neat formula but by carefully organized brute force over an astronomically large space.

What combinatorics does not tell you

  • The huge grid count says nothing about how hard any single puzzle feels to solve.
  • Difficulty comes from the solving path and the techniques required, not from raw totals.
  • Two puzzles with the same number of clues can differ enormously in challenge.
  • Uniqueness is a property of the clue placement, not of the grid count.

That gap between counting and difficulty is exactly where the fun lives. Sudoku combinatorics gives you the breathtaking scale, while the human experience comes from finding the one deduction that unlocks a grid. Shapes change none of this: the puzzles at shapedoku.com share the same 6.67 sextillion structures because each glowing shape is simply a digit wearing a costume.

Ready to put it into practice?

Play Shapedoku free in your browser. No download, no login, just colorful shape Sudoku.

Play the Web App

Keep reading