# What is the maximum number of solutions a Sudoku puzzle can have?

I've seen Sudoku puzzles that can be solved two different ways. Referring to a traditional 9x9 grid:

1. Is it possible for a Sudoku puzzle to have more than two solutions? If so, what is the maximum number of solutions a single Sudoku puzzle can have?

2. For any given puzzle, is there a way to find out how many solutions it has (other than brute force)?

• I'm not a Sodoker, but I assume the answer would be dependent on the size of the grid, no? – Jaydles May 14 '14 at 20:32
• @Jaydles True, thanks! I'll edit; I'm referring to a traditional 9x9 grid. – WendiKidd May 14 '14 at 20:34
• I imagine it also depends on the number of predefined numbers. A blank Sudoku could obviously have thousands of different solutions. – PriestVallon May 14 '14 at 20:35
• If the puzzle is well-defined, there should be only one solution. – Kyle Kanos May 14 '14 at 20:38
• It is an interesting question whether a Sudoku can have exactly 3 solutions, but it is not an interesting question to ask about the maximal number of solutions - just leave the grid empty and count all Sudokus. Also, I think that one should NEVER put three different questions in a single one. – user11235 May 14 '14 at 20:52

Most Sudoku puzzles published have only one solution. If there is more than one solution, it is probably a mistake. That said, puzzles with incomplete clues can have multiple solutions. In the extreme case, a puzzle with no clues has 6,670,903,752,021,072,936,960 solutions according to Wikipedia.

I don't know if it's possible to have exactly 3 solutions, but boards with 2 and 4 (and more) solutions are easy to find. In general, I think boards with an even number of solutions are easier to create.

Finding the number of solutions is a generalization of Sudoku solving algorithms, and there are Sudoku algorithms that do significantly better than brute forcing. Once the board has been filled out as far as possible, it can be brute forced the rest of the way.

• The comment about odd-and even number solutions is misleading... almost all sudokus have a single (odd number) solution. – rolfl May 14 '14 at 20:42
• Published Sudoku puzzles traditionally have one solution, but incomplete Sudoku boards can have many solutions. – Kendall Frey May 14 '14 at 20:44
• @rolfl: I think single solution is the only odd-number solution that is easy to create. That's one point of this answer. – justhalf Jul 25 '14 at 6:13
• You could fit all those possibilities in the IPv6 address space 51 quadrillion times. – Fred Nov 7 '14 at 18:27
• I can think of a way of building a Sudoku with solution count a multiple of three, but forcing exactly three seems really challenging. This would make an interesting question in its own right, here or on math.SE. – Steven Stadnicki Apr 5 '15 at 18:09

I have seen two dissenting opinions on this subject (and in my opinion, the first option is right):

1. By definition, a Sudoku has only one solution. Anything else is just a grid of numbers. Sometimes, there are errors in a publication, and a starting grid has multiple solutions, but, then the starting grid was not a Sudoku!

2. From Wikipedia: The number of classic 9Ã—9 Sudoku solution grids is 6,670,903,752,021,072,936,960, or approximately 6.67Ã—1021 (ignoring rotations and other factors, there are many fewer solutions, just 5,472,730,538

Assuming you define a sudoku to have just one possible solution, then the rest of your questions are moot.

If the sudoku is defined to have multiple solutions, then, brute-forcing is one way, but it is also possible to pre-compute all possible solutions for all inputs, and look up the result that way (a rainbow table).

• Does wikipedia account for the fact that if you turn a board sideways or flip it, it will resemble other puzzles? – Akiva Dec 10 '19 at 5:11
• From the looks of it, the "5,472,730,538" number above accounts for rotations, reflections, and also swapping the numbers around in every possible way (replace 1 with 2 and 2 with 1 everywhere, for example). So a single modern hard drive could actually store the full list of unique Sudoku solutions. – Dave Greene Jun 17 at 18:18

By definition, all valid Sudoku puzzles should have only one solution. In point of fact, many of the techniques used for solving puzzles depend on there being only one solution. All of the Unique Rectangle techniques for example, only work if there is one, and only one, solution.

It depends on the difficulty level. If the number of clues is more than 20, most of the time it has only one solution (but no mathematical support is there). However, if the number of clues is less than 20 (for example: 12, 15, 17), multiple solutions may exist.

• This answer provides a grid with 77 digits and 2 solutions. On the other hand, it has been proven that the minimum number of digits that is required for a grid to have a unique solution is 17. – xhienne Jul 3 '18 at 22:24