# Combinations and candidates

- Difficulty: Hard
- On the web: https://blinku.app/learn/cage-candidates

Check each way to make a cage's sum against its cells' candidates: drop the ways that don't fit, then the digits no remaining way can put in a cell.

Cage combinations looks at the sum alone; this looks at the cells too. A way to make the sum only works if its digits can go into the cells one each. Say two cells make 10 and one of them is down to 3 or 4: only 3+7 and 4+6 fit, so the other cell can only be 7 or 6.

With the ways that don't fit struck, each cell keeps the digits the remaining ways can give it and loses the rest. A naked pair hiding in a cage turns up this way too.

## This example, step by step

A killer sudoku: each cell is written as its cage's name, then its digit ("." where it is empty). Under the board are the cages' sums: "a=23" means cage a adds up to 23. Each step names the cages it is about the same way.

```text
   1  2  3    4  5  6    7  8  9
1 a. a. b. | c. d. e. | e. f. f.
2 a. b. b. | c. d. g. | g. g. g.
3 a. h. b. | d. d. i. | i. i. i.
  ---------+----------+---------
4 j. h. b. | d. d. k. | l. l. m.
5 j. j. b. | n. k. k. | m. m. m.
6 o8 j. j. | n. n. p9 | p4 m. m.
  ---------+----------+---------
7 o3 q1 n9 | n2 r4 p6 | p8 s5 t7
8 u. q. v7 | r. r. w5 | s. s. s.
9 u. q. r5 | r. w. w. | s. s. x9

a=23 b=28 c=8  d=36 e=8  f=12 g=14 h=11 i=18
j=20 k=17 l=13 m=28 n=24 o=11 p=27 q=15 r=27
s=21 t=7  u=6  v=7  w=15 x=9
```

1. **Where to look** (w=15): A pointer first: look at the 15 cage. Whichever way it makes its sum, which digit must be in it?
2. **Cage pointing** (w=15): Against the candidates in the 15 cage, every way to make its sum uses 3, and the cells there that can hold 3 all lie in row 9. So no other cell in row 9 can be 3.
3. **Locked candidates**: In row 9, 3 can only go in column 5 or column 6, and those two cells lie in the bottom box. So no other cell in the bottom box can be 3.
4. **Cage pointing** (r=27): Against the candidates in the 27 cage, every way to make its sum uses 1, and the cells there that can hold 1 all lie in the bottom box. So no other cell in the bottom box can be 1.
5. **Combinations and candidates** (k=17): The three cells left in the 17 cage must make 17. Against their candidates only 2+7+8, 3+6+8, 4+5+8, or 4+6+7 fit, so 1 and 3, fitting none of them, go.

## In hints

The hint marks the cage, lists the ways that still fit, and strikes the candidates that fit none.
