AHS

The Almost Hidden Set (AHS) is a subset of the House that is created by restricting the candidate digits and cells. This is the counterpart constraint to ALS.

(1)AHS

A Locked Set is a state in which "N cells in the same house have N candidate digits", and it is not possible to determine which cell contains which number, but the set as a whole is in a locked state.
AHS is in an almost Locked state, with "N candidate digits in N+1 cells" belonging to the same house. When one cell that makes up AHS is removed, it is confirmed and AHS becomes a LockedSet.
The smallest AHS is "2 cells, 1 candidate digit".

AHS

このHPでは、次のように簡略化した AHS表現 も用います。
AHS

(2) RCC,nRCC

The analysis algorithm using AHS makes use of the common cell and numerical limiting effects of the two AHS.
When two AHS overlap, the cells of the AHS are classified. The cells in the overlapping area of the AHS are RCC (Restricted Common Cell). Also, the cells other than the RCC of the AHS are nRCC (no Restricted Common Cell).

AHS

The RCC has multiple cells. Each cell contains candidate digits from two AHSs. However, for simplicity, initially define the RCC cell for one state.

The candidate digits of two AHSs may be common to both, or unique to each. Therefore, RCC cells will also have combinations of common and unique candidate digits.
RCC-cells are classified as "X" and "Z" as follows:

X The candidate digits of the two AHS are different, or the two AHS have the same candidate digits but the RCC-cells do not have the same candidate digits.
Z RCC-cells have a common candidate digit ("Z" if it is not "X").

AHS

In the diagram above, a cell in an RCC is counted as one cell, but an RCC-cell can be 1 to 3 cells.
Also, within an RCC, X and Z are mixed in various ways.
It is these particular combinations that result in an analytical algorithm. AHS



Analysis Algorithm

AHS-XZ is a bit of an oddball among Sudoku algorithms, but the logic is simple. The GNPX source code is a good reference.

(1) AHS_XZ

AHS_XZ is when the RCC has one or more X and one or more Z.

Exclusion rules :
1) Candidate digits other than AHS in cell Z can be excluded.
    - Suppose cell Z becomes invalid.
    - One AHS will be in LockedSet and the other AHS will run out of cells.

AHS_xz

If the Z cell becomes invalid in some way in the RCC (minimum 2 cells), one AHS will become LockedSet and the other AHS will run out of cells. Therefore, candidate numbers other than the AHS of the Z cell can be eliminated.

AHS_xz

(2) AHS_XZ_double

AHS-XZ double is when the RCC has 2 or more X.

Exclusion rules :
1) Candidate digits other than AHS in cell Z can be excluded.
    - Suppose cell Z becomes invalid.
    - One AHS will be in LockedSet and the other AHS will run out of cells.

2) The other AHS candidate digit in the nRCC can be excluded.
    - This takes advantage of the fact that there are more than two X's.
    - (When RCC has two Xs) In nAHS-1, assume that the candidate AHS-2 is positive.
    - This cell is removed and AHS-1 becomes the LockedSet.
    - The number of cells in AHS-2 is reduced by 2 (the number of RCC cells). However, the presence of two Xs does not reduce the number of candidate digits in AHS-2.
    - Therefore, AHS-2 becomes "N digits N-1(=N+1-2) cells" and fails.

AHS_xz


 Example

AHS_XZ (ID:01_5) AHS-XZ
AHS1: r7c45 r8c5 #38
AHS2: r278c5 #39
X(RCC): r78c5 X: r8c5 Z: r7c5

r7c5#26 is negative

568914372.79..8.513..75..986.75492.3.5.8.3..7..3.71..574...5...13.4.75..8951..734


AHS_XZ_double (ID:01_5) AHS-XZ double
AHS1: r567c7 #18
AHS2: r56c78 #469
X(RCC): r56c7 X: r56c7 Z: r56c7

r5c8#1 r6c8#8 is negative

568914372.79..8.513..75..986.75492.3.5.8.3..7..3.71..574...5...13.4.75..8951..734


AHS_XZ (ID:01_102) AHS-XZ
AHS1: r5c4 r6c45 #23
AHS2: r6c1457 #357
X(RCC): r6c45 X: r6c5 Z: r6c4

r6c4#48 is negative

697..3.45813..52964526...3727....3.8........2..1....6973...2.81.241...73168537924


AHS_XZ (ID:01_103) AHS-XZ double
AHS1: r3456c6 #568
AHS2: r5c56 r6c456 #1237
X(RCC): r56c6 X: r56c6 Z: r56c6

r5c5#58 r6c4#9 r6c5#8 is negative

783..9.614593612876127....3237...1...41....2..65....34398..76421268943755746..819


Top