Thanks to the work of several people, we all know what unique rectangles are and how they can be used to make useful deductions. But, what can happen if we have, not a unique rectangle, but a set of cells that is very closely a unique rectangle? What I am about to say next may have been already discovered or used by someone else (if this is the case, I apologize), but even then let me share my thoughts.
Allowd me to define an almost unique rectangle (which, from now on, I will abbreviate as AUR) in the following way:
- Code: Select all
Almost Unique Rectangle (AUR): a set of four cells populated in such a way that if one or two of them does not have a specific candidate 'x', then those four cells form a unique rectangle.
As we know, the presence of a unique rectangle will force some value in one of those cells or exclude a value from one or more cells. Lets see three simple examples of AURs:
- Code: Select all
. . . | . . 12 | . 127 .
. . . | . . 127| . 124 .
. 178 178| . . . | . . 47
----------+--------+------------
. . . | . . . | . . .
. . . | . . 35 | 358 . .
. . . | . . 357| 35 . .
----------+--------+------------
. 179 179| . . . | . . .
. . . | . . . | . . .
. . . | . . . | . . .
Cells r3c23/r7c23 form what I call a type 1 AUR (we would still have this type of AUR if: one of the 9 were not present in r7c23, or if one of the 8 were not present in r3c23; instead of the two 9s in r7c23 we have two 8s): we can see that if 8 is not in both cells r3c2/r3c3 then uniqueness requires that 9 must be in one of the cells r7c2/r7c3, and vice-versa for 9 in cells r7c2/r7c3. This can be expressed by the link [r3c2|r3c3]=8|9=[r7c2|r7c3], where =8|9= is a link similar but not completely equivalent to the type of link that exists in an ALS having two of his values in just one cell each.
On the other hand, cells r5c67/r6c67 form what I call a type 2 AUR: in this case, if 7 is not in r6c6 then uniqueness requires that 8 must be in r5c7; conversely, if 8 is not in r5c7, then 7 must be in r6c6. This is equivalent to the link [r6c6]=7|8=[r5c7]. This link is a very interesting one: please note that it relates directly two cells that are not in the same unit.
Finally, cells r12c6/r12c8 form what I call a type 3 AUR: if "7" is not in r2c6 then "4" or "7" must be in one of the cells r12c8, and these last two cells then form a naked pair with r3c9 (this bivalue cell must be present in order to this type of AUR be useful); if "4" and "7" are not present in cells r12c8 (and this can happen if one of these values occur in a cell of box 3 besides r12c8/r3c9), then "7" must be in r2c6. We can write this link as [r2c6]=7|4,7=[r1c8|r2c8].
As might be expected, the type of link that exists in an AUR can be included in a nice loop and used to make deductions. So, lets see some examples of nice loops that make use of AURs.
I will begin with the type 1 AUR. Consider the following puzzle in the initial state (after the basic steps):
- Code: Select all
167 2 13478| 468 3489 468 | 5 79 168
156 138 9 | 7 358 2568 | 246 246 1268
567 478 478 | 24568 4589 1 | 79 3 268
----------------+-----------------+-----------------
4 15 126 | 13 7 58 | 1236 2568 9
3 59 16 | 458 2 4589 | 16 58 7
8 1579 127 | 13 6 59 | 123 25 4
----------------+-----------------+-----------------
127 6 38 | 9 1458 24578| 247 247 235
1279 147 147 | 256 15 3 | 8 2679 256
279 38 5 | 2468 48 24678| 24679 1 236
If we look carefully to this grid, we can see two AURs of type 1: one in cells r3c2, r3c3, r8c2, r8c3, and the other in cells r2c7, r2c8, r7c7, r7c8. In the first one, if 8 is not in r3c2/r3c3 then 1 must be in one of the cells r8c2/r8c3, and vice-versa, so we have here the link [r8c2|r8c3]=1|8=[r3c2|r3c3]. We can make use of this link to eliminate an 8 from r2c2 and r3c5:
[r2c2]=3=[r1c3]-3-[r7c3]=3=[r7c9]=5=[r8c9]-5-[r8c5]-1-[r8c2|r8c3]=1|8=[r3c2|r3c3]-8-[r2c2]
=> r2c2<>8.
[r3c5]=9=[r1c5]=3=[r1c3]-3-[r7c3]=3=[r7c9]=5=[r8c9]-5-[r8c5]-1-[r8c2|r8c3]=1|8=[r3c2|r3c3]-8-[r3c5]
=> r3c5<>8.
Later in the solving of this grid it is also possible to use the other type 1 AUR to make a deduction. As an exercise, the reader may want to complete the solving of this puzzle.
Now lets see an example of a type 2 AUR. Consider the following puzzle:
- Code: Select all
3 1 . | 6 . . | . . .
. . 2 | . . . | . . .
. 8 . | . 9 . | 7 6 .
-------+-------+------
. . . | . . 5 | . . .
. 6 . | . 1 . | . 9 .
. . . | 4 . . | . . .
-------+-------+------
. 9 8 | . 6 . | . 3 .
. . . | . . . | 5 . .
. . . | . . 7 | . 4 2
After all basic steps we get:
- Code: Select all
3 1 9 | 6 7 48 | 248 25 458
6 7 2 | 38 5 348| 48 1 9
5 8 4 | 2 9 1 | 7 6 3
-----------+-----------+------------
278 4 137| 9 238 5 | 6 27 18
28 6 35 | 7 1 38 | 2348 9 458
9 23 157| 4 238 6 | 238 57 15
-----------+-----------+------------
4 9 8 | 5 6 2 | 1 3 7
27 23 37 | 1 4 9 | 5 8 6
1 5 6 | 38 38 7 | 9 4 2
Simple Sudoku continues the solving of this grid with two XY-Wings and then gets stuck. It is easy to find in this grid nice loops or perhaps other arguments that solve the puzzle. But please note the following: the cells r1c6, r1c7, r2c6, and r2c7 form an AUR of type 2, where it is easy to see that if 3 is not in r2c6, uniqueness requires that r1c7 = 2; conversely, if 2 is not in r1c7, then 3 must be in r2c6. So, we can consider the link [r2c6]=3|2=[r1c7] and write the following nice loop,
[r6c3]=1=[r4c3]-1-[r4c9]-8-[r6c7]=8=[r6c5]-8-[r5c6]-3-[r2c6]=3|2=[r1c7]-2-[r1c8]-5-[r6c8]-7-[r6c3]
which implies r6c3<>7 and that solve the puzzle.
Lets look at another example (kindly provided by Bennys) of this type of AUR. The initial grid:
- Code: Select all
7 . . | 6 . . | 3 . 1
. 4 6 | . . . | . 9 .
2 . . | . 4 . | . 8 .
-------+-------+------
. . . | 4 . 3 | . . 8
. . 4 | . 6 . | 1 . .
5 . . | 8 . 7 | . . .
-------+-------+------
. 2 . | . 8 . | . . 3
. 7 . | . . . | 8 1 .
4 . 8 | . . 9 | . . 6
from where we get with the basic steps:
- Code: Select all
7 589 59 | 6 259 258 | 3 4 1
18 4 6 | 35 357 18 | 257 9 25
2 1359 1359| 579 4 15 | 6 8 57
--------------+-------------+--------------
19 169 7 | 4 259 3 | 25 256 8
389 389 4 | 259 6 25 | 1 2357 257
5 36 2 | 8 1 7 | 49 36 49
--------------+-------------+--------------
169 2 159 | 157 8 46 | 49 57 3
369 7 359 | 235 235 46 | 8 1 49
4 135 8 | 135 357 9 | 257 25 6
In this grid we have a type 2 AUR in cells r4c7, r4c8, r9c7, r9c8, for which we have the link [r4c8]=6|7=[r9c7]. Thus, we can write the loop
[r4c8]=6|7=[r9c7]-7-[r7c8](-5-[r4c8])-5-[r9c8]-2-[r4c8]
which implies r4c8<>2,5 => r4c8=6 and that solve the puzzle.
A variation of the type 2 AUR exists when both candidates are in the same cell, which in this case function as a bivalue node. Let´s see an example (kindly provided by Ronk):
- Code: Select all
368 36 68 | 5 2 1 | 79 4 79
1 4 2 | 3 79 79| 5 8 6
9 7 5 | 46 48 68| 3 2 1
------------+-----------+-------------
36 369 4 | 8 679 2 | 79 1 5
2 5 69 | 1 4679 79| 48 3 4789
7 8 1 | 49 3 5 | 24 6 249
------------+-----------+-------------
5 69 689| 2 1 4 | 68 7 3
468 1 3 | 7 5 68| 2468 9 248
468 2 7 | 69 89 3 | 1 5 48
This is puzzle #272 from top1465. We have a modified type 2 AUR in cells r2c56/r5c56, which can be used in the following loop,
[r7c3]=8=[r7c7]-8-[r5c7]-4-[r5c5]-6-[r5c3]-9-[r7c3],
which implies r7c3<>9 and that solve the puzzle.
Let's see now an example of a type 3 AUR. The initial grid:
- Code: Select all
1 . . | . . . | 7 . 2
. 3 . | 1 . . | . . .
. 9 . | . . . | . . .
-------+-------+------
. . . | 3 9 . | . 6 .
5 . 8 | . . . | 2 . .
. . . | . . . | . . .
-------+-------+------
2 . . | . . 8 | 5 . .
. . . | 6 . . | . 9 .
. . . | . 4 . | . . .
from which we get after some steps
- Code: Select all
1 458 45 | 9 6 3 | 7 58 2
6 3 257| 1 2578 257| 9 58 4
78 9 257| 28 2578 4 | 6 1 3
-------------+------------+-----------
47 247 1 | 3 9 257| 48 6 58
5 67 8 | 4 17 167| 2 3 9
9 246 3 | 28 258 256| 14 7 15
-------------+------------+-----------
2 1 9 | 7 3 8 | 5 4 6
478 4578 457| 6 12 12 | 3 9 78
3 78 6 | 5 4 9 | 18 2 178
Here we have a type 3 AUR in cells r1c23/r8c23/r9c2 with the link
[r1c2]=8|7,8=[r8c2|r8c3] (note the presence of the bivalue "7,8" in r9c2).
This link can be used to show that r8c1<>7 in the following way:
[r8c1](-7-[r8c2|r8c3])-7-[r9c2]-8-[r8c2|r8c3]=7,8|8=[r1c2]-8-[r3c1]-7-[r8c1], => r8c1<>7.
To finish this post, allowd me to present an example of an almost unique loop. Consider the following puzzle,
- Code: Select all
. 1 . | . 7 . | . . .
. 2 6 | . . . | . 5 7
5 . . | . . . | . . 3
-------+-------+------
. . 8 | 2 . . | . . .
. 5 . | . . 4 | 3 . 2
4 . . | . 3 7 | . 8 .
-------+-------+------
. . . | . 5 3 | 4 . .
. . 5 | . . . | . . 8
. 8 . | . . . | . 9 6
and allowd me to jump to the final step of my solution of this grid:
- Code: Select all
389 1 39 | 35 7 25689| 2689 26 4
389 2 6 | 34 149 189 | 89 5 7
5 47 47 | 69 269 2689 | 2689 1 3
-----------+--------------+------------
679 3 8 | 2 169 1569 | 167 4 59
679 5 1 | 69 8 4 | 3 67 2
4 69 2 | 15 3 7 | 16 8 59
-----------+--------------+------------
26 69 79 | 8 5 3 | 4 27 1
12 47 5 | 147 69 69 | 27 3 8
13 8 347| 47 124 12 | 5 9 6
As can be seen, we have an almost unique loop in cells r3c2, r3c3, r8c2, r9c3, r8c4, and r9c4. Uniqueness requires that if r9c3 is not 3 then r8c4 must be 1, and if r8c4 is not 1 then r9c3 must be 3. Hence, we can consider the link [r9c3]=3|1=[r8c4] and write the loop
[r9c3]=3|1=[r8c4](-1-[r9c5])-1-[r9c6]-2-[r9c5](-4-[r9c3])-4-[r9c4]-7-[r9c3]
which implies r9c3<>4,7 => r9c3=3 and that solve the puzzle.
Carcul