A specific application of Whips

Advanced methods and approaches for solving Sudoku puzzles

A specific application of Whips

Postby RichardGoodrich » Thu Nov 07, 2013 2:54 am

I need help with a specific application of Whips. I have Denis Berthier's book: "The Hidden Logic of Sudoku (Second Edition)
Known as HLOS2 in the sequel (See Mr. Bethier I have been reading your book since I have quite boldly plagerized that little phrase of yours about the 'sequel')

I have been working through it and even working on some Python Code to create the 4 grid transformations. At this point I mainly use the Hodoku player for my recreational Sudoku playing and for working through the examples in HLOS2. The struggle I wish to discuss by example is on p344 of HLOS2 XXII.8.2. Lasos (rl-lassos and lr-lassos) This is a very short 3/4 of a page - which in my mind is too short to due justice to this subject. Contradiction is mentioned, but I seem to be missing any kind of 'proof' or logic development as is SO WELL done in the rest of the book. So I reference the following URL and the section shown. I took that puzzle as published in the sequel (love that word!) and started the TRACE Show below:

http://denis.berthier.pagesperso-orange ... Whips.html
4.1) First whip example

Code: Select all
.16..5....7.4.9.....98....4.4.....29...54.....2..6.1.8..1....3.......6.5....8....


Code: Select all
.----------------------.-----------------------.--------------------.
| 2348     1     6     | 237     237    5      | 23789  789    237  |
| 2358     7     2358  | 4       123    9      | 2358   1568   1236 |
| 235      35    9     | 8       1237   12367  | 2357   1567   4    |
:----------------------+-----------------------+--------------------:
| 135678   4     3578  | 137     137    1378   | 357    2      9    |
| 136789   3689  378   | 5       4      12378  | 37     67     367  |
| 3579     2     357   | 379     6      37     | 1      457    8    |
:----------------------+-----------------------+--------------------:
| 2456789  5689  1     | 2679    2579   2467   | 24789  3      27   |
| 234789   389   23478 | 12379   12379  12347  | 6      14789  5    |
| 2345679  3569  23457 | 123679  8      123467 | 2479   1479   127  |
'----------------------'-----------------------'--------------------'


My columnar TRACE starts here --> S# -ing is the actual operation taken on the grid

s01 r1c1=4h
s02 r6c8=4h
s03 c5r7=5h
s04 r5c6=2h
s05 b6s1=5h
s06 b2s9=6h
s07 c6r4=8h
s08 r4c1=6h
s09 r5c1=1h
s10 r5c2=9h
s11 r6c4=9h
s12 c5r8=9h
s13 r5c3=8h
s14 r2c1=8h

Code: Select all
.-------------------.-------------------.------------------.
| 4      1    6     | 237    237   5    | 23789  789  237  |
| 8      7    235   | 4      123   9    | 23     156  1236 |
| 235    35   9     | 8      1237  6    | 237    157  4    |
:-------------------+-------------------+------------------:
| 6      4    37    | 137    137   8    | 5      2    9    |
| 1      9    8     | 5      4     2    | 37     67   367  |
| 357    2    357   | 9      6     37   | 1      4    8    |
:-------------------+-------------------+------------------:
| 279    68   1     | 267    5     47   | 24789  3    27   |
| 237    38   2347  | 1237   9     1347 | 6      178  5    |
| 23579  356  23457 | 12367  8     1347 | 2479   179  127  |
'-------------------'-------------------'------------------'


s15 r1c4-2 BiC b2c5
BiC k1b8c6 <--- state of puzzle that leads to the s# lines between the dashed line
-------------->
s16 c4r8-1
s17 c4r9-1
--------------<
s18 r4c4=1h
H2iR k89r1c78
-------------->
s19 r1c7-2
s20 r1c7-3
s21 r1c7-7
s22 r1c8-7
-------------<

Code: Select all
.-------------------.------------------.------------------.
| 4      1    6     | 37    237   5    | 89     89   237  |
| 8      7    235   | 4     123   9    | 23     156  1236 |
| 235    35   9     | 8     1237  6    | 237    157  4    |
:-------------------+------------------+------------------:
| 6      4    37    | 1     37    8    | 5      2    9    |
| 1      9    8     | 5     4     2    | 37     67   367  |
| 357    2    357   | 9     6     37   | 1      4    8    |
:-------------------+------------------+------------------:
| 279    68   1     | 267   5     47   | 24789  3    27   |
| 237    38   2347  | 237   9     1347 | 6      178  5    |
| 23579  356  23457 | 2367  8     1347 | 2479   179  127  |
'-------------------'------------------'------------------'


(s23 N3iB n237b3s347)

Now these numbered lines withOUT the s-prefix are my way of representing a chain in a column presentation. I use the parity indication with the 'a' and 'A' similar to the way Robert Hanson does on his sudoku-assitant and development and presentation of 3D-Medusa

01 k3r4c5=a
02 k3r4c3=A
--
03 k3r2c3=.

So the above is my first 'wrestling' with a 'lasso' as discussed on p 344 of HLOS2 and more specifically the puzzle example on the URL indicated in the prequel (Aha a prequel! - great terminology BTW!)

I just FAIL to understand the LOGIC. I do verify that the Hoduku player validates the Lasso conclusion. However, I fail to see the logic and I also fail to find the NRCZT-Chain that would lead to this conclusion. If I understand what Denis Bethier says both on p344 of HLOS2 and in the WEB URL referenced in the prequel of this post, then there MUST be a LONGER chain that "subsumes' (if that is the right word) this partial chain called a lasso. Would anyone care to show me mercy and point out my blind spots or whatever is causing me to NOT see the logic of this lasso in particular and by extension of the logic of the general case!

Shalom, Richard Goodrich on a rainy evening is the metropolis of Cash, TX USA
GrandPaBig
RichardGoodrich
 
Posts: 40
Joined: 12 December 2012
Location: Cash, Texas USA

Re: A specific application of Whips

Postby denis_berthier » Thu Nov 07, 2013 5:04 pm

Hi Richard,

Lassos extend nrczt-chains by allowing a contradiction to occur even in the absence of a z-candidate in the final 2D-cell.
The logic of nrczt-chains, lassoes and whips is the same. If the target z is true, then:
- every left-linking candidate is false,
- every right-linking candidate is true,
- every z- or t- candidate is false.
As a result, the last 2D-cell has no candidate.
Therefore Z can't be true.

(A lasso is nor a partial pattern, it's a full one)
denis_berthier
2010 Supporter
 
Posts: 1253
Joined: 19 June 2007
Location: Paris

Re: A specific application of Whips

Postby RichardGoodrich » Fri Nov 08, 2013 4:04 am

denis_berthier wrote:Hi Richard,

Lassos extend nrczt-chains by allowing a contradiction to occur even in the absence of a z-candidate in the final 2D-cell.
The logic of nrczt-chains, lassoes and whips is the same. If the target z is true, then:
- every left-linking candidate is false,
- every right-linking candidate is true,
- every z- or t- candidate is false.
As a result, the last 2D-cell has no candidate.
Therefore Z can't be true.

(A lasso is nor a partial pattern, it's a full one)


OK, I tried to reference an image - but could not figure out how so ref the following diagram (from end of my orig post)

Code: Select all
.-------------------.------------------.------------------.
| 4      1    6     | 37    237   5    | 89     89   237  |
| 8      7    235   | 4     123   9    | 23     156  1236 |
| 235    35   9     | 8     1237  6    | 237    157  4    |
:-------------------+------------------+------------------:
| 6      4    37    | 1     37    8    | 5      2    9    |
| 1      9    8     | 5     4     2    | 37     67   367  |
| 357    2    357   | 9     6     37   | 1      4    8    |
:-------------------+------------------+------------------:
| 279    68   1     | 267   5     47   | 24789  3    27   |
| 237    38   2347  | 237   9     1347 | 6      178  5    |
| 23579  356  23457 | 2367  8     1347 | 2479   179  127  |
'-------------------'------------------'------------------'


Here is what I do NOT get:
n3r4c5=a tag and n3r4c3=A tag. n3r2c3=a tag. So let me consider the case that gives me problems:

r4c5<>3 => r4c3=3 => r2c3<>3

Now r4c3=3 => r4c5<>3 and r3c3<>3 but how does that imply r2c5<>3, I know if I run things out
in the sense of a forcing chain I will encounter a contradiction eventually for I have done that.

However, I just don't see that from this "lasso" (the state of the three cells that constitute that lasso)
With r2c3<>3 there are three cells in r2 that could be a 3 - how can we say anything about which one
in row 2 it will be. Obviously I am missing something and am frustrated!

I will go back and study your response again - maybe the scales will fall from my eyes?
Thanks for responding - Shalom!
GrandPaBig
RichardGoodrich
 
Posts: 40
Joined: 12 December 2012
Location: Cash, Texas USA

Re: A specific application of Whips

Postby RichardGoodrich » Fri Nov 08, 2013 4:36 am

denis_berthier wrote:Hi Richard,

Lassos extend nrczt-chains by allowing a contradiction to occur even in the absence of a z-candidate in the final 2D-cell.
The logic of nrczt-chains, lassoes and whips is the same. If the target z is true, then:
- every left-linking candidate is false,
- every right-linking candidate is true,
- every z- or t- candidate is false.
As a result, the last 2D-cell has no candidate.
Therefore Z can't be true.

(A lasso is nor a partial pattern, it's a full one)


Another attempt - By your logic above z=3. n3r2c5 is our target.

01 n3r4c5(a) <-- left-linking candidate is false
02 n3r4c3(A) <-- right linking candidate is true
--
03 n3r2c3(a) <-- left-linking candidate is false

Now my issue is how can I say our target is the next right linking candidate there are three choices for that?
But yes I see that if you make n3r2c5 the right-linking candidate it is true, but as it link back to where we
started then I guess as a left-linking candidate it would NOT be false and that is a contradiction - but it 'bugs'
me somehow in that completing that loop violates your principle of how you defined chains to start with.

So in this case how do I construct a lasso or chain that consistently forces the target (n3r2c5) to be false.

And let me ask for clarification. Anything that the target of lasso proves to be false did you say that there
must be a chain which also proves that - but is going to be longer than the lasso? I am having trouble
finding that chain also! Confused but not liking it!
GrandPaBig
RichardGoodrich
 
Posts: 40
Joined: 12 December 2012
Location: Cash, Texas USA

Re: A specific application of Whips

Postby denis_berthier » Fri Nov 08, 2013 6:10 am

Hi Richard,

Could you write in my usual syntax the pattern you want to discuss ?

Is it n3r4{c5 c3} - r2c3{n3 .} ==> r2c5 <> 3 ????
denis_berthier
2010 Supporter
 
Posts: 1253
Joined: 19 June 2007
Location: Paris

Re: A specific application of Whips

Postby RichardGoodrich » Fri Nov 08, 2013 3:12 pm

denis_berthier wrote:Hi Richard,

Could you write in my usual syntax the pattern you want to discuss ?

Is it n3r4{c5 c3} - r2c3{n3 .} ==> r2c5 <> 3 ????


Sure, I will give it a shot. BTW, I am assuming what you call braids is NOT the same as what is found in this link?:

[url]
http://sudopedia.enjoysudoku.com/Braid_Analysis.html
[/url]
GrandPaBig
RichardGoodrich
 
Posts: 40
Joined: 12 December 2012
Location: Cash, Texas USA

Re: A specific application of Whips

Postby RichardGoodrich » Fri Nov 08, 2013 3:20 pm

denis_berthier wrote:Hi Richard,

Could you write in my usual syntax the pattern you want to discuss ?

Is it n3r4{c5 c3} - r2c3{n3 .} ==> r2c5 <> 3 ????


Yes, that is your syntax for the situation we have been discussing for which I am having "cognitive dissonance" :|

Code: Select all
.-------------------.------------------.------------------.
| 4      1    6     | 37    237   5    | 89     89   237  |
| 8      7    235   | 4     123   9    | 23     156  1236 |
| 235    35   9     | 8     1237  6    | 237    157  4    |
:-------------------+------------------+------------------:
| 6      4    37    | 1     37    8    | 5      2    9    |
| 1      9    8     | 5     4     2    | 37     67   367  |
| 357    2    357   | 9     6     37   | 1      4    8    |
:-------------------+------------------+------------------:
| 279    68   1     | 267   5     47   | 24789  3    27   |
| 237    38   2347  | 237   9     1347 | 6      178  5    |
| 23579  356  23457 | 2367  8     1347 | 2479   179  127  |
'-------------------'------------------'------------------'
GrandPaBig
RichardGoodrich
 
Posts: 40
Joined: 12 December 2012
Location: Cash, Texas USA

Re: A specific application of Whips

Postby denis_berthier » Fri Nov 08, 2013 3:30 pm

RichardGoodrich wrote:
denis_berthier wrote:Hi Richard,

Could you write in my usual syntax the pattern you want to discuss ?

Is it n3r4{c5 c3} - r2c3{n3 .} ==> r2c5 <> 3 ????


Yes, that is your syntax for the situation we have been discussing for which I am having "cognitive dissonance"


OK, but then I don't understand your problem. This pattern is a very simple whip[2]. If the target was true, there would be no candidate for cell r2c3.
denis_berthier
2010 Supporter
 
Posts: 1253
Joined: 19 June 2007
Location: Paris

Re: A specific application of Whips

Postby denis_berthier » Fri Nov 08, 2013 3:31 pm

RichardGoodrich wrote:I am assuming what you call braids is NOT the same as what is found in this link?:
[url]
http://sudopedia.enjoysudoku.com/Braid_Analysis.html
[/url]


Right. They are unrelated.
denis_berthier
2010 Supporter
 
Posts: 1253
Joined: 19 June 2007
Location: Paris

Re: A specific application of Whips

Postby RichardGoodrich » Fri Mar 28, 2014 3:26 am

denis_berthier wrote:
RichardGoodrich wrote:
denis_berthier wrote:Hi Richard,

Could you write in my usual syntax the pattern you want to discuss ?

Is it n3r4{c5 c3} - r2c3{n3 .} ==> r2c5 <> 3 ????


Yes, that is your syntax for the situation we have been discussing for which I am having "cognitive dissonance"


OK, but then I don't understand your problem. This pattern is a very simple whip[2]. If the target was true, there would be no candidate for cell r2c3.


I rechecked this and I 'think' I see my error it is r3c5<>3 we are trying to eliminate so that n3r2c3 - n3r3c12 => r3c5<>3
I was trying to link n3r2c3 with other cells in row2 - was that my mistake? Or does this become a simple chain as you define them?
GrandPaBig
RichardGoodrich
 
Posts: 40
Joined: 12 December 2012
Location: Cash, Texas USA

Re: A specific application of Whips

Postby denis_berthier » Fri Mar 28, 2014 9:12 am

Hi Richard

Here is the full solution:

Hidden Text: Show
Code: Select all
singles ==> r7c5 = 5, r8c5 = 9, r6c4 = 9, r6c8 = 4, r4c7 = 5, r5c6 = 2, r5c1 = 1, r5c2 = 9, r4c1 = 6, r5c3 = 8, r4c6 = 8, r3c6 = 6, r1c1 = 4, r2c1 = 8
whip[1]: c5n2{r1 .} ==> r1c4 ≠ 2
whip[1]: c6n1{r8 .} ==> r8c4 ≠ 1
whip[1]: c6n1{r9 .} ==> r9c4 ≠ 1
hidden-single-in-a-column ==> r4c4 = 1
whip[2]: b3n8{r1c7 r1c8} - b3n9{r1c8 .} ==> r1c7 ≠ 7, r1c7 ≠ 3, r1c7 ≠ 2
whip[2]: b3n8{r1c8 r1c7} - b3n9{r1c7 .} ==> r1c8 ≠ 7
whip[2]: b1n3{r3c2 r2c3} - r4n3{c3 .} ==> r3c5 ≠ 3
whip[3]: b3n6{r2c9 r2c8} - b3n1{r2c8 r3c8} - b3n5{r3c8 .} ==> r2c9 ≠ 3
whip[3]: c9n6{r2 r5} - c9n3{r5 r1} - r2c7{n3 .} ==> r2c9 ≠ 2
whip[3]: b3n5{r3c8 r2c8} - b3n1{r2c8 r2c9} - b3n6{r2c9 .} ==> r3c8 ≠ 7
whip[3]: r5c7{n7 n3} - c9n3{r5 r1} - b3n7{r1c9 .} ==> r9c7 ≠ 7, r7c7 ≠ 7
whip[3]: c9n3{r1 r5} - r5c7{n3 n7} - b3n7{r3c7 .} ==> r1c9 ≠ 2
hidden-single-in-a-row ==> r1c5 = 2
whip[1]: c9n2{r9 .} ==> r7c7 ≠ 2, r9c7 ≠ 2
whip[3]: r3n2{c1 c7} - b3n7{r3c7 r1c9} - r7c9{n7 .} ==> r7c1 ≠ 2
whip[3]: r8n1{c6 c8} - b9n8{r8c8 r7c7} - r7n4{c7 .} ==> r8c6 ≠ 4
hidden-single-in-a-row ==> r8c3 = 4
whip[4]: r1c9{n7 n3} - r2c7{n3 n2} - c3n2{r2 r9} - b9n2{r9c9 .} ==> r7c9 ≠ 7
naked-single ==> r7c9 = 2
whip[4]: b8n1{r8c6 r9c6} - r9c9{n1 n7} - r1n7{c9 c4} - c4n3{r1 .} ==> r8c6 ≠ 3
whip[2]: b4n3{r6c3 r6c1} - c6n3{r6 .} ==> r9c3 ≠ 3
whip[3]: r9n6{c2 c4} - c4n2{r9 r8} - r8n3{c4 .} ==> r9c2 ≠ 3
whip[4]: r8c6{n1 n7} - r7c4{n7 n6} - r7c2{n6 n8} - r8n8{c2 .} ==> r8c8 ≠ 1
hidden-single-in-a-row ==> r8c6 = 1
whip[4]: c2n3{r8 r3} - c2n5{r3 r9} - r9n6{c2 c4} - b8n2{r9c4 .} ==> r8c4 ≠ 3
whip[1]: b8n3{r9c6 .} ==> r9c1 ≠ 3
whip[4]: r7c4{n7 n6} - r7c2{n6 n8} - r8n8{c2 c8} - b9n7{r8c8 .} ==> r9c6 ≠ 7
whip[4]: c6n7{r6 r7} - r7n4{c6 c7} - b9n8{r7c7 r8c8} - r8n7{c8 .} ==> r6c1 ≠ 7
whip[1]: c1n7{r9 .} ==> r9c3 ≠ 7
whip[3]: r3c2{n5 n3} - b7n3{r8c2 r8c1} - r6c1{n3 .} ==> r3c1 ≠ 5
whip[4]: r9c9{n7 n1} - r9c8{n1 n9} - r7n9{c7 c1} - r7n7{c1 .} ==> r9c4 ≠ 7
whip[5]: b3n5{r2c8 r3c8} - c2n5{r3 r9} - r9n6{c2 c4} - c4n3{r9 r1} - r2c5{n3 .} ==> r2c8 ≠ 1
whip[4]: c9n6{r5 r2} - b3n1{r2c9 r3c8} - r3c5{n1 n7} - r1n7{c4 .} ==> r5c9 ≠ 7
whip[5]: c2n3{r8 r3} - r3n5{c2 c8} - b3n1{r3c8 r2c9} - r9c9{n1 n7} - r8c8{n7 .} ==> r8c2 ≠ 8
stte
denis_berthier
2010 Supporter
 
Posts: 1253
Joined: 19 June 2007
Location: Paris


Return to Advanced solving techniques