Sudoku training is challenging. Problem Solving Example - The Hardest Sudoku

13.10.2019

Game history

The numerical structure was invented in Switzerland in the 18th century; on its basis, a numerical crossword puzzle was developed in the 20th century. However, in the United States, where the game was directly invented, it did not become widespread, unlike Japan, where the puzzle not only took root, but also gained great popularity. It was in Japan that it acquired the familiar name "Sudoku", and then spread throughout the world.

Rules of the game

The crossword puzzle has a simple structure: a matrix of 9 squares, called sectors, is given. These squares are arranged three in a row and have a size of 3x3 cells. The Sudoku matrix looks like a square, consisting of 3 rows and 3 columns, which divide it into 9 sectors containing 9 cells each. Some of the cells are filled with numbers - the more numbers you know, the easier the puzzle.

Purpose of the game

You need to fill in all the empty cells, while there is only 1 rule: the numbers should not be repeated. Each sector, row and column must contain numbers from 1 to 9 without repetition. It is better to fill in empty cells with a pencil: it will be easier to make changes in case of a mistake or start over.

Solution Methods

Consider a simple version of Sudoku. For example, in a sector or line there is only 1 empty cell left - it is logical that you need to enter in it the number that is not in the number series.

Next, it is worth examining the rows and columns that have the same numbers in 2 sectors. Since the numbers should not be repeated, it is possible to check in which cells the same number can be located in the 3rd sector. Often there is only 1 cell in which you just need to enter the number.

Thus, part of the crossword field will be filled. Then you can start learning strings. Let's say there are 3 free cells in a line, you understand what numbers should be entered there, but you don't know where exactly. You need to try the substitution. Often there are options when a number cannot be located in 2 other cells, because either it is in the corresponding column or in the sector.

Difficult Sudoku

In complex sudoku, these methods only work halfway, there comes a point when it is completely impossible to determine in which cell to enter the number. Then you need to make an assumption and check it. If there are 2 cells in a row, column or sector in which it is equally possible to enter a number, then you need to enter it with a pencil and follow the filling logic further. If your assumption is wrong, then at some point the crossword puzzle will show an error, and there will be a repetition of numbers. Then it becomes obvious that the number should be in the second cell, you need to go back and correct the mistake. In this case, it is better to use a colored pencil to make it easier to find the moment from which you need to solve the crossword puzzle again.

Little secret

It’s easier and faster to solve Sudoku if you first outline with a pencil what numbers can be in each cell. Then you do not have to check all the sectors every time, and in the process of filling, those cells in which only 1 variant of the valid number remains will be immediately obvious.

Sudoku is not only an exciting game that allows you to pass the time, it is a puzzle that develops logical thinking, the ability to retain a large amount of information and attention to detail.

A mathematical puzzle called "" comes from Japan. It has become widespread throughout the world due to its fascination. To solve it, you will need to concentrate attention, memory, and use logical thinking.

The puzzle is printed in newspapers and magazines, there are computer versions of the game and mobile applications. The essence and rules in any of them are the same.

How to play

The puzzle is based on the Latin square. The field for the game is made in the form of this particular geometric figure, each side of which consists of 9 cells. The large square is filled with small square blocks, sub-squares, three squares on a side. At the beginning of the game, some of them are already filled with "hint" numbers.

It is necessary to fill in all the remaining empty cells with natural numbers from 1 to 9.

You need to do this so that the numbers do not repeat:

  • in each column
  • in every line,
  • in any of the small squares.

Thus, in each row and each column of the large square there will be numbers from one to ten, any small square will also contain these numbers without repetition.

Difficulty levels

The game has only one correct solution. There are different levels of difficulty: a simple puzzle with a lot of filled cells can be solved in a few minutes. On a complex one, where a small number of numbers are placed, you can spend several hours.

Solution Methods

Various approaches to problem solving are used. Consider the most common.

Exclusion Method

This is a deductive method, it involves the search for unambiguous options - when only one digit is suitable for writing to a cell.

First of all, we take the square most filled with numbers - the lower left. It lacks one, seven, eight and nine. To find out where to put the one, let's look at the columns and rows where this number is: it is in the second column, so our empty cell (the lowest in the second column) cannot contain it. There are three possible options left. But the bottom line and the second line from the very bottom also contain one - therefore, by the elimination method, we are left with the upper right empty cell in the subsquare under consideration.

Similarly, fill in all empty cells.

Writing Candidate Numbers to a Cell

For the solution, options are written in the upper left corner of the cell - candidate numbers. Then “candidates” that are not suitable according to the rules of the game are crossed out. Thus, all free space is gradually filled.

Experienced players compete with each other in skill, in the speed of filling empty cells, although this puzzle is best solved slowly - and then the successful completion of Sudoku will bring great satisfaction.

Use numbers from 1 to 9

Sudoku is played on a 9 by 9 grid, with a total of 81 grids. Inside the playing field are 9 "squares" (consisting of 3 x 3 cells). Each horizontal row, vertical column and square (9 cells each) must be filled with the numbers 1-9, without repeating any numbers in the row, column or square. Does it sound complicated? As you can see from the image below, each Sudoku playing field has several cells that are already filled. The more cells are initially filled, the easier the game. The fewer cells are initially filled, the more difficult the game.

Don't repeat any numbers

As you can see, the top left square (circled in blue) has already filled 7 of the 9 cells. The only numbers that are missing from this square are the numbers 5 and 6. By seeing which numbers are missing from each square, row, or column, we can use the process of elimination and deductive reasoning to decide which numbers should be in each cell.

For example, in the upper left square, we know that to complete the square we need to add the numbers 5 and 6, but looking at the adjacent rows and squares, we still cannot clearly determine which number to add to which cell. This means that we should now skip the top left square for now and instead try to fill in the gaps in some other places on the playing field.

No need to guess

Sudoku is a logic game, so there is no need to guess. If you don't know what number to put in a certain cell, keep scanning other areas of the playing field until you see the option to insert the desired number. But don't try to "force" anything - Sudoku rewards patience, understanding and solving different combinations, not blind luck or guesswork.

Use the elimination method

What do we do when we use the "elimination method" in a Sudoku game? Here is an example. In this Sudoku grid (shown below), only a few numbers are missing in the left vertical column (circled in blue): 1, 5, and 6.

One way to figure out what numbers can fit in each cell is to use the "eliminate method" by checking what other numbers are already in each square, since the numbers 1-9 are not allowed to be duplicated in each square, row, or column.


In this case, we can quickly notice that there is already a number 1 in the top left and center left squares (the number 1s are circled in red). This means that there is only one place in the leftmost column where the number 1 can be inserted (circled in green). This is how the elimination method works in Sudoku - you find out which cells are free, which numbers are missing, and then eliminate the numbers that are already present in the square, columns and rows. Accordingly, fill in the empty cells with the missing numbers.

The rules of Sudoku are relatively uncomplicated - but the game is extraordinarily varied, with millions of possible number combinations and a wide range of difficulty levels. But it's all based on the simple principles of using the numbers 1-9, filling in the gaps based on deductive thinking, and never repeating numbers in every square, row, or column.

Good day to you, dear lovers of logic games. In this article, I want to outline the main methods, methods and principles for solving Sudoku. There are many types of this puzzle on our site, and in the future, even more will undoubtedly be presented! But here we will consider only the classic version of Sudoku, as the main one for all the others. And all the tricks outlined in this article will also be applicable to all other types of Sudoku.

A loner or the last hero.

So, where does the Sudoku solution begin? It doesn't matter if it's easy or not. But always at the beginning there is a search for obvious cells to fill.

The figure shows an example of a loner - this is the number 4, which can be safely placed on cell 2 8. Since the sixth and eighth horizontals, as well as the first and third verticals, are already occupied by four. They are shown with green arrows. And in the lower left small square, we have only one unoccupied position left. The figure is marked in green in the picture. The rest of the loners are also placed, but without arrows. They are colored blue. There can be quite a lot of such singles, especially if there are a lot of digits in the initial condition.

There are three ways to search for singles:

  • A loner in a 3 by 3 square.
  • Horizontally
  • Vertically

Of course, you can randomly view and identify singles. But it is better to stick to any particular system. The most obvious would be to start with the number 1.

  • 1.1 Check the squares where there is no one, check the horizontals and verticals that intersect this square. And if there are already ones in them, then we completely exclude the line. Thus, we are looking for the only possible place.
  • 1.2 Next, check the horizontal lines. In which there is a unity, and where not. We check in small squares, which include this horizontal line. And if there is a one in them, then we exclude the empty cells of this square from possible candidates for the desired number. We will also check all the verticals and exclude those in which there is also a unity. If the only possible empty space remains, then we put the desired number. If there are two or more empty candidates left, then we leave this horizontal line and move on to the next one.
  • 1.3 Similarly to the previous paragraph, we check all horizontal lines.

"Hidden Units"

Another similar technique is called "and who, if not me ?!" Look at figure 2. Let's work with the upper left small square. Let's go through the first algorithm first. After that, we managed to find out that in cell 3 1 there is a loner - the number six. We put it, And in all the other empty cells we put in small print all the possible options, in relation to the small square.

After that, we find the following, in cell 2 3 there can be only one number 5. Of course, at the moment, five can also be on other cells - nothing contradicts this. These are three cells 2 1, 1 2, 2 2. But in cell 2 3 the numbers 2,4,7, 8, 9 cannot stand, since they are present in the third row or in the second column. Based on this, we rightfully put the number five on this cell.

naked couple

Under this concept, I combined several types of sudoku solutions: naked pair, three and four. This was done in connection with their uniformity and differences only in the number of numbers and cells involved.

And so, let's take a look. Look at Figure 3. Here we put down all the possible options in the usual way in small print. And let's take a closer look at the upper middle small square. Here in cells 4 1, 5 1, 6 1 we got a series of identical numbers - 1, 5, 7. This is a naked triple in its true form! What does it give us? And the fact that these three numbers 1, 5, 7 will be located only in these cells. Thus, we can exclude these numbers in the middle upper square on the second and third horizontal lines. Also in cell 1 1 we will exclude the seven and immediately put four. Since there are no other candidates. And in cell 8 1 we will exclude the unit, we should think further about the four and six. But that's another story.

It should be said that only a particular case of a bare triple has been considered above. In fact, there can be many combinations of numbers

  • // three numbers in three cells.
  • // any combinations.
  • // any combinations.

hidden couple

This way of solving Sudoku will reduce the number of candidates and give life to other strategies. Look at Figure 4. The top middle square is filled with candidates as usual. The numbers are written in small print. Two cells are highlighted in green - 4 1 and 7 1. Why are they remarkable for us? Only in these two cells are candidates 4 and 9. This is our hidden pair. By and large, it is the same pair as in paragraph three. Only in cells are there other candidates. These others can be safely deleted from these cells.

So today I will teach you solve sudoku.

For clarity, let's take a specific example and consider the basic rules:

Sudoku solving rules:

I highlighted the row and column in yellow. First rule each row and each column can contain numbers from 1 to 9, and they cannot be repeated. In short - 9 cells, 9 numbers - therefore, in the 1st and the same column there cannot be 2 fives, eights, etc. Likewise for strings.

Now I have selected the squares - this is second rule. Each square can contain numbers from 1 to 9 and they are not repeated. (Same as in rows and columns). The squares are marked with bold lines.

Hence we have general rule for solving sudoku: neither in lines, nor in columns neither in squares numbers must not be repeated.

Well, let's try to solve it now:

I've highlighted the units in green and shown the direction we're looking. Namely, we are interested in the last upper square. You may notice that in the 2nd and 3rd rows of this square there cannot be units, otherwise there will be a repetition. So - unit at the top:

It is easy to find a deuce:

Now let's use the two we just found:

I hope the search algorithm has become clear, so from now on I will draw faster.

We look at the 1st square of the 3rd line (below):

Because we have 2 free cells left there, then each of them can have one of two numbers: (1 or 6):

This means that in the column that I highlighted there can no longer be either 1 or 6 - so we put 6 in the upper square.

For lack of time, I will stop here. I really hope you get the logic. By the way, I took not the simplest example, in which most likely all solutions will not be immediately visible unambiguously, and therefore it is better to use a pencil. We don't know about 1 and 6 in the bottom square yet, so we draw them with a pencil - similarly, 3 and 4 will be drawn in pencil in the top square.

If we think a little more, using the rules, we will get rid of the question where is 3, and where is 4:

Yes, by the way, if some point seemed incomprehensible to you, write, and I will explain in more detail. Good luck with sudoku.




Similar articles