rjamil wrote:- Code: Select all
+-------------+-------------+--------------+
| 15 6 9 | 2 3 4 | 7 8 15 |
| 24+1 17+4 3 | 5 79 8 | 6 29 14 |
| 25+4 47 8 | 6 79 1 | 29 3 45 |
+-------------+-------------+--------------+
| 3 5 7 | 1 2 6 | 8 4 9 |
| 6 9 1 | 8 4 7 | 3 5 2 |
| 8 2 4 | 9 5 3 | 1 6 7 |
+-------------+-------------+--------------+
| 7 14 5 | 3 6 9 | 24 12 8 |
| 14 3 2 | 7 8 5 | 49 19 6 |
| 9 8 6 | 4 1 2 | 5 7 3 |
+-------------+-------------+--------------+
According to what I need to know about BUG+n move is that:
After detecting BUG-cell(s) and its guardian(s), is there any simple way to eliminate some/all BUG-value(s) from BUG-cell(s) (so that the puzzle crack enough to solve, not necessary but, with either stte or btte only)?
It depends on the situation. If there's a candidate that ALL of the guardians see, then it can be eliminated. It doesn't matter if it's in one of the guardian cells or not; the logic is the same either way. In your example there is such a candidate and it happens to be in a guardian cell: 4r2c1. It can be eliminated because all three guardians see it. Just like ronk wrote:
ronk wrote:From the BUG+3 we know that at least one of r2c1=1, r2c2=4 and r3c1=4 must be true. Each individually true implies r2c1<>4.
That's all there is to it. There's no simpler or more complicated logic to solve BUGs. It's always the same: you must prove the same elimination with each guardian. Otherwise the logic is not valid (even if the elimination happens to be correct).
What I understand from above scenario is that:
1) Lets build the BUG-cells against each guardians:
a) 1 in r2c1; and
b) 4 in r2c2 and r3c1.
Correct so far (except I'd rather call those 'guardian cells' instead of 'BUG cells'). Note that in that one post of mine you mentioned as a source for your terms, I called them 'BUG+ cells' which is more descriptive because the + implies the presence of at least one guardian; i.e. it's a synonym for a 'guardian cell'. On the other hand, 'BUG cell' could be any unsolved cell in the grid, so it's an ambiguous term.
Now check each guardian, if it is present in remaining BUG-cell's BUG-value then remove that guardian from remaining BUG-cell's BUG-value.
I don't know where you found that piece of logic, but it's incorrect (if I even understand it). The only valid eliminations in any situation are those candidates that are seen by
every guardian, either directly or via a chain. It doesn't matter where they are. It's the one and only logic that is applicable in a BUG situation. Forget anything else. There are no simpler tricks, nor are they needed, because that simple piece of logic covers every situation.
It's inefficient and error-prone to try build a catalogue of special cases, when a single simple rule works in all cases. It's trivial to check if all guardians see a candidate directly. It only gets more difficult if you want to eliminate a candidate that is not directly visible to all (or any) of the guardians because then you need chains. On the other hand, any directly visible eliminations are extremely easy. Don't make it more complicated than it is.
In above case guardian 1 is present in r2c1, and it sees remaining BUG-cells, i.e., r2c2 and r3c1. But only one BUG cell contain 1 as BUG-value, so is it safe to remove from r2c2?
No. The guardian 4r3c1 doesn't see it directly. 1r2c1 and 4r2c2 do, but once more: they ALL need to see the elimination. The only way to eliminate 1r2c2 here with BUG logic is to build a chain from 4r3c1 to a remote candidate that does see 1r2c2. For example:
- Code: Select all
.-------------------.-----------.-------------.
| 15 6 9 | 2 3 4 | 7 8 15 |
| a24+1 ah7+4-1 3 | 5 g79 8 | 6 29 14 |
| b25+4 47 8 | 6 f79 1 | e29 3 45 |
:-------------------+-----------+-------------:
| 3 5 7 | 1 2 6 | 8 4 9 |
| 6 9 1 | 8 4 7 | 3 5 2 |
| 8 2 4 | 9 5 3 | 1 6 7 |
:-------------------+-----------+-------------:
| 7 14 5 | 3 6 9 | 24 12 8 |
| c14 3 2 | 7 8 5 | d49 19 6 |
| 9 8 6 | 4 1 2 | 5 7 3 |
'-------------------'-----------'-------------'
(1)r2c1
||
(4)r2c2
||
(4)r3c1 - r8c1 = (4-9)r8c7 = r3c7 - (9=7)r3c5 - r2c5 = (7)r2c2
=> -1 r2c2; stte
That chain proves that 4r3c1 -> 7r2c2. Since 7r2c2 sees 1r2c2 (same cell), the latter can be eliminated, because the other two guardians see it directly (same box or cell).
Remember that the BUG logic only guarantees that at least one of the guardians is true. It means that any single guardian can be false (except in BUG+1) so we can't trust their individual implications at all. In fact, all but one of them can be false (like in this case: only 4r2c2 is a true candidate, but we can't know that in advance). That's why the only valid logic is one that looks at the implications of all guardians at the same time to find where they agree. Only those eliminations can be accepted.
Think it this way. What happens if the only true guardian is 4r3c1 (as it could be because you just don't know)? It would (most simply) imply that r2c2=1. Yet you were just about to eliminate it! That should wake you up to the fact that you can't act on any individual implications (or even combined implications up to N-1) because you can't know if they're true or false. What does it mean in this case that we find a different chain from 4r3c1 that implies the opposite conclusion r2c2<>1? It doesn't mean anything individually either.
However, if we find both of those contradictory implications for 4r3c1 we do know that it (4r3c1) must be false and can be eliminated (that's T&E). It would leave a BUG+2 with just 1r2c1 and 4r2c2 as guardians. Since they both see 1r2c2, it can now be eliminated without any chains. That's one way to simplify BUG situations by reducing guardians, but like I said, if you're going to use T&E you could do it more efficiently by testing and eliminating non-guardians.
Now check guardian 4 is present in r2c2 and r3c1; and both sees r2c1; and it contains 4 as BUG-value. It is safe to remove 4 from BUG-cell r2c1.
Yes, but not with that logic. Again, you only mention 2/3 guardians, and that's not enough for any elimination. You need all 3/3 to agree. No exceptions, ever. In this case that's possible, however, because 1r2c1 also sees 4r2c1 (same cell) so the latter can be eliminated directly (but it's a pretty useless elimination).
Note that, in my dictionary, clue means given; value means candidate (except for Locked candidate name) and so on.
I wish you used "candidate" instead of "value" to avoid confusion, but it's up to you.