Main Page - Back |

Almost Locked Sets From sudokuwiki.org, the puzzle solver's site |

On the occasional Diabolical and most certainly on many Extreme Sudoku puzzles there will be many opportunities to whittle down the candidates by identifying and using Almost Locked Sets. Lets think about the terms first. A set of candidates is locked if the number of candidates in a group of cells matches the number of cells they are in. For example, a Naked Pair of 3/7 on two cells is a locked set: two candidates in two cells. They are considered “locked” because we know all the candidates for the cells; we just don’t know the solution order.

**Any set of cells with exactly one extra candidate is “Almost Locked”**

Note: these examples require AICs and Forcing Chains to be unticked in the solver.

ALS is strongly related to XYZ-Wings and WXYZ-Wings which are subsets of ALS.

The Almost Locked Set XZ Rule

To make use of Almost Locked Sets, we’re going to need two or more of them. Their sizes don’t matter, but they ought to be able to “see” each other that is, have some cells that share a unit (row J in this example). We also need a mixture of candidates in both sets. If there is a common candidate found in both sets and this common candidate is among those cells that can “see” each other, this candidate can exist only in one set or the other. We call this candidate a restricted common. In the two sets in the example above, 6 is a restricted common because 6 in one set will remove it in the other. Let’s call any restricted common candidate X.

The Z part of the rule involves any other candidate found in both ALSs but not a restricted common; that, a candidate that still appears in both ALSs and is not exclusive to one or the other. In the above example, Z is number 8. Now, it so happens that**any other 8 on the grid that can “see” all the 8s in both ALSs can be removed**.

Making an interesting observation is one thing, but what’s the proof? Think of the 8 in A5 in the example above. If 8 were the solution, we'd quickly get a contradiction in at least one of the two sets. A3 would become 4, forcing J3 to be 6 and that removed 6 from J5. B5 would become 1 and since 6 and 8 are removed form J5 as well we are left with a 1 also in J5 - two 1s in the column. So following the consequences through shows the 8 in A5 must go.

A 1 Cell + 3 cell Example

The N+1 definition also applies to single cells - they simply must have two candidates in them - the natural bi-value cell. This next example uses a 3-cell ALS in combination with the 1-cell ALS.

Note: these examples require AICs and Forcing Chains to be unticked in the solver.

ALS is strongly related to XYZ-Wings and WXYZ-Wings which are subsets of ALS.

It’s one away from being locked down. All Naked Pairs, Triples, Quads etc are Locked Sets. Formally, we are interested in groups of cells of size N with N+1 candidates. Take this example where two Almost Locked Sets have been coloured in yellow {A3,J3} and brown {B5,J5}. You can immediately see that the first set has {4,6,8} as members and the brown set has {1,6,8}. So far so good. But since Almost Locked Sets are so common - and you will see them everywhere!, perhaps the greatest difficulty with this strategy is finding ones we can work with. The building blocks are easy enough, but spotting the formations that conform to the rules outlined below can be tricky. |
Almost Locked Set example 1: Load Example or : From the Start |

To make use of Almost Locked Sets, we’re going to need two or more of them. Their sizes don’t matter, but they ought to be able to “see” each other that is, have some cells that share a unit (row J in this example). We also need a mixture of candidates in both sets. If there is a common candidate found in both sets and this common candidate is among those cells that can “see” each other, this candidate can exist only in one set or the other. We call this candidate a restricted common. In the two sets in the example above, 6 is a restricted common because 6 in one set will remove it in the other. Let’s call any restricted common candidate X.

The Z part of the rule involves any other candidate found in both ALSs but not a restricted common; that, a candidate that still appears in both ALSs and is not exclusive to one or the other. In the above example, Z is number 8. Now, it so happens that

Making an interesting observation is one thing, but what’s the proof? Think of the 8 in A5 in the example above. If 8 were the solution, we'd quickly get a contradiction in at least one of the two sets. A3 would become 4, forcing J3 to be 6 and that removed 6 from J5. B5 would become 1 and since 6 and 8 are removed form J5 as well we are left with a 1 also in J5 - two 1s in the column. So following the consequences through shows the 8 in A5 must go.

A 1 Cell + 3 cell Example

The N+1 definition also applies to single cells - they simply must have two candidates in them - the natural bi-value cell. This next example uses a 3-cell ALS in combination with the 1-cell ALS.

The yellow cell F1 is our first ALS. The 1 and 3 in F1 can see F4 which is part of the brown 3-cell ALS. 1 and 3 are common to both ALS but only 1 is restricted common because all the cells in both ALSs can see each other. 3 can't be restricted because the 3 in E4 cannot see the 3 in F1. The XZ rules says we can use that 3 to look for other 3s that share units with both ALSs. The sole 3 on F5 can see F1 (row) and the 3s in E4 and F4 (because of the box). That 3 can be removed. |
Almost Locked Set example 2: Load Example or : From the Start |

More Complex Examples Both these next examples come from the same puzzle and almost follow on from each other. The definition of example 3 is ALS/ALS: [J5] and [D5|D6|E4|E6|F6], 5 is restricted common, other common candidate 7 can be removed from F5 We have an enormous 5-cell ALS in brown with 5 as the restricted common. You can see that 5 occurs only in D5 and aligns with the yellow ALS J5. Its pretty hard to pick out a 5-cell ALS but if you add the numbers available in the brown cells you can see there are 6 possibilities. 7 is shared by both ALSs and is not restricted so it can be removed. |
Almost Locked Set example 3: Load Example or : From the Start |

Still on number 7 the next step is another ALS combination, this time a 2-cell and a 4-cell. The {1,2,7} in the top yellow ALS is matched with a set of {1,2,6,7,8} in row G. 1 is linked by A2 and G2 so it is restricted common. The only interesting cell that is not part of any ALS and contains common candidates is G7. Apart from 5 it contains 2 and 7. The 7 can see the 7 in A7 and all the 7s in the brown ALS. It can be removed. 2 looks like it could be eliminated but there is a 2 in A2 which it cannot directly see. To be eliminated the X must see all the candidates X in both ALSs, which is not the case with 2. ALS/ALS: [A2|A7] and [G2|G5|G6|G9], 1 is restricted common, other common candidate 7 can be removed from G7 |
Almost Locked Set example 4: Load Example or : From the Start |