Understanding Denis Berthier Whips

Advanced methods and approaches for solving Sudoku puzzles

Understanding Denis Berthier Whips

Postby RichardGoodrich » Mon Nov 11, 2013 1:55 am

I want to more or less push the reset button on my post from:

http://forum.enjoysudoku.com/chain-notation-in-my-trace-t31469.html

I have been going through Denis Berthier's (DB) 'Hidden Logic of Sudoku (Second Edition)' (HLOS2 in the sequel)

My hang-up was trying to understand 'Lassos' on p 344 of his book when I found his URL on Whips

http://denis.berthier.pagesperso-orange.fr/HLS/Whips.html

I scrolled down his page to the following:

4.1) First whip example

Expressed as an 81-String (what else to you call this format?)

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  |
'----------------------'-----------------------'--------------------'


I worked on it independently from his solution to the following:

Code: Select all
.---------------.---------------.-------------.
| 4     1   6   | 37    2   5   | 89   89  37 |
| 8     7   23  | 4     1   9   | 23   5   6  |
| 235   35  9   | 8     37  6   | 237  1   4  |
:---------------+---------------+-------------:
| 6     4   37  | 1     37  8   | 5    2   9  |
| 1     9   8   | 5     4   2   | 37   6   37 |
| 357   2   357 | 9     6   37  | 1    4   8  |
:---------------+---------------+-------------:
| 79    68  1   | 67    5   47  | 489  3   2  |
| 237   38  4   | 27    9   1   | 6    78  5  |
| 2579  56  257 | 2367  8   347 | 49   79  1  |
'---------------'---------------'-------------'


At that point I decided (don't remember how I got there!) I wanted to see if I could eliminate 3 from r4c3 (prove r4c3<>3). I first
thought I saw a Lasso. Maybe Not! Then I saw what I think is a fairly ordinary XY-Chain, but I expressed it in DB's 3D chain
format which I think subsumes any simpler chain notation, but expressed it in my own variation of a Trace (a record or log
if you will of how you solved a Sudoku puzzle)

Code: Select all
XY-5 Chain 
----------->
01 k3r4c5=a
02 k3r3c5=A
--         
03 k3r3c2=a
04 k5r3c2=A
--         
05 k5r3c1=a
06 k2r3c1=A
--         
07 k2r2c3=a
08 k3r2c3=A
--         
   k3r3c3=X
-----------<
s01 r4c3-3  (r4c3<>3)


DB sizes a chain by the number of cells in it - which just caused me to realize that this by DB's system should be an XY-5 chain -
because that first link covers two cells. (I had originally referenced it as an XY-4 chain (number of strong links) )

Then I "thought' I saw what DB would have called an xyt-chain. The 't' is an extra candidate that gets eliminated along the
way (these types of chains are dependent on direction and would not meet the standards of DIC (double implication chains))

So I came up with this:

Code: Select all
01 xyt-4 Chain           
02 ----------->           
03 01 k3r4c5=a *         
04 02 k3r3c5=A           
05 --                     
06 03 k3r3c2=a           
07 04 k3r2c3=A *         
08    t3r3c1=X           
09 --                     
10    k3r4c3=X           
11 -----------<           
12 s01 r4c3-3   (r4c3<>3)
                         
( == is a stong link)     
k3r3c5 == k3r2c3 => r4c3-3


When I realized NO that is not an xyt-chain the way DB would define it because the 't' candidate is NOT part of the chain itself but
validates the choice of the last link made by eliminating the possibility of a 3 in r3c1. I am NOT sure what you would call it?

I also thought originally I saw a lasso as defined by DB, but I believe I was mistaken on that! Denis Bethier seems to consolidate
chains and lassos as he defines them under a new category called Whips.

Now at first I was a bit confused by similar terminology called 'Braid' analysis as discussed on the Sudopedia Mirror. DB disabused
me of that idea - Thankfully!

Anyway I have written some Python code that generates the 4 DB grids (what else should I call them?) and automates - with a trace
generated - the setting of all the singles found in the grids. I noticed when I was working on this first Whip example of DB's I used
more hidden singles where he used more chains. I think it would be interesting to see what path my Python solver might make.

After all the ONLY way to solve a cell is with a hidden or naked single. All else is elimination. Well I will see what develops.
I hope to work through his Whip examples. I started going through the examples in HLOS2 but got distracted when I could
NOT seem to understand the logic of Lassos. So this is where I ended up!

Anybody else using Denis Berthier's methods? Comments?
Big1952
RichardGoodrich
 
Posts: 70
Joined: 12 December 2012
Location: Josephine, TX

Re: Understanding Denis Berthier Whips

Postby Leren » Mon Nov 11, 2013 3:03 am

I'm a conventional solver. 3 r4c3 - r4c5 = r3c5 - r3c12 = r2c3 - r4c3 => r4c3 <> 3

Leren
Leren
 
Posts: 5115
Joined: 03 June 2012

Re: Understanding Denis Berthier Whips

Postby RichardGoodrich » Mon Nov 11, 2013 3:39 am

Leren wrote:I'm a conventional solver. 3 r4c3 - r4c5 = r3c5 - r3c12 = r2c3 - r4c3 => r4c3 <> 3

Leren


Very Nice! If there is a hard way, I will find it!
Big1952
RichardGoodrich
 
Posts: 70
Joined: 12 December 2012
Location: Josephine, TX


Return to Advanced solving techniques