The notation used in Nice Loops and SINs

Advanced methods and approaches for solving Sudoku puzzles

Postby Carcul » Sat Mar 25, 2006 11:30 am

Tso wrote:By definition, "4" will NEVER be in both cells r46c5.


Yes, I obviously know that.

Tso wrote:The phrase "4 is not in both cells" is not equivalent to "not-4 is in both cells".


That's strange, because in Portuguese we say precisely "4 is not in both cells" (which I even can translate for those interested in learning Portuguese:D : "4 não está em ambas as células") without any confusion, and without implying that "4 is in both cells" may be true. In fact, I don't think that, just because why say that "these two things are not in both those places" we are considering the hypothesis that "the two things can be simultaneously in both those places". But, as I only have a superficial knowledge of the English language, I guess that there are some Portuguese "expressions" that cannot be directly translated to English and conserving the same meaning. So, I have already edited the original post. Thanks Tso.
Carcul
 
Posts: 724
Joined: 04 November 2005

Postby ronk » Fri Mar 31, 2006 11:40 am

ravel wrote:I am using Mozilla and don't know, how or if i could force line wrapping. In this case not the code blocks are causing the problem.

As I've seen line wrap frequently occur within a code block, that had to be one of my dumbest ideas.:(

I just took a look at this page with the Firefox (Mozilla) browser. The problem is even worse than I thought. Not only do the equations continue on one looooooooong line across a wiiiiiiiiiide page ... the same thing happens to every paragraph on the page.

Carcul, have you taken a look using Firefox yet?
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby Carcul » Mon Apr 03, 2006 11:43 am

Hi Ronk.

Ronk wrote:Carcul, have you taken a look using Firefox yet?


I didn't forget the problem that you and others have already pointed out. That problem is strange because I don't have it: all the paragraphs and loops look ok and I don't need to scroll left-right to read any post. But sometime ago I also have that problem for some days, but however it suddendly disappear and all is ok since then. I don't know what Firefox is and how to use it. Do you still have the same problem? How can I "fix" that?

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

Postby vidarino » Mon Apr 03, 2006 11:59 am

Hi Carcul.

The problem with Firefox (which is a web-browser) is that it doesn't wrap lines unless there is a space somewhere in them. Internet Explorer, on the other hand, also wraps on the hyphens in the loop descriptions. So to me, and other Firefox users, the long loop descriptions on the first page of this thread become terribly wide - about twice the window width on my computer.

The work-around would be to add some spaces in the loop descriptions, e.g. before and/or after the parenthesised implication sub-chains. Or smack in the middle of a long chain, for that matter. I don't think anyone would notice a space there anyway.:)

Vidar
vidarino
 
Posts: 295
Joined: 02 January 2006

Postby ravel » Mon Apr 03, 2006 12:23 pm

After having written a long loop, please just look, where the IE wrapped it and add a blank at this position.
ravel
 
Posts: 998
Joined: 21 February 2006

Postby ronk » Mon Apr 03, 2006 1:29 pm

Carcul wrote:I don't know what Firefox is and how to use it. Do you still have the same problem?

I usually use Microsoft Internet Explorer, which "word wraps" on certain punctuation characters ... so I don't really have the problem. When I use Firefox, however, the problem exists. You can download Firefox from http://www.mozilla.com/firefox/ ... in order to see for yourself.

Firefox -- with usage at about 8% -- has been steadily gaining market share from Microsoft.

Carcul wrote:How can I "fix" that?

Write shorter loops?:D
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re: The notation used in Nice Loops and SINs

Postby Cec » Mon Apr 03, 2006 2:41 pm

Carcul wrote:The notation used in Nice Loops and Single Implication Networks

"The purpose of this thread is to explain the notation that is being used, by most of the users of this forum for some time, in writing simple nice loops, multiple implication nice loops, and single implication networks. ...So, I would like that other users would make coments and remarks, saying what is badly written or explained, making sugestions, in order to turn this post a good post...."

“[r8c7]-4-[r9c8]”: this is a [i]link of weak inference with label “4...The meaning of the link in this particular example is: if r8c7 is “4” then r9c8 is not “4”...."

Hi Carcul,
You say that the above notation “[r8c7]-4-[r9c8]”: means if r8c7 is “4” then r9c8 is not “4”...." then why not express this as [r8c7]=4-[r9c8] . I find this preferable to your suggested notation which has two identical negative symbols, one implied to mean "equal to" as opposed to the other identical negative symbol having an implied meaning of "can not equal" .

The task of understanding these advanced solving techniques would be easier if the notations were more "self-explanatory" - the way I see this proposed notation the use of double negative signs does not achieve this.

Cec
Cec
 
Posts: 1039
Joined: 16 June 2005

Re: The notation used in Nice Loops and SINs

Postby ronk » Mon Apr 03, 2006 2:52 pm

Cec wrote:... then why not express this as [r8c7]=4-[r9c8]

Because the expression is to be read right-to-left ... as well as left-to-right.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby ravel » Mon Apr 03, 2006 10:07 pm

Interesting, at the beginning i had exactly the same problem as Cec, plus the problem that - read from left to right [r8c7]=4=[r9c8] would read "if r8c7 is not 4, then r9c8=4", though there is an "="-sign.
I suppose, for people, who see this notation first, Cec's proposal would have been more intuitive.
Of course, Ron is right, that this is a strong link and can be read from right to left also, but does it matter, when you have a loop including weak links ([r8c7]-4-[r9c8]), where this is not the case (and those are by far the most, i assume, the others only are the exceptions of pure bilocation chains)?
ravel
 
Posts: 998
Joined: 21 February 2006

Re: The notation used in Nice Loops and SINs

Postby Viggo » Fri Apr 21, 2006 7:31 pm

I'am a beginner in this NLN notation, and it seems like this article is very well written for beginners like me - Thank you!

I have not read the complete article yet, but I have a question regarding the very first nice loop:

Carcul wrote:Code:
Code: Select all
 579   5789  12   | 3     4     12  | 589   59    6     
 459   6     249  | 7     8     29  | 1     3459  3459 
 349   89    1349 | 19    6     5   | 489   7     2     
------------------+-----------------+-------------------
 79    4     8    | 5     2     79  | 3     6     1     
 6     1     5    | 89    3     489 | 7     2     49   
 2     3     79   | 6     1     479 | 459   8     459   
------------------+-----------------+-------------------
 1     2     39   | 4     7     38  | 6     359   3589 
 3457  57    6    | 128   9     138 | 24    134   3478 
 8     79    3479 | 12    5     6   | 249   1349  3479 

                    Puzzle 1, Grid 1


Among other possible nice loops, we could write the following one:

I. [r9c8]=1=[r9c4]=2=[r8c4]-2-[r8c7]-4-[r9c8], => r9c8<>4.


I attach now the puzzle with the graphics I have made by Into Sudoku of the puzzle:

Image

Do you aggre with this representation of the this nice loop?

Carcul wrote:[r9c8]=1=[r9c4]”: this is a link of strong inference with label “1”. Such a link with label “x” makes a connection between two cells that, in their unit (row, column, or box), are the only two possible cells where candidate “x” can be located.


In row 8 only two cells has the possible candidate "2". Why are the link between these these cells made by a week link and not a strong link? Is it wrong to write it as a strong link and why?

In the referenced article by Jeff, I think the construction procedure require a week link - am I right?

Generally I just feel, that one should make a strong link, if you can.

/Viggo
Viggo
 
Posts: 60
Joined: 21 April 2006

Postby ravel » Sat Apr 22, 2006 11:18 pm

Since Carcul and Jeff seem to be on holidays, let me give an answer for now , though i dont use this notation.
You are right, that there is a strong link between the 2's in r8c4 and r8c7 and both r8c4=2 => r8c7=4 and r8c7=4 => r8c4=2 holds. But this equivalence cannot be expressed with this notation (=2= would contradict the former link) like the equivalence of the former strong links, that are mere bilocation links, here the equivalence r8c4=2 <=> r8c7=4 follows from both the bivalue in cell r8c7 (=>) and the bilocation for 2 (<=).
No notation is perfect.
The experts will correct me, if i am wrong:)
ravel
 
Posts: 998
Joined: 21 February 2006

Re: The notation used in Nice Loops and SINs

Postby ronk » Sun Apr 23, 2006 10:50 am

Viggo wrote:In row 8 only two cells has the possible candidate "2". Why are the link between these these cells made by a week link and not a strong link? Is it wrong to write it as a strong link and why?

A strong link has both a strong inference -- if not A, then B -- and a weak inference -- if A, then not B -- but, in any one loop, only one inference may be used. For your strong link in row 8, the weak inference -- "if r8c4 is not 2, then r8c7 is 2" -- is the one used.

To clarify that the weak inference applies, and starting at the left end of the nice loop:

[r9c8]=1=[r9c4]=2=[r8c4]-2-[r8c7]-4-[r9c8]

we have the (verbose) interpretation: [edit: fixed errors in "if ... thens"]

if r9c8 is not 1, then r9c4 is 1
if r9c4 is 1, then r9c4 is not 2
if r9c4 is not 2, then r8c4 is 2
if r8c4 is 2, then r8c7 is not 2
if r8c7 is not 2, then r8c7 is 4
if r8c7 is 4, then r9c8 is not 4

Note that each line begins as the preceding line ends. This propagation of inferences -- though almost always stated in a shorthand manner -- always exists, and indeed must exist for a chain to cause a deduction.
Last edited by ronk on Sun Apr 23, 2006 11:13 am, edited 1 time in total.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby Viggo » Sun Apr 23, 2006 1:35 pm

Ravel and Ronk, thank you for the answers, but it is still somewhat confusing to me.

Ronk wrote:To clarify that the weak inference applies, and starting at the left end of the nice loop:

[r9c8]=1=[r9c4]=2=[r8c4]-2-[r8c7]-4-[r9c8]

we have the (verbose) interpretation:

if r9c8 is not 1, then r9c4 is 1
if r9c4 is 1, then r9c4 is not 2
if r9c4 is not 2, then r8c4 is 2
if r8c4 is 2, then r8c4 is not 2
if r8c4 is not 2, then r8c7 is 4
if r8c7 is 4, then r9c8 is not 4


In the "forth line is says: if r8c4 is 2, then r8c4 is not 2, thats a contradiction. I think Ronk means:

if r9c8 is not 1, then r9c4 is 1
if r9c4 is 1, then r9c4 is not 2
if r9c4 is not 2, then r8c4 is 2
if r8c4 is 2, then r8c7 is not 2
if r8c7 is not 2, then r8c7 is 4
if r8c7 is 4, then r9c8 is not 4

However I think you would get the exsact same line of arguments if you write the NLN code, with a strong link in row 8 like this:

[r9c8]=1=[r9c4]=2=[r8c4]=2=[r8c7]-4-[r9c8], => r9c8<>4

So I still cannot see why this is wrong.

Possibly it has to do with the fact, that r8c4 has more than two candidates. When the notation has the same link number at both sides of a cell ("2=[r8c4]=2" or "2=[r8c4]-2"), then I think it means that this cell has more than two candidates, but we are only refering to this specific candidate. Possibly we just need another example to see the difference. If you want to make a clear indication on the cell interferrence you may write like this:

[r9c8]-1=[r9c4]=2-[r8c4]-2=[r8c7]=4-[r9c8], => r9c8<>4

But this is another notation, and I'dont think I get acceptance of that.

/Viggo
Viggo
 
Posts: 60
Joined: 21 April 2006

Postby ronk » Sun Apr 23, 2006 3:35 pm

Viggo wrote:I think Ronk means:

...............
if r9c4 is not 2, then r8c4 is 2
if r8c4 is 2, then r8c7 is not 2
if r8c7 is not 2, then r8c7 is 4
................

Yes, thanks for the correction. I had edited that, but somehow didn't submit it.

Viggo wrote:However I think you would get the exsact same line of arguments if you write the NLN code, with a strong link in row 8 like this:

[r9c8]=1=[r9c4]=2=[r8c4]=2=[r8c7]-4-[r9c8], => r9c8<>4

So I still cannot see why this is wrong.

Because the literal interpretation is then ...
..............
if r9c4 is not 2, then r8c4 is 2
if r8c4 is not 2, then r8c7 is 2
if r8c7 is not 2, then r8c7 is 4
..............

... and the two red statements don't match and neither do the two blue statements. IOW the inference chain (stream) is broken.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby Viggo » Sun Apr 23, 2006 11:58 pm

Well, I think I have to do it very detailed, so I repeat the statements by Ronk with a comment from the NLN notation:

[r9c8]=1=[r9c4]=2=[r8c4]-2-[r8c7]-4-[r9c8], => r9c8<>4

if r9c8 is not 1, then r9c4 is 1 "[r9c8]=1=[r9c4]"
if r9c4 is 1, then r9c4 is not 2 "1=[r9c4]=2"
if r9c4 is not 2, then r8c4 is 2 "[r9c4]=2=[r8c4]"
if r8c4 is 2, then r8c4 is 2 "2=[r8c4]-2" (I a added this redundant line)
if r8c4 is 2, then r8c7 is not 2 "[r8c4]-2-[r8c7]"
if r8c7 is not 2, then r8c7 is 4 "2-[r8c7]-4"
if r8c7 is 4, then r9c8 is not 4 "[r8c7]-4-[r9c8]"

So if you generalise all the link statements it becomes like this:

[cell1]=a=[cell2] means if cell1 is not a then cell2 is a
[cell1]-a-[cell2] means if cell1 is a then cell2 is not a

It seems, that for this nice loop you can revert the direction of the loop. Is this always possible? My verbal interpretation of this is:

if r9c8 is 4, then r8c7 in not 4 "[r9c8]-4-[r8c7]"
if r8c7 is not 4, then r8c7 is 2 "4-[r8c7]-2"
if r8c7 is 2, then r8c4 is not 2 "[r8c7]-2-[r8c4]"
if r8c4 is not 2, then r8c4 is not 2 "2-[r8c4]=2"(This may not be allowed)
if r8c4 is not 2, then r9c4 is 2 "[r8c4]=2=[r9c4]"
if r9c4 is 2, then r9c4 is not 1 "2=[r9c4]=1"
if R9C4 is not 1, then r9c8 is 1 "[r9c4]=1=[r9c8]"

The reversed NLN is:

[r9c8]-4-[r8c7]-2-[r8c4]=2=[r9c4]=1=[r9c8], => r9c8<>4

The deduction starts at r9c8=4 and ends at r9c8=1 - a contradiction, so r9c8<>4.

I think my misconception was, that I was focused on, that the NLN should express the logic of the links and cells. But the NLN notation does not focus on the logic of the puzzle, but it focus on the result of the deduction. You may say that you can always interpret the parts like this:

"a=[cell]" as "then cell=a"
"a-[cell]" as "then cell<>a"

So the signs "-" and "=" refer to the deduction results and not so much on the links general performance on information transfer.

I have got this other Puzzle from LB:

Code: Select all
 17    9     6     | 5     34    8     | 37    2     14   
 3     4     2     | 7     69    19    | 5     8     16   
 5     8     17    | 2     346   14    | 37    9     146 
-------------------+-------------------+-------------------
 148   17    148   | 3     49    249   | 6     5     27   
 9     2     45    | 46    7     456   | 1     3     8   
 6     37    35    | 8     1     25    | 9     4     27   
-------------------+-------------------+-------------------
 247   5     347   | 1     8     34    | 24    6     9   
 248   6     489   | 49    5     7     | 248   1     3   
 148   13    13489 | 469   2     346   | 48    7     5   


Here you got a Nice Loop like this:

[r1c5]-4-[r3c6]-1-[r3c3]-7-[r1c1]-1-[r1c9]-4-[r1c5] => [r1c5] <> 4

The links from r3c3 to r1c5 is strong (bidirectional) links with bilocation behavior. But the links are expressed by "-" only.

The notes above is very detailed, but it is my experience, that you have to be very carefull with logic deductions. Hopefully in this way you can quote my misconceptions and correct me.

/Viggo
Viggo
 
Posts: 60
Joined: 21 April 2006

PreviousNext

Return to Advanced solving techniques

cron