## Short/Comlicated solution to top50000 #8

Advanced methods and approaches for solving Sudoku puzzles

### Short/Comlicated solution to top50000 #8

Top50000 #8:

Edit: Images added for easier reading.A few typos fixed

Code: Select all
`*-----------*|...|.7.|5.8||.9.|..8|3..||51.|.2.|...||---+---+---||8..|...|...||.45|.6.|98.||...|...|..4||---+---+---||...|.9.|.56||..1|4..|.7.||4.7|.5.|...|*-----------*`

After basic logic and coloring:
Code: Select all
`*-----------------------------------------------------------------------------*| 236     23      2346    | 169     7       149     | 5       12469   8       || 7       9       246     | 5       14      8       | 3       1246    12      || 5       1       8       | 369     2       349     | 67      469     79      ||-------------------------+-------------------------+-------------------------|| 8       237     2369    | 12379   134     123479  | 1267    1236    5       || 123     4       5       | 1237    6       1237    | 9       8       1237    || 1236    237     2369    | 123789  138     5       | 1267    123     4       ||-------------------------+-------------------------+-------------------------|| 23      8       23      | 17      9       17      | 4       5       6       || 9       5       1       | 4       38      6       | 28      7       23      || 4       6       7       | 238     5       23      | 18      139     139     |*-----------------------------------------------------------------------------*`

Solution:

1.[r3c4](-9-[r1c6])(-9-[r3c6])-9-[r3c789]=9|3=[(r3c6)]-3-[r579c6]=3|4=[(r1c6)]-4-[r1c123]=4|1=[r1c4]=6=[r3c4] => [r3c4]<>9

Blue=weak link, Red=strong link, Green boxes=grouped nodes/ALS

2. [r1c8](-6-[r1c4]=6=[r3c4]=3=[r3c6](-3-[r5c6])-3-[r9c6]-2-[(r5c6)]-6-[r1c1]=6=[r6c1]=1=[r5c1]-1-[(r5c6)]-7-[r5c9]=7=[r3c9]-7-[r3c7]-6-[r1c8] => [r1c8]<>6

Edit: The following loop is written inconsistently, although the deduction is true if it is interpreted as an implication network that eliminates all candidates from [r5c6]. A corrected loop notation is written a few posts down.

3. [r2c3]-6-[r1c1|r1c3](=6|19=[r1c8])(=6|19=[r1c6])=6=[r1c4]-6-[r3c4]-3-[r4569c4]-{ANL:[r8c9]-3-[r8c5]=3=[r9c6]-3-[r5c6]=3=[r5c9]-3-[r8c9]}-3-[r8c9](-2-[r8c7]-8-[r8c5]-3-[r9c6]-2-[r5c6])(-2-[r5c9])-2-[r2c9](-1-[(r5c9)])
-1-[(r1c8)](-9-[(r1c6)]-1-[r7c6]-7-[(r5c6)])-9-[r3c9]-7-[(r5c9)]-3-[(r5c6)]-1-[r5c1]=1=[r6c1]=6=[(r1c1)]-6-[r2c3] => [r2c3]<>6

Blue=weak link, Red=strong link, Black=weak link indicating elimination from almost nice loop in the middle(ANL), red dots on ends of weak links show the implicating end in the loop notation

And the puzzle is solved with singles after that.

Loop 3 separated by steps and color coded for multiple references:

3. [r2c3]-6-[r1c1|r1c3]
(=6|19=[r1c8])
(=6|19=[r1c6])
=6=[r1c4]-6-[r3c4]-3-[r4569c4]-{ANL:[r8c9]-3-[r8c5]=3=[r9c6]-3-[r5c6]=3=[r5c9]-3-[r8c9]}
-3-[r8c9]
(-2-[r8c7]-8-[r8c5]-3-[r9c6]-2-[r5c6])
(-2-[r5c9])
-2-[r2c9]
(-1-[(r5c9)])
-1-[(r1c8)]
(-9-[(r1c6)]-1-[r7c6]-7-[(r5c6)])
-9-[r3c9]-7-[(r5c9)]-3-[(r5c6)]-1-[r5c1]=1=[r6c1]=6=[(r1c1)]-6-[r2c3] => [r2c3]<>6

Is there anything wrong with such a complicated mess of multiple inferences?
Last edited by doduff on Wed Jun 14, 2006 9:04 pm, edited 5 times in total.
doduff

Posts: 32
Joined: 29 May 2006

### Re: Short/Comlicated solution to top50000 #8

doduff wrote:Solution:

1.[r3c4](-9-[r1c6])(-9-[r3c6])-9-[r3c7879]=9|3=[(r3c6)]-3-[r579c6]=3|4=[(r1c6)]-4-[r1c123]=4|1=[r1c4]=6=[r3c4] => [r3c4]<>9
...
Is there anything wrong with such a complicated mess of multiple inferences?

Well, I got to this first error net, I'am not quite sure about it. Perhaps its wrong or perhaps I need something explained what you do.

I suppose you start the error net by assuming that r3c4=9. At this point: -9-[r3c7879] I suppose you mean -9-[r3c89] that you suppress the candidates 9 in r3c8 and r3c9 - am I right?

When you go further you have a strong link =9, but where? The only strong link I can find here is like this [r3c89]=9=[r1c8]. Or how does this suppression of the 9-candidates in r3c89 cause r3c6 to be 3. This notation with double brackets [(r3c6)] I cannot recall to have seen before. What do you mean by that?

Further you refer to -3-[r579c6] but the candidate 3 in [r7c6] is already removed.

/Viggo
Viggo

Posts: 60
Joined: 21 April 2006

Edit: Images added above for easier reading and a typo fixed
Blue=weak links, Red=strong links, green boxes around grouped nodes/almost locked sets, black dashed line is a weak link derived from an almost nice loop.

Viggo wrote:Well, I got to this first error net, ...

I am pretty sure it is a multiple implication nice loop. But I have a feeling that any error net can be written as a nice loop(with multiple implications possibly) and vice versa. The second loop can definitely be written in reverse, I am not too sure about loops 1 and 3... I haven't been able to write them in reverse yet. I have another feeling that any loop should be able to be written either direction. So maybe they should be considered Error nets. I haven't been able to see loop 3 as an error net, but it seems to work as a loop with a prefered direction.

Viggo wrote:I suppose you start the error net by assuming that r3c4=9. At this point: -9-[r3c7879] I suppose you mean -9-[r3c89] that you suppress the candidates 9 in r3c8 and r3c9 - am I right?

I am simply indicating a weak inference on 9 between r3c4 and the grouped node/almost locked set r3c7, r3c8, r3c9.

Viggo wrote:When you go further you have a strong link =9, but where? The only strong link I can find here is like this [r3c89]=9=[r1c8]. Or how does this suppression of the 9-candidates in r3c89 cause r3c6 to be 3. This notation with double brackets [(r3c6)] I cannot recall to have seen before. What do you mean by that?

I assume you are refering to: -9-[r3c789]=9|3=[(r3c6)]-3-

r3c789 is an almost locked set, and if it does not contain 9 then it is locked on 467 thus eliminating the 4 from r3c6. I use the extra parenthesis on r3c6 to indicate that there was an implication on that cell previously in the chain. I have seen others do this. I think it makes the notation easier to follow. Removing the 4 from r3c6 is not enough to make it 3, you need the multiple inference and the extra brackets help the reader to remember that there was an inference on that cell earlier.

Viggo wrote:Further you refer to -3-[r579c6] but the candidate 3 in [r7c6] is already removed.

Again I have seen others do this. And if you think about it, why would it matter if you remove a candidate that is already not there? I have a theory that you could just add candidates to cells in order to make chains and even use solved cells theoretically, but they would probably not result in any implications.

Thanks, for commenting on the errors. It always helps to have others look at your work to see if it actually makes sense.
doduff

Posts: 32
Joined: 29 May 2006

Hi doduff,

nice deductions.

I dont care much about the notation, as long as i can follow it.

But please note, that Mozilla/Firefox browsers dont wrap lines at the hyphen, so that we have to shift the window right and left to be able to read long chains. So please break your lines like Carcul does it now.

I dont load pictures for various reasons, so be aware also, that not all people would see them. Maybe therefore in the ANL in step 3 i am missing that r5c1<>3 because of the 23-pair in r17c1 for getting r5c9=3 (there is also a typo there, should say [r5c6]=3). For me it is also easier to see the (almost) empty rectangle, that eliminates 3 in r9c6. Carcul, would you write it as an ATILA (or AER) ?
ravel

Posts: 998
Joined: 21 February 2006

Regarding the deductions of Doduff I have the following comment:

They are correct, but you should make the notation more clear: for example, as Ravel as pointed, in step 3 you don't write explicitily why r5c1 is not "3".

Ravel wrote:Carcul, would you write it as an ATILA?

No.

Carcul
Carcul

Posts: 724
Joined: 04 November 2005

I'm sorry that I don't know the notation, but maybe someone will fill in the notation for me. This solution, is for the original puzzle.

Code: Select all
`r2c4    =  5     Hidden Singler3c3    =  8     Hidden Singler6c6    =  5     Hidden Singler4c9    =  5     Hidden Singler7c7    =  4     Hidden Singler8c2    =  5     Hidden Singler2c1    =  7     Hidden Singler8c1    =  9     Hidden Singler8c6    =  6     Hidden Singler9c2    =  6     Hidden Singler7c2    =  8     Hidden Singler7      -  23    Naked  Pair    b8  -  17    Naked  Pair    b1  -  3     Locked Candidate (1)    b8  -  2     Locked Candidate (1)r9c6    =  2     [r9c6]=3 => [r5]=INVALIDr3c7    =  7     [r3c7]=6 =>      INVALIDr3c9    =  9     Naked  Singler9c8    =  9     Hidden Singler5c9    =  7     Hidden Single    b3  -  6     Locked Candidate (1)r3c6    ~  1     XY-Wing                 Naked/Hidden Singles remain[r9c6]=3 => [r8c9]=3         => [r3c4]=3 => [r1c4]=6 => [r6c1]=6 => [r5c1]=1 => [r5]=INVALID[r3c7]=6 => spaghetti nightmare in forced-singles chains that result in an invalid puzzle`
daj95376
2014 Supporter

Posts: 2624
Joined: 15 May 2006

daj95376 wrote:[r3c7]=6 => spaghetti nightmare ...

This is about as complicated as doduffs 3rd step, e.g. this way:
Code: Select all
`*-----------------------------------------------------------------------------*| 236     23      2346    | 169     7       149     | 5       12469   8       || 7       9       246     | 5       14      8       | 3       1246    12      || 5       1       8       | 369     2       349     | 67      469     79      ||-------------------------+-------------------------+-------------------------|| 8       237     2369    | 12379   134     13479   | 1267    1236    5       || 123     4       5       | 1237    6       137     | 9       8       1237    || 1236    237     2369    | 123789  138     5       | 1267    123     4       ||-------------------------+-------------------------+-------------------------|| 23      8       23      | 17      9       17      | 4       5       6       || 9       5       1       | 4       38      6       | 28      7       23      || 4       6       7       | 38      5       2       | 18      139     139     |*-----------------------------------------------------------------------------*`
r3c7=6 => r3c9=7 => r9c9=9 (=> r9c9<>13)
r3c7=6 => (r2c8<>6) r2c3=6 => (r1c12<>6) r1c4=6 => (r1c1<>6->r17c1=23) r5c1=1 => (r5c9<>1) r2c9=1 => r2c5=4 => (r1c4=6) r1c6=1 => r7c6=7 => (r5c1=1) r5c6=3 => (r3c6<>3) r3c4=3
r5c6=3 => (r5c9<>3) r8c9=3
no 3 for box 8 left => r3c7=7

btw, i had 2 xy-wings after that.
ravel

Posts: 998
Joined: 21 February 2006

Ah.. I do not see r5c1<>3 either... there is the mistake!!!!

I know its true, but putting a multiple inference in that direction messes up the rest of the loop by making a different deduction I think.

Thanks for the comments, I will work it out better!
doduff

Posts: 32
Joined: 29 May 2006

ravel,

Thank You for taking my output and making it into a proper solution sequence!!!

My solver gets to the following puzzle state and resolves the XY-Wing in B(lue)+G(reen) by removing the 1's from P(ink). Is it possible that I'm doing something wrong ... or that you are dividing up the P(ink) deletions into two operations?

Code: Select all
`*-----------------------------------------------------------------------------*| 236     23      2346    | 169     7       149-P   | 5       1246    8       || 7       9       246     | 5       14-G    8       | 3       1246    12      || 5       1       8       | 36      2       34-B    | 7       46      9       ||-------------------------+-------------------------+-------------------------|| 8       237     2369    | 12379   134-P   13479   | 126     123     5       || 123     4       5       | 123     6       13-G    | 9       8       7       || 1236    237     2369    | 123789  138-P   5       | 126     123     4       ||-------------------------+-------------------------+-------------------------|| 23      8       23      | 17      9       17      | 4       5       6       || 9       5       1       | 4       38      6       | 28      7       23      || 4       6       7       | 38      5       2       | 18      9       13      |*-----------------------------------------------------------------------------*`

As a side note, I realize now just how important it was to set r9c6=2.
daj95376
2014 Supporter

Posts: 2624
Joined: 15 May 2006

Hi Doduff

You got my quick answer late last night, and now you have got comments from more experts, so I have not much to add. And thank you for your detailed explanations.

I like the graphics you supported, which helped me a lot to see what you did. But the graphics may be slow to load for many users, so you have to bear that in mind, as Ravel already has written. For your informations "into sudoku" is a nice little program, which has an easy possiblity to draw links and make the graphics. My oppinion is, that it is easier to use, and the graphics is better than "simple sudoku". It can be downloaded from here.

In the first step, you can use the strong link, [r3c4]=3=[r3c6] directly instead of using the ALS to the right. When you assume, that r3c4=9 it cannot be 3.

/Viggo
Viggo

Posts: 60
Joined: 21 April 2006

Great point! I didn't even think about that strong link on 3. That makes the chain much better!

Thanks!

Ya, i like 'into sudoku', it sometimes acts buggy, but it is nice that it can find chains and other more advanced methods. It would be cool if everyone who made these programs would colaborate and make a super program.

Peace.doduff
doduff

Posts: 32
Joined: 29 May 2006

Loop 3 fixed(and separated into lines):

[r2c3]-6-[r1c123|r7c1](-3-[r5c1])(=6|24-[r1c6|r1c8])
=6=[r1c4]-6-[r3c4]-3-[r4569c4]-
{Nice Loop:[r8c9]-3-[r8c5]=3=[r9c6]-3-[r5c6]=3=[r5c9]-3-[r8c9]}
-3-[r8c9](-2-[r8c7]-8-[r8c5]-3-[r9c6]-2-[r5c6])(-2-[r5c9])
-2-[r2c9](-1-[(r5c9)])
-1-[(r1c8)](-9-[(r1c6)]-1-[r7c6]-7-[(r5c6)])
-9-[r3c9]-7-[(r5c9)]-3-[(r5c6)]-1-[(r5c1)]=1=[r6c1]=6=[(r1c1)]-6-[r2c3] => [r2c3]<>6

It might be easier to understand if it was written as an error net though.

Notice the link: ...(=6|24-[r1c6|r1c8])... I feel like that explains what is happening better. I still don't totally understand how best to notate certain chains. I usually think in terms of weak implications.

ravel wrote:nice deductions.

I dont care much about the notation, as long as i can follow it.
Thanks. It took a lot of hard work! I am really into notation, that's just one of my things.
Last edited by doduff on Wed Jun 14, 2006 9:06 pm, edited 2 times in total.
doduff

Posts: 32
Joined: 29 May 2006

Another interesting pattern in the puzzle is this:

[r23c3]=6, [r1c8]=6|9, [r3c46]=9 all create the same almost unique patterns:

One example:
[r3c6](-9-[r1c4|r3c4])
-9-[r1c4|r2c3]=9|6=[r1c4]-6-[r1c1|r1c3]=6=[r2c3]-6-[r46c3]
-{Almost Unique Patterns:[r1c12|r4c23|r6c13], [r1c12|r6c23|r6c13]}

But I wasn't able to make any eliminations from this. Can anyone find something to do with this uniqueness pattern? I know that I can eliminate 7 and 9 from all other cells of box 4 and I could do the same for rows 4 and 6 if the was a bivalue 79 cell in them, but it just isn't there. Still It is interesting to see this pop up at all.

peace.doduff
doduff

Posts: 32
Joined: 29 May 2006

### Another Solution

Here is another solution, using Almost Nice Loops:

Code: Select all
` *-----------------------------------------------------------* | 236   23   2346 | 169     7    149    | 5     12469  8    | | 7     9    246  | 5       14   8      | 3     1246   12   | | 5     1    8    | 369     2    349    | 67    469    79   | |-----------------+---------------------+-------------------| | 8     237  2369 | 12379   134  123479 | 1267  1236   5    | | 123   4    5    | 1237    6    1237   | 9     8      1237 | | 1236  237  2369 | 123789  138  5      | 1267  1236   4    | |-----------------+---------------------+-------------------| | 23    8    23   | 17      9    17     | 4     5      6    | | 9     5    1    | 4       38   6      | 28    7      23   | | 4     6    7    | 238     5    23     | 18    139    139  | *-----------------------------------------------------------*`

[r2c5](=1=[r46c5]-1-[r5c46])-4-[r4c5]=4=[r4c6]=9=[r46c4]-9-[r3c4]=
{Nice Loop: [r5c1]=1=[r5c9]=7=[r3c9]-7-[r3c7]-6-[r2c8]=6=[r2c3]-6-
[r1c1]=6=[r6c1]=1=[r5c1]}=1=[r5c1]-1-[r5c9]-{Nice Loop: [r9c9]=9=
[r3c9]=7=[r5c9]-7-[r5c46]=(AUR: r59c46)=7|8=[r9c4]-8-[r9c7]-1-
[r9c9]}-1-[r9c9]=1=[r2c9]-{Nice Loop: [r4c5]=1=[r6c5]=8=[r8c5]=3=
[r8c9]=2=[r5c9]-2-[r5c46]-3-[r4c5]}-3-[r4c5]-{Nice Loop: [r8c9]-3-[r8c5]
=3=[r6c5]-3-[r5c46]=3=[r5c9]-3-[r8c9]}-3-[r8c9](-2-[r5c9])=3=[r8c5]-3-
[r9c6]-2-[r5c6]-{Nice Loop: [r3c4]=3=[r3c6]-3-[r5c6]-7-[r5c9]=7=[r3c9]-
7-[r3c7]-6-[r3c4]}-6-[r3c4]-3-[r3c6]=3=[r5c6]-3-[r5c9]-7-[r3c9]=7=
[r3c7]=6=[r3c8]=4=[r3c6]-4-[r2c5],

which implies r2c5<>4 and that solve the puzzle.

Carcul
Last edited by Carcul on Fri Jun 16, 2006 4:39 am, edited 1 time in total.
Carcul

Posts: 724
Joined: 04 November 2005

daj95376 wrote:... or that you are dividing up the P(ink) deletions into two operations?

You are right, of course, i dont know why, but i counted the 2 eliminations as 2 xy-wings (seems i missed one the first time).
ravel

Posts: 998
Joined: 21 February 2006

Next