Doll Sum
For each listed total, two digits sum to that total and all digits strictly between them also sum to it.
Parameters
| Parameter | Meaning | Default |
|---|---|---|
| cells | The marked cells, for example r1c1-r1c2-r2c2. | Required. |
| sums | The permitted or required totals. | Required. |
Maths
Class: with aggregates.
The shared predicates define the notation and every named predicate.
∀s∈sums: ∃i,j∈[0,|cells|): i<j ∧ D(cells[i])+D(cells[j])=s
∧ sum_D(betweenPositions(cells,i,j))=s
For every listed sum, there are two positions whose endpoint digits sum to it. The digits strictly between those positions also sum to it.
Example
---
format: open-rules
title: Doll Sum example
setter: Example
source: ""
case: ""
library: https://rules.sudoku-sleuth.com/
status: read
---
```rules
sudoku 9x9
doll-sum r1c1-r1c2-r1c3 sums [5]
```
Satisfies the rule: r1c1=2, r1c2=5, r1c3=3. The end digits total 5, matching the digit between them.
Breaks the rule: r1c1=2, r1c2=4, r1c3=3. The digit between the ends differs from their total.