

If the problem can be solved relatively quickly, then so can every problem that satisfies property (1).Įven though checking a solution of an NP-complete problem can be done relatively quickly and easily, there is no known algorithm for finding a solution to begin with, because the time needed for computation increases so fast compared to the size of the problem. Enjoy Sudoku, with thousands of free to play puzzles Solve our classic Sudoku puzzles online or print Easy, medium, hard and expert Sudoku logic puzzles.Any solution to the problem can be checked relatively quickly, i.e.An NP-complete problem satisfies the following two properties: This places the game of solving rank-n Sudoku puzzles in a class of problems that computer scientists have named NP-complete. As the rank of a Sudoku increases from n to n+1, the extra computational time needed to find a solution increases quite fast. Find two different solutions.įor 4×4 Sudoku, a case-by-case analysis utilizing the two essentially different grids proves that a well-formed puzzle must have a minimum of four distinct digits in the givens.įinally, it is intriguing to note that even though there are computer programs that can quickly and easily solve rank-3 Sudokus by employing a backtracking method, solving a Sudoku of arbitrary rank n is a much more difficult problem. The next exercise illustrates this with a specific example.Įxercise: The following rank-2 Sudoku has 2 2-1=3 distinct digits among the givens. Recall that the converse of a true statement is not necessarily true. Our free sudoku puzzle games have some features that make this number puzzle easier for you: hints, auto-check, and highlight duplicates. It is important to note that this is not the same as stating that if a Sudoku of rank n has n 2-1 distinct digits in the givens, then it is well-formed. The fact discussed above can be restated as follows: If a Sudoku of rank n is well-formed, then it must have n 2-1 distinct digits among the givens. In particular, for the usual rank-3 Sudoku, at least 3 2-1=8 distinct digits must be used in the givens for the puzzle to be well-formed otherwise, the puzzle will have more than one solution. When you play our free online sudoku game, theres no need You can choose easy sudoku, medium sudoku, or even sudoku for experts if you are confident. This is because if we had a rank-n puzzle where only n 2-2 symbols were used and we found a solution, then interchanging the places of the two symbols missing from the givens would result in another, different solution.

However, the minimum number of givens for which a rank-3 Sudoku can be well-formed is not known.Įxercise: Can you come up with a Sudoku puzzle that is not well-formed?Īnother interesting question (that you may have considered when solving the above exercise) is how many distinct symbols need to be used among the givens for a puzzle to be well-formed? It turns out that for a Sudoku of rank n, at least n 2-1 distinct symbols must be used for the puzzle to have a unique solution. There are examples of rank-3 Sudoku puzzles with 17 givens that are well-formed. A Sudoku puzzle can have more than one solution, but in this case the kind of logical reasoning we described while discussing solving strategies may fall short. Inside each of those larger squares will be 9 smaller squares. Continue using logic and deduction until you have filled in all of the empty squares.The Math Behind Sudoku Some More Interesting FactsĪ well-formed Sudoku puzzle is one that has a unique solution. In a typical sudoku, youll have a square grid of 9 large squares. Every Sudoku has one solution, so double check by making sure each column, row and square contains the numbers 1-9 with no duplicates or omissions. Next, you can start scanning each row for a certain number, like 1, to see where it should go.

Then look for single empty squares in each row and column that you can fill in. If you see a single empty space in a larger square, fill that in first. For example, if a square already has 7 out of the 9 spaces filled in, you can figure out which 2 numbers are missing and use the numbers in the correlating rows and columns to determine which of the two missing numbers belongs in each space. Some squares already have numbers filled in, so begin by look for missing numbers in a row, column or square. Sudoku is a logic based number placement game that was invented in the US, then popularized in Japan before spreading to the rest of the world. To complete the grid, every column, row and square (each containing 9 spaces) needs to be filled in with the numbers 1-9 without repeating any numbers within the row, column or square. The grid is divided into 9 separate 3 x 3 squares. Sudoku is a game played on a 9 x 9 grid where the object of the game is to fill every space with the correct number.
