Solve the very hard Sudoku level 4 game 38 by multiple X wing reduction
After initial hard to come by breakthroughs, the very hard Sudoku game 38 finally solved by repeated X wing reduction of possible digit.
- Very hard Sudoku level 4 game 38
- Solving very hard Sudoku level 4 game 38 by advanced Sudoku techniques and strategy
- Sudoku hard Strategy and techniques for quick solution
- What is a Cycle of twins or triplets and how to use it in solving a Sudoku hard puzzle.
- How to find a naked single in a valid cell by Possible Digit Subset Analysis (DSA).
- Single digit lock and how to use it in solving a Sudoku hard puzzle.
- Sudoku hard technique of double digit scan.
- Sudoku hard breakthrough technique by digit pattern of X wing.
- Sudoku hard technique of parallel scan for a single digit on a row or a column.
- Very hard Sudoku technique of analysis of linked pairs of locked single digits.
- Very hard Sudoku technique of valid diagonal test of an asymmetric X wing.
- Very hard Sudoku advanced technique of enhanced Swordfish locked digit pattern
You may move directly to any of the above sections by clicking its link and return to previous position by clicking on browser back button.
While going through the solution you may click on say Cycle whenever it appears, to know how to form and use a Cycle and then return to the previous position to continue through the solution.
In the same way, for the other techniques also you may jump to details of a technique and after refreshing your concept return to the point from where you jumped.
The following is the Sudoku puzzle that should engage your mind for some time. The Rs are the row labels, Cs are the column labels and we define the stage marked on top left corner.
We'll first solve the Sudoku hard using strategies and techniques for solving Sudoku hard puzzles.
The strategy and techniques for quickly solving Sudoku hard are explained with examples in the sections after the solution.
You may decide to go through the solution directly and take a look at the specific strategy or technique when you feel like.
The Sudoku hard techniques with internal links to the concept sections appear in the solution. You may just click on any such link, say for example Cycle, go through the concept and return by clicking on browser back button.
Or, you may decide first to go through the concepts and then go through the solution. To jump to the Strategy and techniques concept sections click here.
Following is the solution of the puzzle explained step by step in details.
Please spend your time fruitfully on the game trying to solve it before going through the solutions.
Solving very hard Sudoku level 4 game 38 by advanced Sudoku techniques and strategy: Stage 1: By breakthrough Cycles, double digit scan and asymmetric X wing digit reduction effect
Let us solve our level 4 very hard Sudoku puzzle game now.
We'll show the puzzle again for ease of understanding.
To follow the details accurately, you should better have the game actually with you written on paper, or better still—created in a spreadsheet.
R2C1 2 scan for 2 -- R2C3 5 scan for 5 -- Cycle (1,7,9) in C3 -- R9C3 6 residual (or by scan also).
Cycle (2,8) in left bottom major square by double digit scan for [2,8] in C1, C3.
Cycle (7,9) in R4 and breakthrough Cycle (1,7,9) in C9 -- R1C9 4 by reduction of [1,9]. Cycle (2,8) in C9, R9 and asymmetric X wing on 2 in R7C2, R7C8, R9C2, R9C9 share rows R7, R9 -- R8C6 2 by scan for 2 by X wing shared rows and 2 in C4, C5.
Single digit lock on 3 in R1C7, R2C7 by 3 in R3, C9. Single digit lock on 7 in same column C7 in cells R8C7, R9C7 by 7 in C8 and Cycle (1,7,9) in C9.
R6C7 4 by scan for 4.
Unexpected Cycle (3,5,8,9) in C7 reduces 9 to form R9C7 7. The breakthrough effect will be shown next stage.
Results till now shown.
Solving Sudoku hard level 4 game 38 Stage 2: Two single digit locks join to form breakthrough X wing
Because of Cycle (3,5,6,9) in C7, R9C7 7 by reduction of 9 -- R8C7 8 -- R9C9 2 -- R6C9 8, R9C2 8 -- R7C2 2 -- R7C8 9 -- R7C3 7 -- R7C1 4.
R6C9 2 by scan for 2.
Reduced DS in R7 [5,8] -- R7C6 5 -- R7C4 8 -- R3C5 8 scan for 8.
Cycle (3,9) in R1C6, R1C7 -- R1C2 1 -- R1C4 5 residual.
Two single digit locks on 5 in C1 and C5 form an X wing and shares rows R5 and R6. This reduces 5 for the breakthrough R5C7 9. The effect will be shown next stage.
Results till now shown.
Solving Very hard Sudoku level 4 game 38 final Stage 3: Breakthrough by X wing digit reduction leads straight to solution
Because of X wing on 5 in R5C1, R6C1, R5C5, R6C5, breakthrough R5C7 9 by reduction of 5 in possible digit subset [5,9] -- R4C7 5 -- R1C7 3 -- R2C7 6 -- R3C8 1 -- R2C9 9 -- R4C9 7 -- R5C9 1 -- R5C8 3 -- R4C8 6 -- R4C4 3 -- R4C2 9 residual -- R3C2 7 -- R3C1 9 -- R9C1 3 -- R8C1 1 -- R8C3 9 -- R6C3 1.
R1C6 9 residual -- R9C6 4 -- R9C4 9, R3C6 6 -- R3C4 4.
R2C4 1 scan for 1. With 3 in R4C4, R8C4 7 -- R8C5 3 -- R2C5 7 -- R2C6 3 -- R6C6 7 residual -- R6C4 6, R6C1 5, R5C5 5 -- R5C1 7 -- R6C5 9 residual.
Final solution shown.
Check for the validity of solution if you need.
As a strategy we always try first—the row-column scan to find the valid cell at any stage, because that is the most basic and easiest of all techniques.
When easy breaks by row-column scan becomes hard to come by, the next technique is used.
Next easy to use technique used is—identification of single valid digit for a cell by Digit Subset Analysis or DSA in short. This technique is explained in a following concept section.
And wherever possible, Cycles are formed that in any situation are a treasure to have and Cycles play a key role in quick solution. Concept and use of Cycles are explained in a following section.
You may wait for Cycles to form automatically in a column or row.
But a proactive approach of forming a Cycle by DS analysis speeds up the solution process considerably. This is what we call forced creation of Cycles.
The last resort of filling EACH EMPTY CELL with valid digit subsets is to be taken when it is absolutely necessary. Only with all empty cells filled with valid digit subsets, the possible breakthrough points in a hard puzzle can be discovered.
Strategically for faster solution, it is better to delay this time consuming task as much as possible.
In hybrid strategy, a few of the cells of interest are filled with DS of shorter length and analyzed for a breakthrough such as forming a Cycle or a single digit lock.
One of the most powerful patterns that we have used for highly positive result each time is the lock of a single digit in a row or column inside a 9 cell square so that the digit is eliminated from all other DSs in the locked row or column outside the 9 cell square.
The necessity of use of this digit lock technique indicates in a way the hardness of the puzzle. This technique is also explained in a following section.
In solving this Sudoku hard, we have mentioned the use of an additional technique of Parallel scan for a single digit on the cells of a row or column. But it has a minor and unimportant role in discovering the concerned valid cell. We'll not elaborate it here.
A rarely encountered powerful pattern is 4 cell single digit lock in a rectangular formation that may be encountered in very hard or expert level Sudoku hard puzzles. Naturally, it is a superset of the more common single digit lock in 2 cells and so is much more effective.
This powerful digit pattern is the single digit rectangle or X wing. In solving this very hard level 4 Sudoku puzzle, X wing diagonal test provided the main breakthrough.
A basic part of overall strategy is,
Whether we search for a breakthrough of a bottleneck or a valid cell identification, our focus usually is on the promising zones, the zones (row, column and 9 cell square combined) that contain larger number of filled digits including Cycles.
The main strategy should always be to adopt the easier and faster technique and path to the solution by looking for key patterns all the time. Digit lock, Cycles, Valid cell by DSA are some of the key patterns.
Focus when solving a hard Sudoku puzzle should be on using the technique that would produce best results fastest. Easy to say, not so easy to do—comes with practice.
Form of a Cycle:
In a Cycle, the digits involved are locked within the few cells forming the cycle. The locked digits can't appear in any other cell in the corresponding zone outside the few cells forming the cycle.
For example, if a 3 digit cycle (4,7,8) in column C2 is formed with a breakup of, (4,7) in R1C2, (4,7,8) in R5C2 and (7,8) in R6C2, the digits 4, 7 and 8 can't appear in any of the vacant cells in column C2 further.
If we assume 4 in R1C2, you will find R5C2 and R6C2 both to have DSs (7,8) implying either digit 7, or 8 and no other digit to occupy the two cells. This in fact is a two digit cycle in the two cells. Together with 4 in R1C2, the situation conforms to only digits 4, 7 and 8 occupying the set of three cells involved in the cycle.
Alternately if we assume 7 in R1C2 (this cell has only these two possible digit occupancy), by Digit Subset cancellation we get, digit 8 in R6C2 and digit 7 in R5C2 in that order repeating the same situation of only the digits 4,7 and 8 to occupy the set of three cells.
Effectively, the three digits involved cycle within the three cells and can't appear outside this set of three cells.
This property of a cycle limits the occupancy the cycled digits in other cells of the zone involved (which may be a row, a column or a 9 cell square). This generally simplifies the situation and occasionally provides a breakthrough by reducing the number of possible digits in the affected cells.
A number of Cycles are shown below from a Sudoku hard solution stage:
Cycle (1,2,6) in column C1 is over all three 9 cell squares on the left. It affects only the column C1.
Cycle (3,8,9) in top right 9 cell square is also in row R2, so it should affect both the 9 cell square and R2.
But Cycle (3,6,7) in top right 9 cell square is formed only in the 9 cell squares, it affects only the cells in the 9 cell square.
Can you see another Cycle in row R1 apart from Cycle (1,6)? The second Cycle (3,6,7) is formed by the cells R1C2, R1C3 and the far away cell R1C9. This Cycle affects only the row R1.
Can you say which are the affected areas for Cycle (1,6) in R1?
Two cells of this Cycle belong to row R1 as well as to the top middle 9 cell square. So the Cycle affects two areas, the row and the 9 cell square. This will be true for any two digit Cycle.
Use of a cycle:
In the example of cycle described above, if a vacant cell R8C2 in column C2 has a possible DS of (1,4), as digit 4 has already been consumed in the cycle (4,7,8) in the column, only digit 1 can now be placed in R8C2. You get a single valid digit 1 for R8C2.
This is how a new valid cell is obtained using a Cycle that was not visible otherwise.
In any hard Sudoku game solution, creating, analyzing and using the pattern of Cycles play a very important role.
Sometimes when we analyze the DSs in a cell, especially in highly occupied zones with small number of vacant cells, we find only one digit possible for placement in the cell. We call valid cell identification in this way as Digit Subset Analysis.
For example, if in row R4 we have four empty cells, R4C1, R4C3, R4C6 and R4C9 with digits left to be filled up [1,3,5,9] we say, the row R4 has a DS of [1,3,5,9] that can be analyzed for validity in each of the four empty cells.
By the occurrence of digits in other cells if we find in only cell R4C1 all the other three digits 3,5 and 9 eliminated as these are already present in the interacting zones of middle left 9 cell square and the column C1, we can say with confidence that only the left out digit 1 of the DS [1,3,5,9] can occupy the cell R4C1.
While evaluating the valid digit subset or DS of an empty cell, you would analyze not only the digits that are already filled in corresponding row, column and 9 cell square, you must include the Cycles present in the three interest zones also.
This is how we identify a valid cell by Digit Subset Analysis.
Identifying a valid digit in a cell by DSA is like a bread and butter technique. It is possibly the most heavily used technique after the simplest row-column scan.
Though DSA may not be considered as an advanced technique it often provides a much required breakthrough. So always look for a valid cell by DSA.
An example of a breakthrough at the late stage of Sudoku hard puzzle solution by DSA is shown below.
We'll do DSA on cell R7C5. The possible digit subset or DS in column C5 and hence in cell R7C5 is [5,7,9], but the two digits [5,9] both are present in row R7.
So eliminating these two from the three digit DS for R7C5, we get the single valid digit 7 for R7C5 -- R7C5 7.
This is a breakthrough even at this late stage.
Occasionally, after evaluating valid DSs for a number of empty cells, you may find that,
A single digit appears only in the DSs of two or three cells in a 9 cell square, in a column or a row, and in no other DSs in the 9 cell square.
This is what we call as single digit lock.
If it happens in a row (or a column) inside a 9 cell square, the digit cannot appear in any other cell in the row (or the column) outside the square.
This eliminates all occurrences of the locked digit from the DSs in the row (or the column) outside the 9 cell square. Usually it creates a much needed breakthrough. It is a very powerful pattern.
Single digit lock - Conditions for single digit lock - how to identify it
Two conditions for single digit lock pattern,
- the digit can be placed in only two or three cells of a column or a row, AND,
- the locking cells must also be in SAME 9 cell square.
The third desired condition is,
- The lock to be effective, the locked digit should not be present as a single cell candidate in both the adjacent two 9 cell squares through which the locked column or row passes.
The following shows an example of single digit lock of 5 in cells R7C1 and R9C1.
How a single digit lock is formed
Look at columns C1, C2 and C3 in the bottom left 9 cell square R7R8R9-C1C2C3. Out of 3 empty cells, the cell R7C3 is debarred for placing digit 5 as column C3 has a 5 and it lights up the cell for digit 5.
5 can appear only in two cells in column C1, R7C1 and R9C1 and in no other cell in the 9 cell square or the column C1.
It is locked inside these two cells in C1 and 9 cell parent square.
How a Sudoku single digit lock is used - What it does
The locked digit 5 eliminates itself from the DSs of the other two empty cells R5C1 and R6C1 and a new Cycle (2,3) is created in C1.
Focus again on the bottom left 9 cell square. With Cycle (2,3) in C1, another Cycle (5,9) is formed in the two cells of the 9 cell square. As a result, digit 1 becomes the only digit left and cell R7C3 only cell left for it in the 9 cell square.
Still more happens. With 1 in C3 now, digit 9 now must occupy the cell R6C3.
These two single digit candidates obtained by the single digit lock of 5 affects other cells and breaks the bottleneck.
As a strategy, always form a single digit lock as soon as it is discovered.
You may think, what is the point of it, what would it achieve after all!
Well, in a similar situation in the process of solving a hard Sudoku puzzle game, the reduced DS in R9C1 formed a cycle (3,7) in column C1 and helped to pinpoint a valid digit 4 in cell R2C1 and that started a deluge of valid cell finds. This proved to be the key turning point in the whole game.
This technique sounds simple, but being aware of its existence and identifying it would always result in an important breakthrough. This digit pattern usually occurs in very hard Sudoku.
We will explain this advanced Sudoku hard technique on the following situation in a Sudoku hard game,
Notice the two highlighted digits [1,6] appearing in both row R4 and C5. Together these two result in DIRECT FORMATION OF CYCLE (1,6) in central middle 9 cell square.
This is a double digit scan simultaneously on a row and a column.
Now observe a second set of highlighted double digits [3,9] in C5 which DIRECTLY FORMS TWO CYCLES (4,7,8) AND (3,9) IN CENTRAL MIDDLE 9 CELL SQUARE.
This is a double digit scan on a single zone of C5.
Finally, with 3 in C4, R4C4 9 and R4C6 3.
Together these two double digit scans have produced two valid cells and two Cycles. It is a major breakthrough early in the Sudoku hard game.
This special and not often occurring digit pattern involves A SINGLE DIGIT SHARING SAME TWO ROWS AND TWO COLUMNS.
This can be imagined as an advanced form of single digit lock over one pair of rows and one pair of columns in the formation of a rectangle. That's why we call it a single digit rectangle.
This digit formation is commonly known as X wing.
The following figure shows an X wing formation on digit 4 at an advanced stage of solution.
At this advanced stage, possible digit subsets for all empty cells are evaluated after the valid cells and easily formed Cycles are created. By this approach, time waste is minimal.
Interestingly, if you examine closely you will find that all the possible digit subsets are involved in one or more than one Cycle.
The second more important aspect of this puzzle status is,
You cannot find any more valid cell breakthrough by the more frequently used techniques of row column scan (hidden singles), DSA (naked singles), Cycles (naked and hidden groups), single digit lock (direct interaction), double digit scan or parallel scan.
In this situation especially, you need to identify the more complex breakthrough digit patterns of X wing, XY wing or Swordfish. Specialty of all these next advanced level digit patterns is,
Usually all of X wing, XY wing or Swordfish digit patterns usually involve 3, 4 or more cells sharing one common digit.
Observe that we have indeed such a digit pattern formation of 9 in four cells R1C1, R7C1, R1C4 and R7C4.
This single digit of 9 is shared between two columns C1, C4 and two rows R1, R7.
What's so special about this formation?
The special effect of the X wing formation are,
The commonly shared digit cannot appear in any cell of these rows and columns except these four cells.
As a result all instances of commonly shared digit in these other cells are eliminated from the possible digit subsets, and this REDUCTION USUALLY PRODUCES A CRITICAL BREAKTHROUGH.
The important property of an X wing formation is though validity of one of the two diagonally placed pairs of shared digit. When no other breakthrough is available testing one of the diagonally placed digit pairs will provide final breakthrough.
In our example game, the X wing cause reduction of 9 in possible digit subset [3,9] in cell R1C2 and causes the most critical breakthrough of the puzzle in the form of,
In fact, with this valid cell breakthrough rest of the cells are all reduced to valid cells just by reduction.
Notice that we have joined the diagonally opposite pairs of digit 9 by two lines forming a large X. One of the two diagonals will actually occur blocking all appearances of 9 in the two columns and rows.
Let's see a second example in the following figure.
Here also a stage is reached when no easy breakthrough could be seen. This is a sure sign of breakthrough by more advanced techniques of X wing, XY wing, Sword fish or likes that involve a single digit shared between more than 2 cells.
Though spotting such a digit pattern spanning at least 4 cells is not easy, if you know what to look for, you can find the pattern quickly. Also you need to practice.
In the above figure digit 4 is shared between two columns C3, C7 and two rows R2, R3. The property that makes this digit configuration a valuable and proper X wing is:
In each column, digit 4 can occupy only these two cells and no other cell. That is, digit 4 is locked in the two cells in both C3 and C7.
No doubt that this is a case of two numbers of SINGLE DIGIT LOCKS OVER TWO COLUMNS SHARING THE ROWS ALSO.
Effect is two-fold. First, digit 4 will have to be removed from all possible digit subsets in the cells of R2, R3, C3 and C7 as well as in cells of their home major squares, top right and top left.
Result is the CRITICAL BREAKTHROUGH OF FIRST FORMING CYCLE (2,6) IN R2C4, R2C8 AND THEN THE VALID CELL R2C6 8 BY REDUCTION OF (2,6) BY THE CYCLE IN R2.
That single valid cell resulted in ALL THE REST OF THE VALID CELLS TILL THE FINAL SOLUTION.
A parallel scan is carried out for a specific digit on the empty cells of a promising row (or column). Because of presence of the specific digit in the interconnecting columns (or rows) for all empty cells of the scanned row (or column) except one, the valid cell for scanned digit can be identified as this cell.
The digit pattern and the technique to identify a breakthrough valid cell by parallel scan is shown in the figure below,
The parallel scan for digit 6 is done in this case on the empty cells of R1. Out of 4 empty cells R1C4, R1C6, R1C7 and R1C9, digit 6 is disallowed in the first two by 6 in top middle major square and disallowed in R1C7 by 6 in C7.
This leaves only the single cell R1C9 where digit 6 can be placed. That becomes the valid cell for digit 6.
Observe that as a result a Cycle (4,7,9) is formed in the rest of the three empty cells in R1.
If you could have identified the Cycle before parallel scan, you could automatically have got the valid cell without parallel scan. That's the interesting property of parallel scan, if you can spot one, you would be sure to find an equivalent Cycle as a result.
To us, valid call by parallel scan is easier and faster.
When no common breakthrough digit pattern such as double digit scan, parallel digit scan, X wing, X-Y wing or Swordfish is identifiable, it is recommended to identify and mark all instances single digit locks across rows, columns and major squares. Next, the locked single digit pairs sharing common rows and columns to be identified. Analysis of this set of locked pairs of single digit sharing rows and columns should provide the critical breakthrough.
This technique is based on the same concept as other single digit lock based digit patterns such as X wing, but the digits in this case may appear not in a specific regular form such as X wing. The free form analysis is more complex in this case but packs more power with broader scope.
The following shows an example of application of the technique.
A pair of digit 9 appears in R1C3, R1C7 locked in R1. This is linked with a second locked pair of 9 in R1C7, R2C8 in top right major square. This second pair is linked with a third locked pair of 9 in R2C8, R4C8 in C8 linked through R2C8. Finally, the third locked pair of cells with 9 is linked with a fourth locked pair of 9 in R4C8, R6C7 in right middle major square linked through the common cell R4C8. Finally R6C7 shares common column C7 with 9 in R1C7.
The four pairs of locked digit 9 with 5 unique cells share three linked cells, one row and two columns.
Out of these 5 unique instances of digit 9, because of linked cell and row-column sharing, only two combinations are possible: 9 in R1C3, R2C8 and R6C7 OR 9 in R1C7 and R4C8.
In either case, 9 will be present in R1C3 or in R4C8 and these two affect the SINGLE IMPORTANT cell R4C3 at their cross-section to debar 9 in R4C3. Resulting valid digit of R4C3 1 provides the most critical breakthrough in the whole game.
This is reasonable as the valid digit 1 occupies minimum cells at the moment with maximum potential for further resolution of valid digits.
When two pairs of a digit are locked in two rows (or columns) and share one but not two columns (or rows) what you have is an asymmetric X wing. This special digit formation often is used for a breakthrough by testing validity of any of the two pairs of diagonally placed digits in the asymmetric X wing. By their placement only one pair will be valid, and the other pair of the digit are eliminated.
Following shows an example.
Single digit lock on 3 are formed in R9 in cells R9C3, R9C9 and in R8 in R8C5, R8C9. The two pairs share only the common column C9, but that is enough for testing validity of one of the two diagonals in the asymmetric X wing.
First test of validity of diagonally placed pair of digit 3 in R8C5, R9C9 produces the following result.
With this assumption of digit 3 pair in R8C5, R9C9, digit 6 conflict happens in R4 and the diagonally placed pair of digit 3 in R8C5, R9C9 prove to be invalid. Valid pair of digit 3 are in R9C3 and R8C9. This proves to be the most important breakthrough.
Advanced breakthrough digit patterns of two same digits and four same digits are single digit lock and X wing which is nothing but a pair of single digit locks sharing rows and columns. It is relatively easy to discover and effectively use both digit patterns for critical breakthroughs.
Swordfish is the breakthrough digit pattern of similar type that also is based on single digit locks. Instead of two pairs of single digit locks in X wing, three pairs of single digit locks form a Swordfish.
The specialty of the pattern is:
The three pairs of locked same digit share three columns as well as rows. This eliminates all possibility of placing the digit in any of the shared columns or rows and as a result creates a critical breakthrough.
The following shows four pairs of locked same digit 4 in four columns share rows as well.
Four pairs of locked digit 4 in columns C3, C4, C6 and C8 share rows R3, R4, R6 and central middle major square as well.
When these locked and linked pairs are examined it is easy to find the invalid possibility.
If digit 4 is placed in R3C6, it eliminates 4 in R3 and C6 and confirms 4 in R4C8. This last placement in turn eliminates 4 in R4 confirming 4 in R6C3 which eliminates 4 in R6C4 and R6C5 leaving no cell for 4 to occupy in central middle major square. This proves the possibility of digit 4 in R3C6 as invalid and digit 9 in this cell as the valid option.
R3C6 9 is the critical breakthrough that results in all other remaining valid cells.
Observe that the fourth locked digit pair of 4 in R6C4, R7C4 is not used at all.
To go through the solution of this Sudoku hard once more, click here.
More Sudoku hard puzzles you may like to solve and learn how to solve
The updated list of Solutions to level 3, level 4 and NYTimes Sudoku hard puzzle games:
Enjoy solving Sudoku hard.
By the way, Sudoku hard solution techniques are included with many of the solutions.
Enjoy also learning how to solve Sudoku hard in easy steps.