## V Hard and stuck

Advanced methods and approaches for solving Sudoku puzzles

### V Hard and stuck

Any tips/suggestions for this one?

*** 5** *18
8*4 *21 653
51* *83 *9*

*2* 81* *69
6*7 *52 381
18* **6 *4*

*6* 1*8 975
*58 2** 13*
7*1 **5 82*

Taken from Sudoku programme - very hard.
Arnie

Posts: 49
Joined: 19 May 2005

Take a close look at the number 9... it forms an X-wing, see if you can find it :)
Animator

Posts: 469
Joined: 08 April 2005

This is where I am not clear.....

I can see 9 might go r8c1,r9c2 or r9c5, r8c5 or 6 and surely any of these could form an Xwing with 9 at r1c1,2 or r1c5 or 6 .. .- I'm not quite sure what I am supposed to look for.....
Arnie

Posts: 49
Joined: 19 May 2005

Ok, here is your current grid, with the candidates for the number 9 marked.

9? 9? 9? | 5 9? 9? | * 1 8
8 9? 4 | 9? 2 1 | 6 5 3
5 1 * | * 8 3 | * 9 *
-----------------------
* 2 * | 8 1 * | * 6 9
6 9? 7 | 9? 5 2 | 3 8 1
1 8 9? | 9? 9? 6 | * 4 *
-----------------------
* 6 * | 1 * 8 | 9 7 5
9? 5 8 | 2 9? 9? | 1 3 *
7 9? 1 | 9? 9? 5 | 8 2 *

Now there are two X-wings, I'll the one which doesn't help you much, but it might learn you the technique which you can use to find the second one. (number 9 aswell)

To be able to speak of an X-Wing you first need to have only two cells for a certain number in a column).

If you find one such column then you haven't enough yet, you need to find another column which follows the same rule.

This does not nessesarily mean an X-wing though, there is an extra rule: the candidate-cells of the first column has to be on the same row as the candidate-cells of the second column.

To show you the example:

column 1: 9 is possible in r1c1 and r1c6.
column 6: 9 is possible in r8c1 and r8c6

As you can see the rows match so we have an X-wing.

This allows you to remove the 9 as a candiate from all other cells on row 1 and row 6.

Why? :
* Assume r1c1 is not 9, then r8c6 has to be 9, else it is impossible for column 6 to have a 9.

* Assume r1c6 is not 9, then r8c1 has to be 9, else it is impossible for column 1 to have a 9.

You see the pattern?

(Note: the same goes for rows too, just replace all instances of column with row, and all instances of row with column)
Animator

Posts: 469
Joined: 08 April 2005

The previous post is slightly wrong... both X-wings allows you to move on... (I missed an obvious move after removing the candidates for the number 9 :) )
Animator

Posts: 469
Joined: 08 April 2005

thanks....

is the 2nd Xwing where 9 is at either r1c2, r1c5,r9c2 and r9c5?

If so, 9 must be in r6c3? a further 9 at r5c4?
Arnie

Posts: 49
Joined: 19 May 2005

No...

Also, r1c2 cannot be 9... you can remove 9 as a candidate because of the previous X-Wing.

As in, what happens when r1c2 is 9? then r1c1 can't be 9, r1c6 can't be 9 either, and then r8c1 and r8c6 has to be 9... (else column 1 or column 6 does not have the number 9) which is impossible... the same number twice on one row?

The other X-Wing is in the rows... so start looking for rows with only two candidate-cells :)
Animator

Posts: 469
Joined: 08 April 2005

...the only other xwing with 9's that I can see involves r2c2 r2c4, r9c2 r9c4. By the way , when you described the first xwing, did you choose r1c6 and r8c6? could you not equally have chosen r1c5 and r8c5?? Is my xwing right?
Arnie

Posts: 49
Joined: 19 May 2005

r2c2 r2c4, r9c2 r9c4 is correct :)

could you not equally have chosen r1c5 and r8c5?? Is my xwing right?

No, column 5 has four cells where the number 9 can go... an X-wing only works if there are exactly 2 cells.

Another column that has only two cells is column 3, but you will not find a matching column... If you would use column 3 then you need to find a column that fits the following constraint:

a) 9 is a possibility on row 1 (since r1c3 has the number 9 as a candidate)
b) 9 should be possible on row 6
c) there are only two cells in that column that can have the number 9

There is no column for which a, b and c is true...
Animator

Posts: 469
Joined: 08 April 2005

So now I have identified an xwing at r2c2,r2c4,r9c2 and r9c4, can i infer there cannot be a 9 in r5c2, r5c4 or r6c4? - as they are within the columnar paths of the xwing? if so, 9 must be at r6r6 - correct? if so I cannot see where 9 can go in box 4?
Arnie

Posts: 49
Joined: 19 May 2005

Hmm, sorry my fault!

r2c2 r2c4, r9c2 r9c4 is NOT correct.

There are three places where row 9 can have the number 9: r9c2, r9c4 and r9c5. you need to look for a row that has only two possible cells...
Animator

Posts: 469
Joined: 08 April 2005

....so xwing could be at r2c2 r2c4, r5c2 r5c4 ? if so I cannot see what use this to solve anything?
Arnie

Posts: 49
Joined: 19 May 2005

Yes that's the one.

And it certainly has a usage:

Now you know that either r2c2 and r5c4 has the number 9, or r2c4 and r5c2. No other cell in column 2 nor column 4 can have the number 9.

This allows you to remove 9 from the list of candidates from: r1c2, r6c4, r9c2 and r9c4. If you fill in the number 9 in one of those four cells then you are unable to solve the puzzle (feel free to try!).

Now there is only one place left where the number 9 can go on row 9.

(You could do the same for the first X-Wing and then you will find that there is only one place for the number 9 in column 3)
Animator

Posts: 469
Joined: 08 April 2005

Puzzle solved ! Many thanks !!
Arnie

Posts: 49
Joined: 19 May 2005