Sudoku HowTo

Almost Locked Sets

Almost Locked Sets are often referred to as ALS.

An almost locked set is a group of n cells in a unit that has n + 1 possible candidates. Almost locked sets are usually quite common in a Sudoku puzzle.

If there are two almost locked sets that have some cells that are buddy cells and those cells contain common candidates there may be a restricted common candidate. A restricted common candidate is a candidate that can be placed in only one of the almost locked sets.

If two almost locked sets with a restricted common candidate can be found, then any cell containing a candidate that is not the restricted common candidate but is common to both almost locked sets can have that candidate removed if the cell is buddy cells with all cells in both almost locked sets that contain that candidate.
The Almost Locked Sets example in Figure 1 shows two almost locked sets, one colored green and the other colored blue. The cells tagged with an 'A' contain the restricted common candidate, in this case the value 5. All cells in both sets containing the candidate 5, tagged with an 'A', are buddy cells to one another so the candidate 5 can only exist in one of these cells and consequently the candidate 5 can be in only one of the almost locked sets.

The grey cell is a buddy cell of every cell in both almost locked sets that contain the candidate 7 (The cells tagged with a 'B'), so the candidate 7 can be removed from the grey cell.

The secret sauce for this strategy is the restricted common candidate.

If the restricted common candidate is placed in either one of the almost locked sets, it cannot be used in the other almost locked set. If there is one less candidate in the other almost locked set it becomes a locked set. If it is a locked set, then the candidates in the locked set will all have to be used to fill the cells in the locked set. None of those candidates can be used in cells that are buddy cells to the cells in the locked set.

In the example, if the value 5 is placed in the blue almost locked set, it cannot be in the green almost locked set. The green almost locked set becomes a locked set. The value 7 has to be placed in the green cell. This removes the candidate 7 from the grey cell.

If the value 5 is placed in the green almost locked set then the blue cells become a locked set. The value 7 will have to be placed in one of the blue cells tagged with a 'B'. Once this happens, no matter which blue cell is chosen, the value 7 cannot be placed in the grey cell because all the cells in the blue almost locked set that can contain the candidate 7 are buddy cells of the grey cell.

Either way, the value 7 cannot be placed in the grey cell so it can be removed from the candidates.

There are additional almost Locked Sets examples in this puzzle that can be seen by loading it in the Sudoku Helper.
Figure 2 shows Almost Locked Sets with a restricted common candidate of 5 and the removal of candidate 4 from one cell.

The cells tagged with an 'A' contain the restricted common candidate 5. Placing the 5 in either of these cells removes the 5 from all other cells tagged with an 'A' and consequently from the other set and makes the other set an locked set.

For either set, the value 4 can only be placed in one cell in that set and using the value 4 in that cell will remove it from the grey cell.

If the candidate 5 is placed in the blue almost locked set, the green cells become a locked set. The candidate 4 will have to be used in the green cell tagged with a 'B'. This will remove the candidate 4 from the grey cell.

If the candidate 5 is placed in the green almost locked set, the blue cells become a locked set. The candidate 4 will have to be used in the blue cell tagged with a 'B'. This will also remove the candidate 4 from the grey cell.

Regardless of which cell is chosen for the restricted common candidate of 5 it causes the elimination of the candidate 4 from the grey cell.
1 November 2015
by John
RE: Comments and feedback for almostLockedSets

If a five was placed in R9C9 it would indeed lock both sets. In this case the four would have to be used in both cells labeled with a B and this would not be allowed. The five can also be eliminated from R9C9 based on the 2 Almost Locked Sets in this example.

While this example also shows using a four in the grey cell, means there will be 2 fives in box nine, this is not always the case with Almost locked Set logic.
30 October 2015
by Dave
RE: Comments and feedback for almostLockedSets

The 5 in row 9 column 9 would lock both of the sets. The 4 that has been labeled removed causes both the locked sets to have a 5 in the same box. The logic is different because the 4s are not in the same unit.
21 February 2014
by John
RE: Comments and feedback for almostLockedSets

I do believe so. In this particular example you could exchange the logic for 4s and 5s and make that elimination.
20 February 2014
by Rafael Scheffer
RE: Comments and feedback for almostLockedSets

Can I assert that candidate 5 can be removed from row 9, column 9, by this rule, considering it's the restricted common candidate and must exist only in one of the two sets...

* Your Name
* Feedback
* Enter the letters from the CAPTCHA image.
Get New CAPTCHA
CAPTCHA Image
* Required Input
Submit Feedback
To submit this form, enter the letters you see on the red CAPTCHA image in the box next to the image. If you cannot read the image click 'New CAPTCHA' to get a different CAPTCHA image.

Using CAPTCHA verification on a web site helps reduce SPAM and web site abuse by making it harder for other computers to automatically access pages on this website.
hidden
Copyright © 2007 - 2018 John Ironmonger
This page last updated on March 24, 2015