sudoku max allowed subsets

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

sudoku max allowed subsets

Postby urhegyi » Thu Feb 04, 2021 2:56 pm

I saw an example of a 9x9 sudoku which needed 4 x-wings to solve. Is this the maximum? I think so.
A few months ago I solved the daily sudoku on sudokuwiki.org. It needed 4 xy-wings, but have not saved it, which I regret. Anyone has an idea how a sudoku which needs 4 xy-wings can be created?
urhegyi
 
Posts: 748
Joined: 13 April 2020

Re: sudoku max allowed subsets

Postby 1to9only » Thu Feb 04, 2021 3:56 pm

From: here, on the highest number of times a technique is used to solve a puzzle submitted in the Patterns Game (up to and including game 394).

X-Wing -> ED=3.2 ===> x6
Code: Select all
1..2..3.4.2..1..5...6..7..18..1..9...6..9..8...9..8..36..5..4...5..4..3.7.4..3..5  x6 # 0375   9    9.4/9.4/9.4 - 1to9only
..6..3....7..8...93..7...6..5.4....2..1.6.4..4....7.8..2...5..39...7..5....9..1..  x6 # 0394  16 10.2/10.2/10.2 - JPF

Swordfish -> ED=3.8 ===> x7
Code: Select all
.1...2..37..4...6...2.......2...3..1.........6..7...5.......5...3...1..89..6...7.  x7 # 0077  43    6.9/4.0/3.4 - gsf
.1...2..37..4...6...4.......2...8..1.........6..7...5.......3...3...1..29..6...7.  x7 # 0077  45    7.0/4.0/3.4 - gsf

XY-Wing -> ED=4.2 ===> x7
Code: Select all
1..2...34......5.2.....561...7..64...8..4....2..8....9..6..7....7..8....4..9....3  x7 # 0118 155    6.8/4.2/3.4 1 JPF
...........1.2.3...3.1.4.5...3...2...6.7.3.1...8.9.7...1.5.6.7...4.8.9...........  x7 # 0348  66    5.7/4.0/2.6 - Robbie

Jellyfish -> ED=5.2 ===> x3
Code: Select all
..5...8...1.4.5.6.7.......1.5.9.6.2...........6.1.2.4.4.......9.2.6.9.1...1...3..  x3 # 0058  17    5.2/5.2/3.4 - tarek
1...2...3.4....5....6....4....53....2..6.7..1....81....5....4....9....6.3...1...2  x3 # 0202   5    7.3/5.2/3.4 0 m_b_metcalf

mith posted a puzzle: here that SudokuExplainer needed 8 Swordfishes to solve.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: sudoku max allowed subsets

Postby 1to9only » Tue Feb 09, 2021 11:23 am

In the current Patterns Game (no. 410), using SudokuExplainer techniques:

Here is a sudoku grid requiring 5 X-Wings to solve:
Code: Select all
1...2..3..3.1....4..4..51...6.7....37....28....9.8..7...2.5.3..6....8..1.8.2...6. ED=3.2/3.2/3.2

And these sudoku grids need 4 X-Wings to solve:
Code: Select all
This starts with 4 X-Wings:
1...2..3..3.4....2..2..56...4.1....37....42....8.5..4...1.8.3..8....6..7.7.9...8. ED=3.2/3.2/3.2

These start with 3 X-Wings:
1...2..3..2.4....5..4..12...6.7....87....93....5.8..2...3.6.5..6....8..3.4.9...6. ED=3.2/3.2/3.2
1...2..3..4.3....1..5..16...7.8....59....21....8.9..6...2.6.7..7....3..6.9.2...5. ED=3.2/3.2/3.2
1...2..3..4.5....1..6..17...8.9....77....82....3.7..9...4.6.9..6....9..4.5.4...6. ED=3.2/3.2/3.2

Some of these start off with 2 X-Wings:
1...2..3..2.4....1..4..56...1.7....88....43....9.8..5...3.6.9..6....2..3.9.8...6. ED=3.2/3.2/3.2
1...2..3..2.4....5..6..57...8.9....76....49....9.8..4...1.9.8..2....1..6.6.5...1. ED=3.2/3.2/3.2
1...2..3..3.4....1..4..56...5.7....38....29....1.8..6...2.9.3..9....4..5.4.2...9. ED=3.2/3.2/3.2
1...2..3..3.4....2..2..15...4.6....36....42....7.8..4...5.6.3..9....5..7.1.9...5. ED=3.2/3.2/3.2
1...2..3..3.4....2..2..56...4.5....37....85....1.4..8...9.6.3..6....9..8.1.2...6. ED=3.2/3.2/3.2
1...2..3..3.4....2..2..56...4.7....37....42....8.9..4...6.7.3..5....6..8.1.5...6. ED=3.2/3.2/3.2
1...2..3..3.4....2..2..56...7.8....35....98....1.7..6...6.9.2..9....8..6.1.7...9. ED=3.2/3.2/3.2
1...2..3..4.1....2..5..61...5.7....88....23....3.8..2...9.6.4..5....4..3.1.8...9. ED=3.2/3.2/3.2
1...2..3..4.1....5..6..31...7.2....86....84....1.9..2...5.7.3..7....4..6.6.8...7. ED=3.2/3.2/3.2
1...2..3..4.5....1..3..15...6.1....78....23....4.6..5...2.7.6..9....6..3.8.2...7. ED=3.2/3.2/3.2
1...2..3..4.5....1..6..15...7.8....99....73....8.6..7...2.3.9..5....2..3.9.4...2. ED=3.2/3.2/3.2
1...2..3..4.5....1..6..17...6.4....77....28....4.8..5...2.9.3..3....8..9.9.2...1. ED=3.2/3.2/3.2

User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: sudoku max allowed subsets

Postby 1to9only » Tue Feb 09, 2021 11:48 am

From the millions of sudoku grids I generated (Patterns Game no. 410), there are very few rated ED=4.2/4.2/4.2.

Sudoku grid requiring 3 XY-Wings to solve:
Code: Select all
1...2..3..3.4....2..2..15...2.6....78....43....1.5..4...5.7.9..9....3..5.1.5...8. ED=4.2/4.2/4.2

Sudoku grids requiring 2 XY-Wings to solve:
Code: Select all
1...2..3..4.3....1..5..62...7.5....26....38....9.4..7...1.5.7..8....7..4.6.8...2. ED=4.2/4.2/4.2
1...2..3..4.3....1..2..56...7.2....65....38....9.4..7...1.6.7..8....7..4.5.8...6. ED=4.2/4.2/4.2
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: sudoku max allowed subsets

Postby urhegyi » Tue Feb 09, 2021 4:57 pm

From the archives:
Needs 4 x-wings:
Image
Code: Select all
..94....5.8..9..4.6....23..3....85...4..1..2...19....7..27....1.5..2..9.9....62..

SukakuExplainer even finds 5:
Code: Select all
Analysis results
Difficulty rating: 3,2
This Sudoku can be solved using the following logical methods:
53 x Hidden Single
 1 x Direct Hidden Pair
 2 x Pointing
 1 x Claiming
 6 x Naked Pair
 5 x X-Wing
urhegyi
 
Posts: 748
Joined: 13 April 2020

Re: sudoku max allowed subsets

Postby urhegyi » Tue Feb 09, 2021 5:15 pm

Or another one with 4 x-wings:
Image
Code: Select all
...1.2....3..4..1.5..6.7..8.7..1..2....4.9....5..2..3.8..9.1..6.1..7..5....3.4...

Code: Select all
Analysis results
Difficulty rating: 3,2
This Sudoku can be solved using the following logical methods:
53 x Hidden Single
 2 x Direct Hidden Pair
 4 x X-Wing
urhegyi
 
Posts: 748
Joined: 13 April 2020

ED=5.2/3.8/3.2

Postby 1to9only » Wed Feb 10, 2021 8:29 am

Also from the Patterns Game (no. 410), this ED=5.2/3.8/3.2 (ED=Jellyfish/Swordfish/X-Wing):
Code: Select all
1...2..3..4.5....1..5..46...7.8....66....52....1.6..4...9.5.3..3....8..2.2.4...7. ED=5.2/3.8/3.2

The sudoku has 2 X-Wings, 1 Swordfish, 1 Jellyfish, and 3 XY-Wings.

Trap: I already posted an ED=5.2/3.8/3.0 in the Patterns Game, so this ED=5.2/3.8/3.2 is a trump (higher-rated)!!!
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: sudoku max allowed subsets

Postby mith » Fri Feb 12, 2021 11:13 pm

Lots of the puzzles I've posted have lots of subsets required (and often more available).

As far as constructing, the easiest way to get Swordfish/Jellyfish into a puzzle is to have a pattern of givens forcing them. For swordfish, that means some variation on the diagonal patterns; for Jellyfish, you instead want a 4x4 of givens/filled values not containing a particular digit, and one occurrence of that digit elsewhere.

You can do the same thing with X-Wings, but it's actually a bit trickier to force just with the digits. One attempt to create such a puzzle (rather than just generate it) was It's A Trap!. This has 5 distinct X-Wings available from the start (another after basics), and three of them are due to the interaction between c27, c36, and r6. SE ends up using 6 X-Wings total (though it can be done with 4), plus a Swordfish and some wings
mith
 
Posts: 996
Joined: 14 July 2020

Re: sudoku max allowed subsets

Postby urhegyi » Mon Feb 22, 2021 1:13 pm

4-times.png
4-times.png (52.81 KiB) Viewed 1056 times

Another interesting layout with 4 x-wings:
Code: Select all
...1.2....3..4..1.5..6.7..8.7..1..2....4.9....5..2..3.8..9.1..6.1..7..5....3.4...

Code: Select all
Analysis results
Difficulty rating: 3,2
This Sudoku can be solved using the following logical methods:
53 x Hidden Single
 2 x Direct Hidden Pair
 4 x X-Wing
urhegyi
 
Posts: 748
Joined: 13 April 2020

Re: sudoku max allowed subsets

Postby 999_Springs » Thu Mar 11, 2021 2:01 pm

friend of mine made this puzzle by himself and sent it to me on facebook. it has 6 x-wings, and all 6 are needed, but nothing more advanced than x-wings (unlike 1to9's puzzles with 6). it was specifically designed to be aesthetically beautiful for human players to solve, and i would say it definitely achieves that. it is so nice, that it was also featured on cracking the cryptic's youtube channel here (may contain spoilers). enjoy

Code: Select all
..12....8
..34....2
5....31..
6....18..
.........
..93....5
..48....3
1....67..
8....45..

i might post it in the puzzles forum or as a patterns game pattern if i get his permission
999_Springs
 
Posts: 591
Joined: 27 January 2007
Location: In the toilet, flushing down springs, one by one.

Re: sudoku max allowed subsets

Postby m_b_metcalf » Thu Mar 11, 2021 4:27 pm

999_Springs wrote:... it has 6 x-wings, and all 6 are needed,

FWIW, this one has four consecutive swordfishes (and nothing higher):
Code: Select all
 . . 1 2 . . . . 3
 . . 4 1 . . . . 2
 3 . . . . 5 6 . .
 6 . . . . 7 8 . .
 . . . . . . . . .
 . . 5 9 . . . . 6
 . . 6 3 . . . . 9
 4 . . . . 2 7 . .
 8 . . . . 4 3 . .


Regards,

Mike
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13622
Joined: 15 May 2006
Location: Berlin

Re: sudoku max allowed subsets

Postby urhegyi » Fri Mar 12, 2021 1:50 pm

2 examples with even 5 swordfishes:

Code: Select all
..19....8
..94....7
3....71..
2....15..
.........
..46....1
..71....9
8....23..
9....57..


Code: Select all
..47....5
..78....2
9....43..
8....79..
.........
..26....4
..65....8
4....61..
3....17..
urhegyi
 
Posts: 748
Joined: 13 April 2020

Re: sudoku max allowed subsets

Postby 1to9only » Fri Mar 12, 2021 3:55 pm

I found a few more grids (same pattern) that require 6 X-Wings to solve.
Code: Select all
..12....3..45....62....47..8....93.............63....2..24....14....58..9....72..
..12....3..45....62....37..8....29.............53....4..21....73....72..4....96..
..12....3..24....56....78..2....63.............91....4..57....23....27..9....84..
..12....3..24....54....67..7....83.............51....4..47....68....29..9....34..
..12....3..24....53....62..7....85.............31....2..43....92....96..8....73..

These require 5 swordfishes, all at the beginning (so ED=3.8/3.8/3.8), a number of them are then stte.
Code: Select all
..12....3..24....55....31..1....67.............83....4..58....16....79..8....95..
..12....3..24....54....62..7....86.............36....1..45....68....79..9....45..
..12....3..23....43....45..6....78.............31....5..54....78....96..9....34..
..12....3..23....43....45..6....78.............31....5..45....78....69..9....34..
..12....3..23....43....45..6....37.............38....1..84....57....69..9....84..
..12....3..23....43....45..6....37.............38....1..45....87....96..9....84..
..12....3..23....43....45..6....37.............38....1..45....87....69..9....84..
..12....3..21....45....61..4....78.............36....5..54....67....94..9....85..
..12....3..21....45....61..3....78.............46....5..53....67....93..9....85..
..12....3..21....43....52..5....67.............45....2..53....86....79..9....23..
..12....3..21....43....51..5....67.............45....1..53....86....79..9....13..
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: sudoku max allowed subsets

Postby mith » Fri Mar 12, 2021 9:00 pm

999_Springs wrote:friend of mine made this puzzle by himself and sent it to me on facebook. it has 6 x-wings, and all 6 are needed, but nothing more advanced than x-wings (unlike 1to9's puzzles with 6). it was specifically designed to be aesthetically beautiful for human players to solve, and i would say it definitely achieves that. it is so nice, that it was also featured on cracking the cryptic's youtube channel here (may contain spoilers). enjoy

Code: Select all
..12....8
..34....2
5....31..
6....18..
.........
..93....5
..48....3
1....67..
8....45..

i might post it in the puzzles forum or as a patterns game pattern if i get his permission


It does not surprise me at all that Sam made something like this. :)

It's worth making a distinction between this puzzle and some of the others following it - Sam's puzzle requires all 6 X-wings in the sense that if you don't use all 6 you won't solve the puzzle (without using something harder). The other puzzles have X fish available, but not all of them actually require that many (see also my "It's A Trap!" which requires only 4 of the 6 available).

(urhegyi's second 5 swordfish puzzle is an excellent exception to this - 5 swordfish all eliminating digits from the same cell to leave a naked single. I didn't check all the others, so there may well be some more here that do require all the available fish.)
mith
 
Posts: 996
Joined: 14 July 2020

Re: sudoku max allowed subsets

Postby denis_berthier » Sun Mar 14, 2021 7:31 am

1to9only wrote:These require 5 swordfishes, all at the beginning (so ED=3.8/3.8/3.8), a number of them are then stte.
Code: Select all
..12....3..24....55....31..1....67.............83....4..58....16....79..8....95..
..12....3..24....54....62..7....86.............36....1..45....68....79..9....45..
..12....3..23....43....45..6....78.............31....5..54....78....96..9....34..
..12....3..23....43....45..6....78.............31....5..45....78....69..9....34..
..12....3..23....43....45..6....37.............38....1..84....57....69..9....84..
..12....3..23....43....45..6....37.............38....1..45....87....96..9....84..
..12....3..23....43....45..6....37.............38....1..45....87....69..9....84..
..12....3..21....45....61..4....78.............36....5..54....67....94..9....85..
..12....3..21....45....61..3....78.............46....5..53....67....93..9....85..
..12....3..21....43....52..5....67.............45....2..53....86....79..9....23..
..12....3..21....43....51..5....67.............45....1..53....86....79..9....13..

I didn't try all of them, but the first can be solved with only 4 swordfishes:
Code: Select all
   479       46789     1         2         56789     58        468       46789     3         
   379       36789     2         4         16789     18        68        6789      5         
   5         46789     4679      679       6789      3         1         246789    26789     
   1         23459     349       59        24589     6         7         23589     289       
   23479     2345679   34679     1579      1245789   12458     2368      1235689   2689     
   279       25679     8         3         12579     125       26        12569     4         
   23479     23479     5         8         2346      24        2346      23467     1         
   6         1234      34        15        12345     7         9         2348      28       
   8         12347     347       16        12346     9         5         23467     267       
232 candidates, 1650 csp-links and 1650 links. Density = 6.16%

swordfish-in-columns: n7{c3 c4 c9}{r9 r5 r3} ==> r9c8 ≠ 7, r9c2 ≠ 7, r5c5 ≠ 7, r5c2 ≠ 7, r5c1 ≠ 7, r3c8 ≠ 7, r3c5 ≠ 7, r3c2 ≠ 7
swordfish-in-columns: n2{c1 c6 c7}{r7 r6 r5} ==> r7c8 ≠ 2, r7c5 ≠ 2, r7c2 ≠ 2, r6c8 ≠ 2, r6c5 ≠ 2, r6c2 ≠ 2, r5c9 ≠ 2, r5c8 ≠ 2, r5c5 ≠ 2, r5c2 ≠ 2
swordfish-in-columns: n9{c3 c4 c9}{r5 r4 r3} ==> r5c8 ≠ 9, r5c5 ≠ 9, r5c2 ≠ 9, r5c1 ≠ 9, r4c8 ≠ 9, r4c5 ≠ 9, r4c2 ≠ 9, r3c8 ≠ 9, r3c5 ≠ 9, r3c2 ≠ 9
swordfish-in-columns: n6{c3 c4 c9}{r5 r3 r9} ==> r9c8 ≠ 6, r9c5 ≠ 6, r5c8 ≠ 6, r5c7 ≠ 6, r5c2 ≠ 6, r3c8 ≠ 6, r3c5 ≠ 6, r3c2 ≠ 6
stte

The -1 difference may come from the order in which they are applied.
It would be interesting to see your solution with 5 swordfishes.


[Edit:]
I tried to apply diagonal symmetry before solving:
(diagonal-symmetry-9x9 "..12....3..24....55....31..1....67.............83....4..58....16....79..8....95..")
"..51...68.........12...85..24...38.............36...79..17...95.........35...41.."
I now find a solution with only 3 swordfishes, starting from the symmetric resolution state:
Code: Select all
   479       379       5         1         23479     279       23479     6         8         
   46789     36789     46789     23459     2345679   25679     23479     1234      12347     
   1         2         4679      349       34679     8         5         34        347       
   2         4         679       59        1579      3         8         15        16       
   56789     16789     6789      24589     1245789   12579     2346      12345     12346     
   58        18        3         6         12458     125       24        7         9         
   468       68        1         7         2368      26        2346      9         5         
   46789     6789      246789    23589     1235689   12569     23467     2348      23467     
   3         5         26789     289       2689      4         1         28        267

swordfish-in-rows: n7{r3 r4 r9}{c9 c5 c3} ==> r8c9 ≠ 7, r8c3 ≠ 7, r5c5 ≠ 7, r5c3 ≠ 7, r2c9 ≠ 7, r2c5 ≠ 7, r2c3 ≠ 7, r1c5 ≠ 7
swordfish-in-rows: n9{r3 r4 r9}{c5 c4 c3} ==> r8c5 ≠ 9, r8c4 ≠ 9, r8c3 ≠ 9, r5c5 ≠ 9, r5c4 ≠ 9, r5c3 ≠ 9, r2c5 ≠ 9, r2c4 ≠ 9, r2c3 ≠ 9, r1c5 ≠ 9
swordfish-in-rows: n6{r3 r4 r9}{c5 c3 c9} ==> r8c9 ≠ 6, r8c5 ≠ 6, r8c3 ≠ 6, r7c5 ≠ 6, r5c9 ≠ 6, r5c3 ≠ 6, r2c5 ≠ 6, r2c3 ≠ 6
stte
This should not be a total surprise: the maximum complexity of required Subsets is an invariant under isomorphism, the number of resolution rules applied is not.
[/Edit]


[Edit2:]
I wondered if I could do the same with the other puzzles.
#2 also gives a solution with 3 swordfishes:
(solve (diagonal-symmetry-9x9 "..12....3..24....54....62..7....86.............36....1..45....68....79..9....45.."))
swordfish-in-rows: n7{r3 r4 r9}{c9 c3 c5} ==> r8c9 ≠ 7, r8c5 ≠ 7, r8c3 ≠ 7, r7c5 ≠ 7, r5c5 ≠ 7, r5c3 ≠ 7, r2c9 ≠ 7, r2c3 ≠ 7
swordfish-in-rows: n9{r3 r4 r9}{c5 c4 c3} ==> r8c5 ≠ 9, r8c4 ≠ 9, r8c3 ≠ 9, r6c5 ≠ 9, r5c5 ≠ 9, r5c4 ≠ 9, r5c3 ≠ 9, r2c5 ≠ 9, r2c4 ≠ 9, r2c3 ≠ 9
swordfish-in-rows: n8{r3 r4 r9}{c5 c3 c9} ==> r8c9 ≠ 8, r8c5 ≠ 8, r8c3 ≠ 8, r7c5 ≠ 8, r5c9 ≠ 8, r5c3 ≠ 8, r2c5 ≠ 8, r2c3 ≠ 8
stte

After diagonal symmetry:
#3 has also 3 swordfishes in rows but it requires two whips[1] for the end
#4 has also 3 swordfishes in rows and then stte
#5 has also 3 swordfishes in rows and then stte
...
[/Edit2]

I don't think the word "require" is correct. They may have 5 swordfishes, depending on which order we apply them; but solutions with fewer ones can be found.
denis_berthier
2010 Supporter
 
Posts: 4212
Joined: 19 June 2007
Location: Paris

Next

Return to General