Is there a simple alternative for this template discovery?

Advanced methods and approaches for solving Sudoku puzzles

Postby Ruud » Tue Feb 21, 2006 4:49 pm

vidarino wrote:It borrows heavily from from the "Hinge pattern", as far as I can tell: http://www.sudoku.org.uk/discus/messages/29/414.html?1135572720

This is what I read in the "hinge" topic:

Rod Hagglund wrote:I’ll describe a box as holding a potential “hinge” for a candidate number if all the possible candidate cells for the number in that box can be “covered” by a single row and a single column (i.e., they lie on an L, T or + shape formed by a row and a column). It’s not necessary for all cells in the “hinge” to contain the candidate number; but no candidates can lie outside the shape

Having read this, "borrows heavily" sounds like an understatement to me.

Thanks for the reference.

Can the hinge/ER also be used in this way, as a relay that creates a strong link between A and B? It would work in my humble opinion...

Code: Select all
XX |   |
XX |   |
  +|   | A
---+---+---
   |   |
   |   |
---+---+---
   |   |
  B|   | *
   |   |


Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

Postby Myth Jellies » Tue Feb 21, 2006 5:01 pm

ruud wrote:aeb wrote:
Since five is odd there must be two successive vertices that are not 8, and a common neighbour of them that is. This yields (2,4)!8

This is a reasoning I cannot follow. What are the 2 vertices you isolated and what is the common neighbour. Please identify the cells involved in this process.


The Broken Wing method usually refers to Guardian Cells. As you go along each link, an alternative choice in that same group is a guardian cell. Because an odd link loop is impossible, one of the guardian cells must be true. Stars mark the loop, and hash signs mark the guardian cells. Note that all of the guardian cells see r2c4, thus r2c4 must not be an 8.
Code: Select all
.------------------.------------------.------------------.
| 39    6     5    | 7    *2348  34   | 249   248   1    |
| 2    *89   #348  |*68   #13458 13456| 4569  458   7    |
| 1     7     48   | 9    #2458  456  | 2456  3     458  |
:------------------+------------------+------------------:
| 8     4     9    | 5     7     2    | 3     1     6    |
| 7     1     6    | 3     49    8    | 245   245   459  |
| 35    25    23   | 1     6     49   | 8     7     49   |
:------------------+------------------+------------------:
| 59    3     128  | 248   19    7    | 45    6     458  |
| 6     59    18   | 48    139   139  | 7     458   2    |
| 4    *28    7    |#268  *58    56   | 1     9     3    |
'------------------'------------------'------------------'
Myth Jellies
 
Posts: 593
Joined: 19 September 2005

Postby Ruud » Tue Feb 21, 2006 5:23 pm

Myth Jellies wrote:The Broken Wing method usually refers to Guardian Cells. As you go along each link, an alternative choice in that same group is a guardian cell. Because an odd link loop is impossible, one of the guardian cells must be true. Stars mark the loop, and hash signs mark the guardian cells. Note that all of the guardian cells see r2c4, thus r2c4 must not be an 8.

Thanks. It is perfectly clear. But this method is not simple. These odd circuits do not jump out. So far, the finned X-wing and the hinge/ER are the easiest techniques for a human player.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

Postby Havard » Tue Feb 21, 2006 5:23 pm

Ruud wrote:
Can the hinge/ER also be used in this way, as a relay that creates a strong link between A and B? It would work in my humble opinion...

Code: Select all
XX |   |
XX |   |
  +|   | A
---+---+---
   |   |
   |   |
---+---+---
   |   |
  B|   | *
   |   |


Ruud.


Hi Ruud. Well, If A is true, then B is not true, and v.v., but there is nothing to say that both A and B can't be "not true". So your example does not look right to me.

havard
Havard
 
Posts: 378
Joined: 25 December 2005

Postby Ruud » Tue Feb 21, 2006 6:50 pm

Havard wrote:but there is nothing to say that both A and B can't be "not true". So your example does not look right to me.

It depends on whether or not the "+" (ERI) contains a candidate. When it does, there is only a weak link. When it does not contain a candidate, the link is strong.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

Postby ronk » Tue Feb 21, 2006 7:17 pm

ravel wrote:You also can start with R13C3, because it follows that R5C1=3 and then R4C8=3.

I don't see that one, but I see a simple grouped turbot fish using an ER in box 2 for r3c3<>3 ...
Code: Select all
3 3 3 | . . A | 3 . .
. . . | . . A | . 3 .
. 3 3 | a a . | 3 3 .
---------------------
. . 3 | 3 3 . | . 3 .
3 . 3 | . . . | 3 3 .
. . A | . . a | . . .
---------------------
3 3 . | 3 3 . | . . .
. . . | . . . | . . 3
. 3 . | 3 . . | . . .

... since r3c3 sees both A and a. Note that r3c3 must see ALL of the a's of the grouped candidates in box 2.

ravel wrote:It is also possible to eliminate 3 in R5C1 first (i did it to get the number 1 for this cell), but it is rather complicated.

Maybe this one is simpler. It uses three strong links including the ER in box 6 to eliminate the 3s in both r5c1 and r5c3.
Code: Select all
3 3 3 | . . 3 | 3 . .
. . . | . . A | . a .
. 3 3 | 3 3 . | 3 3 .
---------------------
. . 3 | 3 3 . | . C .
3 . 3 | . . . | c C .
. . B | . . b | . . .
---------------------
3 3 . | 3 3 . | . . .
. . . | . . . | . . 3
. 3 . | 3 . . | . . .

Since b!A (b true excludes A true) and a!C, then b!C and C!b. Therefore, any candidate(s) that see(s) both (little) c and B can be eliminated. Rather than messing with that math though, it's usually easier just to follow the alternating strong and weak links while mentally assigning true and false states.

Interesting puzzle, do you have the starting grid?

Ron
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby ronk » Tue Feb 21, 2006 7:48 pm

Ruud wrote:
Havard wrote:but there is nothing to say that both A and B can't be "not true". So your example does not look right to me.

It depends on whether or not the "+" (ERI) contains a candidate. When it does, there is only a weak link. When it does not contain a candidate, the link is strong.

When the ERI does not contain a candidate, the overall pattern appears to be a grouped turbot fish, but overall there is only one strong link. One strong link does not a valid turbot fish make. Therefore no eliminations are possible AFAIK.

When the ERI does contain a candidate, an x-wing is a potential outcome ... but I don't understand your "weak link" description.

Ron
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby Havard » Tue Feb 21, 2006 7:59 pm

Ruud wrote:
Havard wrote:but there is nothing to say that both A and B can't be "not true". So your example does not look right to me.

It depends on whether or not the "+" (ERI) contains a candidate. When it does, there is only a weak link. When it does not contain a candidate, the link is strong.
Ruud.


hm. I can't see why that is true...

Concider the following:
Code: Select all
X X c | . . . | . . .
X X c | . . . | . . .
c c . | . . . | . A .
------+-------+------
. . . | . . . | . . .
. . . | . . . | . . .
. . . | . . . | . . .
------+-------+------
. . . | . . . | . . .
. . B | . . . | . ? .
. . . | . . . | . . .


In this example there is no reason why not both A and B could be false. Unless of course what you mean is that there are no other candidates along the lines that ERI and A and B share.

If you have:
Code: Select all
X X b'| . . . | . . .
X X b | . . . | . . .
a'a X ------------A .
----|-+-------+------
. . | | . . . | . . .
. . | | . . . | . . .
. . | | . . . | . . .
----|-+-------+------
. . | | . . . | . . .
. . B | . . . | . * .
. . . | . . . | . . .


then you can safely eliminate *, because if A is false, then a or a' have to be true, and then b and b' are false, and then B is true. And as you pointed out, if there is a candidate at the ERI you can't do this deduction, because then if A was false, the ERI could be true, and then B would be false as well, and no elimination could be done.:)
Havard
 
Posts: 378
Joined: 25 December 2005

Postby Havard » Tue Feb 21, 2006 8:14 pm

I just wanted to add that this is not related to the ER at all, because you can actually have candidates where the ER is, and it would still work. The important thing is to NOT have a candidate where the two grouped strong links (A-aa') and (B-bb') meet.

Code: Select all
. . b'| . . . | . . .
. . b | . . . | . . .
a'a X ------------A .
----|-+-------+------
. . | | . . . | . . .
. . | | . . . | . . .
. . | | . . . | . . .
----|-+-------+------
. . | | . . . | . . .
. . B | . . . | . * .
. . . | . . . | . . .


havard
Havard
 
Posts: 378
Joined: 25 December 2005

Postby Ruud » Tue Feb 21, 2006 8:45 pm

Havard wrote:I just wanted to add that this is not related to the ER at all, because you can actually have candidates where the ER is, and it would still work. The important thing is to NOT have a candidate where the two grouped strong links (A-aa') and (B-bb') meet.

Code: Select all
. . b'| . . . | . . .
. . b | . . . | . . .
a'a X ------------A .
----|-+-------+------
. . | | . . . | . . .
. . | | . . . | . . .
. . | | . . . | . . .
----|-+-------+------
. . | | . . . | . . .
. . B | . . . | . * .
. . . | . . . | . . .

This is exactly what I had in mind. Thank you for the clarification.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

Postby ravel » Wed Feb 22, 2006 9:28 am

ronk wrote:Maybe this one is simpler. It uses three strong links including the ER in box 6 to eliminate the 3s in both r5c1 and r5c3.

Ah, this is a nice way to do it:)
Interesting puzzle, do you have the starting grid?

I posted it on page 1. The coloring did not solve it completely, i needed a short forcing chain later.
Code: Select all
------------
...|.7.|.9.
6.7|49.|...
5..|..8|...
------------
...|..5|...
.8.|942|...
9..|.8.|12.
------------
..5|...|..7
...|..7|.53
7.2|..4|.8.
------------
ravel
 
Posts: 998
Joined: 21 February 2006

Another puzzle

Postby Ruud » Wed Feb 22, 2006 3:15 pm

Thanks for helping me improve my solver.

The following puzzle is a very special case. It can be solved with a variety of techniques, including 3 XYZ-Wings. A rarity. At some point, my solver needs a template elimination to proceed. Just before the finish, a forcing chain is required.

This is the original puzzle, in case you want to try and find a completely different way to solve it:

Code: Select all
. . .|2 . .|8 1 .
6 . .|7 . .|9 . .
. . 3|. 1 .|. . 5
-----+-----+-----
3 . 2|. . 5|1 . .
. 5 .|. . .|. 9 .
. . 9|4 . .|5 . 2
-----+-----+-----
4 . .|. 3 .|6 . .
. . 8|. . 6|. . 1
. 7 6|. . 9|. . .


This is the moment it requires the template check. It eliminates candidate 7 in R5C7. What alternatives can I use to eliminate this candidate?

Code: Select all
.---------------.---------------.---------------.
| 57   49   457 | 2    69   34  | 8    1    3467|
| 6    1248 14  | 7    5    348 | 9    24   34  |
| 278  2489 3   | 69   1    48  | 247  2467 5   |
:---------------+---------------+---------------:
| 3    48   2   | 69   789  5   | 1    678  478 |
| 178  5    147 | 3    2678 127 | 47   9    678 |
| 178  6    9   | 4    78   17  | 5    3    2   |
:---------------+---------------+---------------:
| 4    12   15  | 18   3    27  | 6    2578 9   |
| 9    3    8   | 5    247  6   | 247  247  1   |
| 125  7    6   | 18   24   9   | 3    458  48  |
'---------------'---------------'---------------'

This is the moment it requires the forcing chain:

Code: Select all
.------------.------------.------------.
| 57  9   457| 2   6   3  | 8   1   47 |
| 6   12  14 | 7   5   8  | 9   24  3  |
| 27  8   3  | 9   1   4  | 27  6   5  |
:------------+------------+------------:
| 3   4   2  | 6   9   5  | 1   78  78 |
| 178 5   17 | 3   278 127| 4   9   6  |
| 178 6   9  | 4   78  17 | 5   3   2  |
:------------+------------+------------:
| 4   12  15 | 18  3   27 | 6   578 9  |
| 9   3   8  | 5   47  6  | 27  247 1  |
| 125 7   6  | 18  24  9  | 3   458 48 |
'------------'------------'------------'


What simple alternative is available at this stage?

Thank you for your input.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

Postby Carcul » Wed Feb 22, 2006 5:02 pm

Ruud wrote:This is the original puzzle, in case you want to try and find a completely different way to solve it:


After the basic steps we get:

Code: Select all
 57   49    457 | 2   69    34  | 8    1     3467 
 6    1248  14  | 7   5     348 | 9    24    34   
 278  2489  3   | 69  1     48  | 247  2467  5     
----------------+---------------+------------------
 3    48    2   | 69  789   5   | 1    4678  478   
 178  5     147 | 3   2678  127 | 47   9     4678 
 178  6     9   | 4   78    17  | 5    3     2     
----------------+---------------+------------------
 4    12    15  | 18  3     27  | 6    2578  9     
 9    3     8   | 5   247   6   | 247  247   1     
 125  7     6   | 18  24    9   | 3    2458  48   

Here is a possible solution:

[r9c5](-4-[r8c5|r9c8])-4-[r9c9](-8-[r9c8])(-8-[r9c4]-1-[r9c1])-8-[r7c8|r9c8]=8=[r4c8](-8-[r4c9])-8-[r4c2](=8=[r5c1|r6c1]-8-[r3c1])(-4-[r1c2]-9-[r1c5]-6-[r1c9])-4-[r4c9](r4c9=7)-7-[r5c7]-4-[r8c7]=4=[r8c8]-4-[r2c8](-2-[r2c2])-2-[r9c8]-5-[r9c1]-2-[r3c1]=2=[r3c2]=8=[r2c2]-8-[r2c6]={Almost Unique Rectangle: r1c6|r2c6|r1c9|r2c9}=8|7=[r1c9](r1c9=7).

So, if r9c5=4 then we would end up with two "7s" in column 9 (in r1c9 and r4c9). So, r9c5<>4 and that solve the puzzle.

A two step solution:

1. [r1c2](-4-[r2c3]-1-[r7c3]-5-[r9c1])-4-[r4c2](r4c2=8)-8-[r5c1|r6c1]-1-[r9c1]-2-[r9c5]-4-[r9c9]-8-[r7c8|r9c8]=8=[r4c8](r4c8=8), => r1c2<>4.

2. [r9c5](-4-[r8c5])-4-[r9c9]=4=[r1c9]-4-[r2c8](-2-[r3c7]=2=[r8c7]-2-[r8c5])-2-[r2c2]=2=[r7c2]-2-[r7c6]-7-[r8c5],

which means that, if r9c5=4 then r8c5 would be an empty cell. So r9c5<>4 and that solve the puzzle.

Ruud wrote:This is the moment it requires the template check. It eliminates candidate 7 in R5C7. What alternatives can I use to eliminate this candidate?


Grouped coloring:

[r5c7]-7-[r4c9|r5c9]=7=[r1c9]-7-[r1c3]=7=[r5c3]-7-[r5c7], => r5c7<>7.

Ruud wrote:What simple alternative is available at this stage?


Besides a forcing chain, I don't see a simpler alternative.

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

Postby ronk » Wed Feb 22, 2006 5:59 pm

Carcul wrote:
Ruud wrote:This is the moment it requires the template check. It eliminates candidate 7 in R5C7. What alternatives can I use to eliminate this candidate?

Grouped coloring:

[r5c7]-7-[r4c9|r5c9]=7=[r1c9]-7-[r1c3]=7=[r5c3]-7-[r5c7], => r5c7<>7.

Yes, this grouped turbot fish is the "best" thing I found too.

Ruud wrote:This is the moment it requires the forcing chain:
Code: Select all
.------------.------------.------------.
| 57  9   457| 2   6   3  | 8   1   47 |
| 6   12  14 | 7   5   8  | 9   24  3  |
| 27  8   3  | 9   1   4  | 27  6   5  |
:------------+------------+------------:
| 3   4   2  | 6   9   5  | 1   78  78 |
| 178 5   17 | 3   278 127| 4   9   6  |
| 178 6   9  | 4   78  17 | 5   3   2  |
:------------+------------+------------:
| 4   12  15 | 18  3   27 | 6   578 9  |
| 9   3   8  | 5   47  6  | 27  247 1  |
| 125 7   6  | 18  24  9  | 3   458 48 |
'------------'------------'------------'

What simple alternative is available at this stage?

I found nothing better than forcing chains for r1c9<>7, r2c2<>2, [edit: r2c8<>4, r3c1<>7 and r3c7<>2 ... any] of which solves the puzzle.

Ruud, how did you eliminate the 2s from r7c8 and r8c5?

TIA, Ron
Last edited by ronk on Wed Feb 22, 2006 2:57 pm, edited 1 time in total.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby Ruud » Wed Feb 22, 2006 6:28 pm

ronk wrote:Ruud, how did you eliminate the 2s from r7c8 and r8c5?

There is an XYZ-wing in R8C8 with pincers R8C7 and R2C8 that eliminates the 2 at R7C8. Locked candidates takes care of R8C5.

Carcul wrote:[r9c5](-4-[r8c5|r9c8])-4-[r9c9](-8-[r9c8])(-8-[r9c4]-1-[r9c1])-8-[r7c8|r9c8]=8=[r4c8](-8-[r4c9])-8-[r4c2](=8=[r5c1|r6c1]-8-[r3c1])(-4-[r1c2]-9-[r1c5]-6-[r1c9])-4-[r4c9](r4c9=7)-7-[r5c7]-4-[r8c7]=4=[r8c8]-4-[r2c8](-2-[r2c2])-2-[r9c8]-5-[r9c1]-2-[r3c1]=2=[r3c2]=8=[r2c2]-8-[r2c6]={Almost Unique Rectangle: r1c6|r2c6|r1c9|r2c9}=8|7=[r1c9](r1c9=7).

So, if r9c5=4 then we would end up with two "7s" in column 9 (in r1c9 and r4c9). So, r9c5<>4 and that solve the puzzle.

A two step solution:

1. [r1c2](-4-[r2c3]-1-[r7c3]-5-[r9c1])-4-[r4c2](r4c2=8)-8-[r5c1|r6c1]-1-[r9c1]-2-[r9c5]-4-[r9c9]-8-[r7c8|r9c8]=8=[r4c8](r4c8=8), => r1c2<>4.

2. [r9c5](-4-[r8c5])-4-[r9c9]=4=[r1c9]-4-[r2c8](-2-[r3c7]=2=[r8c7]-2-[r8c5])-2-[r2c2]=2=[r7c2]-2-[r7c6]-7-[r8c5],

which means that, if r9c5=4 then r8c5 would be an empty cell. So r9c5<>4 and that solve the puzzle.

That does not sound like a "simple" alternative to me...

Carcul wrote:[r5c7]-7-[r4c9|r5c9]=7=[r1c9]-7-[r1c3]=7=[r5c3]-7-[r5c7], => r5c7<>7.

But this is a nice alternative, thanks!

Too bad there's no simple alternative for the ending forcing chain.

Ruud.
Ruud
 
Posts: 664
Joined: 28 October 2005

PreviousNext

Return to Advanced solving techniques