SudokuWiki
SudokuWiki.org
Strategies for Popular Number Puzzles

Cage Comparison

Example 1

The first cage comparison strategy consists of detecting if one cage has combinations which, if set as the values for that cage, will leave another cage without any valid sets of numbers. The second target cage has to be accessible, i.e. wholly 'seen' by the first cage. And that means all the cells in both cages must be mutually 'seen' (looking along the row, column or within the same box).
Cage Comparison Example 1
Load into solver
In the first example the 2-cage on C1 has combos {1/4} and {2/3}. Along the row is a 2-cage starting at C3. This has been reduced to {1/2/4/5} in both cells leaving {1/5} and {2/4} as possible combiates. Since 1 and 4 in the first cage invalidate both these options 1 and 4 cannot be part of the cage on C1.

Example 2

The second example shows this strategy is not confined to pair cages but they will be the most common. Here two 3-cages within the same box are compared. Usefully they have the same clue but on the face of it have a lot of combinations.
Cage Comparison Example 2
Load into solver
So the cage starting on B1 has been reduced the most and {2/5/8}, {2/6/7} and {3/4/8}. But check out {2,5,8}. If that is the solution then it affects the A1 cage:
A1 cage combo 159
A1 cage combo 168
A1 cage combo 258
A1 cage combo 267
A1 cage combo 348
A1 cage combo 456
So no combination works. We can therefore remove 5 from cage B1.

Example 3

Lets look at JohnNoneDoe's latest example from 2019. Load into solver
As he writes, the 12-in-2 cage at AB9 must be {9/3} or {8/4}. Thus the 8-in-3 cage at ABC8 cannot be {1/3/4} - it must be {1/2/5} and "the solution is straightforward".
Cage Comparison Example 3



Comments

Your Name/Handle

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

Your Comment

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


Please ensure your comment is 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.
CommentsTalk

... by: Mika

Wednesday 5-Feb-2025
Fun fact: The solver can solve the world's hardest Killer Sudoku. (You probably already knew this but some people don't.)
Andrew Stuart writes:
No, I don't know this puzzle. Do share!
Add to this Thread

... by: Ahydul

Monday 28-Oct-2024
Hello, I'm trying to understand the different strategies but this one has no documentation. Can someone give a brief explanation of what this strategy consists of?
Andrew Stuart writes:
I have been very amiss for forgetting about this page. Documentation coming now.
Add to this Thread

... by: JohnNoneDoe

Wednesday 20-Apr-2022
Load killer sudoku

The solver cannot proceed further even with all strategies enabled.

Consider the cage starting at d5 and the 1-cell pseudo-cage b5; the cage at d5 cannot be 189 because that would leave b5 empty. Solution is straightforward if the 1's are removed from cage d5.
Andrew Stuart writes:
Bit late looking at this example but I'm reforming the cage comparison stuff now with some new ideas. Here is the board at the end of solve path where it gets stuck. 1/8/9 is not an option for cage on D5 so it is not valid to remove the 1s. 1/5/9 and 1/6/8 are possible. But a lot has changed since 2022
Add to this Thread

... by: JohnNoneDoe

Tuesday 25-Jun-2019
Here is another board which thwarts the solver.

There is a Killer Sudoku board I would like you to look at

Click on this link:
http://www.sudokuwiki.org/killersudoku.htm?bd=112212212223313412112213413113313443124412241322313311312312211212313322214412211,060012004508000812090009000015270000240017000000000013000003000000000000002706000013000022140000170006000000001600000013000000080000000009001300000012000009001200

The solver fails but the puzzle is easily solved using cage comparison.

The 12-in-2 cage at ab9 must be 9,3 or 8,4. Thus the 8-in-3 cage at abc8 cannot be 1,3,4; it must be 1,2,5 and the solution is straightforward
Andrew Stuart writes:
Board at stuck point. Excellent example and as of 13 June 2025 it is now detected. Going to add to the documentation.
Add to this Thread

... by: JohnNoneDoe

Friday 16-Mar-2018
There is a Killer Sudoku board I would like you to look at

Click on this link

The solver fails on this board. It can be easily solved using what I think is an application of cage comparison. The 13-in-2 cage at a78 cannot contain 6,7 because of the 15-in-2 cage at a34. Thus the 5 cell innie in box 3 summing to 45-13-14=18 must contain a 7, 18-in-5 is 12357.
Andrew Stuart writes:
Board at stuck point. Excellent example and as of 13 June 2025 it is now detected. Going to add to the documentation.
Add to this Thread

... by: JohnNoneDoe

Thursday 19-Jan-2017
Below is a board that thwarts the solver.

There is a Killer Sudoku board I would like you to look at

Click on this link:
http://www.sudokuwiki.org/killersudoku.htm?bd=112212211213313312244212442114232411112131211232121232231121132132232231111333111,190009001808001700100006000012000005001500070006220000200000001100002100000015270018070000051100000600001814000000000000000000190009002511000014000000000000000000

The solution is straightforward when one notes the hidden pair 1,4 in 5hj and 5fg which leads to a hidden pair 8,9 in 5abc and 6b. I think think this observation would be a result of what I think of as cage comparison.
Andrew Stuart writes:
Here is the stuck point. No solution as of June 2025. Not quite sure I follow the logic of this deduction.
Add to this Thread

... by: JohnNoneDoe

Thursday 10-Nov-2016
I am looking forward to the cage comparison documentation. I assume it covers such things as 5 in 2 and 6 in 2 in the same unit, seems very powerful.
REPLY TO THIS POST

... by: Thinkist

Monday 23-Apr-2012
If I'm understanding correctly, this strategy is the exact same as Killer Combinations (hard).

Also, the X-Wing strategies and those below it are useless (or at least really rare). Same for KenKen and KenDoku.

REPLY TO THIS POST
Article created on 7-August-2011. Views: 28092
This page was last modified on 13-June-2025.
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-2025