Thanks Serg,
for reading my method so carefully.
Thanks blue,
from your graphic i could see the redundant checks of my method.
The point is, that i do it house by house, i.e. i start with a house and count all comparisons needed to prove, that it has all digits, then the next one and so on. This turned out to count redundant checks in those cases.
For nr 18 it looked like that (in the constellation shown in your graphic):
skipped r1, c1, b3678
- Code: Select all
|
--1 2 *--
4 5 *
* * 9
|
- verify rows 2345 and columns 2345 with 28 checks each.
- now the 4 boxes 1245 all must have 2 distinct minirows an columns, and can be verified with 16 checks
- with the 4 boxes all minirows must be distinct, and we can verify r6 and c6 with 22 checks
- now in band and stack 2 two boxes and 3 lines are verified, so also b6 and b8
- now we verify r78 and c78, need only 25 checks each because the minirows of b68 must be distinct
- then box 9 needs 16 checks
- at the end we verify r9 and c9, because of the 2 verified boxes we need 22 checks each
- with the 3 columns c789 and 2 boxes 69 b3 is verified, with r789 and b89 b7.
So we had 8*28 + 4*16 + 2*22 + 4*25 + 16 + 2*22 = 492 checks.
BUT:
With the verification of b3 and b7 also all minirows/columns must be distinct, especially r23c789 and r789c23, which we have checked in the first step.
So we can leave them out and substract 4*3=12 from the overall count, getting the desired 480.