# The Rules of Sudoku

## The Sudoku Grid

This is a Sudoku grid.

It consists of 9x9 cells, and it contains some numbers between 1 and 9.

The grid can be divided into rows, columns and boxes of 3x3 cells (which are also called blocks).

This is its solution.

Your goal is to find that solution, i.e. fill all the empty cells with numbers between 1 and 9, so that no number is repeated in each row, column or 3x3 box.

This Sudoku grid is not valid, because there are two 6s in one row, which must not be. It violates the row constraint.

This one violates the column constraint with the 5 repeating.

And this one violates the box constraint. See the upper right box containing multiple 3s.

## Uniqueness

It is important to note, that there is only exactly one solution to every Sudoku puzzle. This property is called uniqueness.

Here is an example of a Sudoku puzzle that is not unique. In this case it has two solutions. See how those four cells can only be 1 or 2? Fill the first empty cell randomly with a 1 or a 2 and see for yourself, that you get a solution regardless of what number you selected.

Why does it need to be uniquely solvable, though? Because if it's not, you can no longer use logic to deduct the numbers. You would need to start guessing then, and that is certainly not what defines a good puzzle (or a puzzle at all).

If you find a Sudoku that, at some point, looks like this, either the puzzle itself is wrongly constructed, or you've made a mistake before.

99 percent of the time, it's you having made a mistake at some point, though. (Look for multiple numbers in the same row, column or box.)