(This is a copy of an article I wrote some time ago. I am posting it here just to be sure there is an extra copy.
The original is here: Broken link removed 18 Jul 2010
Keith: 15 May, 2009)

Edit 18 Jul, 2010:
The original was indeed lost, along with the entire Players' Forum. Much of the content has been recovered. In particular see this article at
http://Forum.EnjoySuDoku.com/viewtopic.php?t=4204
which was last edited on 7 Jun, 2006
end edit

Unique Rectangles: The Essentials

1. Introduction

The original techniques to solve classic Sudoku puzzles are based on the fundamental, simple rule: Each row, column and box contains only one occurrence of each of nine symbols.

It is quite possible for a Sudoku to have none or many solutions. But, most people consider a Sudoku puzzle to be "valid" only if it has a single solution. There are techniques that exploit this uniqueness condition.

In the past few months, the classic and the uniqueness techniques have been blended together, to create very interesting solution methods. These methods are based on patterns that are relatively (and sometimes very) easy for humans to recognize.

This cannot lead to a unique solution: The solution on each diagonal is either 1 or 2, and they can be interchanged.

Either of the above is often called the "deadly pattern". <1> and <2> are the "deadly candidates".

In the previous diagrams, the four cells define a rectangle, which must be, or must lead to, a non-unique solution. In an actual puzzle (where some corners have additional candidates), the goal is to avoid the deadly pattern by ensuring a "Unique Rectangle" (UR) in the solution.

This rectangle pattern obviously occupies only two rows and two columns. It also can occupy only TWO boxes. If the rectangle occupies four boxes, the corners cannot be interchanged to get another solution. (Try it!)

2. The Simplest Unique Rectangle

Suppose we have a partially solved puzzle with the following set of candidates:

This is often called a Type 1 Unique Rectangle. It is very easy for a human to spot.

3. Some Patterns: Shared Buddies

Each cell in a Sudoku puzzle has 20 "buddy" cells. These are the cells which are in the same row, column, or box as the original cell. These are the cells whose values directly affect, or are affected by, the value of the original cell. Two cells together have between 2 and 13 "shared buddies". If you are familiar with this concept, skip this section.

We will usually be concerned with two cells which are corners of the UR. Label them "*". They may be in the same row:

In this case, we can eliminate <3> and <4> as candidates in any of the remaining shared buddies, the cells marked "#"!

Here is the explanation of this surprising result:

The cells with candidates <123>, <124>, and <34> are a "reduced set" of three cells containing four candidates. (Normally, we would need to find a full set of four cells to make eliminations in other cells.) However, the only two cells in the subset where the deadly values are candidates are on the corners of the rectangle.

Only one of the deadly candidates can occur in these two corner cells; The one "missing" candidate in the reduced set is one of the deadly values. Therefore, in the set of the "shared buddies", the reduced set contains all the occurrences of the "extra" candidates. Eliminations can be made in the remaining shared buddies.

There are obvious variations when the extra candidates are in the same row and / or the same box. This is usually called a Type 3 Unique Rectangle. There is also a diagonal variant.

The reduced set may contain candidates which are not on the UR. For example,

allows elimination of <3>, <4>, and <5> from any of the cells marked "#".

5.2 Conjugate Pairs (Strong Links)

If a candidate value occurs only twice in a row, column, or box, the two cells are called a "conjugate pair" and form a "strong link". In the solution, one of the two cells must be that candidate value.

Consider the diagram of Section 5, above. Suppose also that the only occurrences of the candidate <1> in the right hand column are on the corners of the rectangle. Then, one of these corner cells must have the value <1>. To avoid the deadly pattern, one of them must be <3> or <4>. So, neither of them can be <2>, and the reduction is:

This pattern and reduction is called a Type 4 Unique Rectangle. Although this reduction "destroys" the UR, any reductions that could have been made as Type 2 and Type 3 UR's will still be available. (Edit: This is true here, but it is very bad advice in general. You should look for all UR's, and for all reductions, before making any reductions.)

There is an interesting diagonal variation, sometimes called a Type 6 UR. It was first noticed as the overlay of an X-wing on a UR. Consider the pattern of Section 4, above, and suppose the rectangle is also an X-wing on <1>. The result must be:

forces the deadly pattern. This is a chain, in which a certain candidate value in one cell results in a contradiction. So, that candidate can be eliminated.

Another way to look at this: If the <13> cell is <1>, the <124> cell is not <1>. If the <13> cell is <3>, there is a Type 1 UR, and the <124> cell must be <4>. In either case, the <124> cell is not <1>. (This is an excellent technique: Tabulate the possible solutions.)

6. Closure

Above is a summary of unique rectangles and solution strategies that are, I believe, most useful to human solvers using pencil and paper. There is much more on this subject. Take a look at

Let's back up. My original observation, hijacked by the SudoPolice, was that of a UR (possible DP) overlaid on an X-wing. After a few messages, it became clear we were talking about possible DP's supplemented by strong links.

I am not a programmer - I have not laid out all the possibilities. You might ask Mike Barker, one of the few in that forum without an unmanageable ego.

In the case you cite, if there is an X-wing on <1>, the eliminations are clearly correct. I also believe you are correct in the eliminations of the patterns that you give, that are one link short of an X-wing.

(I would ask, like the mythical Type 5 UR, does it really occur?)

I don't have a name for them. other than UR (possible DP) supplemented by strong links. The SudoPolice have variously called them Type 6, Type 7, or Hidden UR's.

The basic URs -- Types 1/2/3/4/5/6 -- all require that (at least) two of the four cells be equivalent bivalues. Two of the basic URs -- Types 4/6 -- require that one of the candidates exist in an X-Wing pattern. This makes the basic URs (relatively) easy to identify.

However, there are other URs. Mike Barker created an extensive list. Among those that have become popular is the Hidden UR (see my message above). It, and the other pattern in my message above, relies on a strong link in a row and a strong link in a column.

I recently ran across an example of a UR that I think is very easy to identify and use. Two of the cells form a Naked Pair, and there is a single strong link connecting each of these cells to its alternate companion cell.

The basic URs -- Types 1/2/3/4/5/6 -- all require that (at least) two of the four cells be equivalent bivalues. Two of the basic URs -- Types 4/6 -- require that one of the candidates exist in an X-Wing pattern. This makes the basic URs (relatively) easy to identify.

However, there are other URs. Mike Barker created an extensive list. Among those that have become popular is the Hidden UR (see my message above). It, and the other pattern in my message above, relies on a strong link in a row and a strong link in a column.

I recently ran across an example of a UR that I think is very easy to identify and use. Two of the cells form a Naked Pair, and there is a single strong link connecting each of these cells to its alternate companion cell.

You've show what is essentially the "naked" patterns associated with URs. There is a whole complementary half of "hidden" patterns based on the question, "Where must the deadly pattern digits go if they are not in the deadly pattern?"

The UR Type 4 can be performed without affecting the outcome. However, concurrent application of the UR Type 6s hinder the puzzle from being cracked at this point. Ironically, only one should be performed.

Perform <56> UR Type 6 and it forces the <16> UR Type 6 to become a UR Type 1, and it cracks the puzzle.
Perform <16> UR Type 6 and it forces the <56> UR Type 6 to become a UR Type 1, and it cracks the puzzle.

What's not very obvious is this AIC forced by the concurrent UR Type 6s:

The UR Type 4 can be performed without affecting the outcome. However, concurrent application of the UR Type 6s hinder the puzzle from being cracked at this point. Ironically, only one should be performed.

Perform <56> UR Type 6 and it forces the <16> UR Type 6 to become a UR Type 1, and it cracks the puzzle.
Perform <16> UR Type 6 and it forces the <56> UR Type 6 to become a UR Type 1, and it cracks the puzzle.

What's not very obvious is this AIC forced by the concurrent UR Type 6s:

Code:

(2)r4c7 = (1-5)r3c8 = (2)r8c8 => r4c9,r7c7<>2

It is interesting. If you take a look at the grid after using both type 6 URs there is an avoidable DP (2 really) that leaves only one more step.
Note that r3c8 is NOT a given.

This pattern -- borrowed from ronk in another forum -- is the basis for a UR Type 1. Three of the cells contain ab and the fourth cell contains at least one value of the candidate pair. In this case, it eliminates a from a+X.

Code:

ab ab
ab a +X

I could have also written:

Code:

ab ab
ab b+X

As it turns out, the classic UR Type 1 is simply two concurrent applications of this pattern.

Code:

ab ab
ab ab+X

In addition, the first pattern can be reduced to:

Code:

a b
b a +X

and the elimination of a in a+X still holds true. This was recently explored by Keith in another thread.

I have no idea what an AUR is. I think we should define an ADP. Almost Deadly Pattern.

A DP is any single-digit solution that has interchangeable candidates and, therefore, multiple solutions. An ADP is an unsolved situation that has a DP plus additional candidates.

By the way, I do not view Sudopedia as a hallowed scripture. The last time I looked, there was no description of a general remote pair, nor of an M-wing,

Keith,

I agree that Sudopedia is not a hallowed scripture. However, since we are without a hallowed scripture (anywhere) for Sudoku, then I try to use any formalized reference that I can find. Sudopedia seems to be "right" a majority of the time.

I was surprised to see that Sudopedia defined Unique Rectangle as a specific Deadly Pattern. I'd always thought that a Unique Rectangle was a specific DP with additional candidates present.

I should have done this first. I searched through The New Sudoku Players' Forum for the first occurrance of "Unique Rectangle". It was a post by MadOverlord here that goes back to Oct 21, 2005. He talks about Uniqueness tests and how he's categorized them into Unique Rectangle types that have extra candidates present.

So, I guess AUR is used by those who follow the Sudopedia definition and wish to designate a UR with additional candidates. You and I can continue to merrily use Unique Rectangle using MadOverlord's definition. _

I took a look at what Sudopedia has to say on the subject, and I don't like it. I don't like the usual classification of URs into types either, but at least it is a common terminology. Sudopedia's discussion may be logical, but it is terminology no one uses.

By the way, all the links to the old Players' Forum from Sudopedia are now broken.

I agree that we may as well start with what Sudopedia says. It helps with common terminology.

By the way, Mad Overlord is Robert Woodhead. He wrote the Sudoku Susser.

I think Sudopeida is simply incorrect. In 2006 I wrote (see the first post of my UR thread, the second post of this thread):

Quote:

... the four cells define a rectangle, which must be, or must lead to, a non-unique solution. In an actual puzzle (where some corners have additional candidates), the goal is to avoid the deadly pattern by ensuring a "Unique Rectangle" (UR) in the solution.

The Unique Rectangle is NOT the deadly pattern. It is NOT a set of candidates that may lead to a non-unique solution. It is what you need to eliminate the deadly pattern, or the potential of a non-unique solution.

I am not about to start editing Sudopedia, any more than I am prepared to rewrite the Encyclopedia Britannica.

There is a sidebar (and much less important) discussion as to whether the deadly pattern (DP) is a (particular) non-unique solution, or whether it is a collection of candidates that may lead to such a solution.

I would prefer we say a DP is a group of cells in a solved puzzle where values can be interchanged, so the solution is not unique.

In an unsolved puzzle, I would prefer to refer to a "possible DP" or a "potential DP".

By the way, I just happened to come along as Robert Woodhead and others were refining their ideas on uniqueness techniques.

Danny, that's an interesting approach I have never thought of using. Thanks

It led me to think again about the question of whether a UR move like this can be replicated by a "proof" move like a chain or net that does not rely on the setter uniquesness assumption - and so whether puzzles can always be solved without using uniqueness. What's the current thinking on this? (Sudopedia just notes it as a "controversy"!) I can often find equivalent moves especially if the UR move was "kraken"-like rather than just using internal logic, but they tend to be ugly brutes!

Although a strong links analysis produces r1c3<>1, I noticed a finned-UR approach that I've used previously.

Code:

r1c3=4 => r5c3=2 r4c3=6 ; r3c3<> 6 -or-
UR Type 1 ; r3c3<>16

Danny,

I like your finned or almost approach, but do not see how it adds to viewing the pattern. To me the strong analysis that determined r1c3<>1 is correct but incomplete. The internal SIS is r1c3=4 & r3c3=349 which can also be used to perform an additional deletion:
(4)r1c3-(4=2)r5c3-(2=6)r4c3; r3c3<>6
||
(349)r3c3-(6)r3c3

Danny, that's an interesting approach I have never thought of using. Thanks

It led me to think again about the question of whether a UR move like this can be replicated by a "proof" move like a chain or net that does not rely on the setter uniquesness assumption - and so whether puzzles can always be solved without using uniqueness. What's the current thinking on this? (Sudopedia just notes it as a "controversy"!) I can often find equivalent moves especially if the UR move was "kraken"-like rather than just using internal logic, but they tend to be ugly brutes!

Peter, an awful lot has been written about the uniqueness controversy. I doubt if there's a consensus on the topic.

My Position on Uniqueness:

There is nothing in the fundamental, newspaper-type description of a Sudoku puzzle that says it must have a unique solution from the clues provided. There are many solutions to the following Sudoku puzzle.

If a Sudoku puzzle has only one solution, then I consider it an additional constraint that's fair game to utilize.

I've heard that using uniqueness might lead to a solution in a multi-solution puzzle, but I don't recall seeing it demonstrated. Even so, I have found a solution and the puzzle can be tossed. I don't care if someone else finds a different solution. That simply means that it's a multi-solution puzzle!!!

Finally, I doubt if a uniqueness step is ever the only way to advance a puzzle's solution. However, I think they are much more interesting to include in a solution than a boring 9-cell XY-Chain. (Your chain does not fall into this category.)

BTW, that's an impressive grouped 6=3 strong link you formed through the ANQ()!

I like your finned or almost approach, but do not see how it adds to viewing the pattern. To me the strong analysis that determined r1c3<>1 is correct but incomplete. The internal SIS is r1c3=4 & r3c3=349 which can also be used to perform an additional deletion:
(4)r1c3-(4=2)r5c3-(2=6)r4c3; r3c3<>6
||
(349)r3c3-(6)r3c3

Yes Ted, what I described is essentially identical to what you described. The only difference is in motivation. I'm much more likely to examine URs that are almost a know pattern with known eliminations before examining URs for eliminations based on analyzing the internal SIS. Similar to a finned X-Wing where no one takes the time to analyze which eliminations are associated with the X-Wing.

As for the elimination r3c3<>6, it leads to r1c3<>1, which exposes a Naked Triple as the final step before Singles. The Naked Triple would have performed r3c3<>6 as well.