[edited Wed June 25, 2025]
Q: What is the difference between theory and practice?
A. In theory they are the same thing.
I will call Denis Berthier (alias denis_berthier on this forum [TNSPF]: DB for the sequel (Started using that term from reading his book: HLS2)
I actually bought that book from Amazon on Oct 31, 2012. Yep, paid full price! Gave it perhaps it's first positive review - 5 stars! Why? Well until then it got poor reviews. Here was my review after struggling to read it for a long time!
5.0 out of 5 stars Seminal Book on solving Sudoku!
Reviewed in the United States on October 30, 2016
Format: PaperbackVerified Purchase
No, it is not an easy book and not one for everyone. However, if you are really into Sudoku and have enough "smarts" and will power to work through the book, it is the ONLY systematic approach to the game available as a "dead tree" book. Denis Berthier has excellent web pages with supplemental material also. He he has a high degree of rigour in his book. Unfortunately it will be mostly folks with good math, computer science, and logic skills that will make the attempt. The BIG thing for me was the realization that chains can be treated as PATTERNS vs INFERENCE rules, and yes it does make a difference. And finally understanding - just recently - how Whips work makes it even more valuable to me. Of course the 4-grid views that transform 3D views of a Sudoku Puzzle into a set of 2-D views is also a pioneering approach. I just wish I could communicate with Denis Berthier as I have gotten into his next book "Pattern-Based Constraint Satisfaction and Logic Puzzles" in which he further develops what he started here. Richard Goodrich
Up until my review, most reviews were very negative! "TOO hard to read" was the main theme. I took that as a challenge - and what a challenge. My philosophy at that point was who wants pablum and I said so! I wanted a book with "content". I had plenty of "easy to read" books.
Well I wore that think out! I recovered it as a hardback. Just recently I fixed that hardback again! [I should make a video of the poor thing!]
I have made my own indexes to it and glued them into the end pages of the book.... The story goes on.
However, I want to review one of my early posts on trying to understand DB's whips . These were NOT in HLS2, but the idea of his Lassoes did take up most of a page (p344 of HLS2). Later DB generalized and subsumed them with his theory of whips. I have friends on this forum that still don't understand them and sometimes I am still NOT sure I do - but am getting there. So I have learned quite a bit since that post [I hope] and want to re-analyze that old post [for fun and grins] and see if I got any new insights?
*************************************************************************************************************************> So Let's review:
- Code: Select all
So as a reminder DB grids: rcn, rnc, ncr, bns
NOTE: ncr was originally cnr
ncr is simply visually more appealing in creating a "sudoku board" refer to: HLS2, p41
DB called the use of those 4 grids an extended sudoku board. For "short" I called it: sudoku board or just board.
I sometimes found using an alternative grid naming of crn, nrc, cnr, nbs convenient when trying to "form" my own "more clear" trace notation. Mostly I have abandonded it as just too much to keep up with! DB preferred his own notation - which of course - called all kinds of havoc on this forum [and probably still does!]. Being an r&D digital hardware design engineer, I did NOT mind so much! Afterall as a "research" engineer I was always doing that myself!
Details on DB's nrc notation
Hidden Text: Show
I may prefer "rcn" notation because of the other grids. Perhaps more generally we should have called it the "xyz" system as in graphing the x,y,z ?
Where x,y,z became r,c,n as the "normal" notation and n,c,r for grid = ncr and so forth! However it seems EUREKA was there first!
So with this particular post [my theory] was that DB was trying to explain whips and their usefullness! There are certainly other [more compact] ways to trace a solution to this puzzle via subsets and block/line interactions
So, I find it a pain to navigate this forum. But, here goes:
In Nov of 2013: Topic/Thread began here: http://forum.enjoysudoku.com/post231089.html#p231089
- Code: Select all
A specific application of Whips
by RichardGoodrich » 2013 Nov Wed 06, 2013 9:54 pm
My specific initial post if you want to get there that way [multiple ways!] is: http://forum.enjoysudoku.com/post231089.html#p231089
After various replies, DB finally responded in Mar of 2014. Perhaps in a certain amount of frustration with his "Complete Solution"
http://forum.enjoysudoku.com/post235395.html#p235395
HoDoKu will be my reference Application for the following. And I will use EUREKA notation to explain whips
****************************************************************************************************************************************> So Let's Go
Few things are harder to put up with than the annoyance of a good example.-Mark Twain
biG's morph:: Few things are harder to find than good examples
biG wrote:I am nunbering DB's steps and then giving my substitution in BLUE (showing casing my 'new' notation) Don't just read this! Use HoDoKu to follow each step. Else it really does not make much sense! Sudoku like math is something you do! You don't just read it! This is play together time!
23 clues, 58 unsolved
Current and Final States - SPOILER ALERT
Hidden Text: Show
DB in step 1 wrote: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
1. 755,859,649,684,475,562,511,529,416,538,468,366,114,118
After Singles this is the new state
Hidden Text: Show
I am trying to keep notation concise, especially on singles, with just comma separation and no spaces. This implies the rcn grid. Instead of saying r7c5=n5: 755 simplies setting it. By the same token: instead of r7c5-n5: 75-5 removes a 5. I prefer simple one letter symbols like the minus sign for a removal vs the more complicated ≠i (not equal)] symbol (hard to find on my keyboard). I also number my lines so that the next line with begin with 15. So, a bit of mental math indicates 14 singles have been set.
DB in step 2 wrote:whip[1]: c5n2{r1 .} ==> r1c4 ≠ 2
15. 2r123c5 = 2r1c4 - 2r678c2 => r1c4 ≠ n2 (contradiction: No 2's left in block 8)
Now the blue line above is my attempt at Keeping-It-Simple-Sudokie [KISS] eureka notation where the = is a strong link and the - is a weak link. Notice the n is not used before that first 2 as that is understood If I was writing that in my biG notation it would appear as: (r123c5n2, r1c4n2) * (b8s147n2, b8sXn2) > X > 14-2
Where the * is my only link symbol and it is always a weak link. The strong link always appears in the round brackets (which are usually not needed for simpler epressions. The unasserted value always appears first. Then the comma (again not needed on simpler expressions) which is followed by the asserted part of the link. I use the X to express either contradiction or unkown. I could have used ?. In the past I have used the digit 0 to express the same thing. The > is my concise one-letter expression for the implication symbol =>. Also I am assuming that from that you know there is no 2s left in b8 and that r1c4 can't be n2 (thus 14-2) (In the sequel I will give simpler examples of my biG chain notation
Now what is even more telling is that I would have expressed this simpler as just a locking candidate - pointing which I would encode as: p2:b8n2 > 14-2. As a matter of fact if we are playing on with HoDoKu just leave off the > part. HoDoKu knows how to do the removals. You may just want to copy the candidates diagram after a step to show the new state of the puzzle. That of course become a matter of personal prefence as to how often! You are following along on HoDoKu aren't you!
This is just the first of many examples on how whips as a type of chain can be used to express subset or fishy patterns. The problem is that it takes more complicated and/or longer chains to express what could be more easily expressed as a pattern. I can only assume DB used whips here to illustrate their "resolving power" We will see in the sequel how it takes several whips to express such things as a naked triple
****************** Step 3 (I know it is slow, but should speed up soon)
DB in step 3 wrote:whip[1]: c6n1{r9 .} ==> r9c4 ≠ 1
16. c2:b8c6n1( > r89c4-n1) Do you really need that part in round brackets ?
OK, now I am NOT playing along with that whip thing! This is a simple claim. In biG notation I start pointers with either p2: or p3: Claims start with c2 or c3. (I prefer candie to candidates because it is shorter and easier to spell and as John Welch would point out - after all all candidates "can die") Now I could have used just p or c. But, I likethese 2 letter expressions. I use the : symbol as the start of a prefix where the following p is a reference to a pointing vector. Similarly the c is a reference to the claim vector . The 2 or 3 digit that comes next refers to the number of candies in the [claiming or pointing vector
Now I still have NOT explained DB's whip notation. It would be helpful to understand at this point the DIC idea of a chain. I so want to make a perjorative out of that acronym by adding a k for those so-called purists who think this is the ONLY type of chain that should be used! DIC is a Double Implication Chain. Sometimes it is called a reversible chain It would be good to review this on sudopedia, etc. The period in DB's notation is a bit harder to explain! But I will try.
The key idea for chains in general is the idea of removing one or more candies. When creating a full chain it sometimes occurs that a contradiction occurs before closing the chain. Whips are all about short chains that produce contradictions. The DIC idea
also comes into play! And don't misunderstand! The DIC noation is powerful and beautiful! In fact this whole chains and nets thing is so hard to grasp that I will refer us to Andrew Stuarts explanation (with colored diagrams https://www.sudokuwiki.org/Introducing_Chains_and_Links I really need to do a POST on chains/nets for both terminology purposes and action of both chains and nets of all kinds - including forcing!
Many DIC's start with the unasserted target of the removal or else right away the target is eliminated - One and Done! These
are also by DB's definition and my preference also Open Chains. These are NOT loops like in Nice Loops - more complicated and hopefully obsolete. And the end of the DIC has the target value asserted so that the target/s that see (linked to is a bit more professional sounding) to both ends of this DIC can be be removed But what if that DIC does not get to that asserted target. And it really does NOT need to start with the unasserted target value. Best to see some examples. Let's look at this one.
Now it appears at this point DB has abandoned the nrc notation. Perhaps he repented later! c6n1{r9 .} ==> r9c4 ≠ 1
- 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 |
'-------------------'-------------------'------------------'
Consider c6n1{r9 .}
So in the state of our current grid above: c6 has 1's only in r8 and r9. Also while not indicated in the notation itself - (guess you just got to know the state of the puzzle?), this chain action is happening only in b8. The idea of "grouped" candidates in a chain is also here. So we start out as in chain notation with unasserted values. By DB's notation we are starting with r9c6 but by use of the period . there could be other candies unasserted - indeed in this case we are unasserting r8c1 aslo. And it could have been r7c1 as well - hypotetically. So the period implies these other rows too are grouped and even the asserted part of this chain has multiple candies in c5. There are two there. Only one could be asserted and it does not matter which one. So perhaps the period indicates this also. And the result of this is that r9c4-n1. The problem for me is this is just a bit too concise. I would express this as (b8n2s69, b8n2s47) > r4c4-n1 or simply 44-1
Some object (including DB to using bns notation vs rcn) but rcn notation becomes even longer and more complicated. AND if we are following along in HoDoKu it should not be a problem! You can see that b8n2s47 is by another name is r89c4n2. And context matters too! As the asserted part of the chain this means either just one of r8 or r9. I this was then unasserted part of the chain it would mean both r8c4 and r9c4 are being removed!
Anway - just sticking to the chain idea eureka could express this as: 1r89c6 = 1r89c4 => r4c4 ≠ n1 (I hate that ≠ synbol! - is much easier! OR what I prefer p2:b8c4n2 (read it as pointing vector (of length 2) in (intersection) of b8 and c4)
This is getting so long I should continue in another POST - This is more to learn about these Whips!