生成数独拼图的独特方法 [英] Unique methods to generate sudoku puzzle

查看:167
本文介绍了生成数独拼图的独特方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有几种可能的独特方式来生成数独谜题?
我只能想到两种可能的方法
1)拿一个已解决的Sudoku难题并随机排列行和列
2)生成一个随机数,并检查它是否违反了Sudoku的任何约束,重复直到数字不会违反每个平方的任何Sudoku约束(从理论上讲可能是,但通常会导致死锁)

How many possible unique ways are there to generate a Sudoku Puzzle?? I can think of only two possible ways 1) Take a solved Sudoku puzzle and shuffle the rows and columns 2) Generate a random number and check if it violates any Sudoku constraints, repeat untill number does not violate any Sudoku constraint for every square(theoretically possible but normally it leads to deadlocking )

还有其他方法吗?

推荐答案

此处共20页PDF,标题为数独谜题生成:从简单到邪恶,您可能会发现对您的任务很有用。

Here is a 20-page PDF, titled "Sudoku Puzzles Generating: from Easy to Evil", that you'd probably find useful in your quest.

回答您的问题:


还有其他方法吗?

Are there any other ways?

是。是的。

这篇关于生成数独拼图的独特方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆