俄亥俄新聞OHIO CHINESE/TAIWANESE AMERICAN NEWS
  • 首頁Home
  • 期刊Issues
  • PubMyNews
  • 聯繫Contact
  • 團隊TEAM
  • 博客Blogs
    • Joyful Living
    • 吳紀珍女士專欄
    • Solve Sudoku, Create Sudoku 玩数独 设计数独
    • Betty Bleen's Poem
    • Linda Fuchs Poems
    • Joan Moos's Poems
    • 周達恆牧師人生探索欄
    • 施忠男 Chung Nan Shih
    • 徐勝雄博士詩詞專欄
    • Molly Grubb
  • 訂閱subscribe

玩数独,设计数独​

Play Sudoku, Design Sudoku

如何在几分钟内设计一个数独游戏

3/17/2018

0 Comments

 

     郑亚玲博士

        锻炼自己或者孩子的观察力,耐心,还有逻辑推理能力?推荐给你一个智力挑战  ― 设计一个数独游戏。
数独是一个数字逻辑推理游戏(见该文末尾的今日数独)。给定一个9行9列9个宫的大方格。一共是81个小方格。一部分小方格已经填好数字。 游戏的目标是填充所有空方格使得每行,每列,每个宫包含9个不同数字 {1,2,3,4,5,6,7,8,9}。一个经典数独有并且只有一个解。请参见今日数独。 请花上一点时间思考:如何能制作这样一个游戏? 如何用最快的速度设计一个这样的游戏?

        比较直接的方法是
   
       (1)  
画好(打印)一个九行九列九个宫的空的大方格
​     (2)  选中一部分小方格(这些小方格将预先填写数字)
​       (3) 
小心地往这些选中的方格中填写数字(注意不要违反每行,每列,每个宫一个数字只出现一次的规则);如果违反规则,重新填写。
​       (4) 检查这个设计的数独游戏是不是只有唯一解。如果不是,重复2或者3。

       缺点:  这种方法虽然直接但是成功制作的概率非常低(比赢彩票的概率还要低)。连第3步都可能重复多次。当你尝试了几次之后,你可能就想放弃。
​
       那么有没有一种更有效率的方法呢?有的。这个设计理念就是“和玩数独完全相反的方向”。我们先填满所有方格,然后小心翼翼地去掉一些数字。


      有好多个捷径可以填满所有方格。其中一种方法是填写9个不同数字 (group filling) 到第一行 (比如369287145)。然后,循环移位这九个数字(circular shift)填写到下一行(比如287145369);重复循环移位填写第3行(比如145369287);第4行(比如692871453) ; 第5行(比如871453692) ;第6行(比如453692871) ;第7行(比如928714536) ;第8行(比如714536928) ;第9行(比如536928714)。
     
       小心翼翼地去掉数字的时候,检查是不是安全去除(safe removal)― 如果我们去掉这个数字,能够根据留下的数字推理出它吗?如果是,就是安全去除。如果一个数字可以安全地被除掉,我们就可以去掉它。重复这个安全去除步骤直到所有小方格数字都被检查过。详细的细节请参考Create Classic Sudoku – Make Your Own in Minutes 
       
        用这种方法,你可以几分钟之内制作一个非常容易的数独游戏。是不是很神奇?下面是一个用这种方法制作的一个中等难度的数独。更多数独?请访问www.createclassicsudoku.com.

今日数独  (难度:中等)

Picture
0 Comments

设计数独游戏  ―  填满空数独的两个诀窍

1/20/2018

0 Comments

 

郑亚玲博士
​

       无论您是在旅行还是正在医院康复,数独都是一款完美的老少皆宜的益智游戏!它有助于培养您的逻辑推理能力,耐心,专注解决问题的能力,和自信心。设计数独的其中一个环节是填满空数独。参见图一。​

图1: 填充空数独。

Picture

​如何填写数字到每个空格,使得每行,每列,每个三乘三的宫格包含数字1到9呢?两个诀窍。

分组填写:一次填写九个不同数字到一行,或者一列,或者一个宫格。这样你就只有九个小任务,而不是八十一个小任务(每次填写一个空格)。

循环位移 Circular shift – 每次将前一行(或列或宫)的数字做一个循环位移填写到当前行(或列或宫)。

图2:九个步骤填充每个空格.

Picture

第一步: 填写九个不同数字692453781到第一行。

第二步: 将692453781循环右移三个位置,即 453781692,781稍做变换排列为817,692稍做变换排列为269 (注意:这两个变换都不是必须的),即 453817269填写到第二行。

第三步: 将453817269循环右移三个位置,即 817269453,817稍做变换排列为781 (注意:这个稍做变换不是必须的),即 781269453填写到第三行。
​
同样的道理填写第四,第五,第六,第七,第八,第九行,就成功填写了所有的空格了。
想要知道更多设计数独的诀窍?请参考 CREATE CLASSIC SUDOKU一书。在AMZON有售。

今日中等数独

Picture

​关于作者:亚玲是制作经典数独 Create Classic Sudoku(在亚马逊热卖)的作者和createclassicsudoku.com 网站创始人。她同时也是Cleveland/Akron地区的房产经纪人。她的电话是216-245-3258。微信号是 yalingzheng2013。

0 Comments

经典数独和设计它的一个诀窍

12/15/2017

0 Comments

 

郑亚玲 博士

       无论您是在旅行还是正在医院康复,数独都是一款完美的老少皆宜的益智游戏!它有助于培养您的逻辑推理能力,耐心,专注解决问题的能力,和自信心。有朋友告诉我,制作数独太复杂了是不可能的。但其实只要你制作数独的一个基本理念―“和玩数独完全相反的方向”,制作数独  其实很简单。怎么个简单法呢?请看下面的一个小例子你就知道了。

       对于不熟悉数独游戏的朋友,什么是数独呢?数独是一种逻辑性的数字填充游戏,玩家须以数字填进每一格,而每行、每列和每个宫(即3x3的大格)有齐1至9所有数字。游戏设计者会提供一部分的数字,使谜题只有一个答案。

        一个经典数独要求这个数独有并且只有一个答案。并且,位于第x 行和第y列的方格(我们称为RxCy)和位于第10-x 行和第10-y列的方格要么同时被填充要么同时没有被填充。(1 ≤ x, y ≤ 9) 例如 R8C1和R2C9要么同时被填充要么同时没有被填充。

​       P1 是一个经典数独。解一下数独,是不是只有一个解(答案)?是不是位于位于第x 行和第y列的方格和位于第10-x 行和第10-y列的方格要么同时被填充要么同时没有被填充 (1≤ x, y≤ 9) ?     

经典数独P1​​

Picture

​思考一下:  如果我们去掉R8C1和R2C9的数字, 新的数独P2还是一个经典数独吗?答案是肯定的。为什么呢?

首先,我们去掉这两个方格的数字后,这个数独依然满足这个对称的要求:位于第x 行和第y列的方格和位于第10-x 行和第10-y列的方格要么同时被填充要么同时没有被填充 (1 ≤ x, y ≤ 9 ).
其次,如果我们去掉 R8C1 和R2C9的数字,这个新的数独还是只有一个解(答案)。

数独P2​

Picture

       R8C1 必须是 9。因为在第一列 :数字9 不能在R1C1因为第一行已经有数字9;数字9不能在第二行因为第二行已经有数字9;数字9不能在第五行因为它所在的3x3宫格已经有数字9。根据排除法,第一列的空格中,只有R8C1可以是数字9。

       R2C9 必须是数字2。因为在第二行:数字2不能在R2C1或者R2C3因为第一宫已经有数字2了;数字2不能在R2C4因为第4列已经有数字2了。根据排除法,在第二行的空格中,只有R2C9可以是数字2。
​
        根据推理,我们可以将数字9和数字2填到R8C1和R2C9。这个填写数字后的数独,正好是经典数独P1。因为P1有且只有一个解,所以我们可以说数独 P2有且只有一个解。

        思考:对于数独P2, 如果去掉 R4C6 和R6C4 的数字,新的数独P3还是一个经典数独吗?
​

​        所有createclassicsudoku.com 的数独都是根据这个理念―“和玩数独完全相反的方向”设计的。来试一下今日数独?

今日数独 (难度:中等)

Picture
0 Comments

Classic Sudoku and One Trick to Make It

12/1/2017

0 Comments

 

Dr. Yaling Zheng

Whether you are traveling, taking a break, or recovering in hospitals, designing a number puzzle game would be a perfect brain workout for you!  I have met friends who think making a Sudoku puzzle is almost an impossible mission.  However, if you know the basic principle to make a Sudoku puzzle – REVERSE WAY OF SOLVING A SUDOKU PUZZLE, making a Sudoku will become easy for you!  In this article, I will talk about one trick to make a classic Sudoku. 


Let us first take a look at the definition of a Sudoku. Sudoku is a puzzle in which missing numbers are to be filled into a 9 by 9 grid of squares which are subdivided into 3 by 3 boxes so that every row, every column, and every box contains the numbers 1 through 9. 

A "Classic" Sudoku is a symmetrical Sudoku that has one and ONLY one solution.  A symmetrical Sudoku is a Sudoku in which any two symmetrical squares (around the center square) are either both filled with numbers or both empty.  In the following we use RxCy to represent the square at the xth row and the yth column. R8C1 and R2C9 are symmetrical squares around the center square R5C5.   Here is an example of classic Sudoku. We call it Sudoku Puzzle P1.  

Sudoku Puzzle P1

Picture

​This Sudoku is a symmetrical Sudoku and it has one and only one solution (you can check that out by solving it).
Question:  If we remove numbers from R8C1 and R2C9, is it still a classic Sudoku? 
The answer is “Yes”. Why?
First, if we remove numbers from R8C1 and R2C9, it is still a symmetrical Sudoku.
Secondly, if we remove numbers from R8C1 and R2C9, the new Sudoku still has one and only one solution.  Why?

Sudoku puzzle P2​

Picture

R8C1 can be immediately inferred to be number 9 because in the first column
(1) Number 9 cannot be in the first row because the first row contains number 9 already;
(2) Number 9 cannot be in the second row because the second row contains number 9 already;
(3) Number 9 cannot be in fifth row because the fourth box contains number 9 already;
(4) number 9 can only be in the eighth row because it cannot be in the other empty squares in the first column.

R2C9 can be immediately inferred to be number 2 because in the second row
(1) Number 2 cannot be in the first or third column because the first box contains number 2 already;
(2) Number 2 cannot be in the fourth column because the fourth column contains number 2 already;
(3) number 2 can only be in the ninth column because it cannot be in the other empty squares in the second row.  

If we fill numbers 9 and 2 into R8C1 and R2C9 separately in Puzzle P2, it becomes puzzle P1.  Since puzzle P1 has one and only one solution, we can declare that puzzle P2 has one and only one solution too.

Think:  Remove numbers in R4C6 and R6C4 in puzzle P2, name the new puzzle P3. Is the puzzle P3 a classic Sudoku?

​All Sudoku puzzles made in www.createclassicsudoku.com are made using this basic principle – REVERSE WAY of solving a Sudoku puzzle.  How about try solving today’s medium Sudoku? 

Today’s Medium Sudoku

Picture
0 Comments

    Author

    Dr. Yaling Zheng
    Website
    www.createclassicsudoku.com

    Archives

    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017

    Categories

    All
    How To Design Sudoku
    How To Make Sudoku
    How To Solve Sudoku
    Sudoku Facts

    RSS Feed

Ohio Chinese/Taiwanese American News Location 俄亥俄新闻地址

Contact Us

​聯繫我們

Picture
微信号微信號 yalingzheng2013
  • 首頁Home
  • 期刊Issues
  • PubMyNews
  • 聯繫Contact
  • 團隊TEAM
  • 博客Blogs
    • Joyful Living
    • 吳紀珍女士專欄
    • Solve Sudoku, Create Sudoku 玩数独 设计数独
    • Betty Bleen's Poem
    • Linda Fuchs Poems
    • Joan Moos's Poems
    • 周達恆牧師人生探索欄
    • 施忠男 Chung Nan Shih
    • 徐勝雄博士詩詞專欄
    • Molly Grubb
  • 訂閱subscribe