Windoku and XY-chain

For fans of Killer Sudoku, Samurai Sudoku and other variants

Windoku and XY-chain

Postby Hajime » Mon May 18, 2020 10:56 am

This Windoku can be solved with an XY-chain around the Windoku boxes
Code: Select all
6......5.......19.2...........2.....5....84.........3..4....7..7.6.3..2...9......

Or are there other methods to solve?
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Windoku and XY-chain

Postby Scarlet » Mon May 18, 2020 1:51 pm

Hi Hajime

I have a different method.This grid can be solved to there:
Code: Select all
         +-------------------------------------------------------------------------------------------+
        |6           178       1478   |  1478        1478         9   |     2       5       3      |
        | 348        378         4578  |  34678      45678        2   |      1       9       678    |
        |2            9         1578  |  13678      15678       3567 |    68          4       678    |
        +---------------------------------------------------------------------------------------------+
        | 13489    13678     1478     |     2          14567       3567 |   568      678     16789  |
        | 5          1367       17     | 1367          9            8     |  4        167        2   |
        |1489       178           2    |   17         146          1456   | 5689       3        1689 |
       +---------------------------------------------------------------------------------------------+
       | 18           4           3    |     9            2          16     |   7       168      5   |
       |   7           5          6    |     18          3           14     |  89         2       1489|
       | 18           2          9    |      5        1478        176    |   3        16          148|
      +---------------------------------------------------------------------------------------------+


And I think there can eliminate 1 in E3. Because all blue 1 in A2,A3,C3 can eliminate red 1 in E3.

Then E3=7. stte. Hope this will help you.

Scarlet
Last edited by Scarlet on Mon May 18, 2020 1:59 pm, edited 5 times in total.
Scarlet
 
Posts: 9
Joined: 06 June 2019

Re: Windoku and XY-chain

Postby tarek » Mon May 18, 2020 1:53 pm

I don't know why you would go for an XY chain in this windoku when it can be solved with intersections.
Rated 2.9 by Sukaku explainer.

Code: Select all
singles until
+-------+-----------------------+-------+-----------------------+-------+
| 6     |*178    *1478    1478  | 1478  | 9       2       5     | 3     |
+-------+-----------------------+-------+-----------------------+-------+
| 348   | 378     4578    34678 | 45678 | 2       1       9     | 678   |
|       |                       |       |                       |       |
| 2     | 9      *1578    13678 | 15678 | 3567    68      4     | 678   |
|       |                       |       |                       |       |
| 13489 | 13678   1478    2     | 14567 | 3567    568     678   | 16789 |
+-------+-----------------------+-------+-----------------------+-------+
| 5     | 1367    7-1     1367  | 9     | 8       4       167   | 2     |
+-------+-----------------------+-------+-----------------------+-------+
| 1489  | 178     2       17    | 146   | 1456    5689    3     | 1689  |
|       |                       |       |                       |       |
| 18    | 4       3       9     | 2     | 16      7       168   | 5     |
|       |                       |       |                       |       |
| 7     | 5       6       18    | 3     | 14      89      2     | 1489  |
+-------+-----------------------+-------+-----------------------+-------+
| 18    | 2       9       5     | 1478  | 167     3       16    | 148   |
+-------+-----------------------+-------+-----------------------+-------+
Singles to the end


[EDIT: I can see Scarlet beat me to it :D ]

Tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Windoku and XY-chain

Postby Hajime » Mon May 18, 2020 5:27 pm

Scarlet wrote:And I think there can eliminate 1 in E3. Because all blue 1 in A2,A3,C3 can eliminate red 1 in E3.
Then E3=7. stte. Hope this will help you.

No.. not quite. I am still learning... :? . How does that work?
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Windoku and XY-chain

Postby Scarlet » Tue May 19, 2020 3:47 am

The second column,the third column and the forth column need to be filled with three groups(1 to 9). Then because the rule of Windoku ,we know that r234c234 and r678c234 need to be filled in one group(1 to 9)respectively.

So according to the analysis just now, r159c234 must contain a group(1 to 9)

Back to the grid: We know that the digit 1 in the first box can only appear in r1c23 and r3c3. If r1c2=1, then because r159c234 is a group of 1 to 9, so E3 can`t contain 3. If r1c3 and r3c3 are filled with 1, because of the third column, then E3 can`t contain 1.

So E3 can`t contain 1.

Got it? :D

Scarlet
Scarlet
 
Posts: 9
Joined: 06 June 2019

Re: Windoku and XY-chain

Postby tarek » Tue May 19, 2020 7:32 am

Wow Scarlet,

I must confess that I had to read your post twice to get a grip of what you are trying to say :D .

The 4 windows of windoku force the formation of 5 hidden groups, So in a nut shell you have your Sudoku regions & an extra 9 groups (look at my diagram to see the extra 9 groups). Hajime if you did not know that there were 5 hidden windows then I must say that I'm slightly surprised as you have programmed all of these nice variants and gattai already. If that were true then it suggests that you understood sudoku & variants from the top down rather than from the bottom up. You ask questions about difficult techniques (XY chains) when more time invested in variant oriented techniques may be needed. I would retract my advice if you already knew them obviously!

candidate 1 is locked in box 1 (I marked them with *). r5c3 (Scarlet calls it E3) therefore can't contain 1 (it shares a region with each of those locked candidates in box 1). In other words if r5c3 = 1 then box 1 will have no 1s which is against the rules of sudoku. You can therefore eliminate r5c3<>1 safely.
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Windoku and XY-chain

Postby Hajime » Tue May 19, 2020 7:35 am

Scarlet wrote:So E3 can`t contain 1.

Got it? :D

Yes, thank you. Learned something more today.
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Windoku and XY-chain

Postby Hajime » Tue May 19, 2020 7:45 am

Hi tarek. Yes I know the 5 hidden regions of a windoku. What I did not "see" is the 3 one's in the first normal box. Very basic omission in my brain. And I haven't yet programmed normal boxes interfering windoku regions interfering lines :?
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Windoku and XY-chain

Postby tarek » Tue May 19, 2020 9:25 am

Hajime wrote:Hi tarek. Yes I know the 5 hidden regions of a windoku. What I did not "see" is the 3 one's in the first normal box. Very basic omission in my brain. And I haven't yet programmed normal boxes interfering windoku regions interfering lines :?


Well that happens to anybody especially me :D

From a programming point of view it is best to program it as a generalised locked candidates. The candidates locked in a region can therefore eliminate any candidate outside that region that sees all of the locked candidates.

tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Windoku and XY-chain

Postby Hajime » Tue May 19, 2020 12:12 pm

I did program 2 interfering houses in a generalised way: boxes with lines (rows or columns), windoku regions with lines, also with asterisk, diagonals etc. Alls have the same subroutine.
But never 3 interfering houses.
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Windoku and XY-chain

Postby tarek » Tue May 19, 2020 12:20 pm

Hajime wrote:I did program 2 interfering houses in a generalised way: boxes with lines (rows or columns), windoku regions with lines, also with asterisk, diagonals etc. Alls have the same subroutine.
But never 3 interfering houses.
In the most generalized form just have cells from one house and their target cells. This is what I have implemented in the "Genralized intersections" technique in Sukaku Explainer … Very effective and simple when you look at the logic

tarek
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Re: Windoku and XY-chain

Postby Hajime » Tue May 19, 2020 4:52 pm

tarek wrote:"Generalized intersections" technique in Sukaku Explainer …


I think your technique is the same I use
AB.jpg
AB.jpg (14.74 KiB) Viewed 1146 times

House A and House B with intersection AB en out of intersection area A\B (A not B) or B\A (B not A)
General rule: If candidate k in AB but not in A\B then k not in B\A

But for 3 houses a bigger logical problem occurs:
ABC.jpg
ABC.jpg (28.13 KiB) Viewed 1146 times

What are here the general rules?
I know 1 rule from above example in this topic about normal Box (A), Windoku region (B) and Column 3 (C):
If k not in A\B\C and not in C\B\A and k in (ABC or AB\C or AC\B) then k not in BC\A
But now the real logic is not yet arrived to me

[Maybe a new topic in the "Software" section?]
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Windoku and XY-chain

Postby creint » Tue May 19, 2020 5:19 pm

In my solver only less than 50 lines.
Each constraint, each digit group in constraint, select for each cell in digit group the seeing cells.
Take intersecting cells except the current digit group and try to exclude in those.

Only problem you can get is that you try the same exclusion. (2 locked in box and row)
creint
 
Posts: 393
Joined: 20 January 2018

Re: Windoku and XY-chain

Postby Hajime » Wed May 20, 2020 3:36 pm

Looks like your solvers are able to deal with all the types (Windoku,SudokuP,SudokuX,etc, even all together ) to eliminate candidates using "generalized intersections".
Really impressive. But is there much to gain?
ABCrule.jpg
ABCrule.jpg (29.4 KiB) Viewed 1119 times

The only rule I can find using 3 interfering constraints is:
If candidate k is not in A\B\C (in A, not B, not C) then it is also not in BC\A (B and C, not A); the yellow sections.
No more rules. Right? (except 3 times for A,B and C and your candidate k must be in ABC)
And the example in the beginning of this topic complies to this.

And for 4 intersections or more? Is this ever happening?
An example would be nice.

BTW, what is the (eureka) notation of the elimination of 1 in r5c3 in the example?
User avatar
Hajime
 
Posts: 1375
Joined: 20 April 2018
Location: Fryslân

Re: Windoku and XY-chain

Postby creint » Wed May 20, 2020 4:45 pm

Take an x-sudoku where in \ diagonal 1 in locked into 3 cells 1r1c1,1r5c5,1r9c9. Number 1 must fit in this constraint so every digit that excludes all those digits in \ diagonal must be excluded. So -1r1c9, -1r9c1.
creint
 
Posts: 393
Joined: 20 January 2018

Next

Return to Sudoku variants