Generated: Two by Two

Post puzzles for others to solve here.

Re: Generated: Two by Two

Postby eleven » Sat Sep 25, 2021 10:47 am

[Withdrawn]
Last edited by eleven on Sat Sep 25, 2021 11:21 am, edited 2 times in total.
eleven
 
Posts: 3151
Joined: 10 February 2008

Re: Generated: Two by Two

Postby denis_berthier » Sat Sep 25, 2021 11:03 am

.
My take on Marek's solution:

Starting from the original puzzle, the resolution state RS1 after Singles and whips[1] is:
Code: Select all
   +-------------------+-------------------+-------------------+
   ! 234   245   7     ! 6     1     9     ! 2348  58    245   !
   ! 1234  6     1239  ! 8     24    5     ! 234   179   247   !
   ! 8     12459 1259  ! 3     7     24    ! 246   159   2456  !
   +-------------------+-------------------+-------------------+
   ! 7     3     4     ! 9     5     6     ! 1     2     8     !
   ! 9     12    6     ! 12    8     7     ! 5     4     3     !
   ! 5     8     12    ! 124   3     24    ! 7     6     9     !
   +-------------------+-------------------+-------------------+
   ! 246   2457  258   ! 24    9     3     ! 2468  578   1     !
   ! 1246  12459 1259  ! 7     24    8     ! 246   3     2456  !
   ! 234   247   238   ! 5     6     1     ! 9     78    247   !
   +-------------------+-------------------+-------------------+


On the original puzzle, givens 2 and 4 appear only in 1 place each, in the same row. If their values were interchanged, we would get an isomorphic puzzle (and each solution for it would provide by iso a solution for the first).
Call a the value in r2c5 (we don't know if a = 2 or 4). Except in r2c5, replace everywhere 2 and 4 by 24.
We don't know what a is, so we try to solve one of the two iso puzzles by replacing a by one of the two possible values.

Note: it is not necessary to try the two possibilities. I do it here for the sole purpose of showing how each case is dealt with.

1) Suppose we are not lucky and we replace the a in r2c5 by 2:
Code: Select all
   +-------------------+-------------------+-------------------+
   ! 234   245   7     ! 6     1     9     ! 2348  58    245   !
   ! 1234  6     12349 ! 8     2     5     ! 234   179   247   !
   ! 8     12459 12459 ! 3     7     24    ! 246   159   2456  !
   +-------------------+-------------------+-------------------+
   ! 7     3     24    ! 9     5     6     ! 1     24    8     !
   ! 9     124   6     ! 124   8     7     ! 5     24    3     !
   ! 5     8     124   ! 124   3     24    ! 7     6     9     !
   +-------------------+-------------------+-------------------+
   ! 246   2457  2458  ! 24    9     3     ! 2468  578   1     !
   ! 1246  12459 12459 ! 7     24    8     ! 246   3     2456  !
   ! 234   247   2348  ! 5     6     1     ! 9     78    247   !
   +-------------------+-------------------+-------------------+


We find a solution in tW3:
Code: Select all
naked-single ==> r8c5=4
naked-single ==> r7c4=2
naked-single ==> r3c6=4
naked-single ==> r6c6=2
naked-pairs-in-a-column: c7{r3 r8}{n2 n6} ==> r7c7≠6, r1c7≠2
hidden-single-in-a-row ==> r7c1=6
hidden-pairs-in-a-column: c8{n1 n9}{r2 r3} ==> r3c8≠5, r2c8≠7
hidden-single-in-a-block ==> r2c9=7
finned-x-wing-in-columns: n4{c9 c1}{r9 r1} ==> r1c2≠4
biv-chain[3]: r7n7{c2 c8} - r9c8{n7 n8} - r7c7{n8 n4} ==> r7c2≠4
biv-chain[3]: r4c3{n2 n4} - r7n4{c3 c7} - r9c9{n4 n2} ==> r9c3≠2
biv-chain[3]: r7n4{c3 c7} - r2c7{n4 n3} - c3n3{r2 r9} ==> r9c3≠4
t-whip[3]: r1n3{c1 c7} - r2c7{n3 n4} - r1n4{c9 .} ==> r1c1≠2
whip[1]: c1n2{r9 .} ==> r8c2≠2, r8c3≠2, r9c2≠2
biv-chain[3]: r7n4{c7 c3} - r9c2{n4 n7} - r9c8{n7 n8} ==> r7c7≠8
   327619854
   164825397
   895374216
   732956148
   946187523
   581432769
   658293471
   219748635
   473561982


Unfortunately, it doesn't match the givens in r3c3,r3c8. No problem: just permute everywhere the digits 2 and 4.


2) Of course, if we had been lucky and we had replaced the a in r2c5 by 4, we would have gotten:
Code: Select all
   +-------------------+-------------------+-------------------+
   ! 234   245   7     ! 6     1     9     ! 2348  58    245   !
   ! 1234  6     12349 ! 8     4     5     ! 234   179   247   !
   ! 8     12459 12459 ! 3     7     24    ! 246   159   2456  !
   +-------------------+-------------------+-------------------+
   ! 7     3     24    ! 9     5     6     ! 1     24    8     !
   ! 9     124   6     ! 124   8     7     ! 5     24    3     !
   ! 5     8     124   ! 124   3     24    ! 7     6     9     !
   +-------------------+-------------------+-------------------+
   ! 246   2457  2458  ! 24    9     3     ! 2468  578   1     !
   ! 1246  12459 12459 ! 7     24    8     ! 246   3     2456  !
   ! 234   247   2348  ! 5     6     1     ! 9     78    247   !
   +-------------------+-------------------+-------------------+


and the corresponding resolution path in tW3 (which, obviously, is an iso mapping of the previous path):
Code: Select all
naked-single ==> r8c5=2
naked-single ==> r7c4=4
naked-single ==> r3c6=2
naked-single ==> r6c6=4
naked-pairs-in-a-column: c7{r3 r8}{n4 n6} ==> r7c7≠6, r1c7≠4
hidden-single-in-a-row ==> r7c1=6
hidden-pairs-in-a-column: c8{n1 n9}{r2 r3} ==> r3c8≠5, r2c8≠7
hidden-single-in-a-block ==> r2c9=7
finned-x-wing-in-columns: n2{c9 c1}{r9 r1} ==> r1c2≠2
biv-chain[3]: r7n7{c2 c8} - r9c8{n7 n8} - r7c7{n8 n2} ==> r7c2≠2
biv-chain[3]: r4c3{n4 n2} - r7n2{c3 c7} - r9c9{n2 n4} ==> r9c3≠4
biv-chain[3]: r7n2{c3 c7} - r2c7{n2 n3} - c3n3{r2 r9} ==> r9c3≠2
t-whip[3]: r1n3{c1 c7} - r2c7{n3 n2} - r1n2{c9 .} ==> r1c1≠4
whip[1]: c1n4{r9 .} ==> r8c2≠4, r8c3≠4, r9c2≠4
biv-chain[3]: r7n2{c7 c3} - r9c2{n2 n7} - r9c8{n7 n8} ==> r7c7≠8
stte

giving directly the solution with the correct givens for r3c3,r3c8:
   347619852
   162845397
   895372416
   734956128
   926187543
   581234769
   658493271
   419728635
   273561984


3) Does this trick simplify the solution? Apparently, yes. The original puzzle was in Z4, the new one is in tW3.
BUT, how hard is it to find this trick?
Why does it work when we replace the 24 in r2c5? Said otherwise, what conditions must be checked for it to work for r2c5?
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: Generated: Two by Two

Postby eleven » Sat Sep 25, 2021 11:20 am

Ah thanks, finally i got it. All the solution steps are the same then for both digits.
Apologies to Marek.
eleven
 
Posts: 3151
Joined: 10 February 2008

Re: Generated: Two by Two

Postby marek stefanik » Sat Sep 25, 2021 6:56 pm

Denis, thanks for your very clear explanation.

denis_berthier wrote:Why does it work when we replace the 24 in r2c5? Said otherwise, what conditions must be checked for it to work for r2c5?
If you mean 'Why is the puzzle easier, after you substitute in r2c5?', probably the best way to find useful replacements is to do the same you do when trying to minimise the number of steps – count the easily available eliminations.

If you're asking about the conditions for the replacement to even be possible (whether or not it helps the solution path), there are a few things to consider.
Firstly you cannot make up any information affecting the rookery from outside.
You cannot make the substitution in a cell which doesn't have to contain one of the digits you are substituting for, as the number of solutions might decrease.
Say in this puzzle if I decided that my new 2 was r7c1, I wouldn't have got the solution.
You cannot substitute in cells that don't have to contain different digits.
If I decide that my new 2 is r2c5 and my new 4 is r6c6, I'll also get a problem.

Secondly you have to make sure to keep all the information you initially had. I'll use some puzzles from the hardest thread to explain this.

........1.....2.3..34..5.....1.6..736.34.781.78....6....8...1.631..86.4.4.67...8.
This one has a very interesting 259 template which could be used more effectively.
Unlike in many other puzzles where the replacement has been used, you don't have a full house with the digits 259.
The cells with the original givens could then contain other (not 259) digits if you just replaced naively.
But if you keep the information that they contain one of the digits you are substituting for, you are guaranteed to get the same number of solutions you initially had (you multiply by the number of permutations, here 6, when deleting the digits and then divide by the same number when placing them elsewhere).
In this case you get a sukaku after the substitution.
You don't have to put back in all three digits, two of them are enough to determine the permutation. This allows you to substitute for example in r67c8, even though you don't know, where the third one is.

.............12.34..1.3..25..672.5...17..6...52..81.67.75.68...18.2....66.217..5.
In this one (the first one in the post) the 349 template is interesting, but you have two 3s given and they're not equivalent.
If you want to use the replacement, you have to remember that they contain the same digit (whichever digit it will be after the substitution).

And finally, you cannot forget to compare your solution against the original givens to get the correct permutation after you're done.

eleven wrote:finally i got it. All the solution steps are the same then for both digits.
Out of everything, I didn't think this was unclear.
AFAIK there is no elephant restriction on 2s, but even then we could still replace, provided we won't try to use it on a digit that could be 4.
Next time I'll use letters to avoid confusion.

Marek
marek stefanik
 
Posts: 359
Joined: 05 May 2021

Re: Generated: Two by Two

Postby creint » Sat Sep 25, 2021 8:29 pm

denis_berthier wrote:
Hidden Text: Show
Code: Select all
Resolution state after Singles and whips[1]:
   +-------------------+-------------------+-------------------+
   ! 234   245   7     ! 6     1     9     ! 2348  58    245   !
   ! 1234  6     1239  ! 8     24    5     ! 234   179   247   !
   ! 8     12459 1259  ! 3     7     24    ! 246   159   2456  !
   +-------------------+-------------------+-------------------+
   ! 7     3     4     ! 9     5     6     ! 1     2     8     !
   ! 9     12    6     ! 12    8     7     ! 5     4     3     !
   ! 5     8     12    ! 124   3     24    ! 7     6     9     !
   +-------------------+-------------------+-------------------+
   ! 246   2457  258   ! 24    9     3     ! 2468  578   1     !
   ! 1246  12459 1259  ! 7     24    8     ! 246   3     2456  !
   ! 234   247   238   ! 5     6     1     ! 9     78    247   !
   +-------------------+-------------------+-------------------+


Solved using only Subsets and (reversible) z-chains of length ≤ 4:

Code: Select all
hidden-pairs-in-a-column: c8{n1 n9}{r2 r3} ==> r3c8≠5, r2c8≠7
hidden-single-in-a-block ==> r2c9=7
biv-chain[2]: r5n2{c2 c4} - b8n2{r7c4 r8c5} ==> r8c2≠2
biv-chain[2]: r5n2{c2 c4} - c6n2{r6 r3} ==> r3c2≠2
biv-chain[4]: r1n3{c1 c7} - b3n8{r1c7 r1c8} - r9n8{c8 c3} - b7n3{r9c3 r9c1} ==> r2c1≠3
biv-chain[4]: r1n3{c7 c1} - b7n3{r9c1 r9c3} - b7n8{r9c3 r7c3} - c7n8{r7 r1} ==> r1c7≠2, r1c7≠4
biv-chain[4]: r1n8{c8 c7} - b3n3{r1c7 r2c7} - c3n3{r2 r9} - b7n8{r9c3 r7c3} ==> r7c8≠8
biv-chain[3]: r7c8{n5 n7} - r9c8{n7 n8} - b7n8{r9c3 r7c3} ==> r7c3≠5
hidden-pairs-in-a-row: r7{n5 n7}{c2 c8} ==> r7c2≠4, r7c2≠2
biv-chain[3]: r7c3{n2 n8} - r9n8{c3 c8} - r9n7{c8 c2} ==> r9c2≠2
biv-chain[4]: r7c3{n2 n8} - c7n8{r7 r1} - r1n3{c7 c1} - b7n3{r9c1 r9c3} ==> r9c3≠2
finned-x-wing-in-rows: n2{r9 r1}{c9 c1} ==> r2c1≠2
biv-chain[4]: r2c1{n1 n4} - b2n4{r2c5 r3c6} - r6c6{n4 n2} - r6c3{n2 n1} ==> r2c3≠1, r3c3≠1
biv-chain[4]: b9n5{r8c9 r7c8} - r7c2{n5 n7} - r9c2{n7 n4} - r9c9{n4 n2} ==> r8c9≠2
z-chain[4]: c2n9{r8 r3} - b1n1{r3c2 r2c1} - r8n1{c1 c3} - r8n9{c3 .} ==> r8c2≠5
z-chain[4]: c3n5{r3 r8} - c3n1{r8 r6} - c2n1{r5 r8} - c2n9{r8 .} ==> r3c2≠5
x-wing-in-columns: n5{c2 c8}{r1 r7} ==> r1c9≠5
naked-pairs-in-a-column: c9{r1 r9}{n2 n4} ==> r8c9≠4, r3c9≠4, r3c9≠2
biv-chain[3]: r1c9{n4 n2} - r9n2{c9 c1} - c1n3{r9 r1} ==> r1c1≠4
finned-x-wing-in-columns: n4{c5 c1}{r2 r8} ==> r8c2≠4
biv-chain[3]: r1c9{n4 n2} - r1c1{n2 n3} - b3n3{r1c7 r2c7} ==> r2c7≠4
biv-chain[2]: b8n4{r7c4 r8c5} - r2n4{c5 c1} ==> r7c1≠4
biv-chain[3]: c1n1{r8 r2} - r2n4{c1 c5} - c5n2{r2 r8} ==> r8c1≠2
biv-chain[3]: r8c5{n2 n4} - r7n4{c4 c7} - r9c9{n4 n2} ==> r8c7≠2
biv-chain[2]: b2n2{r3c6 r2c5} - r8n2{c5 c3} ==> r3c3≠2
z-chain[4]: c1n2{r9 r1} - r1n3{c1 c7} - r2c7{n3 n2} - c5n2{r2 .} ==> r8c3≠2
stte

At the end missing a whip, -4r9c2 before stte can be applied.
creint
 
Posts: 393
Joined: 20 January 2018

Re: Generated: Two by Two

Postby eleven » Sat Sep 25, 2021 8:30 pm

marek stefanik wrote:Next time I'll use letters to avoid confusion.

That's not needed, if you mention this tricky technique.
I never had heard of that. Who has found it, does it have a name and are there more examples ?
I'll have a look at the 2 puzzles above after my holidays.

Concerning 2 digits there seem to be very rare cases, where it is useful.
I generated some puzzles with 1 and 2 only in a row 1.
After basics there were only a few 12 cells.
And in most cases after replacing the givens by 12 and adding the other digit in all places, where only one is in a cell, the resulting puzzle will be harder.

This is the best i could find after about 30 tries, where the alternative grid seems to be a bit easier:
Code: Select all
 +-------+-------+-------+
 | 1 . 9 | . 4 . | 5 . 2 |
 | 7 . . | . . . | 8 . . |
 | . 5 . | . . 3 | . . . |
 +-------+-------+-------+
 | . . . | . . 9 | . . . |
 | 5 . . | . . 7 | . 3 . |
 | 4 8 . | . . . | . . 9 |
 +-------+-------+-------+
 | . . 6 | 5 . . | . . . |
 | 8 . . | . 7 . | 6 . 4 |
 | . . . | . 9 4 | . . 8 |
 +-------+-------+-------+

leading to:
Code: Select all
+----------------------+----------------------+----------------------+
| 1      3      9      | 78     4      68     | 5      67     2      |
| 7      26     4      | 9      1256   1256   | 8      16     3      |
| 26     5      8      | 127    126    3      | 9      4      167    |
+----------------------+----------------------+----------------------+
| 236    1267   1237   | 124    123    9      | 1247   8      5      |
| 5      9      12     | 1248   1268   7      | 124    3      16     |
| 4      8      1237   | 12     12356  1256   | 127    126    9      |
+----------------------+----------------------+----------------------+
| 9      4      6      | 5      128    128    | 3      127    17     |
| 8      12     5      | 3      7      12     | 6      9      4      |
| 23     127    1237   | 6      9      4      | 12     5      8      |
+----------------------+----------------------+----------------------+

alternative:
Code: Select all
+----------------------+----------------------+----------------------+
| 1      3      9      | 78     4      68     | 5      67     2      |
| 7      26     4      | 9      1256   1256   | 8      16     3      |
| 26     5      8      | 127    126    3      | 9      4      167    |
+----------------------+----------------------+----------------------+
| 236    1267   1237   | 124    123    9      | 1247   8      5      |
| 5      9      12     | 1248   1268   7      | 124    3      16     |
| 4      8      1237   | 12     12356  1256   | 127    126    9      |
+----------------------+----------------------+----------------------+
| 9      4      6      | 5      128    128    | 3      127    17     |
| 8     #12     5      | 3      7     #12     | 6      9      4      |
| 23     127    1237   | 6      9      4      |#12     5      8      |
+----------------------+----------------------+----------------------+

Here you can place 1 (or 2) into r8c2.
eleven
 
Posts: 3151
Joined: 10 February 2008

Re: Generated: Two by Two

Postby marek stefanik » Sat Sep 25, 2021 10:25 pm

eleven wrote:I generated some puzzles with 1 and 2 only in a row 1.
I think you can get better results with a box then a row, because then you'll leave four boxes completely untouched, whereas in your example you only leave two.
Of course the best will be to either only give one of them or give them in one miniline (my guess is that the latter could even be better).

Marek
marek stefanik
 
Posts: 359
Joined: 05 May 2021

Re: Generated: Two by Two

Postby denis_berthier » Sun Sep 26, 2021 3:01 am

eleven wrote:...this tricky technique.
I never had heard of that. Who has found it, does it have a name and are there more examples ?

I would have thought it was your variables replacement technique. What's different with it?
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: Generated: Two by Two

Postby denis_berthier » Sun Sep 26, 2021 4:58 am

denis_berthier wrote:Why does it work when we replace the 24 in r2c5? Said otherwise, what conditions must be checked for it to work for r2c5

marek stefanik wrote:If you mean 'Why is the puzzle easier, after you substitute in r2c5?', probably the best way to find useful replacements is to do the same you do when trying to minimise the number of steps – count the easily available eliminations.

But that introduces an uncomputable amount of complexity in the solution.

marek stefanik wrote:If you're asking about the conditions for the replacement to even be possible (whether or not it helps the solution path), there are a few things to consider.
Firstly you cannot make up any information affecting the rookery from outside.

OK

marek stefanik wrote:Secondly you have to make sure to keep all the information you initially had.

Not necessarily. In my explanation, in the transformation of state RS1, I re-introduce candidates 2 or 4 in places where they had been eliminated. Nothing can guarantee the transformed puzzle will allow them to be easily eliminated again. The same happened in previous eleven's examples.

The main problem I see with this approach (and indeed for eleven's approach - which for me is the same) is, it is not pattern-based: there is no a priori condition on the cells/candidates to be replaced that would make it legitimate - in the sense that it would guarantee the transformed puzzle has exactly the same solution(s).
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: Generated: Two by Two

Postby marek stefanik » Sun Sep 26, 2021 8:09 am

denis_berthier wrote:But that introduces an uncomputable amount of complexity in the solution.
You cannot quite use it in your simplest-first strategy.
There are many ways you could replace and they'll lead to different solution paths, so you cannot quite tell which of them is the simplest without trying out all of them.
Your few-steps algorithm already chooses promising steps, though, so maybe you could find a way to fit it in there (probably not allowing more than one replacement per path, with the exception of switching back to the original givens).

denis_berthier wrote:
marek stefanik wrote:Secondly you have to make sure to keep all the information you initially had.

Not necessarily. In my explanation, in the transformation of state RS1, I re-introduce candidates 2 or 4 in places where they had been eliminated.
You're right, I should have specified I only meant information common to both digits.

denis_berthier wrote:there is no a priori condition on the cells/candidates to be replaced that would make it legitimate - in the sense that it would guarantee the transformed puzzle has exactly the same solution(s).
Let n be the number of digits that are substituted for.
If you delete the givens into a sukaku and keep potential equivalencies (such as the one in the second example from the hardest thread), your puzzle will have n! times more solutions then the original one.
When you then place the digits elsewhere, you divide the number of solutions by n!.
The only thing that's changed is the permutation of digits.
You don't have to get the same solutions (you'll get them with a different permutation), but you can always replace back into the original one.
Also, it's worth mentioning that uniqueness-based techniques still apply, provided the original puzzle was valid.

denis_berthier wrote:and indeed for eleven's approach - which for me is the same
Yes, it is. I believe eleven was joking when he said he'd never heard of that.

Marek
marek stefanik
 
Posts: 359
Joined: 05 May 2021

Re: Generated: Two by Two

Postby denis_berthier » Sun Sep 26, 2021 8:27 am

marek stefanik wrote:
denis_berthier wrote:But that introduces an uncomputable amount of complexity in the solution.
You cannot quite use it in your simplest-first strategy.
There are many ways you could replace and they'll lead to different solution paths, so you cannot quite tell which of them is the simplest without trying out all of them.
Your few-steps algorithm already chooses promising steps, though, so maybe you could find a way to fit it in there (probably not allowing more than one replacement per path, with the exception of switching back to the original givens).

No, I think those are unrelated topics. The problem tackled by my (and DEFISE) few steps algorithm is exponentially more complex than solving (and rating) a puzzle. That would make using your/eleven's technique much harder than not using it.

marek stefanik wrote:
denis_berthier wrote:
marek stefanik wrote:Secondly you have to make sure to keep all the information you initially had.

Not necessarily. In my explanation, in the transformation of state RS1, I re-introduce candidates 2 or 4 in places where they had been eliminated.
You're right, I should have specified I only meant information common to both digits.

I don't see what this is. Can you give an example in state RS1 before/after the transformation? Did I loose any "information common to both digits" in this process?

marek stefanik wrote:
denis_berthier wrote:there is no a priori condition on the cells/candidates to be replaced that would make it legitimate - in the sense that it would guarantee the transformed puzzle has exactly the same solution(s).
Let n be the number of digits that are substituted for.
If you delete the givens into a sukaku and keep potential equivalencies (such as the one in the second example from the hardest thread), your puzzle will have n! times more solutions then the original one.

"potential equivalencies" is an uncomputable information input into the transformed puzzle. There's no proof it compensates for the information lost in the change of variables .
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: Generated: Two by Two

Postby marek stefanik » Sun Sep 26, 2021 10:14 am

denis_berthier wrote:No, I think those are unrelated topics. The problem tackled by my (and DEFISE) few steps algorithm is exponentially more complex than solving (and rating) a puzzle. That would make using your/eleven's technique much harder than not using it.
I'm just saying that the way you tackle your problem without the replacement might be the best way to tackle the replacement as well.
It might actually make better use of the replacement then the simplest-first strategy, since the goal is to look for a shorter path, not necessarily for the shortest one, and so you don't have to check every possibility to get a meaningful output (but I'm aware that it is likely to require many more tries to reach the same level of optimisation).

denis_berthier wrote:I don't see what this is. Can you give an example in state RS1 before/after the transformation? Did I loose any "information common to both digits" in this process?
No, I just said you were right and corrected my formulation.

denis_berthier wrote:"potential equivalencies" is an uncomputable information input into the transformed puzzle.
The equivalencies are obvious from the original givens.
If you mean your solver cannot work with that information, that doesn't mean it's impossible.
On the other hand, the fact that 'the little gray cells' can handle that, proves it is possible.

denis_berthier wrote:There's no proof it compensates for the information lost in the change of variables.
Au contraire. Let's have a look at the puzzle I've used as an example.
.............12.34..1.3..25..672.5...17..6...52..81.67.75.68...18.2....66.217..5.
We're replacing for 349. Let's call n the number of solutions of the original puzzle.
In the following [racb] stands for the content of the cell racb.

Original: 3r2c8, 3r3c5, 4r2c9; n solutions
Generalised: 349r2c89, [r2c8]=[r3c5]; 6n solutions (since we don't have a set permutation of 349)
Alternative: generalised with a chosen permutation; n solutions (likely with a different permutation of 349 than the original)

You can always reach the generalised puzzle by simply deleting all the information not common to all three digits.
Then by choosing the permutation to match the original givens, you get back into the original puzzle without any loss of information.

As you can see, the eliminations you can do regarding other digits (here 125678) are the same in all three puzzles.

If instead you meant there is no proof it will make the puzzle simpler, there is at least one optimal placement in each generalised puzzle.
You might have got one of them originally, but there is no proof of that either and you cannot expect that in the general case.

Marek
marek stefanik
 
Posts: 359
Joined: 05 May 2021

Re: Generated: Two by Two

Postby eleven » Sun Sep 26, 2021 11:39 am

denis_berthier wrote:
eleven wrote:...this tricky technique.
I never had heard of that. Who has found it, does it have a name and are there more examples ?

I would have thought it was your variables replacement technique. What's different with it?

I never thought of replacing givens, just candidates. It was a surprise to me, that it can be useful too.
eleven
 
Posts: 3151
Joined: 10 February 2008

Re: Generated: Two by Two

Postby denis_berthier » Sun Sep 26, 2021 12:54 pm

marek stefanik wrote:
denis_berthier wrote:"potential equivalencies" is an uncomputable information input into the transformed puzzle.
The equivalencies are obvious from the original givens.
If you mean your solver cannot work with that information, that doesn't mean it's impossible.
On the other hand, the fact that 'the little gray cells' can handle that, proves it is possible.

It doesn't have anything to do with any solver.

marek stefanik wrote:
denis_berthier wrote:There's no proof it compensates for the information lost in the change of variables.
Au contraire. Let's have a look at the puzzle I've used as an example.


I think we're not talking of the same thing.
You have a given puzzle P1 with some intrinsic rating, say W4 (totally independent of any solver or strategy).
You make some magical trick that transform it into a puzzle P2 with its own intrinsic rating (hopefully) less than that of P1.
Whether you have lost information or not in the process is irrelevant to the question I raised here: http://forum.enjoysudoku.com/eleven-s-variable-replacement-method-and-its-complexity-t39277.html: what's the complexity of the magical trick? Obviously, it can't be less than that of P1.
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: Generated: Two by Two

Postby eleven » Sun Sep 26, 2021 10:21 pm

I think, there is nothing magic with this method.
Instead of solving the original puzzle with e.g. 2 digits only given in a unit, it is tried to find a (slightly) different puzzle, which is is known to have the same solution. In some (a few) cases that one will be easier to solve.
If you mean the complexity of finding the other puzzle, it's like with the other techniques - sometimes easy, sometimes hard, independent of, if it leads to nothing or solves the puzzle directly.

[Added:]If i wanted to program this '2 digits only given in one unit' case, i would replace the givens by the 2 candidates, solve with some techniques, and then for each cell, where only the 2 digits are left as candidates, try one of them. If for one of the cells it's easier to find a solution than for the original (given) cells, the technique makes sense.
eleven
 
Posts: 3151
Joined: 10 February 2008

PreviousNext

Return to Puzzles