Diabolical

ALS-XZ

Two Almost Locked Sets connected by a restricted common candidate. The other common candidate is eliminated from cells seeing both sets.

Also known as: Almost Locked Sets - XZ Rule

In short

Find two Almost Locked Sets — N cells in a unit with N+1 candidates — sharing two digits, X and Z. If every X in one set sees every X in the other, X is restricted and at most one set can use it. Z is trapped inside the two sets, so any outside cell seeing every Z in both loses it.

What Is It?

An Almost Locked Set (ALS) is a group of N cells in a single unit (row, column, or box) that collectively contain exactly N+1 candidates. If they had N candidates, they would be fully locked (like a Naked Pair, Triple, or Quad). The "almost" means they have one extra candidate, remove any one digit and the set locks.

ALS-XZ connects two Almost Locked Sets through a "restricted common candidate" (X). Digit X appears in both ALS A and ALS B, and all cells containing X in one ALS can see all cells containing X in the other. This means X can only be true in one of the two sets, if ALS A uses X, ALS B can't, and vice versa.

The second common digit (Z) also appears in both sets. Since one set must absorb X, the other set must lock without X, and Z must be part of that locked set. Therefore, any cell that can see all Z-candidates in both sets cannot contain Z. This is one of the most powerful elimination techniques in Sudoku.

How It Works

First, find two Almost Locked Sets, groups of N cells with N+1 candidates each, where the cells share a single unit. A single bivalue cell counts as an ALS (1 cell, 2 candidates).

Check if the two ALS share two common digits. Call them X and Z. Verify that X is a "restricted common", every cell with X in ALS A can see every cell with X in ALS B. This ensures X can be true in at most one of the two sets.

Since X is restricted, it forces one ALS to lock (become a proper Locked Set) without X. That locked set will contain Z. The other ALS also contains Z. Any cell outside both sets that can see every cell containing Z in both ALS A and ALS B cannot be Z, one of those positions must hold Z.

Worked Example

Example 1: ALS-XZ

ALS A is the single bivalue cell R2C4 {2, 5} (1 cell, 2 candidates). ALS B is R5C4 {2, 5, 6}, R5C6 {2, 7}, R5C9 {6, 7} — three cells in row 5 holding four candidates {2, 5, 6, 7} (3 cells, 3+1 candidates).

The restricted common is X = 5: it appears in R2C4 (ALS A) and R5C4 (ALS B), and those two cells share column 4, so 5 can be true in at most one of the sets. That forces the other common digit, Z = 2, into one of the two ALS: if A takes 5 then B locks and must place 2; if A takes 2, done.

R6C4 sees every cell that holds 2 in both sets — R2C4 and R5C4 down column 4, and R5C6 in the same box. Since one of them must be 2, eliminate 2 from R6C4, which reduces to {5, 6}.

Frequently Asked Questions

What is an Almost Locked Set?

An Almost Locked Set is a group of N cells sharing one unit whose candidates total N+1 digits. With N candidates the cells would be fully locked, like a Naked Pair or Triple; the one spare digit is what makes it ‘almost’. Remove any single digit from the set and it locks.

What does ‘restricted common’ mean in ALS-XZ?

A restricted common is a digit that appears in both sets where every cell holding it in one set sees every cell holding it in the other. The two sets therefore cannot both use it. That digit is X; the second shared digit, Z, is the one you eliminate.

In ALS-XZ, why must digit Z land inside one of the two sets?

Because one of the two sets must lock. At most one set can take X, so the other is left with N cells and N candidates, a proper locked set that places every digit it holds, Z among them. Whichever way it falls, Z occupies a cell in one set or the other.

Can a single cell count as an Almost Locked Set?

Yes, a bivalue cell, one cell with exactly two candidates, is the simplest ALS, since one cell holding two digits fits the N cells with N+1 candidates definition. The worked example uses exactly that: R2C4 {2, 5} is ALS A, paired with a three-cell ALS in row 5.

Where do ALS-XZ eliminations apply?

ALS-XZ removes Z from any cell outside both sets that sees every cell holding Z in either set. In the worked example Z is 2, held by R2C4 in ALS A and by R5C4 and R5C6 in ALS B. R6C4 sees all three, two down column 4 and one in the same box, so 2 comes out of R6C4.

How does ALS-XZ relate to XY-Wing and Naked Pairs?

ALS-XZ is the general form. A Naked Pair or Triple is a locked set, while an Almost Locked Set holds one candidate more than it has cells, so ALS-XZ generalises them. The forcing idea — a shared digit has to land somewhere, so cells seeing all its positions lose it — is the same one behind XY-Wing, applied to whole sets.

Key Points

Related Techniques

All Sudoku Techniques

Explore all 28 solving techniques in our complete technique guide.