Solve Tough Sudoku without guessing?

Advanced methods and approaches for solving Sudoku puzzles

Solve Tough Sudoku without guessing?

Postby TopRank » Thu Dec 22, 2005 10:25 pm

I found this sudoku at Krazydad.com's list of tough sudokus. These can supposedly be solved without guessing.

(This is here, puzzle 8)
http://krazydad.com/sudoku/books/KD_Sudoku_TF_8_v2 .pdf

According to the hints in the back the next solvable cell is f3 (row 6 column 3) which can be a 2 or 8 and turns out to be 2.

The online sudoku solver by logic cannot get this one but I'm willing to believe it can be solved without guessing since it says so.
http://www.sudokusolver.co.uk/

Reached end of logic.. using guessing technique called Ariadne's thread

Code: Select all
           
A  6 4 9   5   1   2   7 8 3
B  8 3 1   46  46  7   9 5 2
C  7 2 5   38  9   38  6 4 1
           
D  5 6 38  378 37  4   2 1 9
E  1 7 23  23  5   9   4 6 8
F  4 9 28  1   26  68  5 3 7
           
G  9 8 7   46  346 36  1 2 5
H  3 5 4   27  27  1   8 9 6
I  2 1 6   9   8   5   3 7 4


I'd sure appreciate if anyone can explain the easiest way to reach a solution to this.
TopRank
 
Posts: 11
Joined: 22 December 2005

Postby rubylips » Thu Dec 22, 2005 10:47 pm

The critical Almost Locked Set is {r4c4,r4c5,r5c4}, which tells us that when r4c4 doesn't contain an 8, r5c4 must contain a 2. Therefore, when r4c4 contains a 7, r5c4 contains a 2 and r8c4 a 7 - a contradiction. When the 7 is removed from r4c4, there's just a single position for the 7 in Row 4 and the puzzle is solved quickly.
rubylips
 
Posts: 149
Joined: 01 November 2005

Alternative solution

Postby Carcul » Thu Dec 22, 2005 10:58 pm

Hi TopRank.

Another way to solve this puzzle is to note the type 1 unique rectangle in cells r2c4, r2c5, r7c4, r7c5, from which we must have r7c5 = 3 so that the grid have only one solution. From here the solving is straightforward.

Regards, Carcul
Carcul
 
Posts: 724
Joined: 04 November 2005

Postby SteveF » Thu Dec 22, 2005 11:03 pm

And possibly another option, r4c5, r5c4 and r8c5 form an xy-wing, meaning that 2 can be excluded as a candidate from r8c4.
SteveF
 
Posts: 86
Joined: 26 March 2005

Postby TopRank » Thu Dec 22, 2005 11:44 pm

Thanks everyone.

Rubylips - I'm not sure what "almost locked set" means. Were you able to see that on inspection or did you need scrap paper? Please point me to a link where I can learn about those.

Carcul - I see that. That is very clever, if r7c5 is not 3 then the puzzle has no unique solution. I think I'll be able to use that from now on.

SteveF - XY wing. Since you mentioned those squares I can see that if r8c4 is 2, then r8c5 has to be 7, r4c5 has to be 3 and r5c4 has to be 2 which contradicts r8c4 being 2. But what specifically do you look for to find an xy wing?
TopRank
 
Posts: 11
Joined: 22 December 2005

Postby Nick67 » Fri Dec 23, 2005 12:21 am

Hey, we are on a roll with ideas for this puzzle!

Let me throw out 1 more: how about a BUG?

Code: Select all
A  6 4 9   5    1    2   7 8 3
B  8 3 1   46   46   7   9 5 2
C  7 2 5   38   9    38  6 4 1

D  5 6 38  78+3 37   4   2 1 9
E  1 7 23  23   5    9   4 6 8
F  4 9 28  1    26   68  5 3 7

G  9 8 7   46   34+6 36  1 2 5
H  3 5 4   27   27   1   8 9 6
I  2 1 6   9    8    5   3 7 4


... but I'm getting way too predictable ... gotta find
a new technique!

[edit: added the following]
This grid has the BUG pattern. By the BUG principle, r4c4 must be 3,
or r7c5 must be 6 (or both): otherwise the puzzle will have multiple
solutions if any. Both possibilities lead to r4c5=7:
r4c4=3 => r4c5=7
r7c5=6 => r6c5=2 => r5c4=3 => r4c5=7
... so we can place 7 in r4c5, and then only singles remain.

[edit #2: the analysis here is incorrect. Please see the later posts in the thread.]
Last edited by Nick67 on Fri Dec 23, 2005 6:08 pm, edited 3 times in total.
Nick67
 
Posts: 113
Joined: 24 August 2007

Postby SteveF » Fri Dec 23, 2005 6:47 am

There are several good descriptions of xy-wing in this forum, but try this link:

http://forum.enjoysudoku.com/viewtopic.php?t=992&highlight=xywing
SteveF
 
Posts: 86
Joined: 26 March 2005

Postby sweetbix » Fri Dec 23, 2005 7:21 am

XY WING = a short forcing chain using cells with 2 candidates

I like the term *buddies* as used in Sudoku Susser. Every cell has 20 buddies = other cells in their row, column and box.

This is how I look for XYwings. Find 2 cells in the same group that share one candidate XY, XZ. Then, if one of these cells has a buddy with the unshared candidates YZ then all cells that are buddies of the 2 cells with Z cannot be Z.
sweetbix
 
Posts: 58
Joined: 10 December 2005

Postby rubylips » Fri Dec 23, 2005 10:29 am

An Almost Locked Set is a set of n cells that between them contain n+1 candidate values. The point is that when one candidate is eliminated, we are often able to infer interesting facts from those that remain. Read more here: Almost locked rules (for now).
rubylips
 
Posts: 149
Joined: 01 November 2005

Postby MCC » Fri Dec 23, 2005 1:27 pm

Nick67

If you're going to throw BUG's at us could you please explain what is eliminated or placed and why.

Look to the replies of: Rubylips, Carcul and Stevef for examples of a good reply.

MCC
MCC
 
Posts: 1275
Joined: 08 June 2005

Postby Nick67 » Fri Dec 23, 2005 3:53 pm

Yes, sorry about that! I have edited my post.
Nick67
 
Posts: 113
Joined: 24 August 2007

Postby MCC » Fri Dec 23, 2005 5:50 pm

Nick67 wrote:
Code: Select all
A  6 4 9   5    1    2   7 8 3
B  8 3 1   46   46   7   9 5 2
C  7 2 5   38   9    38  6 4 1

D  5 6 38  78+3 37   4   2 1 9
E  1 7 23  23   5    9   4 6 8
F  4 9 28  1    26   68  5 3 7

G  9 8 7   46   34+6 36  1 2 5
H  3 5 4   27   27   1   8 9 6
I  2 1 6   9    8    5   3 7 4



[edit: added the following]
This grid has the BUG pattern. By the BUG principle, r4c4 must be 3,
or r7c5 must be 6 (or both): otherwise the puzzle will have multiple
solutions if any. Both possibilities lead to r4c5=7:
r4c4=3 => r4c5=7
r7c5=6 => r6c5=2 => r5c4=3 => r4c5=7
... so we can place 7 in r4c5, and then only singles remain.


Thanks for the reply Nick, but surely the second equation is wrong.

Looking at c5
r7c5=6=>r4c5=3

If we following on from your equation

r7c5=6 => r6c5=2 => r5c4=3 => r4c5=7=>r8c5=2=>r6c5=6

we have both r7c5 and r6c5=6 a contradiction.

MCC
MCC
 
Posts: 1275
Joined: 08 June 2005

Thanks so much everybody

Postby TopRank » Fri Dec 23, 2005 6:21 pm

I now understand xy-wings, almost locked sets, and a basic kind of removal by uniqueness.

The hint sheet at the back of krazydad's book indicates that r6c3 is the next cell whose value is found. Any idea how that cell can be discovered as 2 without resolving other cells first?
TopRank
 
Posts: 11
Joined: 22 December 2005

Postby sweetbix » Fri Dec 23, 2005 6:38 pm

Forcing chain
r6c6=8 => r6c3=2
r6c6=6 => r3c6=8 =>r3c4=3 => r5c4=2 => r5c3=3 => r6c3=2
sweetbix
 
Posts: 58
Joined: 10 December 2005

Postby Nick67 » Fri Dec 23, 2005 10:04 pm

Code: Select all
A  6 4 9   5    1    2   7 8 3
B  8 3 1   46   46   7   9 5 2
C  7 2 5   38   9    38  6 4 1

D  5 6 38  78+3 37   4   2 1 9
E  1 7 23  23   5    9   4 6 8
F  4 9 28  1    26   68  5 3 7

G  9 8 7   46   34+6 36  1 2 5
H  3 5 4   27   27   1   8 9 6
I  2 1 6   9    8    5   3 7 4

MCC, sorry again! You are absolutely right.
Here is my correction, based on your idea of a contradiction:

This grid has the BUG pattern. By the BUG principle, r4c4=3
or r7c5=6 (or both): otherwise the puzzle will have multiple
solutions if any. Consider the assignment r7c5=6. That would imply
that r4c5=3, because it is the only remaining 3 in c5.
But r7c5=6 also implies that r6c5=2 and therefore that r5c4=3,
a contradiction to r4c5=3. So r7c5=6 must be false, and the
the remaining assignment allowed by the BUG principle (r4c4=3)
must be true. Then the puzzle can be solved using singles only.
Nick67
 
Posts: 113
Joined: 24 August 2007


Return to Advanced solving techniques