ELI5: Explain Like I'm 5

Sudoku solving algorithms

Alright kiddo, so Sudoku is a game where we have to fill a 9x9 grid with numbers from 1 to 9 without having the same number in any row, column or 3x3 square. To solve it, we use a special kind of rules called algorithms.

One of the easiest algorithms is called the "elimination" method. We start by looking at each row, column and 3x3 square, and see which numbers are already there. Then, we try to figure out which number is missing and can go in a certain cell. For example, if we see that numbers 1, 3, 5 and 7 are already in a row, we know that the remaining numbers are 2, 4, 6 and 8. So, we can eliminate those numbers from the other cells in that row and column.

Another algorithm is the "only possibility" method. We look at a certain cell and see which numbers can go there based on the other numbers in that row, column and 3x3 square. If only one number can go there, then that number must be the solution for that cell.

A more advanced algorithm is called "naked pairs". We look at two cells in the same row, column or 3x3 square that have only two possible numbers. If those numbers are the same, then we eliminate these numbers from any other cell in that row, column or 3x3 square.

Lastly, we have the "guess and check" method. This is where we make a guess for a certain cell and see if it leads to a contradiction or not. If it does, we know that our guess was wrong and we have to try another number. This method is not very efficient, but it can help us solve very difficult sodokus.

So, these algorithms help us solve sodokus by using special rules to figure out which numbers should go where. By combining these rules and methods, we can solve even the hardest puzzles!
Related topics others have asked about: