Sudoku Logic 数度逻辑

数独逻辑 Shù dú luójí. 

Sudoku is NOT a game of mathematics. It is a game of logic.

Sudoku comprises a 9 x 9 grid of eighty-one cells. It has nine boxes, each box has nine cells. The cells are arranged in nine rows and nine columns. We name the Row 1, Row2, Row 3, Row 4, Row 5, Row 6, Row 7, Row 8, and Row 9. We name the Columns A, B, C, D, E, F, G, H, I. Each cell therefore has a name dependent on its position in the grid. Cells A1, B1, C1, A2, B2, C2, A3, B3 and C3 forming Box # 1, and the boxes going from left to right and from top to bottom. So the last Box # 9 comprises cells G7, G8, G9, H7, H8, H9, I7, I8 and I9 .

Each cell may contain a number from one to nine, and each number can only occur once in each row, column, and box. A Sudoku Challenge starts with some cells containing numbers (these become our clues), and the goal of the Challenge is to assign the remaining cells with numbers 1 through 9. A Proper Sudoku Challenge should have only one solution.

数独不是数学游戏。这是一个逻辑游戏。Shù dú bùshì shùxué yóuxì. Zhè shì yīgè luójí yóuxì.  数独包括一个由 81 个单元格组成的 9 x 9 网格。它有九个盒子,每个盒子有九个单元格。单元格排列成九行九列。我们将第 1 行、第 2 行、第 3 行、第 4 行、第 5 行、第 6 行、第 7 行、第 8 行和第 9 行命名。我们将列命名为 A、B、C、D、E、F、G、H、 I. 因此,每个单元格都有一个取决于它在网格中的位置的名称。单元格 A1、B1、C1、A2、B2、C2、A3、B3 和 C3 形成框 #1,框从左到右,从上到下。所以最后一个框 #9 包含单元格 G7, G8, G9, H7, H8, H9, I7, I8 和 I9 。
Shù dú bāokuò yīgè yóu 81 gè dānyuán gé zǔchéng de 9 x 9 wǎng gé. Tā yǒu jiǔ gè hézi, měi gè hézi yǒu jiǔ gè dānyuán gé. Dānyuán gé páiliè chéng jiǔ xíng jiǔ liè. Wǒmen jiāng dì 1 xíng, dì 2 xíng, dì 3 xíng, dì 4 xíng, dì 5 xíng, dì 6 xíng, dì 7 xíng, dì 8 xíng hé dì 9 xíng mìngmíng. Wǒmen jiāng liè mìngmíng wèi A,B,C,D,E,F,G,H, I. Yīncǐ, měi gè dānyuán gé dōu yǒu yīgè qǔjué yú tā zài wǎng gé zhōng de wèizhì de míngchēng. Dānyuán gé A1,B1,C1,A2,B2,C2,A3,B3 hé C3 xíngchéng kuāng#1, kuāng cóng zuǒ dào yòu, cóng shàng dào xià. Suǒyǐ zuìhòu yīgè kuāng#9 bāohán dānyuán gé G7, G8, G9, H7, H8, H9, I7, I8 hé I9.
每个单元格可能包含一个从 1 到 9 的数字,并且每个数字在每一行、每列和框中只能出现一次。数独挑战从一些包含数字的单元格开始(这些成为我们的线索),挑战的目标是为剩余的单元格分配数字 1 到 9。正确的数独挑战应该只有一个解决方案。
Měi gè dānyuán gé kěnéng bāohán yīgè cóng 1 dào 9 de shùzì, bìngqiě měi gè shùzì zài měi yīxíng, měi liè hé kuāng zhōng zhǐ néng chūxiàn yīcì. Shù dú tiǎozhàn cóng yīxiē bāohán shùzì de dānyuán gé kāishǐ (zhèxiē chéngwéi wǒmen de xiànsuǒ), tiǎozhàn de mùbiāo shì wèi shèngyú de dānyuán gé fēnpèi shùzì 1 dào 9. Zhèngquè de shù dú tiǎozhàn yīnggāi zhǐyǒu yīgè jiějué fāng'àn.

How to play Sudoku for an absolute beginner - Watch this video if you are an absolute beginner of Sudoku. https://youtu.be/kvU9_MVAiE0

如何为绝对初学者玩数独 - 如果您是数独的绝对初学者,请观看此视频。 https://youtu.be/kvU9_MVAiE0
Rúhé wèi juéduì chū xuézhě wán shù dú - rúguǒ nín shì shù dú de juéduì chū xuézhě, qǐng guānkàn cǐ shìpín. Https://Youtu.Be/kvU9_MVAiE0

Now let us consider how to solve an actual Sudoku Challenge given below.

现在让我们考虑如何解决下面给出的实际数独挑战。
Xiànzài ràng wǒmen kǎolǜ rúhé jiějué xiàmiàn gěi chū de shíjì shù dú tiǎozhàn.
A Sudoku Challenge

There are a total of thirty exposed cells (that is, cells with numbers in them). Because Sudoku Challenges are computer generated and have differing degrees of difficulties, we do not recommend solving any Challenge with less than twenty-six exposed cells. Also, because some challenges can sometimes be unsolvable (they may have more than one answer, for instance), we have to be mentally prepared to abandon a game when a complete solution cannot be found.

总共有三十个暴露的单元格(即其中带有数字的单元格)。由于数独挑战是计算机生成的,并且难度各不相同,我们不建议使用少于 26 个暴露单元格来解决任何挑战。此外,由于某些挑战有时无法解决(例如,它们可能有多个答案),因此我们必须做好在找不到完整解决方案时放弃游戏的心理准备。
Zǒnggòng yǒu sānshí gè bàolù de dānyuán gé (jí qízhōng dài yǒu shùzì de dānyuán gé). Yóuyú shù dú tiǎozhàn shì jìsuànjī shēngchéng de, bìngqiě nándù gè bù xiāngtóng, wǒmen bù jiànyì shǐyòng shǎo yú 26 gè bàolù dānyuán gé lái jiějué rènhé tiǎozhàn. Cǐwài, yóuyú mǒu xiē tiǎozhàn yǒushí wúfǎ jiějué (lìrú, tāmen kěnéng yǒu duō gè dá'àn), yīncǐ wǒmen bìxū zuò hǎo zài zhǎo bù dào wánzhěng jiějué fāng'àn shí fàngqì yóuxì de xīnlǐ zhǔnbèi.

We start the game by looking at the three rows 1, 2, and 3, then rows 4, 5, and 6, and then rows 7, 8, 9 to see whether we can find solutions to enter some numbers into some of the blank cells.

Looking at rows 1, 2, and 3, we find that cell A2 = 2 and equals to cells G5 and I7. Therefore cell H1 must be a “2”. Then cell A3 = E2 = 3 and equals to G6. So, cell I 1 must equal to 3.

Then for rows 4, 5, and 6, we have C5 = H6 = 4 and F1 = 4. So, cell D4 = 4. For rows 7, 8, and 9, we have cell B8 = cell F9 = 9 and cell H3 = 9. So, cell G7 = 9.

我们先看第1、2、3行三行,然后第4、5、6行,然后第7、8、9行,看看能不能找到解决办法,把一些数字输入一些空白细胞。
查看第 1、2 和 3 行,我们发现单元格 A2 = 2 并且等于单元格 G5 和 I7。因此,单元格 H1 必须是“2”。然后单元格 A3 = E2 = 3 并等于 G6。因此,单元格 I 1 必须等于 3。然后对于第 4、5 和 6 行,我们有 C5 = H6 = 4 和 F1 = 4。因此,单元格 D4 = 4。对于第 7、8 和 9 行,我们有单元格 B8 = 单元格 F9 = 9 和单元格 H3 = 9。因此,单元格 G7 = 9。
Wǒmen xiān kàn dì 1,2,3 xíng sān xíng, ránhòu dì 4,5,6 xíng, ránhòu dì 7,8,9 xíng, kàn kàn néng bùnéng zhǎodào jiějué bànfǎ, bǎ yīxiē shùzì shūrù yīxiē kòngbái xìbāo.
Chákàn dì 1,2 hé 3 xíng, wǒmen fāxiàn dānyuán gé A2 = 2 bìngqiě děngyú dānyuán gé G5 hé I7. Yīncǐ, dānyuán gé H1 bìxū shì “2”. Ránhòu dānyuán gé A3 = E2 = 3 bìng děngyú G6. Yīncǐ, dānyuán gé I 1 bìxū děngyú 3. Ránhòu duìyú dì 4,5 hé 6 xíng, wǒmen yǒu C5 = H6 = 4 hé F1 = 4. Yīncǐ, dānyuán gé D4 = 4. Duìyú dì 7,8 hé 9 xíng, wǒmen yǒu dānyuán gé B8 = dānyuán gé F9 = 9 hé dānyuán gé H3 = 9. Yīncǐ, dānyuán gé G7 = 9.

We have solved 4 cells now. For the next step, we look at columns A, B, and C and can you see that cell B3 = 4? Why? Because cell A8 = cell C5 = 4 and is equal to cell F4.

我们现在已经解决了 4 个单元格。对于下一步,我们查看 A、B 和 C 列,您能看到单元格 B3 = 4 吗?为什么?因为单元格 A8 = 单元格 C5 = 4 并且等于单元格 F4。Wǒmen xiànzài yǐjīng jiějuéle 4 gè dānyuán gé. Duìyú xià yībù, wǒmen chákàn A,B hé C liè, nín néng kàn dào dānyuán gé B3 = 4 ma? Wèishéme? Yīnwèi dānyuán gé A8 = dānyuán gé C5 = 4 bìngqiě děngyú dānyuán gé F4.

Similarly, for columns D, E, and F, can you figure out that cell D2 = 9, cell D8 = 2 and cell F8 = 3 along the same logic. [E6 = F9 = 9 = H3; F3 = E4 = 2; E2 = D5 = 3 = B7.].

类似地,对于 D、E 和 F 列,您能否按照相同的逻辑计算出单元格 D2 = 9、单元格 D8 = 2 和单元格 F8 = 3。 [E6 = F9 = 9 = H3; F3 = E4 = 2; E2 = D5 = 3 = B7。] Lèisì de, duìyú D,E hé F liè, nín néng fǒu ànzhào xiàng tóng de luójí jìsuàn chū dānyuán gé D2 = 9, dānyuán gé D8 = 2 hé dānyuán gé F8 = 3. [E6 = F9 = 9 = H3; F3 = E4 = 2; E2 = D5 = 3 = B7.]

For columns G, H, and I, we have I 1 = 3 = G6 = B7; so, H9 = 3.

对于 G、H 和 I 列,我们有 I 1 = 3 = G6 = B7;所以,H9 = 3。Duìyú G,H hé I liè, wǒmen yǒu I 1 = 3 = G6 = B7; suǒyǐ,H9 = 3.

And, if we now look at rows 1, 2, and 3 again, we have cell B3 = 4 = F1. Therefore cell G2 = 4. Having get G2 = 4, we can look at columns G, H, and I to see that cell I 9 = 4 [because G2 = H6 = 4] and in rows 7, 8, and 9, we can find that cell E7 = 4 [because A8 = I 9 = 4 = F1]. Logical?

Then in columns D, E, and F, we can have E9 = 8 because D1 = F5 = 8. In Box # 8 (cells D7, E7, F7, D8, E8, F8, D9, E9, and F8) there is now only one empty cell left, cell F7. The only number left in that box must be 6. F7 = 6.

而且,如果我们现在再次查看第 1、2 和 3 行,我们有单元格 B3 = 4 = F1。因此,单元格 G2 = 4。获得 G2 = 4 后,我们可以查看 G、H 和 I 列以看到单元格 I 9 = 4 [因为 G2 = H6 = 4] 以及在第 7、8 和 9 行可以找到单元格 E7 = 4 [因为 A8 = I 9 = 4 = F1]。合乎逻辑吗?然后在 D、E 和 F 列中,我们可以有 E9 = 8,因为 D1 = F5 = 8。在框 #8(单元格 D7、E7、F7、D8、E8、F8、D9、E9 和 F8)中有现在只剩下一个空单元格,单元格 F7。该框中剩下的唯一数字必须是 6。F7 = 6.  Érqiě, rúguǒ wǒmen xiànzài zàicì chákàn dì 1,2 hé 3 xíng, wǒmen yǒu dānyuán gé B3 = 4 = F1. Yīncǐ, dānyuán gé G2 = 4. Huòdé G2 = 4 hòu, wǒmen kěyǐ chákàn G,H hé I liè yǐ kàn dào dānyuán gé I 9 = 4 [yīnwèi G2 = H6 = 4] yǐjí zài dì 7,8 hé 9 xíng kěyǐ zhǎodào dānyuán gé E7 = 4 [yīnwèi A8 = I 9 = 4 = F1]. Héhū luójí? Ránhòu zài D,E hé F liè zhōng, wǒmen kěyǐ yǒu E9 = 8, yīnwèi D1 = F5 = 8. Zài kuāng#8(dānyuán gé D7,E7,F7,D8,E8,F8,D9,E9 hé F8) zhōng yǒu xiànzài zhǐ shèng xià yīgè kōng dānyuán gé, dānyuán gé F7. Gāi kuāng zhōng shèng xià de wéiyī shǔ zì bìxū shì 6.F7 = 6.

To summarise, the first fiftteen steps of the solution are given below: 总而言之,解决方案的前十个步骤如下: Zǒng’éryánzhī, jiějué fāng’àn de qián shíwǔ gè bùzhòu rúxià:

Step # 步Look at:  看 一看(行列框)Logical Analysis: 逻辑分析:Cell # 细胞 Solution 解决
1Rows 1, 2, 3A 2 = F 3 = 2 = G 5 = I 7H 12
2Rows 1, 2, 3A 3 = E 2 = 3 = G 6 I 13
3Rows 4, 5, 6C 5 = H 6 = 4 = F1D 44
4Rows 7, 8, 9B 8 = F 9 = 9 = H 3 G 7 9
5Columns A, B, CA 8 = C 5 = 4 = F1B 34
6Columns D, E, FE 6 = F 9 = 9 = H 3G 29
7Columns D, E, FF 3 = E 4 = 2D 82
8Columns G, H, II 1 = G 6 = 3 = B 7H 93
9Columns D, E, FE 6 = F 8 = 9 = H3D 29
10Columns G, H, IG 2 = G 6 = 4 = A 8 I 94
11Rows 7, 8, 9A 8 = I 9 = 4 = F 1E 74
12Rows 7, 8, 9B 7 = H 9 = 3 F 8 3
13Columns D, E, FD 1 = F 5 = 8 E 98
14Box # 8Remaining Cell F 7, remaining digitF 76
15Box # 2E 8 = B 2 = 7D 37

It is now easy to follow the logical reasons for the rest of the solution to the Challenge recorded in the tabulation below: 现在很容易理解下表中记录的挑战的其余解决方案的逻辑原因: Xiànzài hěn róngyì lǐjiě xià biǎo zhōng jìlù de tiǎozhàn de qíyú jiějué fāng’àn de luójí yuányīn:

Step  步Look at:  看 - 行列框Logical Analysis: 逻辑分析Cell  细胞Solution 解决
16Column DRemaining Cell D 6, remaining digitD 66
17Box # 3Remaining 1,5,7: D 3 = 7; I 8 = 1I 35
18Box # 3Remaining 1,7: D3 = 7G 31
19Box # 3Remaining Cell G1, remaining digitG17
20Row 3Remaining 6.8: D 1 = 8E 36
21Row 3Remaining Cell C 3, remaining digitC 38
22Box # 7G 3 = 8 = E 9A 78
23Rows 7, 8, 9D 9 = I 8 = 1C 71
24Row 7Remaining Cell H7, remaining digitH 7 9
25Box # 9Remaining 6,8: E 9 = 8G 96
26Box # 9Remaining Cell G 8, remaining digitG 88
Step  步Look at:  看 - 行列框Logical Analysis: 逻辑分析Cell  细胞Solution 解决
27Row 8Remaining Cell C 8, remaining digitC 86
28Row 2Remaining 1,5: C 7 = 1C 25
29Row 2Remaining Cell F2, remaining digitF 21
30Box # 2Remaining Cell E 1, remaining digitE 15
31Column ERemaining Cell E 5, remaining digitE 51
32Columns A, B, CB 4 = C 8 = 6A 16
33Box # 1Remaining 1,9: B 8 = 9B 11
34Box # 1Remaining Cell C 1, remaining digitC 19
35Columns A, B, CA 7 = C 3 = 8 = F 5B 68
36Columns G, H, IH 2 = G 8 = 8 = F 5 =B 6I 48
Step  步Look at:  看 - 行列框Logical Analysis: 逻辑分析Cell  细胞Solution 解决
37Column GRemaining Cell G4; remaining digitG 45
38Column HRemaining 1,6: C 5 = 1H 41
39Column HRemaining Cell H 5; remaining digitH 56
40Column IRemaining 7,9: E 6 = 9I 59
41Column IRemaining Cell I 6; remaining digitI 67
42Column CRemaining 2,7: I 6 = 7C 97
43Column CRemaining Cell C 6; remaining digitC 62
44Rows 4, 5, 6H 4 = E 5 = 1A 61
45Row 6Remaining Cell F 6, remaining digitF 65
46Box # 5Remaining Cell F 4, remaining digitF 47
47Row 4Remaining Cell A 4; remaining digitA 49
48Row 5Remaining 5,7: B 2 = 7A 57
49Row 5Remaining Cell B 5; remaining digitB 55
50Column ARemaining Cell A 9; remaining digitA 95
51Column BRemaining Cell B 9; remaining digitB 92

Kindly note that when the entire grid is completed, all digits in each row add up to 45. Similarly, all digits in each column as well as each box also add up to 45.

请注意,当整个网格完成时,每行的所有数字加起来为 45。同样,每列以及每个框中的所有数字加起来也为 45。
Qǐng zhùyì, dāng zhěnggè wǎng gé wánchéng shí, měi xíng de suǒyǒu shùzì jiā qǐlái wèi 45. Tóngyàng, měi liè yǐjí měi gè kuāng zhōng de suǒyǒu shùzì jiā qǐlái yě wèi 45.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.