Do SK-loops really need solved/given cells?

Advanced methods and approaches for solving Sudoku puzzles

Do SK-loops really need solved/given cells?

Postby ag24ag24 » Fri Nov 22, 2024 3:10 am

I have a question about SK-loops and their variations; apologies if it is a terribly newbie one, but I couldn't answer it by searching here.

Everything I have read about SK-loops is unambiguous that in each box, the cell in the same row or column as all four of the cells that are part of the loop must be given/solved. But I don't see why this needs to be so. Let us consider the following partial grid, which is what I understand to be a maximally general SK-loop:

**** abcd abcd | abef abef ****
cdgh [c?] ---- | ---- ---- efij
cdgh ---- ----| ---- ---- efij
----------------------------------
ghkl ---- ----| ---- ---- ijop
ghkl ---- ----| ---- ---- ijop
**** klmn klmn | mnop mnop ****

(sorry if the spacing is confusing - everything except the "[c?]" is intended to be in columns 1 or 6 or rows A or F)

where the letters a...p denote candidates in the indicated cell, and (necessarily) different letters not appearing in a single cell (such as c and p) can specify the same value. It seems to me that we can derive the SK-loop eliminations without saying anything at all about the cells marked with *. Consider whether cell B2 can be c. If it is, then cells B1 and C1 must be two of d,g,h. If they are g and h, we can go around the loop anticlockwise and derive DE1 = kl, F23 = mn, F45 = op, DE6 = ij, BC6 = ef, A45 = ab, A23 = cd, contradicting B2=c. But if BC1 are not g and h, one of them must be d, so A23 is ab, so we can instead go around the loop clockwise and derive A45 = ef, BC6 = ij, DE6 = op, F45 = mn, F23 = kl, DE1 = gh, BC1 = cd, again contradicting B2=c. So we're done, B2=c can be eliminated, and we never looked at AF16. What am I missing? Is this not a bona fide SK-loop, or not a truly generic one?
ag24ag24
 
Posts: 10
Joined: 19 July 2024

Re: Do SK-loops really need solved/given cells?

Postby denis_berthier » Fri Nov 22, 2024 3:46 am

ag24ag24 wrote:Everything I have read about SK-loops is unambiguous that in each box, the cell in the same row or column as all four of the cells that are part of the loop must be given/solved.

I don't know where you have read this, but the definition of an sk-loop doesn't involve any given at all. It's based only on candidates.
.
denis_berthier
2010 Supporter
 
Posts: 4299
Joined: 19 June 2007
Location: Paris

Re: Do SK-loops really need solved/given cells?

Postby ag24ag24 » Fri Nov 22, 2024 4:08 am

I meant, for example, rule (3) below, which is from https://www.philsfolly.net.au/Sudoku/loops_help.htm

1) The loop requires 16 cells in 4 boxes in 2 bands and and 2 stacks.
2) Loops can include single, double or triple links, as long as the sum of the links is 16.
3) In each box the cell at the intersection of the row cells and column cells is a given.
4) Of the 2 cells involved in a row or column within a box, one of the two can be solved or given.
5) For each solved or given cell, the link count should be increased by one.
ag24ag24
 
Posts: 10
Joined: 19 July 2024

Re: Do SK-loops really need solved/given cells?

Postby denis_berthier » Fri Nov 22, 2024 4:41 am

ag24ag24 wrote:I meant, for example, rule (3) below, which is from https://www.philsfolly.net.au/Sudoku/loops_help.htm .


They explicitly call it a variant!

If you want a formal definition and a detailed discussion of it, see mine in chapter 13 of [PBCS] here: https://www.researchgate.net/publication/356313228_Pattern-Based_Constraint_Satisfaction_and_Logic_Puzzles_Third_Edition

Note that most patterns have special cases, extensions and degenerated cases, and it's often very difficult to define all the possible variants.
.
denis_berthier
2010 Supporter
 
Posts: 4299
Joined: 19 June 2007
Location: Paris

Re: Do SK-loops really need solved/given cells?

Postby ag24ag24 » Fri Nov 22, 2024 6:26 am

Thanks! I didn't think I was resorting to variants (in the five rules that I quoted, I think only rules 4 and 5 describe variants, not rule 3). However, I see that your definition of SK-loops indeed says nothing about the cells I was referring to (the ones you define as the centre of a block), other than "in all the known examples the center of the block is occupied by a clue" - which I suppose is why other (less formal) treatments tend to include that as part of the definition rather than as merely a seemingly-universal property.
ag24ag24
 
Posts: 10
Joined: 19 July 2024

Re: Do SK-loops really need solved/given cells?

Postby denis_berthier » Fri Nov 22, 2024 6:40 am

.
In my formal definition, I tried to generalise as much as possible from the known examples. That didn't require to put any condition on clues.
.
denis_berthier
2010 Supporter
 
Posts: 4299
Joined: 19 June 2007
Location: Paris

Re: Do SK-loops really need solved/given cells?

Postby totuan » Fri Nov 22, 2024 9:45 am

ag24ag24 wrote:I have a question about SK-loops...

You can refer original post by Steve-K: https://sudoku.com.au/The-Easter-Monster-An-Opening-Volley.aspx

totuan
totuan
 
Posts: 251
Joined: 25 May 2010
Location: vietnam

Re: Do SK-loops really need solved/given cells?

Postby denis_berthier » Fri Nov 22, 2024 10:17 am

.
This an undated web page. It's very far from being the original post.
.
denis_berthier
2010 Supporter
 
Posts: 4299
Joined: 19 June 2007
Location: Paris

Re: Do SK-loops really need solved/given cells?

Postby ag24ag24 » Sat Nov 23, 2024 5:15 pm

I have another question (somewhat related). In getting to grips with SK-loops, I have realised that there are smaller loops which yield to the same logic. For example, if boxes 1 and 2 look like this:

+----------------+----------------*---
| ---- 1234 1234 | ---- 1256 1256 |
| ---- 3478 3478 | ---- 5678 5678 |
| ---- ---- ---- | ---- ---- ---- |
+----------------+----------------+---
| | |

then surely we can use the SK-loop logic to eliminate 1 and 2 from r1c14789, 3 and 4 from r1c1, r2c1 and r3c123, 5 and 6 from r1c4, r2c4 and r3c456, and 7 and 8 from r2c14789, no? And one can also make versions with 12 cells in (for example) r1c2356, r2c2389 and r3c5689. But I have never seen such patterns discussed, nor even named. Can anyone point me to such threads?
ag24ag24
 
Posts: 10
Joined: 19 July 2024

Re: Do SK-loops really need solved/given cells?

Postby eleven » Sat Nov 23, 2024 8:28 pm

I remember, that i have solved a puzzle with such a 3-boxes loop, but i can't find it anymore. They are extremely rare. ([Added:]only found this related post)

The SK-loop does not need the 3 givens in the 4 boxes, but without them you hardly can reduce the candidates to that pattern.
eleven
 
Posts: 3196
Joined: 10 February 2008

Re: Do SK-loops really need solved/given cells?

Postby rjamil » Fri Jan 03, 2025 11:46 am

Hi,

I think tutuan refers to this post.

R. Jamil
rjamil
 
Posts: 802
Joined: 15 October 2014
Location: Karachi, Pakistan

Re: Do SK-loops really need solved/given cells?

Postby ghfick » Mon Jan 06, 2025 6:04 pm

Steve K's website includes several posts he made on the Easter Monster. In the post 'Final Shots upon the Easter Monster', ttt from Vietnam makes a comment dated December 8,2007.
I thought I would revisit the Easter Monster to see if there are 'new' solution paths for it out there. I returned to David P. Bird's compendium which in the third 'chapter', David considers the linkage between SK Loops and JEs. He nearly found a route for the Easter Monster but there was a flaw in that approach. I would be interested in the current views on this puzzle and the techniques needed to solve it. I think current versions of YZF_Sudoku and Sudoku Studio both need Brute Force.
ghfick
 
Posts: 238
Joined: 06 April 2016
Location: Calgary, Alberta, Canada youtube.com/@gordonfick

Re: Do SK-loops really need solved/given cells?

Postby marek stefanik » Wed Jan 15, 2025 5:58 pm

Easter Monster has a near-automorphism, which can be used to bring it down to 9.3 skfr.

Hidden Text: Show
After the direct sk-loop elims (1267r28c28 \ 16b37 27b19 + 8 cells):
Code: Select all
,------------------,-----------------,------------------,
| 1     478   3458 | 3567  389  5678 | 3489  369   2    |
| 238   9     378  | 4     126  1267 | 138   5     368  |
| 3458  248   6    | 1235  389  1258 | 7     139   3489 |
:------------------+-----------------+------------------:
| 2468  5     1478 | 9     126  3    | 128   1267  678  |
| 389   126   389  | 126   7    4    | 3589  126   3589 |
| 2369  1267  1379 | 8     5    126  | 1239  4     3679 |
:------------------+-----------------+------------------:
| 7     148   4589 | 1235  348  1258 | 6     239   3459 |
| 456   3     145  | 1267  126  9    | 245   8     457  |
| 4589  468   2    | 3567  348  5678 | 3459  379   1    |
'------------------'-----------------'------------------'
Note the STP property: each of b1379 has one of 1267 in p28 and one in p46 and the dominoes in b2468 contain one of 16 and one of 27.
Each of 1267 has to appear in two of the b2468 dominoes.
The digit in r6c6 has to appear in r5 and c5, so it has to appear in one of b28 dominoes and one of b46 dominoes.

Suppose that the same 1|6, a, appears in the b28 dominoes.
The other, b, would then appear in b46 dominoes (STP).
Neither of them can appear in r6c6.
a in c6 must take r2c6.
b in r6 must take r6c2.
By STP, we get 2r2c5 and 2r5c2, which breaks 2b1, i.e. contra.
Code: Select all
,------------------,-----------------,------------------,
| 1     478   3458 | 3567  389  5678 | 3489  369   2    |
|*238   9     378  | 4     2–a  a–27 | 138   5     368  |
| 3458 *248   6    | 1235  389  1258 | 7     139   3489 |
:------------------+-----------------+------------------:
| 2468  5     1478 | 9     126  3    | 128   b27   678  |
| 389   2–b   389  | 126   7    4    | 3589  b2    3589 |
| 2369  b–27  1379 | 8     5    2–ab | 1239  4     3679 |
:------------------+-----------------+------------------:
| 7     148   4589 | 1235  348  1258 | 6     239   3459 |
| 456   3     145  | a27   a2   9    | 245   8     457  |
| 4589  468   2    | 3567  348  5678 | 3459  379   1    |
'------------------'-----------------'------------------'

Therefore one of 16 takes b24 dominoes and the other b68 dominoes.
Let's call them a and b in that order.

Here is the magic trick:
Suppose ar6c6.
Depending on 27b9 (note STP), we get one of the top grids.
Notice the UA7 in #-marked cells.
If one of the top grids has solutions, we can permute the UA7 in each of them to get solutions to the corresponding middle grid.
We can morph the solutions of the middle grid as follows: r|c: 321456987|321456987, digits: 673451289; to get solutions to the corresponding bottom grid.
The solutions to the bottom grids match the original givens and are different to the solutions of the corresponding top grid, so by uniqueness of the initial puzzle, the top grids have no solution.
Code: Select all
+-------+-------+-------+        +-------+-------+-------+
| 1 . . | . . . | . . 2 |        | 1 . . | . . . | . . 2 |
| . 9 . | 4 . . | . 5 . |        | . 9 . | 4 . . | . 5 . |
| . . 6 | . . . | 7 . . |        | . . 6 | . . . | 7 . . |
+-------+-------+-------+        +-------+-------+-------+
| . 5 . | 9#b 3 | .#7 . |        | . 5 . | 9#2 3 | .#b . |
| . . . |#2#7 4 | .#b . |        | . . . |#b#7 4 | .#2 . |
| . . . | 8 5 a | . 4 . |        | . . . | 8 5 a | . 4 . |
+-------+-------+-------+        +-------+-------+-------+
| 7 . . | . . . | 6 2 . |        | 7 . . | . . . | 6 . . |
| . 3 . |#b#2 9 | . 8 7 |        | . 3 . |#7#b 9 | 2 8 . |
| . . 2 | . . . | . . 1 |        | . . 2 | . . . | . 7 1 |
+-------+-------+-------+        +-------+-------+-------+

            ↓                                ↓

+-------+-------+-------+        +-------+-------+-------+
| 1 . . | . . . | . . 2 |        | 1 . . | . . . | . . 2 |
| . 9 . | 4 . . | . 5 . |        | . 9 . | 4 . . | . 5 . |
| . . 6 | . . . | 7 . . |        | . . 6 | . . . | 7 . . |
+-------+-------+-------+        +-------+-------+-------+
| . 5 . | 9#7 3 | .#b . |        | . 5 . | 9#b 3 | .#2 . |
| . . . |#b#2 4 | .#7 . |        | . . . |#7#2 4 | .#b . |
| . . . | 8 5 a | . 4 . |        | . . . | 8 5 a | . 4 . |
+-------+-------+-------+        +-------+-------+-------+
| 7 . . | . . . | 6 2 . |        | 7 . . | . . . | 6 . . |
| . 3 . |#2#b 9 | . 8 7 |        | . 3 . |#b#7 9 | 2 8 . |
| . . 2 | . . . | . . 1 |        | . . 2 | . . . | . 7 1 |
+-------+-------+-------+        +-------+-------+-------+

            ↓                                ↓

+-------+-------+-------+        +-------+-------+-------+
| 1 . . | . . . | . . 2 |        | 1 . . | . . . | . . 2 |
| . 9 . | 4 . . | . 5 . |        | . 9 . | 4 . . | . 5 . |
| . . 6 | . . . | 7 . . |        | . . 6 | . . . | 7 . . |
+-------+-------+-------+        +-------+-------+-------+
| . 5 . | 9 2 3 | . a . |        | . 5 . | 9 a 3 | . 7 . |
| . . . | a 7 4 | . 2 . |        | . . . | 2 7 4 | . a . |
| . . . | 8 5 b | . 4 . |        | . . . | 8 5 b | . 4 . |
+-------+-------+-------+        +-------+-------+-------+
| 7 . . | . . . | 6 . . |        | 7 . . | . . . | 6 2 . |
| . 3 . | 7 a 9 | 2 8 . |        | . 3 . | a 2 9 | . 8 7 |
| . . 2 | . . . | . 7 1 |        | . . 2 | . . . | . . 1 |
+-------+-------+-------+        +-------+-------+-------+

Here is a more concise explanation:
Consider the grids A: the top-left grid with a=1, B: the top-left grid with a=6, C: the top-right grid with a=1, D: the top-right grid with a=6.
Candidates of a grid are all valid (row, column, digit) triples which are not given and are not seen by any given.
The sudoku isomorphism r|c: 321456987|321456987, digits: 673451289 maps each candidate of A to a candidate of D and vice versa, same for B and C.
Suppose one of the grids, WLOG A, has some solutions. Given a solution of A, we can apply the isomorphism to the solved values (not givens) and place the result in D. This gives us a solution to D.
Both solutions match the givens of the puzzle and they are different, which is a contradiction with uniqueness of the puzzle.
So A (and each of the other grids) has no solutions.


Suppose now that one of 27, c, takes the dominoes in b28 and the other, d, takes the dominoes in b46.
Neither of them can take r6c6, and as ar6c6 causes a uniqueness contradiction, we get br6c6.
Therefore we get br5c8 and br8c5 (singles in r5 and c5, given that b takes b68 dominoes).
If c=2, it must in b8 take r8c4 and then cannot be placed in r5, i.e. contra.
If d=2, it must in b6 take r4c8 and then cannot be placed in c5, i.e. contra.
Code: Select all
,------------------,-----------------,------------------,
| 1     478   3458 | 3567  389  5678 | 3489  369   2    |
| 238   9     378  | 4     ac   ac   | 138   5     368  |
| 3458  248   6    | 1235  389  1258 | 7     139   3489 |
:------------------+-----------------+------------------:
| 2468  5     1478 | 9     126  3    | 128   bd    678  |
| 389   ad    389  | 126   7    4    | 3589  b–d   3589 |
| 2369  ad    1379 | 8     5    b    | 1239  4     3679 |
:------------------+-----------------+------------------:
| 7     148   4589 | 1235  348  1258 | 6     239   3459 |
| 456   3     145  | bc    b–c  9    | 245   8     457  |
| 4589  468   2    | 3567  348  5678 | 3459  379   1    |
'------------------'-----------------'------------------'

So one of 27 takes the b26 dominoes and the other takes the b48 dominoes.
–7r1c4, –7r4c3, –7r6c9, –7r9c6, skfr 10.4 -> 9.3
The b28 and b46 dominoes form quads.
There are still a few steps possible with just 1267, but they are not very helpful.
YZF_Sudoku is able to solve it with dynamic chains.

As a side note, all of this hinges on 7 (or 2, isomorphic) being the given in r5c5.
If it were a 1|6, then either 16 or 27 could appear in b28 dominoes.
In the first puzzle, we get the quads, in the second 27 break them, in the third 16 break them:
1.......2.9.4...5...6...7...8.5.3.......64......98..4.2.....6...4...9.8...7.....1
1.......2.9.4...5...6...7...8.5.3.......64......89..4.2.....6...4...9.8...7.....1
1.......2.9.4...5...6...7...8.9.4.......63......85..4.2.....6...5...9.8...7.....1
(The last one is also unique with 7r5c5.)

Marek
marek stefanik
 
Posts: 370
Joined: 05 May 2021


Return to Advanced solving techniques

cron