An almost locked set (ALS) is a group of N cells in one row, column or box that together hold exactly N+1 candidates. Take away any one of those digits and the rest are locked into the cells, like a naked pair or triple. To spot one, look for a two-candidate cell (the smallest ALS), or two cells in a house that share three digits between them, or three cells that share four.
On its own an ALS does nothing. The payoff comes when two of them interact through the ALS-XZ rule, which is what this guide covers. It is the natural next step once XY-Wing and XYZ-Wing feel easy, because both are small ALS-XZ patterns.
The ALS-XZ rule
You need two almost locked sets, A and B, that share no cells, plus two digits they both contain:
- X, the restricted common digit. Every X in A sees every X in B. So X cannot be in both sets at once. At least one set loses X.
- Z, the other shared digit. Whichever set loses X becomes a locked set, and a locked set must place every one of its digits, including Z.
So Z lands in A or in B. Any cell that sees every Z candidate in both sets cannot be Z.
A worked example
This position is from a real puzzle in our library. It has two sets of two cells each.
- 2, the restricted common digit (X)
- 3, the shared digit (Z)
- 3 removed
Set A: R1C4 and R1C8 in row 1
R1C4 has {1, 2, 3} and R1C8 has {1, 2}. Two cells, three digits: an ALS. If 2 is taken away, R1C8 must be 1 and R1C4 must be 3.
Set B: R1C2 and R2C1 in box 1
R1C2 has {2, 5} and R2C1 has {3, 5}. Two cells, three digits: another ALS. If 2 is taken away, R1C2 must be 5 and R2C1 must be 3.
Putting them together
The 2s in A are in R1C4 and R1C8. The only 2 in B is in R1C2. All three are in row 1, so they see each other and at most one of the sets can hold a 2. That makes 2 the restricted common digit, X.
Both sets also contain 3, which is Z. Whichever set gives up the 2 is locked and has to place its 3: in R1C4 for set A, or in R2C1 for set B. So one of R1C4 and R2C1 is a 3.
Two cells see both of them and still have 3 as a candidate. R1C1 shares row 1 with R1C4 and box 1 (and column 1) with R2C1. R2C4 shares column 4 and box 2 with R1C4 and row 2 with R2C1. Both lose their 3.
XY-Wing and XYZ-Wing are ALS-XZ
A single cell with two candidates is an ALS: one cell, two digits. That makes some familiar wings small cases of the same rule.
- XY-Wing: one pincer is set A. The pivot plus the other pincer form set B (two cells, three digits, provided they share a house). The restricted common digit is the one the first pincer shares with the pivot, and Z is the pincer digit.
- XYZ-Wing: the pivot and one pincer form a two-cell ALS, the other pincer is a one-cell ALS, and Z is the digit all three cells share.
Seen this way, ALS-XZ is the general form. The sets can be bigger, the cells can hold more candidates, and the two sets can be in any houses, as long as the X candidates all see each other.
How to find ALS-XZ patterns
- Collect small sets first. In each house, note bivalue cells, pairs of cells with three digits between them, and triples with four. Bigger sets exist but are hard to track by hand.
- Pair sets that share two digits. For each shared digit, check whether every copy in one set sees every copy in the other. If it does, that digit can be X.
- Take any other shared digit as Z. Find the cells that see every Z in both sets. Those lose Z.
- Double-check the X condition. This is where most mistakes happen. One X candidate in set B that does not see an X in set A breaks the pattern.
Where ALS fits
Almost locked sets come after chains and colouring in most technique lists. If you are not yet comfortable with XY-Chains or 3D Medusa, start there. ALS also shows up inside longer chains, where a whole set acts as one link.
See our list of sudoku techniques in learning order and the overview of advanced sudoku strategies for the full ladder. Related patterns: W-Wing and X-Chain.
Start with the smallest ALS pattern
The Dojo in Sudoku Royale has no ALS drill. Its XY-Wing drill trains the smallest case of the same idea: two-candidate cells whose shared digit forces a third digit into one of two places. Open the XY-Wing drill on your iPhone.
Get Sudoku Royale: Free on iOSFrequently Asked Questions
What is an almost locked set in sudoku?
An almost locked set is a group of N cells in one row, column or box that contain exactly N+1 candidates between them. A single cell with two candidates is the smallest example. Remove one digit and the cells become a locked set, like a naked pair or triple.
What is the ALS-XZ rule?
Take two almost locked sets that share no cells and share two digits, X and Z. If every X in one set sees every X in the other, at least one set loses X and becomes locked, so Z must be placed in one of the two sets. Any cell that sees every Z in both sets can have Z removed.
What is a restricted common candidate?
It is a digit found in both almost locked sets where every copy in one set sees every copy in the other. Because of that, the digit can be true in at most one of the two sets.
Is XY-Wing a type of ALS?
Yes. An XY-Wing is an ALS-XZ where one set is a single bivalue pincer and the other set is the pivot plus the second pincer. XYZ-Wing works the same way with a three-candidate pivot.