I have now read Carsuls very good article as well as Jeffs article on Nice loops. Finaly I think, I got some understanding of the topic. Along the way I have saved a copy of the PC-screen with "Into Sudoku" of each of Carsuls examples.
Without a permission from Carsul (I hope he approves) I have desided to make an illustrated version of his article. The graphics makes it easier for me to understand, and hopefully others may think the same. Due to the comments, I have added some spaces i the deductions.
--------------------------------------------------------------------------------
The notation used in Nice Loops and Single Implication NetworksThe 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. This thread is intended to be progressively polished in order to make it a reliable reference for those who would like to understand this notation and the nice loops that are posted as solutions of some puzzles. 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. For a good explanation of the terms used in forcing chain terminology, please consult this post.
Part 1. Simple Nice Loops and Grouped Nice Loops
The notation used in nice loops is not very hard to understand. For a good thread about nice loops, how they can be identified and used, please consult this link. Lets begin with a simple example. Consider Puzzle 1:
- 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.
(Yellow marks the eliminated candidate)
Now, lets try to understand the symbology used here:
[r8c7]: the cell located at the intersection of row 8 and column 7 (rows are numbered 1-9 from top to bottom of the grid, and the columns are numbered 1-9 from left to right).
=>: this symbol means implies or from which we can conclude that
.
r9c8<>4: this means that r9c8 cannot be 4.
[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 the example given, in row 9 the only two possible places for 1 are r9c8 and r9c4, and so we can construct a strong link between them, [r9c8]=1=[r9c4], with the following meaning: if 1 is not in r9c8 then it must be in r9c4, and vice-versa.
[r8c7]-4-[r9c8]: this is a link of weak inference with label 4. Such a link with label x connects two cells that, in their unit, are not necessarily the only two possible places for candidate x, that is, it can connect two cells that are the only two possible places for "x" in the unit but, more frequently, it connects cells that are not conjugate cells. The meaning of the link in this particular example is: if r8c7 is 4 then r9c8 is not 4. In general, with simple nice loops such as this one weak links are constructed to/from bivalue cells (cells that have only two possible candidates), but in advanced nice loops this does not need to be the case.
Also in Puzzle 1 we can write the following loop:
II. [r8c7]=2=[r9c7]-2-[r9c4]-1-[r3c4]=1|4=[r3c7]-4-[r8c7], => r8c7<>4.
(The brown part is the ALS)
[r3c4]=1|4=[r3c7]: this type of link has the following meaning if 1 is not in r3c4 then 4 must be in r3c7, and if 4 is not in r3c7 then 1 must be in r3c4. This link exists principaly in two kinds of patterns. The first one is an Almost Locked Set (ALS: a set of n cells populated by n+1 candidates) in which two of his candidates are in only one cell (each) of the ALS. In the present example, we have an almost locked set in cells r3c2/r3c4/r3c7 which are populated by candidates 1,4,8,9: now, if the reader looks carefully, the 1 is located (among the cells of the ALS) only in r3c4, and the 4 is located only in r3c7, and so if 1 is not in r3c4 then 4 must be in r3c7 (or we would have only two candidates to populate the three cells r3c2/r3c4/r3c7) and vice-versa this logic is represented by [r3c4]=1|4=[r3c7]. The second pattern is an Almost Unique Rectangle (AUR: refer here for the definition, an explanation of the type of link, and some relevant examples). Consider the following puzzle:
- Code: Select all
256 156 4 | 8 3 7 | 9 12 125
7 135 1235 | 145 9 245 | 135 6 8
8 1359 12359 | 15 6 25 | 7 1234 1245
---------------------+-------------------+--------------------
9 47 235 | 6 148 458 | 138 12378 127
1 8 6 | 2 7 3 | 4 5 9
235 47 235 | 45 148 9 | 138 12378 6
---------------------+-------------------+--------------------
35 1359 8 | 79 2 46 | 156 1479 1457
4 2 19 | 79 5 68 | 168 1789 3
56 569 7 | 3 48 1 | 2 489 45
Puzzle 2
Here we have an AUR in cells r46c5 (this condensed symbology means that we are considering cells r4c5 and r6c5) and r46c7:
III. [r2c7]=5=[r7c7]=6=[r8c7]-6-[r8c6]-8-[r9c5]-4- [r4c5|r6c5]=4|3=[r4c7|r6c7]-3-[r2c7], => r2c7<>3.
(The brown part marks the unique rectangle)
In this case, the link means that, if 4 is not in either of the cells r46c5 then, in order to preserve uniqueness of the solution, one of the cells r46c7 must be 3.
[r4c5|r6c5]: this indicates that the set of cells separated by the vertical bar is involved in the same implication. This could also be written as [r46c5].
Lets now consider again puzzle 1, but now with the grid updated after the deduction II:
- 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 | 18 9 138 | 2 34 3478
8 79 3479 | 2 5 6 | 49 1 3479
Puzzle 1, Grid 2
Here we could write:
IV. [r7c3]=9=[r9c2|r9c3]-9-[r9c7]-4-[r8c8]-3-[r8c6]=3= [r7c6]-3-[r7c3], r7c3<>3.
[r7c3]=9=[r9c2|r9c3]: this is a grouped strong link, which has a similar meaning to the strong link described above: in this case, although in a given unit there are more than two possible cells for a given candidate x, these cells are distributed among only two other units. In the present example, candidate 9 is distributed in box 7 by two other units, namely row 7 and row 9. So, if 9 is not in r7c3 then it must be in one of the cells r9c23; conversely, if 9 is not in either of the cells r9c23 then it must be in r7c3 this logic is represented by [r7c3]=9=[r9c2|r9c3].
Part 2. Multiple Inference Nice Loops
The symbology used is these type of loops is very similar with the one used in simple nice loops, with the only difference being in writing the various multiple implications between brackets. But what is a multiple implication? As we have already seen, in simple nice loops each cell implies only one cell in the implication stream: for example, in the notation [r8c7]-6-[r8c6]-8-[r9c5] the cell r8c7 is implying (is being related with) only the cell r8c6. In a multiple implication nice loop, we have at least one cell that implies more than one cell: in the notation [r8c7](-6-[r2c7])-6-[r8c6]-8-[r9c5] the cell r8c7 is not only being related with the cell r8c6 but also with the cell r2c7.
Lets look at a simple example (Puzzle 3):
- Code: Select all
4 12 13 | 38 5 6 | 238 9 7
6 29 5 | 1 389 7 | 238 23 4
8 7 39 | 29 239 4 | 5 1 6
-----------------+------------------+----------------
19 3 4 | 5 1279 129 | 1279 6 8
7 5 169 | 2689 4 1289 | 1239 23 39
2 8 169 | 69 1679 3 | 179 4 5
-----------------+------------------+----------------
159 19 2 | 368 368 58 | 4 7 39
3 4 8 | 7 19 19 | 6 5 2
59 6 7 | 4 23 25 | 39 8 1
Puzzle 3
Here we could write:
V. [r1c4]-8-[r5c4]=8=[r5c6]-8-[r7c6]-5-[r9c6]-2-[r9c5](-3-[r2c5])-3- [r3c45]-9-[r2c5]-8-[r1c4], => r1c4<>8
This looks just like a discontinuous simple nice loop, except for the notation between brackets. The meaning of the multiple implications can be better understood if we think in the loop as having in his cells the values implied by the implications: in this case, lets assume r1c4=8 then, r5c4 cannot be 8 and r5c6=8 (strong link with label 8 between these two cells), then r7c6 is 5, then r9c6 is 2, and then r9c5 is 3. On one hand, r9c5=3 eliminates 3 from r2c5, which is indicated by the multiple implication (-3-[r2c5]); on the other hand, r9c5=3 also eliminates 3 from r3c5, which then would make up a naked pair with r3c4, eliminating also 9 from r2c5 which then also becomes 8 as r1c4. Keep in mind an important thing about multiple implications: their purpose can be viewed as being to preparea cell (or various cells) for the main implication stream. In this simple example, the purpose of the (-3-[r2c5]) was to prepare the cell r2c5 for the main implication -9-[r2c5]-8-[r1c4] by making it a bivalue cell. If the multiple implication were not used then r2c5 would be a trivalue cell and the loop would have no meaning.
Lets see another example (Puzzle 4):
- Code: Select all
5 18 2 | 6 378 378 | 4 9 17
9 6 18 | 2 78 4 | 17 3 5
3 7 4 | 5 9 1 | 2 8 6
--------------+--------------------+----------------------
4 5 378 | 178 6 9 | 1378 127 12378
1 9 6 | 78 2 378 | 5 4 378
2 38 378 | 1478 34578 3578 | 1378 6 9
--------------+--------------------+----------------------
7 4 5 | 9 18 6 | 138 12 1238
8 2 9 | 3 157 57 | 6 157 4
6 13 13 | 478 4578 2 | 9 57 78
Puzzle 4
Here we could write:
VI. [r4c9]=2=[r4c8]-2-[r7c8]-1-[r7c5]-8-[r2c5]-7-[r2c7]-1-[r1c9] (-7-[r4c9|r5c9])-7-[r9c9](-8-[r4c9])-8-[r5c9]-3-[r4c9], => r4c9<>3,7,8.
In this case, cell r1c9 not only implies r9c9 but also r5c9 (and r4c9), turning this cell into a bivalue cell. Just a final note about the notation of multiple implication nice loops: sometimes it may happen that a ramification of the main implication stream has its own multiple implications - when this happen, such a ramification is written between {}.
Part 3. Single Implication Networks
A Single Implication Network (SIN), also called an Error Net, is structurally different from a nice loop in that it doesnt have a cyclic nature. In fact, heres how a SIN is defined in Jeffs post Forcing Chains: Terminology and Definition (the definition was slightly adapted):
SIN or Error Net - a network with one implication stream that starts with a candidate selected in one node and propagates with or without multiple inferences until a contradiction is revealed. Due to this contradiction, such as empty cell, one digit appears 2 times in a unit and no place for a digit in a unit, it can be concluded that the candidate selected at the start is invalid.
For nice loops we have a set of rules that allow us immediately to make a conclusion from the notation of the nice loop (refer here). With single implication networks we have similar "rules" for identifying contradictions from their notation:
1 If a SIN begins with a weak link labeled "x" from cell A we are assuming that "x" is in A.
2 If a SIN begins with a strong link labeled "x" from cell A, then we are assuming that "x" is not in A and so "x" (or another candidate) is in a "conjugate" cell.
3 If a SIN begins with a notation like "-x-[r7c7]" then we are assuming that "x" is not in r7c7, without assuming that x is in any particular cell(s), and in this case there is no "conjugate" cell. This notation means simply that we considering that x is not in r7c7.
4 If a SIN "ends" in one cell we have a contradiction when: (a) there are two strong links with different labels that end in that cell; (b) if the cell is populated by candidates "x", "y", "z", ..., and there are weak links with labels "x", "y", "z", ... that end in that cell (this is the empty cell contradiction argument); (c) there are two links, one strong and the other weak, with equal labels that end in that cell.
5 If a SIN "ends" in different cells of the same unit we have a contradiction when: (a) there are two strong links with equal labels that end in two cells of that unit; (b) there are n weak links with the same label "x" and/or strong links with a label different from x, that end in the only n possible cells of the unit for candidate "x".
Typically, SINs have multiple implications. Lets now see some examples of the notation used in SINs, where the end links are highlighted in bold for easy analysis.
- Code: Select all
3 6 14 | 14 7 29 | 29 8 5
7 289 48 | 3 249 5 | 2469 246 1
49 129 5 | 8 6 1249 | 2479 3 479
---------------+----------------+------------------
28 5 9 | 147 3 1246 | 14678 1467 478
28 4 67 | 5 129 1269 | 3 167 789
1 3 67 | 47 49 8 | 4679 5 2
---------------+----------------+------------------
6 7 1348 | 9 5 134 | 1248 124 48
49 189 2 | 6 148 147 | 5 147 3
5 18 1348 | 2 148 1347 | 1478 9 6
Puzzle 5
VII. [r8c2]=9|4=[r8c5|r9c5](-4-[r2c5])-4-[r6c5](-9-[r5c5])-9-[r2c5] (-2-[r5c5])-2-[r2c2]=2=[r3c2]=1=[r1c3]-1-[r1c4]=1=[r4c4]-1-[r5c5].
This SIN begins with a strong link (which makes use of the almost unique rectangle in cells r8r25/r9c25) and so we are considering that 9 is not in r8c2; it ends with three weak links with labels 1, 2, and 9 in cell r5c5, and so this SIN means that if r8c2 is not 9 then r5c5 is an empty cell. So, r8c2 must be 9.
- Code: Select all
2 14 6 | 8 7 14 | 35 9 35
13 5 8 | 123 9 123 | 7 4 6
37 9 47 | 5 46 346 | 8 1 2
-----------------+----------------+-------------
6 14 149 | 49 5 8 | 2 3 7
5 7 349 | 3469 2 3469 | 19 8 149
8 2 349 | 7 1 349 | 59 6 459
-----------------+----------------+-------------
19 8 2 | 46 46 7 | 139 5 139
4 3 5 | 129 8 129 | 6 7 19
179 6 17 | 19 3 5 | 4 2 8
Puzzle 6
VIII. [r7c1]-1-[r9c3]-7-[r3c3](-4-[r5c3])=7=[r3c1]=3=[r2c1]-3-[r2c4|r2c6]= (Almost Unique Rectangle: r2c46/r8c46)=3|9=[r8c4|r8c6]-9-[r8c9]-1-[r7c7|r7c9]= (Almost Unique Pattern: r1c79/r6c79/r7c79)=1|4=[r6c9]-4-[r5c7|r5c9]-9-[r5c3]-3- [r5c4|r5c6]=3=[r6c6]-3-[r3c6]
In this case the SIN begins with a weak link from r7c1, meaning we are supposing that 1 is in that cell. This SIN ends with to weak links with label 3, one connected to cells r2c4/r2c6 and the other connected to r3c6: according to rule 5b, this means that with r7c1=1 there is no possible cell for 3 in box 2, and so r7c1<>1. Please note the multiple implication (-4-[r5c3]) whose purpose is to prepare cell r5c3 (by turning it a bivalue cell) for the implications -9-[r5c3]-3-[r5c4|r5c6].
(Almost Unique Pattern: r1c79/r6c79/r7c79)=1|4=[r6c9]: the purpose of this notation and similar ones is to make clear for the reader the origin of the link between which the information inside the brackets is written (it can also be written between {}). In this example, we have in the indicated cells an almost unique pattern: we cannot have simultaneously r6c9<>4 and r7c7/r7c9<>1, otherwise the puzzle would have more than one solution. So, if r6c9 is not 4 then one of the cells r7c7/r7c9 must be 1, and vice-versa. The information between brackets then makes more clear where this link [r7c7|r7c9]=1|4=[r6c9] come from.
Lets now consider again Puzzle 1:
- 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
Here we could also write the following SIN:
IX. [r9c2|r9c3](-9-[r8c7|r9c7]-4-[r3c7])-9-[r7c3]-3-[r7c6]-8-[r8c4|r9c4]-1-[r3c4] (-9-[r3c7])-9-[r3c2]-8-[r3c7].
In this case the SIN begins with a grouped weak link, which means that we are considering the effect of candidate 9 being placed in any of the cells r9c2/r9c3. The SIN ends with three weak links with labels 4, 8, and 9 in cell r3c7, so we have an empty cell contradiction argument. Overall meaning of this SIN: if 9 is in any of the cells r9c2/r9c3 then r3c7 would have no possible candidate so, both r9c2/r9c3 cannot be 9 which implies r7c3=9.
-9-[r8c7|r9c7] and -8-[r8c4|r9c4]: these are weak links connected to Almost Locked Sets in the first case, if 9 is not in cell r9c7 then it makes up a naked pair with r8c7 on 2,4; similarly, if 8 is not in r8c4 then this cell forms a naked pair with r9c4. This notation could also be written in the more complete form -9-[Almost Locked Set: r8c7|r9c7].
Lets now study a final example:
- Code: Select all
2345 245 1 | 9 23 7 | 56 456 8
6 249 29 | 1 8 5 | 7 3 249
23589 2589 7 | 4 6 23 | 1 59 259
---------------------+---------------+---------------------
1258 3 4 | 267 9 268 | 568 1567 156
1289 26789 2689 | 5 23 4 | 368 1679 1369
589 56789 689 | 367 1 368 | 4 2 3569
---------------------+---------------+---------------------
248 2468 5 | 236 7 1 | 9 468 346
29 1 2369 | 8 4 236 | 356 56 7
7 468 368 | 36 5 9 | 2 1468 1346
Puzzle 7
For this grid it could be written:
X. [r8c7]{=(Almost Unique Rectangle: r1c7/r1c8/r8c7/r8c8)=3|4=[r1c8]-4-[r1c1]=4= [r7c1]-4-[r9c2]}=3=[r5c7](=8=[r4c7]-8-[r4c6])-3-[r5c5](-2-[r4c6]-6-[r8c6])-2-[r1c5] (-3-[r3c6]-2-[r8c6])-3-[r1c1]=3=[r3c1]=8=[r3c2]-8-[r9c2]-6-[r9c4]-3-[r8c6],
First, overall meaning of this SIN: it begins with a strong link with label 3 from r8c7, and it ends with three weak links with labels 2, 3, 6 that meet in cell r8c6 so, if r8c7 is not 3 then r8c6 is an empty cell, therefore r8c7 must be 3. Note that the first ramification is written between {} because inside it there is information written between brackets. Lets now analyse in detail the notation of this SIN:
=(Almost Unique Rectangle: r1c7/r1c8/r8c7/r8c8)=3|4=[r1c8]: the information inside brackets makes more clear the origin of the link =3|4=. We have an Almost Unique Rectangle in the cells indicated: if r8c7 is not 3 then r1c8 must be 4, otherwise the puzzle would have more than one solution. This knowledge is written as [r8c7]=3|4=[r1c8].
-4-[r1c1]=4=[r7c1]-4-[r9c2]: as we have seen, r8c7 not 3 implies r1c8=4 but, as we have a strong link with label 4 between cells r1c1 and r1c7, r1c8=4 implies that r1c1 cannot be 4 and so r7c1=4 which then eliminates 4 from r9c2, turning it into a bivalue cell and preparing it for the main implication stream.
=3=[r5c7](=8=[r4c7]-8-[r4c6]): as we are considering that 3 is not in r8c7, and we have a strong link with label 3 r8c7/r5c7, then r5c7=3. But we also have a strong link with label 8 between cells r5c7/r4c7, and so r5c7=3 implies r4c7=8 eliminating 8 from r4c6 and making this cell a bivalue cell: this is indicated by the multiple implication (=8=[r4c7]-8-[r4c6]).
-3-[r5c5](-2-[r4c6]-6-[r8c6]): r5c7=3 turns r5c5=2. This means that, as r4c6 is now a bivalue cell (due to the multiple implication (=8=[r4c7]-8-[r4c6])), we have r4c6=6 and so the first end weak link to the target cell r8c6.
-2-[r1c5](-3-[r3c6]-2-[r8c6]): we have seen above that r5c5=2, which implies r1c5=3 (-2-[r1c5]) which in turn makes r3c6=2 and we have the second end weak link to the target cell r8c6.
-3-[r1c1]=3=[r3c1]=8=[r3c2]-8-[r9c2]-6-[r9c4]-3-[r8c6]: from before we have seen that r1c5=3. But we have a strong link with label 3 between cells r1c1/r3c1, and so r1c5=3 implies r1c1<>3 which implies r3c1=3 ([r1c5]-3-[r1c1]=3=[r3c1]). Now we have another strong link, this time with label 8, between cells r3c1 and r3c2: but we have seen that we have r3c1=3 and so this implies r3c1<>8 => r3c2=8 ([r3c1]=8=[r3c2]). If you remember, the first ramification of the SIN ended with a weak link labeled 4 in cell r9c2, turning it a bivalue cell with candidates 6,8. But we now have r3c2=8 and this makes r9c2=6 ([r3c2]-8-[r9c2]) which in turn implies that r9c4=3 and here we have the third and last end weak link to the target cell r8c6, turning it an empty cell and revealing a contradiction.
Carcul