generalised deadly patterns

Everything about Sudoku that doesn't fit in one of the other sections

Re: generalised deadly patterns

Postby denis_berthier » Thu Mar 13, 2025 3:56 am

nazaz wrote:Of course, there's a tradeoff to be had here. Do you restrict yourself to a satisfyingly-short catalogue Sudopedia-style DPs and add branching logic to fit the problem at hand, or do you use a larger catalogue of GDPs to enact elegant eliminations in a slightly magical way? Either would be a reasonable position to take, and now that we've heard both sides I don't think it would be profitable to argue the "beauty" question any further.

I agree there's a tradeoff, as in many topics.
Except that your caricature of the other side doesn't rest on anything serious.
There's no "branching logic to fit the problem at hand". ORk-chains are a very general chain pattern, with a very restricted form of OR-branching. It isn't defined "to fit the problem at hand" but is applicable to a wide variety of situations, as I've already shown.
There's no "magical way" on your side: the user has to remember thousands of specific patterns in the catalogue of GDPs. So, the tradeoff could as well be defined as "remember thousands of special patterns" vs "remember only a few ones and use them smartly".
You have the same tradeoff between early detection and risk of missing the pattern.
Larger DPs or GDPs will have more guardians.

nazaz wrote:here's a recap of where we've got to with GDPs and their depletions:
They appear to include everything that people recognise as "deadly", e.g. Sudopedia's narrow formally-defined DPs, UR1.1, MUGs and dobrichev's 7-cell patterns.

What's narrow in Sudopedia's definition?:
Sudopedia wrote:"A deadly pattern is a set of cells whose candidates form a pattern that causes the puzzle to have multiple solutions. "


nazaz wrote:There's a lot of them ... which perhaps you love, perhaps you hate. A matter of personal taste.

No. Mainly a matter of memory.

nazaz wrote:The "new" GDPs are not all just theoretical. Examples can be found within natural-looking solution paths.

No convincing example so far.
.
denis_berthier
2010 Supporter
 
Posts: 4369
Joined: 19 June 2007
Location: Paris

Re: generalised deadly patterns

Postby marek stefanik » Thu Mar 13, 2025 8:24 am

This is my own solution to the puzzle I posted:
Code: Select all
,---------------------,---------------------,-------------------,
| 1234   6     5      | 7       129   249   | 1239  138   2389  |
| 9     #12   #124    |#124     8     3     | 1267  157   2567  |
| 8     #123   7      |#12+9    5     6     | 4     13    239   |
:---------------------+---------------------+-------------------:
| 5     #123+9#12+9   | 29      4     279   | 8     6     237   |
| 12346  7     124689 | 25689   2369  2589  | 123   1345  2345  |
| 2346   238   2468   | 2568    236   1     | 237   9     23457 |
:---------------------+---------------------+-------------------:
| 1267   4     12689  | 12689   1269  289   | 5     378   36789 |
| 26     2589  2689   | 3       7     24589 | 69    48    1     |
| 167    1589  3      | 145689  169   4589  | 679   2     46789 |
'---------------------'---------------------'-------------------'
nearly-deadly pattern 1234#: the only solutions without a U4 have 12 pairs in r23c4 and r4c23
(2=9)r4c4 – 9# == (12r23c4 & 12r4c23) => –2r4c69, –2r5679c4, btte
Proof of nearly-DP: Show
Code: Select all
*12    124    |*124
*123   .      |*12
--------------+-----
 123   12
(3=4)* – (4=12)r2c23 => –12r3c2

Code: Select all
*12   *124    | 124
 3     .      | 12
--------------+-----
*12   *12
UR* => –12r2c3

Code: Select all
 12    4      |*12
 3     .      |*12
--------------+-----
*12   *12
desired pairs


denis_berthier wrote:What's narrow in Sudopedia's definition?:
Sudopedia wrote:"A deadly pattern is a set of cells whose candidates form a pattern that causes the puzzle to have multiple solutions. "
A puzzle with a DP can have no solutions at all.
That excludes all DPs anyone has ever considered in valid puzzles. I do think that is to narrow.
Also the focus on cells. Patterns like reverse bug require other truths, unless you take every cell where one of the digits appears as a candidate.
The actual sudopedia definition (the one in the chapter 'Definition'):
Sudopedia wrote:Formally, a deadly pattern is a collection of cells and their candidates that ...

... have multiple solutions ...
... each of which have the same footprint ...
... but no (cell,value) pairs in common.
solves the first issue, and doesn't refer to any individual puzzle. So far much better.
However, it excludes reverse bugs, permeable DPs, GDPs and others.

denis_berthier wrote:the user has to remember thousands of specific patterns in the catalogue of GDPs.
That is not the case for manual solvers. We can find a new pattern from scratch, if the puzzle calls for it. That's the fun part about solving puzzles.
If you're not interested in them or don't think they are suitable for your solver, just don't include them. No one is forcing you.

I wrote:Suppose you manage to eliminate 1r2c3, 2r2c4, 2r3c2, and 1r4c2.
denis_berthier wrote:I've a much better idea: suppose the puzzle is solved.
It's weird to dismiss a RS just because your solver wouldn't reach it naturally.
In my opinion a computer solver should provide guidance in any RS the user asks it about.
But again, no one is forcing you. You can even have it do something like 'If the RS is not reached by the simplest-first strategy, output a B5B net to spite the user.' It's entirely your choice.

Marek
marek stefanik
 
Posts: 381
Joined: 05 May 2021

Re: generalised deadly patterns

Postby denis_berthier » Thu Mar 13, 2025 9:00 am

marek stefanik wrote:
denis_berthier wrote:What's narrow in Sudopedia's definition?:
Sudopedia wrote:"A deadly pattern is a set of cells whose candidates form a pattern that causes the puzzle to have multiple solutions. "

Sudopedia wrote:Formally, a deadly pattern is a collection of cells and their candidates that ...
... have multiple solutions ...
... each of which have the same footprint ...
... but no (cell,value) pairs in common.
solves the first issue, and doesn't refer to any individual puzzle. So far much better.
However, it excludes reverse bugs, permeable DPs, GDPs and others.

Which only shows Sudopedia is inconsistent. The first definition is perfectly clear and doesn't need any "formal" version that contradicts it.

marek stefanik wrote:
denis_berthier wrote:the user has to remember thousands of specific patterns in the catalogue of GDPs.
That is not the case for manual solvers. We can find a new pattern from scratch, if the puzzle calls for it. That's the fun part about solving puzzles.
If you're not interested in them or don't think they are suitable for your solver, just don't include them. No one is forcing you.

I don't include them for a unique reason: they are useless.
I know you have fun in spending your life on rare and irrelevant patterns, but no one is forcing you.

marek stefanik wrote:Suppose you manage to eliminate 1r2c3, 2r2c4, 2r3c2, and 1r4c2.
denis_berthier wrote:I've a much better idea: suppose the puzzle is solved.
It's weird to dismiss a RS just because your solver wouldn't reach it naturally.

SudoRules allows any RS as input. My point is about you having to make arbitrary eliminations at the start in order to prove your point and to hide the fact that you have no convincing example.
.
denis_berthier
2010 Supporter
 
Posts: 4369
Joined: 19 June 2007
Location: Paris

Re: generalised deadly patterns

Postby marek stefanik » Thu Mar 13, 2025 10:08 am

denis_berthier wrote:I don't include them for a unique reason: they are useless. [...]
SudoRules allows any RS as input. My point is about you having to make arbitrary eliminations at the start
Well, if they can provide a simpler way to solve a puzzle from a specific RS, they are not useless.
They might be less useful for solving a puzzle from its initial RS, but if you are concerned about any RS, they are clearly useful.

denis_berthier wrote:I know you have fun in spending your life on rare and irrelevant patterns, but no one is forcing you.
Well, I'm not spending my life complaining in threads about elementary minimal DPs that they lack variety...

Marek
marek stefanik
 
Posts: 381
Joined: 05 May 2021

Re: generalised deadly patterns

Postby eleven » Fri Mar 14, 2025 2:02 pm

In the current puzzle i came across this GDP, which would be a MUG with the (easily) eliminated 9r1c5 (no help there).
Code: Select all
+----------------------+---------------------+------------------+
| .      789    .      | .      67    .      | .      .   78    |
| .      79     .      | .      79    .      | .      .   .     |
| .      789    .      | .      679   .      | .      .   78    |
+----------------------+---------------------+------------------+
eleven
 
Posts: 3218
Joined: 10 February 2008

Re: generalised deadly patterns

Postby nazaz » Fri Mar 14, 2025 3:25 pm

eleven wrote:In the current puzzle i came across this GDP, which would be a MUG with the (easily) eliminated 9r1c5 (no help there).
Code: Select all
+----------------------+---------------------+------------------+
| .      789    .      | .      67    .      | .      .   78    |
| .      79     .      | .      79    .      | .      .   .     |
| .      789    .      | .      679   .      | .      .   78    |
+----------------------+---------------------+------------------+
Thanks for the example.

Per the definitions, that would be a depletion of a GDP, since you can add further eight-cell UAs on top (or'ing their candidates into the cells) whilst preserving the "deadly" property. There are a few ways to do that, for example arriving at this GDP:
Code: Select all
+----------------------+---------------------+------------------+
| .      789    .      | .      679   .      | .      .  6789   |
| .      79     .      | .       79   .      | .      .   .     |
| .      789    .      | .      679   .      | .      .  6789   |
+----------------------+---------------------+------------------+
Since your pattern is a depletion of that GDP, it is deadly, just as you said.
User avatar
nazaz
 
Posts: 36
Joined: 06 November 2018

Re: generalised deadly patterns

Postby eleven » Fri Mar 14, 2025 7:31 pm

... which is a MUG.
eleven
 
Posts: 3218
Joined: 10 February 2008

Re: generalised deadly patterns

Postby nazaz » Fri Mar 14, 2025 7:57 pm

eleven wrote:... which is a MUG.
Ha, yes :D I picked it out because it looked prettier than some of the other possibilities; probably a consequence of the no-isolated-footprints requirement you mentioned for MUGs.

Alright, you could have this ugly GDP instead:
Code: Select all
+----------------------+---------------------+------------------+
| .     6789    .      | .      67    .      | .      .  678    |
| .      79     .      | .      79    .      | .      .   .     |
| .      789    .      | .      6789  .      | .      .   78    |
+----------------------+---------------------+------------------+
User avatar
nazaz
 
Posts: 36
Joined: 06 November 2018

Re: generalised deadly patterns

Postby eleven » Fri Mar 14, 2025 9:40 pm

Concerning your 5-cell GDP example, you already can eliminate 7 r9c9 here (but this would be a uniqueness elimination): For both 3 and 9 r8c4 you get a UR1 eliminating 7r9c9.
................12..3..45..................26.4..75..8...2.8....5....1..1..6.....
Code: Select all
+-------------------+-------------------+-------------------+
| 7     2     8     | 5     9     1     | 6     34    34    |
| 4     9     5     | 7     3     6     | 8     1     2     |
| 6     1     3     | 8     2     4     | 5     79    79    |
+-------------------+-------------------+-------------------+
| 39    8     79    | 34    6     2     | 47    5     1     |
| 5     37    1     | 349   8     39    | 47    2     6     |
| 2     4     6     | 1     7     5     | 39    39    8     |
+-------------------+-------------------+-------------------+
| 39    6     47    | 2     1     8     | 39    47    5     |
| 8     5     2     |*39    4    *379   | 1     6    *379   |
| 1     37    479   | 6     5    *379   | 2     8    *349-7 |
+-------------------+-------------------+-------------------+
eleven
 
Posts: 3218
Joined: 10 February 2008

Re: generalised deadly patterns

Postby nazaz » Sat Mar 15, 2025 11:20 am

Very interesting. Shuffling things across into rows 1&2 and columns 1-6 for ease of exposition, we have:
Code: Select all
   39   .   379  |  .   .   379
   .    .   379  |  .   .   3479

To use the UR1s, you're wrapping them in a little bit of external logic:
Code: Select all
either 3@r1c1 => UR1 with guardians 34@r2c6
    or 9@r1c1 => UR1 with guardians 49@r2c6
    => 349@r2c6

You could also wrap the GDP with external logic to get the same result:
Code: Select all
if 7@r2c6 then -7r1c6,-7r2c3 (singles)
            => -7r1c3 (naked pair)
            => GDP5; contradiction
User avatar
nazaz
 
Posts: 36
Joined: 06 November 2018

Previous

Return to General