How to solve Sudoku step by step. How to solve Sudoku - ways, methods and strategy

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.


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.

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.

It often happens that you need something to occupy yourself, entertain yourself - while waiting, or on a trip, or simply when there is nothing to do. In such cases, a variety of crosswords and scanwords can come to the rescue, but their minus is that the questions are often repeated there and remembering the correct answers, and then entering them “on the machine” is not difficult for a person with a good memory. Therefore, there is an alternative version of crossword puzzles - this is Sudoku. How to solve them and what is it all about?

What is Sudoku?

Magic square, Latin square - Sudoku has a lot of different names. Whatever you call the game, its essence will not change from this - this is a numerical puzzle, the same crossword puzzle, only not with words, but with numbers, and compiled according to a certain pattern. Recently, it has become a very popular way to brighten up your leisure time.

The history of the puzzle

It is generally accepted that Sudoku is a Japanese pleasure. This, however, is not entirely true. Three centuries ago, the Swiss mathematician Leonhard Euler developed the Latin Square game as a result of his research. It was on its basis that in the seventies of the last century in the United States they came up with numerical puzzle squares. From America, they came to Japan, where they received, firstly, their name, and secondly, unexpected wild popularity. It happened in the mid-eighties of the last century.

Already from Japan, the numerical problem went to travel the world and reached, among other things, Russia. Since 2004, British newspapers began to actively distribute Sudoku, and a year later, electronic versions of this sensational game appeared.

Terminology

Before talking in detail about how to solve Sudoku correctly, you should devote some time to studying the terminology of this game in order to be sure of the correct understanding of what is happening in the future. So, the main element of the puzzle is the cage (there are 81 of them in the game). Each of them is included in one row (consists of 9 cells horizontally), one column (9 cells vertically) and one area (square of 9 cells). A row may otherwise be called a row, a column a column, and an area a block. Another name for a cell is a cell.

A segment is three horizontal or vertical cells located in the same area. Accordingly, there are six of them in one area (three horizontally and three vertically). All those numbers that can be in a particular cell are called candidates (because they claim to be in this cell). There can be several candidates in the cell - from one to five. If there are two of them, they are called a pair, if there are three - a trio, if four - a quartet.

How to solve Sudoku: rules

So, first, you need to decide what Sudoku is. This is a large square of eighty-one cells (as mentioned earlier), which, in turn, are divided into blocks of nine cells. Thus, there are nine small blocks in total in this large Sudoku field. The player's task is to enter numbers from one to nine in all Sudoku cells so that they do not repeat either horizontally or vertically, or in a small area. Initially, some numbers are already in place. These are hints given to make it easier to solve Sudoku. According to experts, a correctly composed puzzle can only be solved in the only correct way.

Depending on how many numbers are already in Sudoku, the degrees of difficulty of this game vary. In the simplest, accessible even to a child, there are a lot of numbers, in the most complex there are practically none, but that makes it more interesting to solve.

Varieties of Sudoku

The classic type of puzzle is a large nine-by-nine square. However, in recent years, various versions of the game have become more and more common:


Basic solution algorithms: rules and secrets

How to solve Sudoku? There are two basic principles that can help solve almost any puzzle.

  1. Remember that each cell contains a number from one to nine, and these numbers should not be repeated vertically, horizontally and in one small square. Let's try by elimination to find a cell, only in which it is possible to find any number. Consider an example - in the figure above, take the ninth block (lower right). Let's try to find a place for the unit in it. There are four free cells in the block, but one cannot be placed in the third in the top row - it is already in this column. It is forbidden to put a unit in both cells of the middle row - it also already has such a figure, in the area next door. Thus, for this block, it is permissible to find a unit in only one cell - the first in the last row. So, acting by the method of elimination, cutting off extra cells, you can find the only correct cells for certain numbers both in a specific area, and in a row or column. The main rule is that this number should not be in the neighborhood. The name of this method is "hidden loners".
  2. Another way to solve Sudoku is to eliminate extra numbers. In the same figure, consider the central block, the cell in the middle. It cannot contain the numbers 1, 8, 7 and 9 - they are already in this column. The numbers 3, 6 and 2 are also not allowed for this cell - they are located in the area we need. And the number 4 is in this row. Therefore, the only possible number for this cell is five. It should be entered in the central cell. This method is called "loners".

Very often, the two methods described above are enough to quickly solve a Sudoku.

How to solve Sudoku: secrets and methods

It is recommended to adopt the following rule: write small in the corner of each cell those numbers that could be there. As new information is obtained, the extra numbers must be crossed out, and then in the end the correct solution will be seen. In addition, first of all, you need to pay attention to those columns, rows or areas where there are already numbers, and as many as possible - the fewer options remain, the easier it is to handle. This method will help you quickly solve Sudoku. As experts recommend, before entering the answer into the cell, you need to double-check it again so as not to make a mistake, because because of one incorrectly entered number, the whole puzzle can “fly”, it will no longer be possible to solve it.

If there is such a situation that in one area, one row or one column in any three cells, it is permissible to find the numbers 4, 5; 4, 5 and 4, 6 - this means that in the third cell there will definitely be the number six. After all, if there were a four in it, then in the first two cells there could only be five, and this is impossible.

Below are other rules and secrets on how to solve Sudoku.

Locked Candidate Method

When you work with any one particular block, it may happen that a certain number in a given area can only be in one row or in one column. This means that in other rows/columns of this block there will be absolutely no such number. The method is called “locked candidate” because the number is, as it were, “locked” within one row or one column, and later, with the advent of new information, it becomes clear exactly in which cell of this row or this column this number is located.

In the figure above, consider block number six - the center right. The number nine in it can only be in the middle column (in cells five or eight). This means that in other cells of this area there will definitely not be a nine.

Method "open pairs"

The next secret, how to solve Sudoku, says: if in one column / one row / one area in two cells there can be only two any identical numbers (for example, two and three), then they are located in no other cells of this block / row / column will not. This often makes things a lot easier. The same rule applies to the situation with three identical numbers in any three cells of one row/block/column, and with four - respectively, in four.

Hidden Pair Method

It differs from the one described above in the following way: if in two cells of the same row/region/column, among all possible candidates, there are two identical numbers that do not occur in other cells, then they will be in these places. All other numbers from these cells can be excluded. For example, if there are five free cells in one block, but only two of them contain the numbers one and two, then they are exactly there. This method works for three and four numbers/cells as well.

x-wing method

If a specific number (for example, five) can only be located in two cells of a certain row/column/region, then that is where it is located. At the same time, if in the adjacent row/column/area the placement of a five is permissible in the same cells, then this figure is not located in any other cell of the row/column/area.

Difficult Sudoku: Solving Methods

How to solve difficult sudoku? The secrets, in general, are the same, that is, all the methods described above work in these cases. The only thing is that in complex sudoku situations are not uncommon when you have to leave logic and act by the “poke method”. This method even has its own name - "Ariadne's Thread". We take some number and substitute it in the right cell, and then, like Ariadne, we unravel the ball of threads, checking whether the puzzle fits. There are two options here - either it worked or it didn't. If not, then you need to “wind up the ball”, return to the original one, take another number and try all over again. In order to avoid unnecessary scribbling, it is recommended to do all this on a draft.

Another way to solve complex sudoku is to analyze three blocks horizontally or vertically. You need to choose some number and see if you can substitute it in all three areas at once. In addition, in cases with solving complex Sudokus, it is not only recommended, but it is necessary to double-check all the cells, return to what you missed before - after all, new information appears that needs to be applied to the playing field.

Math Rules

Mathematicians do not remain aloof from this problem. Mathematical methods, how to solve Sudoku, are as follows:

  1. The sum of all the numbers in one area/column/row is forty-five.
  2. If three cells are not filled in some area / column / row, while it is known that two of them must contain certain numbers (for example, three and six), then the desired third digit is found using example 45 - (3 + 6 + S), where S is the sum of all filled cells in this area/column/row.

How to increase guessing speed?

The following rule will help you solve Sudoku faster. You need to take a number that is already in place in most blocks / rows / columns, and using the exclusion of extra cells, find cells for this number in the remaining blocks / rows / columns.

Game Versions

More recently, Sudoku remained only a printed game, published in magazines, newspapers and individual books. Recently, however, all sorts of versions of this game have appeared, such as board sudoku. In Russia, they are produced by the well-known company Astrel.

There are also computer variations of Sudoku - and you can either download this game to your computer or solve the puzzle online. Sudoku comes out for completely different platforms, so it doesn't matter what exactly is on your personal computer.

And more recently, mobile applications with the Sudoku game have appeared - both for Android and for iPhones, the puzzle is now available for download. And I must say that this application is very popular among cell phone owners.

  1. The minimum possible number of clues for a Sudoku puzzle is seventeen.
  2. There is an important recommendation on how to solve Sudoku: take your time. This game is considered relaxing.
  3. It is advised to solve the puzzle with a pencil, not a pen, so that you can erase the wrong number.

This puzzle is a truly addictive game. And if you know the methods of how to solve Sudoku, then everything becomes even more interesting. Time will fly by for the benefit of the mind and completely unnoticed!

In this article, we will analyze in detail how to solve complex Sudoku using the example of diagonal Sudoku.

We get condition number 437, which is shown in Figure 1. And the first square immediately catches our eye, it is the most saturated in open numbers. The numbers 1, 3,4,9 are missing. But since the horizontal a already contains three, the number three is placed on c1. The rest we can't really deliver. So let's take a look at what else we have. For example, the vertical is 4, and here the number four can only stand on b4, due to the presence of a four in the fifth square and on the c-rank. We will not put the rest of the numbers yet.

All the tricks and methods that we will apply further apply to both solving simple and complex Sudoku.

And what do we have on the horizontal b? The triple is missing here and it can stand only on b8. (In the second square, it already exists on the vertical 9). And if we carefully consider the horizontal b further, we will find that we have a hidden loner - the number 9 on cell b9. Because the rest of the candidates (these are 1 and 5) cannot stand on this cell!

What can we do next? If we consider square five. Here the numbers 3 and 5 can be either on d5 or on e6. This means that these cells are not considered for the rest of the numbers. Based on this, only one place remains for the one - cell d6.

The result of our actions is in Figure 2. Thanks to our analysis, row b is filled in completely. One on b5, five on b6. Which gives us the right to place 3 and 5 in the fifth square!

Let's continue the analysis of the fifth square. It lacks the number 7, it is not on the main diagonals, and what is most interesting is on the 4-file. Thanks to this very vertical, we can say for sure that the number seven in the fifth square can stand either on f4 or e4. Since the horizontals c and d already contain the seven. And on e5 it cannot stand because of the 4-file. Next, let's turn to the main ranks. And then the sevens are immediately placed! On i9 and on f4.

What we got can be seen in Figure 3. Next, we continue the analysis of the main diagonals. If we consider the one coming from the a1 cell, then it lacks a deuce, which is placed only on h8. This diagonal also lacks 1, 8 and 9. The one can only stand on a1, put it quickly! And the eight cannot stand on d4, since it is already on the d-rank. We arrange - d4 -9, e5 -8.

And now we can completely fill the fifth and first squares! What we got is shown in Figure 4.

Pay attention to the vertical 3. Here you need to place 1, 6, 7. One is placed only on f3, and based on this, the rest are placed - e3 -7, h3-6. Next in line we have vertical 9, as it is arranged just fabulously. d9-2, g9-6, h9-8.

What if we check for open singles?! For example, the number three is boldly placed on cells d2 and h5. Although further analysis of singles does not give anything. Then we turn to the remaining diagonal. She lacks 6, 2, 4. The number six can only be on c7. The rest is easy to fill out.

And why is vertical 4 not drawn to the end? Fixing. c4 -8.

The result of our research in Figure 5. And now we fill in the horizontal with. c8-1, c5-9, c6-2. And this is all based on the presence of these numbers in other verticals. Based on the horizontal with easy to fill the horizontal d. d1-6, d7-4. Further, the third square is quite simply filled. But the second square is not yet filled, although there are also only two candidates - the six and the seven. But they do not meet along the verticals five and six, and therefore we will put them aside for now.

After analyzing all the verticals and horizontals, we come to the conclusion that it is impossible to put a single figure unambiguously. Therefore, we turn to the consideration of squares. Let's turn to the sixth square. There are not enough 5,6,8,9. But we can definitely put the numbers 6 and 8 on the squares f7 and f8. Thanks to our analysis, the entire f is affixed! f1 -9, f2 -5. And what we see here - the fourth square is filled with the whole! e1-4, e2-2.

What we got can be seen in Figure 6. Now let's turn to square nine. Here we have one open loner - the number one on the i7. Thanks to this, we can put a one in the seventh square on g2. Eight on i2.

Loading...Loading...