Hi
rjamil,
I'd written most of this before I noticed your second post, so this only addresses the first one. I'll look at the other one shortly.
rjamil wrote:SpAce wrote:Does this help?
Not at all!!!
Well, that's discouraging, but it's good that you give honest feedback. It's much better to tell frankly if you don't understand something.
Actually, what I understand all about BUG+n now is that, if puzzle pencilmark state reached, where all unsolved cells having only bi-value remain, except 'n' cells, then check each digit from 'n' cells, if digit present in more than two cells within a same unit (i.e., either row or column or box) then that digit is marked as BUG digit guardian; and that cell is marked as BUG guardian cell.
Not so fast. That's almost correct, but not quite. If you apply that algorithm to the current puzzle, for example, and fail to do any other checks, you might end up with this and think you've found a BUG and its guardians:
- Code: Select all
.---------.----------------.---------.
| 4 8 1 | 9 7 2 | 3 6 5 |
| 7 9 3 | 56 68 58 | 2 4 1 |
| 6 2 5 | 34+1 13 14+3 | 7 8 9 |
:---------+----------------+---------:
| 8 1 2 | 36 36 9 | 4 5 7 |
| 3 5 6 | 8 4 7 | 9 1 2 |
| 9 4 7 | 25+1 12 15 | 8 3 6 |
:---------+----------------+---------:
| 5 3 8 | 7 9 6 | 1 2 4 |
| 1 6 9 | 24 28 48 | 5 7 3 |
| 2 7 4 | 13 5 13 | 6 9 8 |
'---------'----------------'---------'
Does that look like a BUG+3 to you? At first glance it might because removing those three +candidates would leave only bivalue cells behind, and most of the bilocation checks work too, as you'd have only two of 1s and 3s each in box 2 and row 3 if the +candidates were removed. However, you have either one or three of them in columns 4 and 6. Clearly that can't work, since a BUG needs either zero or two of every digit in
every house. Removing those +candidates would give you two hidden singles (1r9c4 and 3r9c6) which can't happen with a real BUG. Thus, this is not a BUG with that guardian configuration.
The easiest way to avoid such hazards is to mark the most unambiguous guardians first, which usually resolves the rest too. In this case it's easiest to start with the trivalue cell r6c4. Since both 2 and 5 exist precisely twice in all of their units, they can't be guardians. That leaves the 1 as the only possibility. Since there are three 1s in all of its houses (box, row, column) it can be marked as a guardian. It also means that 1r3c4 (which was originally ambiguous) can't be a guardian because removing both that and 1r6c4 would leave only one 1 in column 4. That leaves 3r3c4 as the only possibility since the 4 exists exactly twice in all of its houses. That also locks the 1r3c6 as the last remaining guardian (we could have known that directly too, because there are only two 3s in column 6, so it can be neither 3 nor 4).
If you apply that process systematically, you'll end up with one of three possibilities: 1) you found a single BUG and all of its guardians, 2) you found a
multi-BUG (i.e. multiple possible BUGs with different sets of guardians), or 3) you found that a BUG is not possible in the current puzzle state. There are some advanced (and mostly theoretical) things you can do with options 2 and 3, but mostly we dismiss them, and only continue BUG solving with option 1.
(Now, a question arises that, what to call the remaining digits in BUG guardian cells?)
I've called them "BUG candidates" since they're actually part of the BUG (deadly pattern) itself. The extras are
guardians or
guardian candidates since their existence ensures the puzzle remains valid by preventing the BUG from forming. I strongly advice against calling the guardians "BUG digits" or "BUG values", because they specifically are
not part of the BUG. Similarly I recommend calling their cells
guardian cells instead of "BUG cells" (because in a BUG situation every unsolved cell is logically a "BUG cell"). "Guardian" is a standard term in the context of any deadly pattern, so please start using that to avoid misunderstandings. (Ignore any other terms you've possibly seen in ancient posts. They're obsolete.)
Note also that a single guardian
cell can have more than one guardian
candidate. That's why you could have, for example, three guardian cells but five actual guardians. That would be BUG+5 instead of BUG+3. Like I said, 'N' is the count of the actual guardian candidates instead of the guardian cells. (Again, if you find conflicting information in ancient posts, ignore that. This is the current standard, and the only one that makes sense.)
If, by placing a guardian(s) in to guardian-cell(s) considered as T&E, then what would be considered to remove a non-guardian from guardian cell(s)?
I'm not exactly sure what you're asking or if I translated that correctly into the standard terminology. In any case, if you're going to use T&E anyway, there's no reason to even find the BUG and its guardians. It's mostly just a waste of time in that case. Just use T&E directly on any candidate that seems like a good elimination and forget about BUGs.
(Btw, I presume you know the difference between T&E and guessing? In any case the difference is that T&E only accepts contradictions and their resulting eliminations. Guessing accepts also solutions found directly by trying a candidate without proving any eliminations. Of those T&E is considered a valid, if not very elegant, solving method and proof of a step. Guessing is not, even if it may very well be the fastest way to solve a puzzle.)
Anyway, if you do find the BUG and still want to use T&E instead of real BUG solving, there's a smart way and an extremely dumb way to do it. The smart way is to try to eliminate
non-guardians via contradictions, because that can solve the puzzle with just a single elimination or a few at most. However, if you use T&E on guardian candidates, you'll run into a dead end. The only way that would make sense is if you accept guessing, but we don't even consider that possibility.
What happens if you T&E guardian candidates? If it's a true candidate, it will eventually lead to a solution. Yet, since we don't accept guesses that doesn't help at all, so we just discard the result. If it's a false candidate, it will run into a contradiction and we can eliminate it. However, eliminating a guardian will never solve the puzzle. All it does is reduce the size of the N by one, but a BUG+(N-1) still remains. So, even if you eliminate all false guardians, you still have to use normal BUG-solving or some other method to finish the puzzle. The luckiest case is if there's only one true guardian, which means you'll end up with BUG+1 after eliminating all the false ones. However, there's no guarantee of that, because there may be many true guardians (possibly all of them). So why not just place the remaining guardians if you're pretty sure they must be true candidates? You could, but that's still (a very informed way of) guessing, and as such it's not an acceptable solving step (unless your only goal is to find the solution no matter what). In any case it's an extremely dumb and inefficient way to use a BUG, so don't.
Btw, BUGs and T&E was covered extensively in
this thread. The original poster used exactly what I just described as the "extremely dumb" T&E strategy, i.e. tried to eliminate all false guardians via contradictions. Pointing out the horrible inefficiency of that approach (and its clearly faulty implementation), and a few other errors of his ways, was probably why that person got so mad at me that he had to resort to slandering recently. Some people simply can't admit their mistakes, which is why they'll never learn. (Sure, I could have been more diplomatic, but my patience was running thin.)
So, once more. If you really wish to solve a BUG+N situation with T&E, do not test the guardian candidates. It's the dumbest thing you could do, unless you accept guessing (don't). The only other reason that makes some sense is if you want to reduce the number of guardians for an easier BUG solution. However, if you're using T&E anyway, you might as well do it all the way and target more effective candidates directly (i.e. non-guardians). If you invest in finding a BUG, learn to solve it like a BUG.