Solver App for Android and iPhone
Strategies for Number Puzzles of all kinds
Page Index
Solvers
Puzzles
Basic Strategies
Tough Strategies
Diabolical Strategies
Extreme Strategies
Depreciated Strategies
Str8ts
Other

Almost Locked Sets

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.

Almost Locked Set example 1
Almost Locked Set example 1 : Load Example or : From the Start

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.

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.

Almost Locked Set example 2
Almost Locked Set example 2 : Load Example or : From the Start
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.

More Complex Examples

Almost Locked Set example 3
Almost Locked Set example 3 : Load Example or : From the Start
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 4
Almost Locked Set example 4 : 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
Go back to Unit Forcing ChainsContinue to Finned X-Wing


Comments

Your Name/Handle

Email Address - required for confirmation (it will not be displayed here)

Your comment or question

Please enter the
letters you see:
arrow
Enter these letters Remember me


Please keep your comments relevant to this article.
Email addresses are never displayed, but they are required to confirm your comments. When you enter your name and email address, you'll be sent a link to confirm your comment. Line breaks and paragraphs are automatically converted - no need to use <p> or <br> tags.
Comments Talk

Friday 2-May-2014

... by: Anton Delprado

I have found it quite useful to extend this method with XY-Chains. XY-Chains find weak links between bi-value cells but you can use ALSs in place of XY cells (XY cells are just a simple type of ALS).

ALS XZs are just a two step chain and a "ALS Chain" is just continuing this logic.

These may seem hard to find at first, but if you are already looking for XY-Chains I have found it quite easy to include 2 and 3 cell ALSs in the chaining logic.

Of course all of these are examples of AICs but I find those to be quite hard to find in general.

Wednesday 10-Jul-2013

... by: ralph maier

LOL
Still interested to know whether a restricted candidate is really necessary for an ALS to work

Sunday 14-Apr-2013

... by: sunshine48

A simple explanation, I finally got it. Wonderful site.

Tuesday 9-Apr-2013

... by: Douglas Boffey

There is a second way a set can be almost locked, namely, when N candidates appear in N + 1 cells within a unit. I call this a Hidden ALS (or HALS), as knocking out one of the cells reduces to a hidden pair/triple/quad/&c. Likewise, the ALS described on this page would be better called a NALS (Naked ALS).

Wednesday 25-Jul-2012

... by: Jason

Ian,

If I understand correctly, adding G5 to the brown ALS does no good. You can only use this technique to make eliminations on numbers common to both the ALS.

In Example 1, adding G5 to the brown ALS picks up another candidate, the 9, but it will not lead to any more eliminations because the yellow ALS does not have a 9. If the yellow ALS happened to have a 9, then it could help.

Essentially, the relationships between the common elements of the two ALS means that the unrestricted common candidate (in Example 1, it's the 8) has to be the correct solution for a cell in at least one of the two ALS. So at least one of the yellow or brown cells that contain 8 as a candidate must actually be a 8 in the final answer.

It logically follows that 8 can be removed as a candidate in any cell that can see ALL of the 8s in the yellow and brown squares.

Saturday 30-Jun-2012

... by: Ian Saliba-Curtis

Hi Andrew!
Example 1: Could you not also have added G5 to the brown ALS and made it an almost locked triplet over 4 candidates?

If yes - is there a reason why you didn't?
If no - please could you explain why not?

Many thanks! Your site is fascinating.
Kind regards,
Ian

Thursday 5-Apr-2012

... by: Marc

Ok, I've found out the answers myself...

Answer 1 = No, it's not true. A bi-value cell ALS can share the same box with one or more cells of the other ALS

Answer 2= Yes, they can.

Tuesday 3-Apr-2012

... by: Marc

I have two questions:

If one of the ALS is a bi-value cell, then the other ALS cannot have a cell in the same box of the bi-value cell, is that true?

If none of the ALS is a bi-value cell, and they both are in a row (or both in a column), can both these rows (or columns) appear in the same band (or stack)?

Thursday 15-Mar-2012

... by: rlhaben

Actually, sorry. I was wrong on this one. It does present a contradiction. I stared at this for 15 minutes trying to see it. Wrote the comment, then looked again and saw it immediately. Looking forward to getting this on the iPad. :)

Thursday 15-Mar-2012

... by: rlhaben

Andrew must be busy on the mobile solver since I have seen no answer. But I think Grandad is right. If you load the example, you will not even get to ALS as an example for those cells unless you manually remove the 2. However, even in that case, the proof doesn't seem to work. If you make F5 a 3, it does not present a contradiction in the two ALSs. It may present a contradiction elsewhere. But this type of example trips me up. I bought the book and I love it. But I often find that I can't prove a path I follow using its rules. I usually import the puzzle that I can't prove and watch what the solver does. Sometimes that helps, sometimes not.

Tuesday 23-Aug-2011

... by: Grandad

I am almost certainly not the first to ask but - in the 2nd example, surely F1 should have possibles 1, 2 and 3 so isn't an ALS ?

Thursday 14-Oct-2010

... by: Terry

Hi Andrew,

Excellent site ;-)
I'm just getting to grips with some of the more difficult strategies. I had a puzzle loaded in the solver and it came up with an ALS that I fail to understand :( The starting point for the puzzle is

..7...32.1..2.7..6.26.5.71..8...2....19.6.5...6.7......91.2..475..17.....78......

If you just keep clicking 'Take Step' until it comes to the first ALS, I can't see how 8 is restricted as 6 can also be seen by both ALSs.

What am I missing in my understanding of the ALS technique?

Many thanks and best wishes,

Terry

Sunday 28-Feb-2010

... by: Ana

In the last example the {1,2,6,7,8} in row G is not an ALS because it has 5 candidates in 3 cells
Andrew Stuart writes:

The four cells highlighted in brown are the ALS, so thats 5 candidates in 4 cells.

Article created on 12-April-2008. Views: 49081
This page was last modified on 4-September-2008.
All text is copyright and for personal use only but may be reproduced with the permission of the author.
Copyright Andrew Stuart @ Syndicated Puzzles Inc, 2011