W-wing in jigsaw

For fans of Killer Sudoku, Samurai Sudoku and other variants

W-wing in jigsaw

Postby urhegyi » Wed Dec 23, 2020 12:05 pm

Here a generated jigsaw with a special pattern.
2020-12-23.png
2020-12-23.png (118 KiB) Viewed 299 times

I solved this last night, but didn't find the generalized intersection by hand and replaced this through a w-wing.
4/7 at R3C2 and R4C3 linked by two 4's at R7C23 --> R3C2=7 OR R4C3=7 --> R4C2<>7 --> R3C2=7 (only possibility in column)
solved easily after this.
urhegyi
 
Posts: 538
Joined: 13 April 2020

Re: W-wing in jigsaw

Postby urhegyi » Wed Dec 23, 2020 7:54 pm

I have another example which I can solve manually with an ER(empty rectangle) and an XY-wing.
JigsawExplainer fails to analyze because not enough techniques are enabled.
When I start solving and do the ER by hand (after singles)which removes the 2 from a bivalue, so that the only possible candidate at R4C3 remains 5 and then rate again it gives the expected 4.2 rating(xy-wing).
Is there no support for ER or is this not enabled?
Your program can solve it without it by a harder forcing chain, but for me ER is much simpler.

Puzzle:

Code: Select all
.4..3.....28...3...1..5....96.....4....9.7....3.....96....2..6...6...73.....9..1. 111113444221113445261333445266333345226677745226678775299678875999688875999988855
urhegyi
 
Posts: 538
Joined: 13 April 2020

Re: W-wing in jigsaw

Postby 1to9only » Wed Dec 23, 2020 10:08 pm

The original SudokuExplainer did not have implementation for Empty Rectangles.
1to9only
 
Posts: 3416
Joined: 04 April 2018

Re: W-wing in jigsaw

Postby urhegyi » Thu Dec 24, 2020 12:28 am

1to9only wrote:The original SudokuExplainer did not have implementation for Empty Rectangles.

bug found in JigsawExplainer!!!
I did the forcing chain found by JigsawExplainer and come to this stage:
Code: Select all
549.3.6.142816935781.6549.396.371.4.6539.71..13....5967.1.2346.2.6.1573.37..96.1. 111113444221113445261333445266333345226677745226678775299678875999688875999988855

When you start solving from here you come to the point you have to choose from 2 possible steps that contradict(bug in program): the UR type 1 thats is in my eyes incorrect because it's in 3 houses and UR works only in 2 houses that makes R4C9<>2/8 == 5 or the bug type 1 which is correct and makes R4C9<>5/8 ==2. Can you look at this, because this is a real bug!
You can find the correct value for R4C9 by the Empty Rectangle in nonet 1 R1C4 = 2 OR R3C3 = 2. If R3C3=2 then it eliminates 2 from R4C3=5; in the other case when R1C4=2 then R1C6<>2 and R4C7=2 in nonet 2 which eliminates 2 from R4C3=5 too. R4C3=5 --> R4C9<>5 so the UR type1 which removes the 2/8 and keeps R4C9=5 is incorrect!!! The only correct solution is produced by the bug or ER rule.
urhegyi
 
Posts: 538
Joined: 13 April 2020

Re: W-wing in jigsaw

Postby urhegyi » Thu Dec 24, 2020 1:33 am

2020-12-24.png
2020-12-24.png (128.86 KiB) Viewed 248 times
The UR type 1:
urhegyi
 
Posts: 538
Joined: 13 April 2020

Re: W-wing in jigsaw

Postby urhegyi » Thu Dec 24, 2020 1:34 am

2020-12-24 (1).png
2020-12-24 (1).png (125.65 KiB) Viewed 248 times
The Bug type 1:
urhegyi
 
Posts: 538
Joined: 13 April 2020

Re: W-wing in jigsaw

Postby 1to9only » Thu Dec 24, 2020 9:15 am

I don't think I've changed any of the solving code. So it's pretty much sudoku solving, which works with jigsaws, mostly!
Specific solving techniques can be disabled from Options, Solving techniques..., and unselecting any unwanted ones.
I also don't think I'll fix any of the issues anytime soon.

Edit: URs and BUGs also cause problems for normal samurais, as I posted here.
1to9only
 
Posts: 3416
Joined: 04 April 2018

Re: W-wing in jigsaw

Postby urhegyi » Thu Dec 24, 2020 12:24 pm

1to9only wrote:I don't think I've changed any of the solving code. So it's pretty much sudoku solving, which works with jigsaws, mostly!
Specific solving techniques can be disabled from Options, Solving techniques..., and unselecting any unwanted ones.
I also don't think I'll fix any of the issues anytime soon.

Edit: URs and BUGs also cause problems for normal samurais, as I posted here.

This bug is on a single grid jigsaw and has nothing to do with overlapping grids in samurai. It proves that the UR 1 definition is not correct for use in JIGSAW in general because in this example 3 nonets are involved!!!
I think one of the necessary conditions to use UR 1 is that only 2 nonets are involved!!! It works in SUDOKU when used over only 2 houses. When it's used over 4 houses it isn't an UR in ordinary sudoku too.
You only have to count the number of nonets involved and when it's more than 2 not showing an UR 1 as possible solution option. NEEDS further investigation.
EDIT:
When I try this example in SiSeSuSo with options up to generalized intersection enabled it's only partially solved.
When I additionally enable X-chain / X-cycle it's completely solved!
So when you disable UR 1 in this example it will try to find a solution with higher rated methods as an UR too.
urhegyi
 
Posts: 538
Joined: 13 April 2020

Re: W-wing in jigsaw

Postby urhegyi » Thu Dec 24, 2020 1:15 pm

2020-12-24 (2).png
2020-12-24 (2).png (114.99 KiB) Viewed 225 times
When I disable UR in this example it makes a correct analyze of the solution path too and don't get the error message on analyze as when UR is not disabled!
urhegyi
 
Posts: 538
Joined: 13 April 2020

Re: W-wing in jigsaw

Postby Hajime » Thu Dec 24, 2020 2:49 pm

You have to be very careful with Unique Rectangles (type 1 to 6).
An UR is based upon a single normal (boxes) Sudoku that has exactly one solution.
A single Sudoku has more solutions if the UR method is not supplied.

But if the puzzle has overlaps or the jigsaw is not a box or other constraints are present like diagonals,
than the UR-method may be not valid.
User avatar
Hajime
 
Posts: 713
Joined: 20 April 2018
Location: Netherlands

Re: W-wing in jigsaw

Postby creint » Fri Dec 25, 2020 12:31 pm

Code: Select all
549.3.6.142816935781.6549.396.371.4.6539.71..13....5967.1.2346.2.6.1573.37..96.1. 111113444221113445261333445266333345226677745226678775299678875999688875999988855

Has only one UR: 89r78c29
8r7c9 - 9r7c2 - 8r8c2 - 9r8c9 -> -8r7c9
8r8c9 - 9r8c2 - 8r7c2 - 9r7c9 -> -8r8c9

Finding all possible UR is not the problem, finding the exclusions is.
You must use the threat in combination with other logic.
In my opinion the current naming of those UR tactics is bad.
creint
 
Posts: 325
Joined: 20 January 2018


Return to Sudoku variants