SudokuWiki
SudokuWiki.org
Strategies for Popular Number Puzzles

Rectangle Elimination

Released 14th Oct 2023

This is the first novel 'tough' strategy in a long time and replaces Empty Rectangles which I feel is an overly complicated pattern. Ken Reek from Denver, USA, sent me his explanation and it is included in his solver SudoKoach. I think it sufficiently distinct to warrant its own test and go near the start. The pattern can also be expressed with AICs usually with at least one grouped cell. For those curious I've kept the Empty Rectangle test on the solver so you can go back a step, untick Rectangle Elimination and compare.

Comments welcome.

I will use the original puzzle Ken sent to me to illustrate his pattern.

The pattern works on a single number - in this case 9.

Rectangle Elimination 1
Rectangle Elimination 1 : Load Example

The base of the pattern consists of a Hinge cell G2 connected to the one remaining 9 in the row (or column), in this case G6. This part has to be a strong either/or link. First 'wing' cell in orange.

From the hinge G2 we look for another 9 in the opposite orientation (the column) and in a different box that is weakly linked - more than two 9s in the unit. The second 'wing' cell.

Consider the weakly-linked A2. If it's ON, then the other wing cell G6 must also be ON. However, this would eliminate ALL the 9s in the 'fourth corner box' (box 2, which is the fourth corner of the rectangle). So A2 cannot be ON, i.e. we can eliminate 9 as a possibility from A2. Simple as.
Rectangle Elimination 2
Rectangle Elimination 2


So it turns out there is a second Rectangle Elimination at this stage of the puzzle and my solver finds it before Ken's one - just because of the way I search for the hinge first and go from top-left to bottom-right.

If the 9 in F2 was ON it would remove the 9 in G2 - AND - it would turn OFF the 9 in F4 and turn ON the 9 in J4 - eliminating the 9 in J1.

Since we can't remove all the 9s in box 7 we have a contradiction assuming 9 in F2 can be a solution.

Double Rectangle Elimination

Double Rectangle Elimination
Double Rectangle Elimination : Load Example or : From the Start
The solver can identify more than one candidate in the same pattern as shown here. The results will be
If +1[B8] then -1[D8] forcing +1[D1] which removes all 1s from box 1, so B8 cannot be 1
If +2[B8] then -2[D8] forcing +2[D1] which removes all 2s from box 1, so B8 cannot be 2

To show how this is also an Empty Rectangle I've displayed the pattern here.

Grouped X-Cycle
1 taken off B8. ERI=B1 + strong link on 1 between D1 and D8.
2 taken off B8. ERI=B1 + strong link on 2 between D1 and D8.


And to show how these are often expressible as Nice Loops I show that pattern here

Grouped X-Cycle
X-CYCLE on 1 - Discontinuous Alternating Nice Loop, length 6):

+1[B8]-1[D8]+1[D1]-1[A1]+1[B2|B3]-1[B8]
- Contradiction: When B8 is set to 1 the chain implies it cannot be 1 - it can be removed

Two Strong Links

Two strong links example
Two strong links example : Load Example or : From the Start

Another kind of double Rectangle Elimination is when both links are strong.
In this case the solver will return

If either +5[B7] or +5[E2] are ON then both are on because they are strongly linked through the hinge cell B2. If both are ON then this removes all 5s from box 6, so neither can be 5

This kind I find to be much, much rarer.

Note: The solver will always alternative strong/weak in a chain and draw the lines that way since it represents ON/OFF/ON etc. See here.

To give it's Nice Loop definition we have to use quite a complicated chain. It also works but discovering that B2 must be the solution rather than finding the wings are not. Two sides of the same coin but proves Rectangle Elimination is an easier pattern to find for a human.

X-CYCLE on 5 - Discontinuous Alternating Nice Loop, length 6):
-5[B2]+5[E2]-5[E7|E9]+5[F7]-5[B7]+5[B2]
- Contradiction: When 5 is removed from B2 the chain implies it must be 5 - other candidates 6 can be removed

This strategy is patched into the online solver - I have run tests to check my code and see how widespread it is. I intent to place it between Y-Wings and Swordfish. On testing Ruuds top 50k test set I find 35,826 instances across 23,885 puzzles, so very high - but that is partly due to being at the front of the queue. I also found a small bug in the Empty Rectangles getting more instances, but that is moot now.

Exemplars

These puzzles have the most Rectangle Eliminations while still being less than or equal to diabolicals.
They make good practice puzzles.

Go back to Y-Wing StrategyContinue to SwordFish Strategy


Comments

CommentsTalk

... by: Pandu R

Saturday 30-Mar-2024
Separately, I think Rectangle Elimination and Empty Rectangle are exactly equivalent (i.e. every RE can also be considered an ER, and every ER can also be considered an RE.) -- right?

If so, it might be worth saying this explicitly. The current language and UI suggests that ER is a subset of RE.
Andrew Stuart writes:
I hope I've strengthened the language a bit, I agree it's an exact replacement not a subset. - [Del]
Add to this Thread

... by: Pandu R

Saturday 30-Mar-2024
Here's my stab at another explanation for the first example, reusing some of your language (up until the ***) but changing some: (after the ***)

The base of the pattern consists of a Hinge cell G2 connected to the one remaining 9 in the row (or column), in this case G6. This part has to be a strong either/or link.

From the hinge G2 we look for another 9 in the opposite orientation (the column) and in a different box that is weakly linked - more than two 9s in the unit. *** (The 'hinge' cell is highlighted in green, and the 'wing' cells are highlighted in orange.)

Consider the weakly-linked 'wing' cell A2. If it's ON, then the other wing cell must also be ON. However, this would eliminate ALL the 9s in the 'fourth corner box' (box 2, which is the fourth corner of the rectangle). So A2 cannot be ON, i.e. we can eliminate 9 as a possibility from A2.

---

P.S.: I don't think the sentence "These two 'wing' cells (in orange) are locked. If one is ON the other must also be ON" is correct. (At least, if it's correct, it's not obvious, and might need more explanation.) Yes, if A2 is ON then G6 is on. But if G6 is ON, I don't see why A2 must be ON.
REPLY TO THIS POST

... by: tim

Saturday 27-Jan-2024
I strongly recommend that you view the Sudoku Swami's explanation of Empty Rectangles on tutorial #18 of YouTube. Conjugate Pairs ( two cells with the same value in a house) are easy to see. When present, Empty Rectangles are also easy to see.

The Swami explains this useful and simple elimination in Clear, Simple to Understand language with Clear, Concise illustrations.



REPLY TO THIS POST

... by: Shari A Tuttle

Thursday 25-Jan-2024
In the first example on this page for rectangle elimination, I am confused about the logic. If G6 is ON, then G2 is off. If G2 is off, could it not be true that E2 could be on? How do you infer that if G6 is ON, then A2 is ON? Thank you
REPLY TO THIS POST

... by: Shari A Tuttle

Thursday 25-Jan-2024
In the first example on this page for rectangle elimination, I am confused about the logic. If G6 is ON, then G2 is off. If G2 is off, could it not be true that E2 could be on? How do you infer that if G6 is ON, then A2 is ON? Thank you
REPLY TO THIS POST

... by: Nephrium

Thursday 11-Jan-2024
To complete Pieter's comment, if G6 is ON, A2 is OFF since G6 only leaves one 9 in block two at A5!
REPLY TO THIS POST

... by: Pieter Newtown

Saturday 18-Nov-2023
Hi Andrew
David H's Comment made me look closer into this strategy. Frankly I skip many Tough strategies and often go straight to X-Cycles which will find this too.

The statement "These two 'wing' cells are locked. If one is ON the other must also be ON" doesn't go both ways. If G6 is OFF then A2 is OFF is true, but in reverse, if G6 is ON then A2 is not necessarily ON due to the weak link from G2 to A2. If A2 is ON then G6 is ON would be true.

Also, as David pointed out, a typo for us proper English spellers, should be "fourth corner box".

Ciao, Pieter

P.S.
I could never get my head around Empty Rectangles anyway!
Andrew Stuart writes:
Typo fixed thank-you! - [Del]
Add to this Thread

... by: David Harkness

Sunday 29-Oct-2023
I see why the 9 is eliminated from A2 in the first example using the Empty Rectangle strategy, but I don't follow the description for this new strategy.

"From the hinge G2 we look for another 9 in the opposite orientation (the column) and in a different box that is weakly linked - more than two 9s in the unit."

So far, so good.

"These two 'wing' cells are locked."

Which are the two 'wing' cells? A2 and G2? A2 and G6? G2 and G6?

"If one is ON the other must also be ON."

This doesn't apply to any two cells of A2/G2/G6, so is the other wing cell in box 2? This is the part where you lost me.

"And if G6 is OFF then A2 is OFF."

Yes.

Our weakly-linked 'wing' cell 9 can be eliminated if ALL the 9s in the forth corner box are turned OFF by the action of A2 and G6."

I think that's a typo and you meant "fourth corner box" (box 2). This part is also clear. I'm just left wondering which two cells are the 'wing' cells which both must be ON if either is ON. Am I misreading that part?

Cheers,
David
Andrew Stuart writes:
Hi David. I've added "(in orange)" to make the wings clear. - [Del]
Happy Bob replies:Sunday 11-Feb-2024
The logic is quite straight forward, but the explanation needs work. The logic is that when the weak-linked wing candidate is ON, the strong-linked wing candidate has to be on also. If this situation eliminates all options in the fourth cell, then the candidate in the weak-linked cell cannot be valid and can be eliminated.
Add to this Thread

... by: Strmckr

Tuesday 17-Oct-2023
Definitely not new, this has been out since 2007 on the players forum covered by me and others

Empty rectangle intersection is the easier explination for empty rectangles as a mini row col switch in any box. Where all the values for the box exist on these two mini sectors.

Extensions include the
Dual ER (2 arms off 1 box)
rec`t kite (er+kite) 1 box connects to 2 arms which are also weakly linked in another sector.

Mutiple eri connected
Muti-fish for multiple digits

I have examples if you want

Ps we use aic logic over niceloops as these have been discontinued since 2010 as well as anything colouring based. As the logic of aic is shorter and easier in many aspects.

Strmckr
Andrew Stuart writes:
Thanks Strmckr. Lots to absorb here. I suspected the idea goes back away. - [Del]
Add to this Thread
Article created on 7-October-2023. Views: 23452
This page was last modified on 23-October-2023.
All text is copyright and for personal use only but may be reproduced with the permission of the author.
Copyright Andrew Stuart @ Syndicated Puzzles, Privacy, 2007-2024
Playwire