三明治中数字可以重复吗?

最后更新

不——与杀手数独不同,三明治数独甚至不需要特殊规则来禁止它。三明治的唯一性直接来自标准数独规则,并且它是该变体中所有组合分析的基础。

为什么重复是不可能的

The sandwich is simply a stretch of consecutive cells within one row or one column. Standard Sudoku already forbids any digit from appearing twice in a line, so the sandwiched digits are automatically distinct. Killer Sudoku needs an explicit extra rule because its cages can bend across rows, columns, and boxes; a sandwich never leaves its line, so the classic rule does all the work. A two-cell sandwich summing to 8 can be {2,6} or {3,5}, but never {4,4}.

填充仅来自2-8

There is a second, easy-to-forget restriction: the 1 and the 9 are the boundaries of the sandwich, and each appears only once per line - So neither can ever be inside it. The filling is always a subset of {2,3,4,5,6,7,8}. This shrinks the combination space dramatically. A three-cell sandwich summing to 12 looks like it might allow {1,2,9} - It does not. The only valid sets are {2,4,6} and {3,4,5} (and {2,3,7}), all drawn from 2-8. Always enumerate combinations from the seven middle digits, never from all nine.

为什么唯一性增强你的推理

互异性是强制组合存在的根本原因。因为没有数字可以重复使用,极端和只有很少的实现方式——两个单元格和为5必须是{2,3},三个单元格和为21必须是{6,7,8}。每个强制集的行为类似于裸元组:其数字可以从行中所有其他单元格中消除,以及从任何完全包含三明治片段的宫中消除。唯一性将算术线索转化为硬放置逻辑。

查看组合逻辑的实际应用