Sudoku's Hidden Rule

Sudoku’s Hidden Rule

The sudoku folk are not one without controversy. There is an unstated rule that can push us to the solution of a puzzle without necessarily only using the stated basic sudoku rules. Some find the use of an unstated rule a bit distasteful or at least against the spirit of the solve.

数独爱好者并非没有争议。有一条不成文的规则可以推动我们解开谜题,而不必仅仅依赖数独的基本规则。有些人认为使用不成文的规则有点令人反感,或者至少违背了解题的精神。

Given I am just someone who likes to have something to do on my phone instead of consuming content. I like to use every advantage I can within reason while not robbing myself of the experience.

鉴于我只是一个喜欢在手机上找点事做,而不是单纯消费内容的人。我喜欢在合理的范围内利用每一个优势,同时又不剥夺自己的体验。

I’m talking about uniqueness. Deadly Patterns. Unique Rectangles. Universal Graves. The unstated rule that makes a sudoku “valid” [0]. “This puzzle has exactly one solution.”

我说的是唯一性。致命模型(Deadly Patterns)、唯一矩形(Unique Rectangles)、全双值格(Universal Graves)。这条不成文的规则使数独变得“有效”[0]。“这个谜题有且仅有一个解。”

There are solving techniques that arise from the assumption of validity, that to me do not muddle the solving experience and are very logically interesting to my brain.

有一些解题技巧源于对有效性的假设,对我而言,它们不会干扰解题体验,而且在逻辑上非常吸引我。

The most common technique is a “unique rectangle” which is a form of “deadly pattern”. A “deadly pattern” is a pattern in the puzzle that would mean this puzzle has more than one solution. If we assume the puzzle is valid, then we can also assume that no deadly pattern can ever exist in the puzzle since it has one and only one solution.

最常见的技巧是“唯一矩形”,它是“致命模型”的一种形式。“致命模型”是指谜题中会导致谜题拥有多个解的模式。如果我们假设谜题是有效的,那么我们也可以假设谜题中绝不会存在致命模型,因为它有且仅有一个解。

Look at this snippet of a sudoku grid, in the four notated cells we will assume there are only two possible options for values in the cells, either a 2 or 3.

看看这个数独网格的片段,在四个标注的单元格中,我们假设每个单元格只有两个可能的取值选项,即 2 或 3。

This arrangement is considered “deadly” because it allows for two different possible solutions. Solution 1

这种排列被认为是“致命的”,因为它允许存在两种不同的可能解。 解法 1

Thus we know that this would never actually appear in a valid sudoku, if it does then our notation is probably wrong. However, what might appear is something like this.

因此我们知道,这种情况绝不会出现在有效的数独中,如果出现了,那很可能是我们的标注错了。然而,可能会出现的是这样的情况。

In this case we have an almost deadly pattern, the only thing saving us is the possibility of a 1 in the top left. So, since we know we cannot have a deadly pattern we must use the 1.

在这种情况下,我们遇到了一个近乎致命的模型,唯一能拯救我们的是左上角存在 1 的可能性。因此,既然我们知道不能出现致命模型,我们就必须使用这个 1。

Let’s look at one more deadly pattern.

让我们再看一个致命模型。

For example’s sake, let’s assume the rest of the grid is filled in correctly and these cells are the only ones left not filled in. We can see that every single open cell has exactly 2 possible options. This means that there are now exactly two solutions to the puzzle, for any given cell, pick an option and the rest of the puzzle will fill in. Pick the other option and you will get a different solution.

举例来说,假设网格的其余部分已正确填好,而这些单元格是唯一未填写的。我们可以看到,每一个开放的单元格都有且仅有 2 个可能的选项。这意味着现在谜题恰好有两个解:对于任何给定的单元格,选择一个选项,谜题的其余部分就会填满;选择另一个选项,你就会得到一个不同的解。

Since each cell has two possible values this is known as a Bivalue Universal Grave or BUG.

由于每个单元格都有两个可能的值,这被称为“全双值格”(Bivalue Universal Grave),简称 BUG。

Thus, again like in the unique rectangle, since the puzzle we are solving is valid, we will never see this pattern. Instead we will see another almost deadly pattern.

因此,就像唯一矩形一样,由于我们正在解的谜题是有效的,我们永远不会看到这种模式。相反,我们会看到另一种近乎致命的模型。

The only difference here is that a single cell has three options instead of two, breaking us out of the bivalue grave. To avoid the BUG, we the value of the cell must equal the value that was we added to avoid the bug in this case a 3. There is a more logical deduction path to determine which of the three values is correct as well [1].

这里唯一的区别是,有一个单元格有三个选项而不是两个,这打破了全双值格。为了避免 BUG,该单元格的值必须等于我们为了避免 BUG 而添加的值,在本例中为 3。此外,还有一条更符合逻辑的推导路径来确定三个值中哪一个是正确的 [1]。

I think the above techniques are very logically interesting and using them does not feel like it is taking anything away from my solving experience, so I use them whenever I can. I hope these may have been interesting to you as well. If you’d like to try applying these techniques and others try the iOS app “:) Sudoku +” by Enjoy Sudoku [2]. Choose the “Annoying” or “Devious” difficulty setting to see some of these techniques in action.

我认为上述技巧在逻辑上非常有趣,使用它们并不会削弱我的解题体验,所以我尽可能地使用它们。希望这些对你来说也很有趣。如果你想尝试应用这些技巧及其他方法,可以试试 Enjoy Sudoku 开发的 iOS 应用 “:) Sudoku +” [2]。选择“Annoying”(烦人)或“Devious”(狡诈)难度设置,即可看到其中一些技巧的实际应用。

If you’d just like to have a good time watching someone solve clever sudoku puzzle, check out Cracking the Cryptic on YouTube.

如果你只是想通过观看他人解开巧妙的数独谜题来享受乐趣,请查看 YouTube 上的 Cracking the Cryptic 频道。

[0] That may seem obvious to you at first blush, a jigsaw puzzle usually has one solution, elementary school algebra problems have one solution, and using a box with the digits 1-9 seems like it would fit right into 5th grade. However, those of you with a little bit of combinatorics under your belt may also notice that the set of digits 1-9 repeated nine times and arranged into 81 cells could be many, many options. If we were just trying to fill the 81 cells with digits 1-9, ignoring the rules of sudoku ,there would be 9^81 options, ~10^77. If we get more precise and say we actually only have nine 1s, nine 2s etc at our disposal we have then 81!/(9!)^9 options, ~10^70. The setter of a sudoku puzzle, if they want a “valid” puzzle, must add enough starting digits so that that huge space of possible fills whittles down to exactly one valid solution.

[0] 这对你来说乍看之下可能显而易见:拼图通常只有一个解,小学代数题只有一个解,而使用包含 1-9 数字的方格似乎很适合五年级学生。然而,那些对组合数学有所了解的人可能会注意到,将 1-9 的数字重复九次并排列在 81 个单元格中,可能会有非常多的选择。如果我们只是试图用 1-9 的数字填满 81 个单元格,忽略数独规则,会有 9^81 种选择,约 10^77。如果我们更精确一点,说我们实际上只有九个 1、九个 2 等可用,那么我们有 81!/(9!)^9 种选择,约 10^70。数独谜题的出题者如果想要一个“有效”的谜题,必须添加足够的起始数字,以便将巨大的可能填充空间缩减为唯一一个有效的解。

[1] sudokuwiki BUG Explainer

[1] sudokuwiki BUG 解释器