Sudoku is a logic based object placement (I use Object Placement rather than Number Placement because if we were to replace the digits with the letters of the Alphabet, the logic of solving remains undisturbed) game. It is said that Howard Garns was the one who designed the classic sudoku grid in 1974 and was first published in 1979 by Dell Magazines and was called “Number Place”. The puzzle was introduced in Japan in 1984 by Nikoli as “Sūji wa dokushin ni kagiru” which means “The numbers must be single”. This was later shortened to “Sudoku”. Sudoku is a trademarked word in Japan and only Nikoli can use that word.
Sudoku basically consists of a 9x9 grid, which is made of smaller 3x3 grids within. These are called Boxes.
The area where a digit is placed is called a Cell and the grid is made up of 81 such cells. The cells are identified by the row and column they belong to.
A set of horizontally connected cells is called a Row and a set of vertically connected cells is called a Column. The rows and columns are numbered from top to bottom and left to right respectively.
So before we delve into the aspects of solving a sudoku, let us first understand the constraints. Every, row, column and a 3x3 box is a constraints which limits us from putting any digit twice within it. In other words, every row, column and 3x3 box will have the digits 1 to 9 exactly once without any digit repeating. So you may wonder how this helps us in solving.
To understand it better, we have what is known as the concept of Buddy Cells. Buddy Cells are basically cells which share at least one constraint with a given cell. So when a constraint is shared, the digit in that given cell will never appear again in all its buddy cells. Every cell in the grid will have exactly 20 buddy cells. To illustrate it further have a look at the image below. The cell R1C1 has the digit 1 placed in it. The grey cells marked are the buddy cells because they share either a row, column or a box with R1C1. Hence we can never place the digit 1 in any of the grey cells.
Now to solve a sudoku, a few numbers will already be placed in the grid and we need to fill in the remaining digits in the blank cells. We need to identify all possible digits that can be placed in the blank cells based on the given clues. The concept of writing all possible numbers is known as "Pencil Marking".
Hope this introduction gave you a better understanding of what a sudoku is and how to identify the constraints. We will have a look at the techniques in future blog posts where we will explain how to start using the basic solving techniques to solve a sudoku grid. Until the next post, happy solving!