Stuck completely on a "tough" level

Advanced methods and approaches for solving Sudoku puzzles

Stuck completely on a "tough" level

Postby Heliob » Sat Nov 05, 2005 5:16 pm

Anyone has any idea how to solve that using logic only (no trial and error)?

4 3 8 _ 9 7 5 _ _
6 7 5 3 _ _ 4 9 _
2 _ 9 5 _ 4 3 _ 7

7 _ 4 _ 5 3 9 2 1
3 _ _ 7 _ 9 _ 4 5
9 5 _ 4 _ _ 7 _ 3

1 4 7 _ 3 8 _ 5 9
8 2 6 9 7 5 1 3 4
5 9 3 1 4 _ _ 7 _
Heliob
 
Posts: 2
Joined: 05 November 2005

Postby Lummox JR » Sat Nov 05, 2005 6:18 pm

Well, trial and error is logic (guessing is not), but you don't need anything complex at all to solve this one. You have a naked single at R3C2.

Of course, that's meaningless because this is an invalid puzzle. There are no solutions. Did you misplace a clue perhaps?
Lummox JR
 
Posts: 125
Joined: 22 September 2005

Postby Heliob » Sat Nov 05, 2005 6:59 pm

Sorry Lummox, I indeed misplaced a number R1C3 is a blank!
Heliob
 
Posts: 2
Joined: 05 November 2005

Postby rubylips » Sat Nov 05, 2005 7:11 pm

In that case the puzzle becomes a good deal more difficult as it requires three non-trivial forcing chains:

Code: Select all
1. The value 1 in Box 2 must lie in Row 2.
- The move r3c5:=1 has been eliminated.
The value 2 in Box 9 must lie in Column 7.
- The move r9c9:=2 has been eliminated.
Consider the chain r1c4~6~r1c9-6-r9c9~6~r7c7-6-r7c4.
When the cell r1c4 contains the value 6, so does the cell r7c4 - a contradiction.
Therefore, the cell r1c4 cannot contain the value 6.
- The move r1c4:=6 has been eliminated.
The cell r3c5 is the only candidate for the value 6 in Box 2.
2. Consider the chain r9c6-6-r6c6-6-r6c8-6-r5c7~6~r9c7.
When the cell r9c7 contains the value 6, so does the cell r9c6 - a contradiction.
Therefore, the cell r9c7 cannot contain the value 6.
- The move r9c7:=6 has been eliminated.
Consider the chain r3c2-8-r1c3~8~r1c4-8-r4c4-8-r4c2.
When the cell r4c2 contains the value 8, so does the cell r3c2 - a contradiction.
Therefore, the cell r4c2 cannot contain the value 8.
- The move r4c2:=8 has been eliminated.
The value 6 is the only candidate for the cell r4c2.
rubylips
 
Posts: 149
Joined: 01 November 2005

Postby emm » Sat Nov 05, 2005 11:13 pm

What about the squirmbag?

8s = r1c348, r3c28, r4c24, r5c237, r6c38 => remove 8s from r1c9, r3c5, r5c5 & r6c5.

Well... it works.

Edit : It works but it's wrong. I checked when I read you never find these without finding something simpler. This squirmbag has a parasite at r9c7.
emm
 
Posts: 987
Joined: 02 July 2005

Re: Stuck completely on a "tough" level

Postby teddy » Sat Nov 12, 2005 1:32 am

Heliob wrote:Anyone has any idea how to solve that using logic only (no trial and error)?

4 3 _ _ 9 7 5 _ _
6 7 5 3 _ _ 4 9 _
2 _ 9 5 _ 4 3 _ 7

7 _ 4 _ 5 3 9 2 1
3 _ _ 7 _ 9 _ 4 5
9 5 _ 4 _ _ 7 _ 3

1 4 7 _ 3 8 _ 5 9
8 2 6 9 7 5 1 3 4
5 9 3 1 4 _ _ 7 _


There has an simple clue exist in this one
Pls note all the space R7C4 R7C7 R9C6 should be digit 2 or 6.
Also R9C7 should be 2 6 or 8.
From above two conditions, we can comfirm R9C7 should be 8. Then all others become easy.
teddy
 
Posts: 3
Joined: 10 November 2005

Postby Ruud » Sat Nov 12, 2005 1:50 am

Hi, here is a piece of my solver log:

Solver Log wrote:Row 2 only has candidates for Digit 1 in Box 2
Column 7 only has candidates for Digit 2 in Box 9
R9C9 causes an XY-Wing eliminating Digit 2
R2C6 has Digit 1 as the only remaining candidate
Coloring Digit 6 found an inconsistent color chain
Row 3 Digit 6 must be placed in R3C5
Swordfish found in Rows {4,5,7}, Columns {2,4,7} for Digit 6
Coloring Digit 8 found an inconsistent color chain


As you can see, it requires a nice variety of techniques, but nothing beyond coloring.

After this bottleneck, it can be completed with singles only.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

Postby Jeff » Sat Nov 12, 2005 8:02 am

rubylips wrote:In that case the puzzle becomes a good deal more difficult as it requires three non-trivial forcing chains:

Hi, rubylips

The 3 chains are turbot fishes. What are your definitions for trivial and non-trivial forcing chains?
Jeff
 
Posts: 708
Joined: 01 August 2005

Postby Jeff » Sat Nov 12, 2005 8:16 am

Hi, Ruud
Code: Select all
Row 2 only has candidates for Digit 1 in Box 2
Column 7 only has candidates for Digit 2 in Box 9
I suppose these are just statements, no eliminations.
Code: Select all
R9C9 causes an XY-Wing eliminating Digit 2
Could you list the other 3 cells in the xy-wing?
Code: Select all
R2C6 has Digit 1 as the only remaining candidate
Perhaps I can understand this after the xy-wing is clarified.
Code: Select all
Coloring Digit 6 found an inconsistent color chain
Could you explain what inconsistent mean?

Many thanks
Jeff
 
Posts: 708
Joined: 01 August 2005

Postby Ruud » Sat Nov 12, 2005 4:17 pm

OK, Jeff.
Jeff wrote:
Code: Select all
Row 2 only has candidates for Digit 1 in Box 2
Column 7 only has candidates for Digit 2 in Box 9
I suppose these are just statements, no eliminations.

These lines identify Line-Box interactions. My log shows a more detailed description, but I cannot copy these yet.
- The first one eliminates R3C5 Digit 1.
- The second one eliminates R9C9 Digit 2. (this one opens the XY-Wing)

Code: Select all
R9C9 causes an XY-Wing eliminating Digit 2
Could you list the other 3 cells in the xy-wing?

The cells are: XY=R9C9. XZ=R9C6. YZ=R2C9. The last cell is R2C6, where digit 2 is eliminated, leaving only 1.

Code: Select all
R2C6 has Digit 1 as the only remaining candidate
Perhaps I can understand this after the xy-wing is clarified.

I think so.

Code: Select all
Coloring Digit 6 found an inconsistent color chain
Could you explain what inconsistent mean?

That one is the trickiest. It is logged by multi coloring. When coloring applies colors to conjugate pairs, it forms chains of alternating colors. There can be more than one chain formed this way. In this case, there are 5 chains built, with 10 colors in total.
Then the coloring routine will check the houses where multiple chains come together. From this data, it builds a list of exclusion rules.
Finally, it will expand this list with logical deductions.

At this point, one of the chains has excluded itself. That is an inconsistency. All candidates that form the chain can therefore be eliminated.
The cells are R1C4 and R3C8. Digit 6 can be eliminated.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

Postby Jeff » Sun Nov 13, 2005 8:20 am

Thanks, Ruud

Code: Select all
As you can see, it requires a nice variety of techniques, but nothing beyond coloring

So, the colouring is multi-colouring which is not that trivial for me. BTW, does your multi-colouring work on multi-digits?
Jeff
 
Posts: 708
Joined: 01 August 2005

One chain

Postby bennys » Sun Nov 13, 2005 10:17 am

Code: Select all

+----------------+----------------+----------------+
| 4    3    18   | 268  9    7    | 5    168 *268  |
| 6    7    5    | 3    128  12   | 4    9    28   |
| 2    18   9    | 5    68   4    | 3    168  7    |
+----------------+----------------+----------------+
| 7    68   4    | 68   5    3    | 9    2    1    |
| 3    168  128  | 7    1268 9    | 68   4    5    |
| 9    5    128  | 4    1268 126  | 7    68   3    |
+----------------+----------------+----------------+
| 1    4    7    |*26   3    8    | 26   5    9    |
| 8    2    6    | 9    7    5    | 1    3    4    |
| 5    9    3    | 1    4    26   | 268  7    68   |
+----------------+----------------+----------------+

Lets look at R1C3,R1C4,R1C8 they have four candidates 1268
If we will remove two candidates we have a problem
Which mean that we cant have R7C4=2 AND R1C9=6
But R7C4=2 => R7C7=6 => R1C9=6(the only 6 in C9)
Which mean that R7C4=6 and it solve the puzzle
bennys
 
Posts: 156
Joined: 28 September 2005

Postby Jeff » Sun Nov 13, 2005 10:48 am

bennys

This elimination can also be explained by the technique you used here, where an empty-cell contradiction is resulted.

Target Cell: r1c4=268

Forcing net:
r7c4=2 => r1c4<>2
r7c4=2 => r7c7=6 => r9c9<>6 => r1c4<>6
r7c4=2 => r7c7=6 => r9c9<>6 => r1c9=6 => r1c3=r1c8=18 =>r1c4<>8

Due to this contradiction: r7c4<>2 => r7c4=6

I prefer this interpretation because the pattern is already recognised.
I like these kind of techniques because they can be performed by pure inspection.:D
Jeff
 
Posts: 708
Joined: 01 August 2005

Postby Ruud » Sun Nov 13, 2005 1:35 pm

Jeff wrote:does your multi-colouring work on multi-digits?

The multi-coloring as I implemented in Sudo Cue works the same way as it does in the latest version of Simple Sudoku

I've made only one optional addition, that is including the XZ and YZ cells of an XY wing into the coloring scheme. It merges the results of 2 techniques that can be performed by a player, and may solve an occasional puzzle that otherwise would need forcing chains.

Full coloring on multiple digits is also known as Ultracoloring or Supercoloring. I have not implemented it in my solver, because it has no real benefits over tabling. But you can do it manually in Sudo Cue. It allows you to color individual candidates.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

Postby rubylips » Sun Nov 13, 2005 4:56 pm

The most direct solution is as follows:
Code: Select all
Consider the chain r9c7-8-r9c9-6-r1c9-2-r1c4-2-r7c4-2-r7c7-2-r9c7.
When the cell r9c7 contains the value 2, it likewise contains the value 8 - a contradiction.
Therefore, the cell r9c7 cannot contain the value 2.
- The move r9c7:=2 has been eliminated.
The cell r9c6 is the only candidate for the value 2 in Row 9.

The chain here isn't so different to that identified by bennys:
Code: Select all
r1c4-2-r7c4-2(or 6)-r7c7~6~r9c9-6-r1c9

An alternative analysis of that chain might proceed as follows:
i. Observe r1c9<>6 => r1c4=2.
ii. Observe r1c4<>2 => r1c9=6.
Now, (i) allows us to eliminate 6 as a candidate for r1c4 while (ii) allows us to eliminate 2 as a candidate for r1c9. (ii) leaves r1c4 as the sole candidate for the value 2 in Row 1, after which the puzzle is trivial to solve.
rubylips
 
Posts: 149
Joined: 01 November 2005

Next

Return to Advanced solving techniques