Comments on: Creating Sudoku puzzles
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles/
Comments on Ask MetaFilter post Creating Sudoku puzzlesFri, 27 May 2005 02:53:57 -0800Fri, 27 May 2005 02:53:57 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60Question: Creating Sudoku puzzles
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles
I know the theory of solving <a href="http://www.sudoku.org.uk/">Sudoku puzzles</a> but I'd like to know how you would go about creating them. <br /><br /> I've found a lot of sites on the web that tell you how to solve <a href="http://www.sudoku.org.uk/">Sudoku puzzles</a> and even <a href="http://www.scanraid.com/sudoku.htm">a site</a> and an excel macro (link sadly lost) which will do just that automatically.<br>
<br>
However I'm more interested in understanding the logic required for creating your own so that I can write something myself to generate them. Does anyone know where I can find such information?<br>
<br>
I'm especially interested in how you go about generating the board and then which numbers you remove to get the puzzle to a pre-defined level of difficulty.post:ask.metafilter.com,2005:site.19225Fri, 27 May 2005 02:37:59 -0800ralawrencesudokucreatepuzzleBy: kenaman
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles#316793
This is an <a href="http://myweb.tiscali.co.uk/davidelizabeth/tcl/sudoku/">example </a>of a little app which does what you wish to do, with three levels of difficulty.<br>
<br>
Not sure if Dave Easton the writer gives any insight into its development anywhere on the web, will give a quick look....comment:ask.metafilter.com,2005:site.19225-316793Fri, 27 May 2005 02:53:57 -0800kenamanBy: kenaman
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles#316794
<a href="http://www.setbb.com/phpbb/index.php?mforum=sudoku&sid=c3b6c7d322ca0784ff157ebff1e46033">Sudoku Programmers BB</a> might help also..comment:ask.metafilter.com,2005:site.19225-316794Fri, 27 May 2005 02:56:00 -0800kenamanBy: ralawrence
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles#316823
Dave Easton's generator looks good but I'm having difficulty finding a contact email for him. There is nothing on his site and google doesn't seem to help.<br>
<br>
The BB is also good but doesn't give too many details. For example, they advocate starting with a blank grid and then placing numbers and testing the solvability but that looks to be very hit and miss and intensive. The other way appears to be to start with a full grid and "roll back", which is one way, but I can't seem to find out how to generate the full grid in the first place!comment:ask.metafilter.com,2005:site.19225-316823Fri, 27 May 2005 05:23:28 -0800ralawrenceBy: gleuschk
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles#316860
Here's a <a href="http://www.pro.or.jp/~fuji/java/puzzle/numplace/makesudoku/sudoku01.html.en">step-by-step guide</a>. Interestingly enough, it doesn't start with a full grid. No real way to judge the difficulty of the puzzle (aside from how many cells you reveal), but <a href="http://www.sudokusolver.co.uk/">this solver</a> should help you get some idea of how hard it is (and whether it can be solved!).comment:ask.metafilter.com,2005:site.19225-316860Fri, 27 May 2005 06:33:08 -0800gleuschkBy: gleuschk
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles#316865
Oh, also, on how to generate a full grid. There's one obvious ("canonical") full grid: <br>
<code><br>
123 456 789 <br>
456 789 123<br>
789 123 456<br>
<br>
234 567 891<br>
567 891 234<br>
891 234 567<br>
<br>
345 678 912<br>
678 912 345<br>
912 345 678<br>
</code><br>
and there are some obvious group actions: copies of Z/3Z can permute <br>
(1) rows within each band<br>
(2) columns within each band<br>
(3) the horizontal bands, and<br>
(4) the vertical bands<br>
<br>
Furthermore, a copy of S_9 permutes the numbers, and Z/2Z acts by the transpose. I conjecture that the orbit of the canonical grid under these group actions is the entire set of full grids. My next step is to find a combinatorialist who'll count them all for me and see if there's any chance I'm right.comment:ask.metafilter.com,2005:site.19225-316865Fri, 27 May 2005 06:40:17 -0800gleuschkBy: gleuschk
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles#316868
Hm, <a href="http://www.sudoku.com/forums/viewtopic.php?t=44&start=135">more</a> on the combinatorics, including an assertion that there are 6,670,903,752,021,072,936,960 valid full grids, a factor of about a trillion more than I thought. Oh well. Won't get tenure that way.comment:ask.metafilter.com,2005:site.19225-316868Fri, 27 May 2005 06:47:26 -0800gleuschkBy: gleuschk
http://ask.metafilter.com/19225/Creating-Sudoku-puzzles#316980
<small>and of course I meant S_3 instead of Z/3Z. I am so ashamed.</small>comment:ask.metafilter.com,2005:site.19225-316980Fri, 27 May 2005 09:38:35 -0800gleuschk