What is the 45 rule and how does it apply here?
Last updated
The 45 rule is best known from Killer Sudoku, but it has a clean and underused application in Sandwich Sudoku: it turns every outside clue into a second, complementary clue about the cells the sandwich does not cover.
Why Every Line Sums to 45
Each row and column contains the digits 1 through 9 exactly once, and 1+2+3+4+5+6+7+8+9 = 45. This is a fixed arithmetic fact of every valid Sudoku line. Split any line into three parts - The 1 and 9 (summing to 10), the sandwiched cells (summing to the clue), and everything outside the sandwich - And the three parts must account for the full 45.
The Outside-Sum Trick
Rearranging gives: outside digits = 45 − 10 − clue = 35 − clue. A row with clue 12 has outside digits summing to 23; a row with clue 30 has outside digits summing to just 5. The outside region is a 'shadow sandwich' - A set of distinct digits from 2-8 with a known total - And it obeys exactly the same combination logic as the sandwich itself. When the clue is large, the outside sum is small and often more constraining than the inside: an outside total of 5 across two cells must be {2,3}, immediately fixing two cells at the edges of the line.
Using Both Sides Together
Work whichever side of the line is tighter. With clue 30, either the sandwich is five cells of {4,5,6,7,8} with {2,3} outside, or six cells with the single digit 5 outside - Two crisp scenarios you can test against the boxes. The 45 rule also provides a permanent error check: at any point, placed digits inside the sandwich may never exceed the clue, and placed digits outside may never exceed 35 − clue. If either total is breached, a placement upstream is wrong.