Bug + n Example(Implemented by my Solver)

Advanced methods and approaches for solving Sudoku puzzles

Bug + n Example(Implemented by my Solver)

Postby yzfwsf » Sat Jun 27, 2020 11:30 pm

Hidden Text: Show
Code: Select all
.1.8...6.9...3...1..5..18.....94..1...7..8..5.9.7..6.......7.4..8..2.7....14.3..2
.---------------------------------.---------------------------------.---------------------------------.
|  37         1          2        |  8          79         45       |  35         6          49       |
|  9          67         8        |  25         3          46       |  45         27         1        |
|  3467       34         5        |  26         79         1        |  8          27         39       |
:---------------------------------+---------------------------------+---------------------------------:
|  8          5          36       |  9          4          26       |  23         1          7        |
|  16         24         7        |  3          16         8        |  24         9          5        |
|  12         9          34       |  7          15         25       |  6          38         48       |
:---------------------------------+---------------------------------+---------------------------------:
|  23         23         9        |  56         58         7        |  1          4          68       |
|  45         8          46       |  1          2          9        |  7          35         36       |
|  57         67         1        |  4          68         3        |  9          58         2        |
'---------------------------------'---------------------------------'---------------------------------'

type 1.png
type 1.png (29.41 KiB) Viewed 1183 times

Hidden Text: Show
Code: Select all
..1...7......6...464...9.1...2.534..4..7.....86..4...5..3...1...1......2...5...6.
.---------------------------------.---------------------------------.---------------------------------.
|  3          2          1        |  4          8          5        |  7          9          6        |
|  59         579        89       |  13         6          17       |  2          38         4        |
|  6          4          78       |  23         27         9        |  5          1          38       |
:---------------------------------+---------------------------------+---------------------------------:
|  1          79         2        |  6          5          3        |  4          78         89       |
|  4          3          5        |  7          9          8        |  6          2          1        |
|  8          6          79       |  12         4          12       |  39         37         5        |
:---------------------------------+---------------------------------+---------------------------------:
|  259        589        3        |  89         27         6        |  1          4          79       |
|  7          1          6        |  89         3          4        |  89         5          2        |
|  29         89         4        |  5          1          27       |  389        6          379      |
'---------------------------------'---------------------------------'---------------------------------'

type 2.png
type 2.png (30.37 KiB) Viewed 1183 times

Hidden Text: Show
Code: Select all
.1....2..3......6...5.7...3.5..34..6..87...1...7.6.9...6..13.7....4....8..3.5.6..
.---------------------------------.---------------------------------.---------------------------------.
|  78         1          6        |  3          48         59       |  2          59         47       |
|  3          278        49       |  29         48         1259     |  18         6          57       |
|  49         28         5        |  6          7          12       |  18         49         3        |
:---------------------------------+---------------------------------+---------------------------------:
|  29         5          29       |  1          3          4        |  7          8          6        |
|  6          3          8        |  7          29         29       |  45         1          45       |
|  1          4          7        |  5          6          8        |  9          3          2        |
:---------------------------------+---------------------------------+---------------------------------:
|  25         6          24       |  8          1          3        |  45         7          9        |
|  57         79         1        |  4          29         6        |  3          25         8        |
|  48         89         3        |  29         5          7        |  6          24         1        |
'---------------------------------'---------------------------------'---------------------------------'

type 3.png
type 3.png (30.94 KiB) Viewed 1183 times
Last edited by yzfwsf on Sun Jun 28, 2020 12:04 am, edited 1 time in total.
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: Bug + n Example(Implemented by my Solver)

Postby yzfwsf » Sat Jun 27, 2020 11:31 pm

Hidden Text: Show
Code: Select all
.1.5...6.8...1...7..2..89.....17...6..1..68...9....4.55...4...2...........89.....
.---------------------------------.---------------------------------.---------------------------------.
|  3          1          47       |  5          9          47       |  2          6          8        |
|  8          46         9        |  26         1          24       |  5          3          7        |
|  67         5          2        |  67         3          8        |  9          4          1        |
:---------------------------------+---------------------------------+---------------------------------:
|  4          8          5        |  1          7          9        |  3          2          6        |
|  2          3          1        |  4          5          6        |  8          7          9        |
|  67         9          67       |  23         8          23       |  4          1          5        |
:---------------------------------+---------------------------------+---------------------------------:
|  5          67         3        |  8          4          1        |  67         9          2        |
|  9          2467       46       |  37         26         5        |  1          8          34       |
|  1          2467       8        |  9          26         37       |  67         5          34       |
'---------------------------------'---------------------------------'---------------------------------'

type 4.png
type 4.png (32.31 KiB) Viewed 1182 times

Hidden Text: Show
Code: Select all
..4.8.....9...6.723..2..8...4.9.5..8..91..5.........9.4.....3......7..8.23...4..6
.---------------------------------.---------------------------------.---------------------------------.
|  6          2          4        |  7          8          19       |  19         3          5        |
|  18         9          18       |  3          5          6        |  4          7          2        |
|  3          57         57       |  2          4          19       |  8          6          19       |
:---------------------------------+---------------------------------+---------------------------------:
|  17         4          3        |  9          6          5        |  17         2          8        |
|  78         6          9        |  1          2          78       |  5          4          3        |
|  5          18         2        |  4          3          78       |  6          9          17       |
:---------------------------------+---------------------------------+---------------------------------:
|  4          578        5678     |  568        19         2        |  3          15         79       |
|  9          15         156      |  56         7          3        |  2          8          4        |
|  2          3          578      |  58         19         4        |  79         15         6        |
'---------------------------------'---------------------------------'---------------------------------'

None Type.png
None Type.png (31.52 KiB) Viewed 1182 times
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: Bug + n Example(Implemented by my Solver)

Postby rjamil » Sun Jun 28, 2020 1:21 am

Hi yzfwsf,

Type 1: If single guardian cell contain either one or more guardian(s) then remove BUG candidates from guardian cell;

Type 2: If single guardian occupy more than one guardian cells then that guardian may be remove from the common peer of all guardian cells;

Type 3: If a guardian occupy in single guardian cell then remove all BUG candidates from that guardian cell;

Type 4: I think, 2 @ r89c2 are not guardian candidates and may be removed from them.

None Type: BUG candidate 6 @ r7c3 may also be removed due one of the 7 and 8 guardian may be placed in guardian cell r7c3.

Hope that the above definitions are logically correct.

R. Jamil
Last edited by rjamil on Sun Jun 28, 2020 1:55 am, edited 1 time in total.
rjamil
 
Posts: 730
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Bug + n Example(Implemented by my Solver)

Postby yzfwsf » Sun Jun 28, 2020 1:45 am

rjamil wrote:Hi yzfwsf,

In "Type 4.png" example, I think, 2 @ r89c2 are not guardian candidates.

R. Jamil


Type 1: only one cell has guardians. You can delete the non guardians.(Thank to SpAce point out it)
Type 2: all the guardians are the same candidate number,all candidates seeing all the guardians can be eliminated.
Type 3: all cells with guardians are in the same house, and all guardians form a virtual cell, which forms a Naked / locked subsets with other cells in the house
Type 4: only two cells have a guardian and are in the same house. If one of the non Guardian candidates is SIS in this house, the other non Guardian candidates can be deleted
Type 5:logic same as AIC Type 2
Only the green background candidates are the guardians.
Last edited by yzfwsf on Sun Jun 28, 2020 3:15 am, edited 1 time in total.
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: Bug + n Example(Implemented by my Solver)

Postby rjamil » Sun Jun 28, 2020 2:07 am

Hi yzfwsf,

Phew. Just updated my above post and see your reply, almost same thoughts.

R. Jamil
Last edited by rjamil on Sun Jun 28, 2020 2:17 am, edited 2 times in total.
rjamil
 
Posts: 730
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Bug + n Example(Implemented by my Solver)

Postby yzfwsf » Sun Jun 28, 2020 2:14 am

rjamil wrote:Hi yzfwsf,

Phew. Just updated my above post and see your reply, almost same thoughts.

In your Type 4 example, 2 may also be removed from guardian cells r89c2 safely.

R. Jamil

No, if you remove 2r89c2, where is the 2 in box 7.The bug + n technique can only guarantee 1 of n must be true.
In the type 4 example. Two Guardian cells, one is 2 and another one is one of 467.
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: Bug + n Example(Implemented by my Solver)

Postby rjamil » Sun Jun 28, 2020 2:22 am

Hy yzfwsf,

Thanks for the clarification. Just distinguish blue and green background color. Its my sight mistake.

Now its clear that two guardian cells and each contain a unique guardian and common one. Since, both sees each other, therefore, unique guardians may be removed from opposite guardian cells.

Thanks again.

R. Jamil
rjamil
 
Posts: 730
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Bug + n Example(Implemented by my Solver)

Postby yzfwsf » Sun Jun 28, 2020 2:35 am

rjamil wrote:Hy yzfwsf,

Thanks for the clarification. Just distinguish blue and green background color. Its my sight mistake.

Now its clear that two guardian cells and each contain a unique guardian and common one. Since, both sees each other, therefore, unique guardians may be removed from opposite guardian cells.

Thanks again.

R. Jamil

Your understanding is still wrong. In fact, type 4 only focuses on non Guardian numbers,in example is 27r8c2\24r9c2. Two more example for type 4.
Hidden Text: Show
Code: Select all
3....97...2......8..1.7..4.1..4..8...5......1..8.2..3......4..27..6..9....3.5..1.
.---------------------------------.---------------------------------.---------------------------------.
|  3          48         45       |  1          68         9        |  7          2          56       |
|  56         2          7        |  3          4          56       |  1          9          8        |
|  5689       69         1        |  2          7          568      |  35         4          36       |
:---------------------------------+---------------------------------+---------------------------------:
|  1          3          2        |  4          69         67       |  8          5          79       |
|  4          5          69       |  78         89         3        |  2          67         1        |
|  69         7          8        |  5          2          1        |  46         3          49       |
:---------------------------------+---------------------------------+---------------------------------:
|  58         18         69       |  79         13         4        |  35         67         2        |
|  7          14         45       |  6          13         2        |  9          8          35       |
|  2          69         3        |  89         5          78       |  46         1          47       |
'---------------------------------'---------------------------------'---------------------------------'

type 4-2.png
type 4-2.png (29.37 KiB) Viewed 1155 times

Hidden Text: Show
Code: Select all
3..4..6...4..1..3...8..7..9.1..9.7..8.5..2.4...7.....24..3.1..8..35......8..7....
.---------------------------------.---------------------------------.---------------------------------.
|  3          27         12       |  4          5          9        |  6          8          17       |
|  79         4          69       |  26         1          8        |  25         3          57       |
|  15         56         8        |  26         3          7        |  4          12         9        |
:---------------------------------+---------------------------------+---------------------------------:
|  2          1          4        |  8          9          3        |  7          56         56       |
|  8          9          5        |  7          6          2        |  13         4          13       |
|  6          3          7        |  1          4          5        |  8          9          2        |
:---------------------------------+---------------------------------+---------------------------------:
|  4          56         69       |  3          2          1        |  59         7          8        |
|  79         27         3        |  5          8          46       |  19         12         46       |
|  15         8          12       |  9          7          46       |  235        56         3456     |
'---------------------------------'---------------------------------'---------------------------------'

type 4-3.png
type 4-3.png (31.25 KiB) Viewed 1155 times
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: Bug + n Example(Implemented by my Solver)

Postby SpAce » Sun Jun 28, 2020 3:02 am

Hi yzfwsf,

Thanks for these great examples. Keep them coming! A couple of comments:

yzfwsf wrote:Type 1: only one cell has guardians. You can delete the guardians

Should be 'non-guardians".

Type 3: all cells with guardians are in the same house, and all guardians form a virtual cell, which forms a Naked / locked subsets with other cells in the house

You can also eliminate 2r2c2 if you look at it this way:

(8)r2c2 == (2948)r2c6435 => -2 r2c2, -8 r2c7

or even 1r2c6 with a bit of stretching:

(81)r2c27 == (2948)r2c6435 => -1 r2c6, -2 r2c2, -8 r2c7

(However, both are ripple effects of -8r2c7 so they make no difference. You get the same result by eliminating any of the three.)

Type 4: only two cells have a guardian and are in the same house. If one of the non Guardian candidates is SIS in this house, the other non Guardian candidates can be deleted

One way to describe that is a virtual hidden pair (any guardian + the strongly linked non-guardian), similar to Type 3 being a virtual naked subset.
Last edited by SpAce on Sun Jun 28, 2020 3:26 am, edited 1 time in total.
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Re: Bug + n Example(Implemented by my Solver)

Postby rjamil » Sun Jun 28, 2020 3:05 am

Hi yzfwsf,

Thanks for providing further examples (with text form).

Why it is always true for one guardian in one guardian cell that the same guardian is part of the final solution?

Am I still interpreting wrongly for BUG+n move, If a guardian is present in one guardian cell, then all BUG candidates may be removed from that guardian cell?

Similarly, is there any scenario, where one guardian (not unique) is not the solution, if present in sole guardian cell? (Just like to treat as BUG+1 move.)

For examples:
In Type 3: 8 @ r2c2;
In Type 4-2: 6 @ r3c6; and
In Type 4-3: 5 @ r9c7.

R. Jamil
rjamil
 
Posts: 730
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Bug + n Example(Implemented by my Solver)

Postby yzfwsf » Sun Jun 28, 2020 3:21 am

rjamil wrote:Hi yzfwsf,

Thanks for providing further examples (with text form).

Why it is always true for one guardian in one guardian cell that the same guardian is part of the final solution?

Am I still interpreting wrongly for BUG+n move, If a guardian is present in one guardian cell, then all BUG candidates may be removed from that guardian cell?

Similarly, is there any scenario, where one guardian (not unique) is not the solution, if present in sole guardian cell? (Just like to treat as BUG+1 move.)

R. Jamil

Only one of all the guardians in all guardian cells must be true, not one of guardians in each guardians cell.Say bug+6, 6 guardians in 3 cells ,only 1 of 6 must be true, not 3 of 6 are true
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: Bug + n Example(Implemented by my Solver)

Postby rjamil » Tue Jun 30, 2020 1:05 am

Hi yzfwsf,

Understand from BUG+n Type 4 that, it needs additional strong inference sets (SIS) in order to remove something, whereas, I want to know that, the only guardian(s) and guardian cell(s) is/are enough to derive any deductions.

Ok, one last attempt to convey my point of view. (Please accept it as my childish attempt.)

yzfwsf wrote:Only one of all the guardians in all guardian cells must be true, not one of guardians in each guardians cell.Say bug+6, 6 guardians in 3 cells ,only 1 of 6 must be true, not 3 of 6 are true

If I interpret your above mentioned statement correctly then you mean that, in BUG+6, where 6 guardians in 3 guardian cells, even then, at least one of the 3 guardian cell may contain guardian. Whereas, the other 2 guardian cells either may or may not contain guardian(s).

But, my observations are as follows:
- each guardian is a solution of one of its guardian cell(s), if number of guardians is less than or equals to number of guardian cells; and
- each guardian cell contains one of its guardian(s) as solution, if number of guardians is greater than number of guardian cells.

Well, any example that violates my observations is highly appreciated. (I already surrender myself for BUG+n move and will again thinking once confirmed/understand that Type 4 need to be some kind of SIS as SOS support.)

R. Jamil
----------
SOS = Solve Out Sudoku.
rjamil
 
Posts: 730
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Bug + n Example(Implemented by my Solver)

Postby yzfwsf » Tue Jun 30, 2020 1:52 am

Hi rjamil
How do you explain the following example according to your logic?
Code: Select all
..32....6.5..3....8......5..7.5...6.....2.8....84....7..47.29..6....1....3..8...4

type 3-1.png
type 3-1.png (32.34 KiB) Viewed 1102 times
yzfwsf
 
Posts: 852
Joined: 16 April 2019

Re: Bug + n Example(Implemented by my Solver)

Postby rjamil » Tue Jun 30, 2020 2:19 am

Hi yzfwsf,

Yes, your example violates my observations.

Thanks.

Edit as on 20200703: On second thought, I see lot of other non-complex moves present at the current puzzle state.

By my reckoning, a BUG+n (where n => 1) move is considered as last resort. So, the above BUG+2 move is considered as wrong move, to the best of my knowledge.

Is BUG+n move also possible in degenerating case?

R. Jamil
rjamil
 
Posts: 730
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Bug + n Example(Implemented by my Solver)

Postby SpAce » Sat Jul 11, 2020 2:49 pm

rjamil wrote:Edit as on 20200703: On second thought, I see lot of other non-complex moves present at the current puzzle state.

the puzzle state: Show
..32....6.5..3....8......5..7.5...6.....2.8....84....7..47.29..6....1....3..8...4
Code: Select all
.-------------.---------.------------.
| 47   14  3  | 2  5  9 | 17  8   6  |
| 179  5   79 | 8  3  6 | 14  47  2  |
| 8    2   6  | 1  7  4 | 3   5   9  |
:-------------+---------+------------:
| 234  7   12 | 5  9  8 | 24  6   13 |
| 35   49  15 | 6  2  7 | 8   49  13 |
| 29   6   8  | 4  1  3 | 5   29  7  |
:-------------+---------+------------:
| 15   18  4  | 7  6  2 | 9   3   58 |
| 6    89  59 | 3  4  1 | 27  27  58 |
| 27   3   27 | 9  8  5 | 6   1   4  |
'-------------'---------'------------'

What exactly do you consider non-complex? I don't see anything less complex than the BUG+2 move. In fact, to me it's the least complex and the most elegant one available here. It's also the easiest to spot, by far.

By my reckoning, a BUG+n (where n => 1) move is considered as last resort. So, the above BUG+2 move is considered as wrong move, to the best of my knowledge.

There's no such thing as a wrong move, unless it uses invalid logic. The only way such a description would make sense is if you clearly specified what strategy is being used. Then a move can be considered "wrong" if it's a poor fit for that particular strategy.

For example, if your strategy is "simplest first" then a complex move would be wrong if simpler moves are available. However, even that totally depends on the chosen definition of "simple" and the resulting hierarchy of moves. What do you think is the simplest available move here?

Also, simple and easy are not always synonyms. The latter is an even more subjective concept. Thus, "easiest first" is a different strategy from "simplest first". It uses (potentially) a different hierarchy of moves, and that hierarchy would be different for each solver.

For example, in this case (and in most cases) the BUG+2 is the easiest available move for me, by far. I can see it at a glance just by eyeballing. Any other available move I would actually have to search for. It also happens to be the simplest, as far as I'm concerned. So, how could you say it's a wrong move?

If you want a realistic hierarchy based on what's actually easy for human solvers, you should probably ask them. Of course the answers will vary, but they'll still probably be different from what you think. What is easy for a software solver is often very different from what is easy for a manual solver, and vice versa.

Is BUG+n move also possible in degenerating case?

I don't understand the question.
User avatar
SpAce
 
Posts: 2671
Joined: 22 May 2017

Next

Return to Advanced solving techniques