Almost hidden set - xz rule:

Programs which generate, solve, and analyze Sudoku puzzles

Re: Almost hidden set - xz rule:

Postby yzfwsf » Mon Apr 14, 2025 7:26 pm

StrmCkr wrote:i take it you have this{ahs xz } coded and operation ?

Yes, a few more for you:
Code: Select all
:0000:x:...+1+465.3...9+2..4.1..+75.6...3..7.2....7....3.2...+35..6.5..14..76..+5.73....83.....:218 323 232 832 233 143 443 943 846 452 856 159 959 462 983 997 998 999::
:0000:x:.1.........6..21..9.+3+18...5+1.7.6+43......+13+467+6+342+7...13..4...+1...2..1..6..+1.+2.59.:514 914 717 819 724 829 732 737 242 876 788 888 492 899::
:0000:x:.3...+8.4...42..+3.88..+4736+2....65+18....+87+32...5..+849.32..79..+48..8......59...+8.2..:111 711 113 513 613 117 121 522 728 928 742 243 651 652 158 159 162 671 679 683 686 187 188 192 194 596 696::
:0000:x:..3.+89..5.9.+57..+3.7..36.+9....2.35..18..6+1+7+39+2+3...2.5..+5...4+3.8..3...64....72....3:411 432 133 433 441 442 462 463 974 984 192 692::
:0000:x:..3....8..4.1....761...5....6..3...51....7.9...52..7.....6...2..5....4..+4.6.82..9:217 419 619 626 926 434 734 934 435 861 368 669 177 179 381 781 783 188 189 394 397::
:0000:x:4...+6...5.5.9...6..+62.7.8..+67+58.+9..12...5.6....1..6+59...+6.9...35....3.2+6..36..1..:812 912 225 452 853 456 459 891 992 498::
:0000:x:.1.8.+7.6...7..6..1+6..2+1.79.4..3.+9..8..6.8.........25....9.71..33...+2.9...6.9...2.:211 217 821 822 328 543 247 251 252 454 554 357 457 158 459 464 664 168 591 891::
:0000:x:....8.6....5.....3.....7.1.48....5..+92...8.6..56.1...91....43...4.27......9.6..4.:113 414 925 434 535 935 743 344 246 346 354 454 764 873 878 887 888 589 889 791 891 599::
:0000:x:..3+24..9..2...91.+36..1.+3....5+63.+241.2...6..3...45.8....+6+2..5+3...7.83...6....2.9..:711 821 725 728 828 533 735 838 839 749 754 962 471 971 774 879 481 583 191 591 891 192 892 193 494 496 498 798 499 599 899::
:0000:x:..84..+3.1.4..6.7.+83......2+46.........87+6.5..+3.+3.2+7148+6+8.+37....2.9..3.8..75.....3+9:926 543 943 548 951 476 178 588::
yzfwsf
 
Posts: 952
Joined: 16 April 2019

Re: Almost hidden set - xz rule:

Postby StrmCkr » Mon Apr 14, 2025 10:14 pm

nice :) can't wait for your updated code to have a look at those in action

my own codes very far off to be honest i've swapped to java and have been doing a ground up rebuild of my pascal engines and my existing ahs-xz is very basic for that code as it just took my als-xz engine and swapped it to use ahs built off of Rn,Cn,Bn, space over RC for als
the search triggers have only a couple clauses for triggering compared to all the ones talked about in this topic.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1473
Joined: 05 September 2006

Re: Almost hidden set - xz rule:

Postby Wepwawet » Mon Sep 22, 2025 5:44 am

The majority of us are not mathematical geeks, computer programmers or have familiarity with abstract acronyms and the terminology used in a lot of your posts, so can you explain to me, in terms that are not an example of an Incomprehensible Explanation Paradox, exactly what an Almost Hidden Set is?

As it hppens, I do understand Almost Locked Sets, and I do some programming, and someone posted (was it you?) that using AHS was significantly faster than using ALS, so I m interested in executing an alternate method to increase speeds. From what I seem to glean from elsewhere, that an Almost Hidden Set I seems to be N digits in N+1 cells, how is that possible? Surely that leaves a cell with no digit, or am I missing something here (obviously).

So could you please enlighten me on this, please.
Wept
User avatar
Wepwawet
 
Posts: 34
Joined: 19 November 2019

Re: Almost hidden set - xz rule:

Postby yzfwsf » Mon Sep 22, 2025 5:11 pm

Wepwawet wrote:From what I seem to glean from elsewhere, that an Almost Hidden Set I seems to be N digits in N+1 cells, how is that possible? Surely that leaves a cell with no digit, or am I missing something here (obviously).

So could you please enlighten me on this, please.

Because there are other candidate numbers in these cells.
yzfwsf
 
Posts: 952
Joined: 16 April 2019

Re: Almost hidden set - xz rule:

Postby Maxito_Bahiense » Mon Sep 22, 2025 7:48 pm

yzfwsf wrote:
Wepwawet wrote:From what I seem to glean from elsewhere, that an Almost Hidden Set I seems to be N digits in N+1 cells, how is that possible? Surely that leaves a cell with no digit, or am I missing something here (obviously).

So could you please enlighten me on this, please.

Because there are other candidate numbers in these cells.


In other words, a naked set is a set of N candidates being the only candidates in N cells [the cells normally linked as in a weak link, sharing a house]. There cannot be more candidates besides these N numbers on each cell; these candidates, however, can be present in other cells of the house. Examples of these sets are naked singles [N=1] and naked pairs [N=2].

A hidden set is a set of N cells being the only cells that hold N candidates [the cells normally linked as in a weak link, sharing a house]. The candidates cannot be found in any other cell besides these N cited cells; the cells can however hold additional candidates besides the N referred numbers. Examples of these sets are hidden singles [N=1] and hidden pairs [N=2].

If we relax the one-to-one relation between candidates and cells, we may think of "degrees of freedom" in these definitions, and the following concepts:

An almost naked set is a set of N+1 candidates being the only candidates in N cells [the cells normally linked as in a weak link, sharing a house]. Some or all of the N+1 candidates are also present in other cells. The typical example of an ANS is a bivalue cell: one cell containing only candidates a and b.

An almost hidden set is a set of N+1 cells being the only ones holding N candidates [the cells normally linked as in a weak link, sharing a house]. The cells hold also other candidates additional to the referred N. The typical example of an AHS is a bilocated candidate: a candidate present only in two cells of a house.

A NS or a HS implies the elimination of the additional candidates (on NS, the additional instances of the N candidates outside the cells; on HS, the additional candidates inside the cells). ANS or AHS don't give way to these elims, but combinations of sets using common candidates and links can transform an ALS into a locked set, and thus allow for elims.

With more degrees of freedom, we may think of almost-almost hidden sets [AAHS or 2-dof AHS].
Please, those that are more knowledgeable on the topic, expand or correct any mistakes.
Max.
Colour your way out of the mess maze.
User avatar
Maxito_Bahiense
 
Posts: 26
Joined: 27 February 2024
Location: Bahía Blanca, Argentina

Re: Almost hidden set - xz rule:

Postby Wepwawet » Mon Sep 22, 2025 10:15 pm

yzfwsf wrote:
Wepwawet wrote:From what I seem to glean from elsewhere, that an Almost Hidden Set I seems to be N digits in N+1 cells, how is that possible? Surely that leaves a cell with no digit, or am I missing something here (obviously).

So could you please enlighten me on this, please.

Because there are other candidate numbers in these cells.


Of course!
Wept
User avatar
Wepwawet
 
Posts: 34
Joined: 19 November 2019

Re: Almost hidden set - xz rule:

Postby Wepwawet » Mon Sep 22, 2025 10:27 pm

Maxito_Bahiense wrote:
yzfwsf wrote:
Wepwawet wrote:From what I seem to glean from elsewhere, that an Almost Hidden Set I seems to be N digits in N+1 cells, how is that possible? Surely that leaves a cell with no digit, or am I missing something here (obviously).

So could you please enlighten me on this, please.

Because there are other candidate numbers in these cells.


... An almost hidden set is a set of N+1 cells being the only ones holding N candidates [the cells normally linked as in a weak link, sharing a house]. The cells hold also other candidates additional to the referred N. The typical example of an AHS is a bilocated candidate: a candidate present only in two cells of a house.

A NS or a HS implies the elimination of the additional candidates (on NS, the additional instances of the N candidates outside the cells; on HS, the additional candidates inside the cells). ANS or AHS don't give way to these elims, but combinations of sets using common candidates and links can transform an ALS into a locked set, and thus allow for elims ...



Ah, this is what I suspected it would be, or at least something along those lines. Do I take it, then, as a naked set has a complimentary hidden set, an ALS will have a complementary AHS, or are they just two different sets (independent of each other) that can be employed to achieve the same goal?
Wept
User avatar
Wepwawet
 
Posts: 34
Joined: 19 November 2019

Re: Almost hidden set - xz rule:

Postby Maxito_Bahiense » Tue Sep 23, 2025 7:56 pm

Wepwawet wrote:Ah, this is what I suspected it would be, or at least something along those lines. Do I take it, then, as a naked set has a complimentary hidden set, an ALS will have a complementary AHS, or are they just two different sets (independent of each other) that can be employed to achieve the same goal?


Taking into account the caveat that there are here people more knowledgeable of this topic than me, the idea is that, just as there is always a complementary hidden set for a naked set and viceversa, here you have the same principle at work.

Consider the following example: a box, say b1, has already 4 numbers set. That leaves 5 candidates to be solved. Assume position 5 [p5] is a bivalue cell with candidates a/b [an ANS]. Set numbers F, G, H and I are, without loss of generality, in p1, p3, p7 and p9:
Code: Select all
.-----.-----.-----.
|     |     |     |
|  F  |  x  |  G  |
|     |     |     |
:-----+-----+-----:
|     |     |     |
|  y  | a/b |  z  |
|     |     |     |
:-----+-----+-----:
|     |     |     |
|  H  |  w  |  I  |
|     |     |     |
'-----'-----'-----'


Then, remaining candidates c,d and e must be present in cells x, y, z and w [b1 p2, p4, p6 and p8], forming an AHS, complementary to the ANS with a/b.

Both the ANS and the AHS can be used in deductions: which one is more useful depends on the eye (and scope) of the technician.
Max.
Colour your way out of the mess maze.
User avatar
Maxito_Bahiense
 
Posts: 26
Joined: 27 February 2024
Location: Bahía Blanca, Argentina

Re: Almost hidden set - xz rule:

Postby StrmCkr » Wed Sep 24, 2025 11:09 pm

Naked subset {locked subset} = N cells with N digits
Hidden Subset = N Digits with N cells

https://www.reddit.com/r/sudoku/wiki/b-terminology/
since a sector houses 9 cells and 9 digits there is a balance of the two sets to occupy the limits of 9 cells and 9 digits.

Code: Select all
if there is a size:
 N size  naked sets - 9 =>  n size hidden subset in the left overs
 N size hidden subset - 9 => n size naked subsets in the leftovers


this is the reason why we only search for size 4 subsets

they balance and the exists coequally as well as the definitions of the two types is by the Space they are found in.

hidden subsets utilize Rn,Cn,Bn space {Sector by Digit storing Position}
naked subsets use RC space the intersection of [Rn,Cn,Bn] [ "Pencil marks" ]
it is possible for the two sets to exists at the same time

Code: Select all
.---------------------------------.---------------------------------.---------------------------------.
| 12         12         3456789   | 3456789    3456789    3456789   | 3456789    3456789    3456789   |
| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |
| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |
:---------------------------------+---------------------------------+---------------------------------:
| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |
| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |
| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |
:---------------------------------+---------------------------------+---------------------------------:
| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |
| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |
| 123456789  123456789  123456789 | 123456789  123456789  123456789 | 123456789  123456789  123456789 |
'---------------------------------'---------------------------------'---------------------------------'

    Naked Pair: (12) r1c12 in r1 => b1p456789 <> 1, 2
    Naked Pair: (12) r1c12 in b1 => b1p456789 <> 1, 2
    Hidden Pair: (12) r1c12 in r1 => b1p456789 <> 1, 2

adding Degrees of Freedom we add +x values to the container = set function
adding the "almost" part, if x was missing the sets would be equivalent
https://www.reddit.com/r/sudoku/wiki/a-als-terminology/

Almost Locked subset = N cells with N + x digits
Almost Hidden Subset = N Digits with N +x cells


to answer the question are ALS xz = AHS xz, no they are not.
i theorized personally they are not but never found proof, YZF posted an example showing they are not in a few posts before this.

they reason they are not equivalent is from the DOF,

which means there is ALS xz and AHS xz formations that can only be expressed in one and not the other.

that using AHS was significantly faster than using ALS,

using Hidden Set size 1-4, naked sets size 1-4: these functions use the same code it is faster to search for these instead of searching for naked sets size 5-9 to find the opposite hidden sets.
Some do, some teach, the rest look it up.
stormdoku
User avatar
StrmCkr
 
Posts: 1473
Joined: 05 September 2006

Previous

Return to Software