数独的隐藏规则
Sudoku's Hidden Rule

原始链接: https://cyrusjavan.com/posts/solving-with-uniqueness/

数独谜题假定有且仅有一个解,一些解题者将这一假定作为未明确说明的规则。致命模式是会导致多解的排列;因为有效谜题不可能包含它们,解题者可以排除会形成它们的选项。唯一矩形是常见的致命模式,涉及四个只含两个可能值的格子;而 BUG(双值通用墓地)是所有空格都有两个选项、从而形成两个解的模式。在近致命情况下,打破该模式的额外值必须被使用。作者认为这些基于唯一性的技巧在逻辑上有趣且不会损害解题体验,建议使用它们,尤其在较难的谜题中。

黑客新闻 新 | 过去 | 评论 | 问答 | 展示 | 招聘 | 提交 登录 数独的隐藏规则 (cyrusjavan.com) 8分 由 multifasciatus 40分钟前 | 过去 | 收藏 | 1条评论 帮助 johnea 2分钟前 [–] 看到这个现在出现很有意思。 我多年来使用这条“未明说”的规则,而且经常很难向别人解释。 我常称之为“不能有两个解”,意思是谜题不允许有两个解。 我个人更喜欢在纸上解数独。只是个人偏好。 所以我做了很多报纸上的数独。我发现许多“更难的”,也许称为“五星”报纸数独,会落入这条“不能有两个解”的规则,所以我一般避免使用它,除非谜题_真的-很难,而且我找不到其他方法。 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

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.”

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.

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

Solution 2

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.

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.

Since each cell has two possible values this is known as a Bivalue Universal Grave or 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].

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.

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

[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.

[1] sudokuwiki BUG Explainer

[2] EnjoySudoku.com

联系我们 contact @ memedata.com