第二节 宫内排除法
数独的基本思路有两种,其中一种是判断某格中应该填哪个数字,例如前文所述的最后一数法。另一种方法是判断某个数字应当填在哪里。
我们首先应以宫为观察对象,寻找某个数字在某个宫内的位置。观察下图例题,在学习过程中,我们可以按照从1~9的数字顺序进行寻找。

先观察数字1可能存在的位置,由于规则要求,每行、列、宫中的数字不重复,因此一个已知数1可以排除它所在行、列、宫内的数字1,如下图所示。
对第九宫进行观察,我们发现该宫有5个待定格,其中4格都不可能是1,1只能在星格H8。

同理可以排除得到第六宫的1,继而得到第四宫的1。之后可以利用此方法得到所有的1。


接下来我们可以切换视角观察其余数字。以数字2为观察对象,可以逐步解开所有2。


同理也可解开所有3、4、5,然后慢慢解开其余数字。




填完1~8后,数字9只能填在每个宫余下的唯一空格中。这样的情况算是排除法的特殊情况(没有排除线的排除法),但要注意的是“数字只能填在某个位置”与最后一数章节提到的“某格只能是某个数”仍然有本质上的区别。


以宫为观察对象,用排除法找到某个数字在宫内的唯一可能位置的方法叫作宫内排除法。
利用宫内排除法解题时,大多数情况不能从1开始连续排除到9,更多的情况是通过观察决定目标数字,再对这个数字进行观察。有时候观察某个数字时,能解开一部分宫内该数字的位置,但不能将这个数字在九个宫内的位置完全确定。判定哪个、哪些数字需要观察,何时应该切换目标数字,是解题时的基本功,对顺利完成各种题目而言都非常重要。
从下题我们可以对一些宫内排除法的视角进行讨论。
运用宫内排除法时,我们前期可以在大行或大列中,寻找仅出现两次的某个数字,并且在该数字未出现的那个宫里,寻找该数字的排除,如下面左图所示。这样的排除有很多种。

当然,除了这一类情况之外,另有一种排除是由两个不在同一大行、大列的数字,对于同一个宫排除形成,这种情况也不可以忽略,如下面右图所示。


运用宫内排除法时,如果已有一定的基础,可以尝试同时观察不止一个数字的排除。以数字5为观察对象,可以排除得到第一宫的数字5,如下面左图所示。接下来可以通过数字4的排除得到第一宫中A1=4。我们可以切换视角进行观察,数字4、5同时对于第一宫进行排除,结合F1的5,得到A3=5,A1=4。


利用排除法解题时,要养成好习惯:如果排除法解开了一个数字,尽可能寻找这个数字在其余宫内的排除情况。以5和9为例,下图为将所有宫内的5和9都补充完整的盘面。


本题终盘如下。这一题是常见的标准数独,利用宫内排除法可以解开。利用宫内排除法解题时,也可以与最后一数、二余法等方法相结合,切换视角进行观察。

排除法不需要对于格子进行数数,有些学习者会对此类方法有所偏好。需要注意的一点是,进行宫内排除法之前,一定要确认目标的宫里是否有目标数字,否则容易出现错误的排除。这个问题在一些刚刚接触数独的儿童身上较为常见,在练习时一定要加以警惕。