Avoidable Rectangles are a most unusual strategy ‑ and, to this author’s knowledge, the only one that makes use of solved cells. We are used to the idea that a solution kills all the other numbers of the same value along the row, column and box, meaning that all information about that cell has been used up. Apparently, this is not so.

To appreciate this strategy, we have to put ourselves in the shoes of the puzzle creator, not the puzzle solver.

Consider the solution in diagram to the right. We have four cells that are shaded. To create a Sudoku puzzle, some removal process has to take place - some method of taking out numbers so that they can be filled in again by a puzzle solver. The crucial constraint is that the puzzle must have a unique solution. If the puzzle maker removed all four shaded cells, then there would be at least two solutions, since the 1 and the 2 are interchangeable in this situation.

Notice that we are talking about a rectangle that crosses exactly two boxes. This is the same deadly pattern formation we’ve discussed in Unique Rectangles. If our four cells are in four boxes, the puzzle maker can remove all numbers, since they are not interchangeable. To the puzzle maker, the four shaded cells above are an “unavoidable set”: he or she can’t avoid leaving one or more of these numbers as a clue.

There are millions of possible puzzles derivable from a completed Sudoku board. The top third of the puzzle above is just one example. Notice, however, that at least one of the four cells (C5) from our example is a clue - which avoids creating a double solution.

The next picture shows the state of play (in the top third of a puzzle) near the end. From the point of view of the puzzle solver aware of “unavoidable sets”, we can spot a very interesting rectangle in B4, C4, B7 and C7. It seems that we’ve found an interchangeable pair of 5s and 8s.

Work on the puzzle so far has fixed 5 in C4 and B7 and 8 in C7, but the final corner has two options ‑ an 8 or a 9. If B4 really were an 8, then we’d have the same situation as in the case of the 1 and 2 where the puzzle maker was forced to leave a clue. Since our newly identified rectangle does not contain a clue in the corners, we can’t have an interchangeable pair here. The 8 is not a valid solution, so we can remove it and place a 9 in B4.

So the rule of Avoidable Rectangles is:

**We can remove a candidate that forms a potential interchangeable pair with three other cells spread over two boxes where the three other cells are solved cells (not clues).**

Extensions of this strategies are documented in my book The Logic of Sudoku.

Note: This strategy does not exist in the solver because it relies on knowledge of what the original clues were. However, my solver is only given the state of the board as it currently exists and solved cells could be clues or cells solved in a previous round. It does not know. The data entry does allow one to distinguish between them but I can't force the user to abide by it.

So the rule of Avoidable Rectangles is:

Extensions of this strategies are documented in my book The Logic of Sudoku.

Note: This strategy does not exist in the solver because it relies on knowledge of what the original clues were. However, my solver is only given the state of the board as it currently exists and solved cells could be clues or cells solved in a previous round. It does not know. The data entry does allow one to distinguish between them but I can't force the user to abide by it.

## Comments

Comments Talk## Wednesday 27-Apr-2016

## ... by: John

Love your site, I'm just wondering if you've done any statistics on this strategy. I've been looking for it in puzzles (I really want to find one!), but I often notice that in cases where it would've been used other unique rectangle strategies have already eliminated the candidate. I assume it's fairly rare to actually get an elimination this way.My offline solver which does keep track of clues (since they are inputs) does include this strategy. A recent run on Ruud's top 50,000 set - my favourite test set - finds 22 instances. Could be more since its dependent on the order, but I include it just after Jelly-Fish and before the other UR strategies

## Thursday 14-Nov-2013

## ... by: Tom

I think it's crucial to add that the UR can be used when there are exactly two candidates in the cell in question. It never worked for me when I had 3 candidates there..## Friday 4-May-2012

## ... by: Duncan

Good and detailed explanation. I use this "impossible ambiguity" strategy in killer and in kakuro as well where it is equally valid.One thing to look out for as well is when the ambiguity extends over three vertical pairs of cells in a horizontal line (or vice versa), which I have seen a couple of times.

## Sunday 11-Dec-2011

## ... by: Eric

Nice strategy if you are out of options, but there must be another way to solve the puzzle. There MUST be another way to remove a candidate, otherwise multiple solutions are possible.## Tuesday 26-Jul-2011

## ... by: Yossarian

@ Paolo and Malikov:Your argumentation is right. You should consider the following argument instead:

Imagine at the end you have a solution containing the 8 in that cell. Then you can find a second solution swapping those 4 cells, which is also a solution to the given sudoku.

This is impossible as we know there is only one solution to the given sudoku.

So the 8 cannot go in that cell.

Hope this helps understanding,

philipp

## Saturday 19-Mar-2011

## ... by: Quescaisje

This elegant tactic finds good use in AI Escargot, viz. the rectangle formed by E2/3, H2/3.bill

## Wednesday 3-Mar-2010

## ... by: CS Vidyasagar

Excellent exposition. One does come across such situations and this weapon will enhance our fire power in demolishing Sudoku puzzles. If one reads your excellent explanations of DEADLY RECTANGLES, then this article becomes crystal clear.I shall try and locate such Avoidable Rectangles and send them to you.

thanks and regards,

Vidyasagar

## Wednesday 20-Jan-2010

## ... by: Leo Salmonsson

Really good explenation. I liked it a lot.Easy to follow and easy to understand. Ill be back to this site for more.

Thanks a lot!

## Saturday 12-Dec-2009

## ... by: paolo

can't get your example, but maybe I'm missing something.In the last example IF YOU PUT 5 in B7-C4 and 8 in C7 this means that you had some reason to put that numbers there. In other words that 5s and 8 cannt be swapped. Otherwise they should not have been placed. So it is arbitrary to deduce from them the impossibility of having an 8 in B4.

I mean that (IMHO of course) you won't ever arrive in that position (last example) because you should have applied the UNIQUE RECTANGLE tecnique before, in case.

Hope my explanation is understandable.....

paolo

## Thursday 17-Sep-2009

## ... by: Pritt Galford

Regarding your webpage about Avoidable Rectangles, I have a problem understanding your explanation. I think perhaps the problem arises not with your logic, but with the example instead.Look at filled-in cells A3 & A9, and C3 & C9. They are an interrelated pair, thus allowing two solutions to the puzzle which is a no, no. There are others of the same problem in the example.

Also see the top 1/3rd of the puzzle of your last example on the same webpage. It has cell A5 with candidates 8 & 9 but nine is already filled in at J5.

Bottom line: I think your Avoidable Rectangle logic is correct and sound, but I'm finding there sure are a lot, in fact it's rather a common occurrence, especially in difficult Sudokus, to find multiple solutions which are violations of the unique solution rule. Your thoughts, please.

## Tuesday 7-Jul-2009

## ... by: Malikov

I agree with the above comments, this being a great site and all, but don't start charging admission. You'll find that 99% of people do Sudoku for fun, and won't be willing to pay when there are hundreds of free sites they can access.## Friday 22-May-2009

## ... by: Ken Stephens

I understand the logic based on the information given, that "the three other cells are solved cells (not clues)". However I do not understand how they CAN be solved cells if they would have been interchangeable but for the contents of the fourth cell.Thanks for a great site which explains things so clearly and on just the right level.

## Sunday 26-Apr-2009

## ... by: Gary Maness

I have a question on this one. I recently used my own variation on this idea that involved 2 pairs that didn't quite form a rectangle. In fact two cells could see the forth but the third could only be seen by one of the others that I had solved. But using the same logic I thought that since there were no clues on any of those cells, if the target number, 8 were possible then there would be two solutions.Do you have Sudoku Dragon? I can send you the partially solved puzzle. i am interested to know if this forms a rule or did I just get lucky! I mean, in your example, the two end cells, the 5's could see the forht cell and the first cell, the 8. In mine the end cells could the target, but only one could see the first cell.

I hope this makes sense. BTW, I LOVE this site. I have learned so much about the game. You should consider charging admission! I do plan on buying the Index.Dat program and the book when I can though.

Thanks a bunch.