View previous topic :: View next topic |
Author |
Message |
| dixonhsiao
| Joined: 28 Jan 2007 | Posts: 5 | : | | Items |
|
Posted: Wed Feb 07, 2007 12:39 am Post subject: Any other efficient method? |
|
|
So far I know that there is two general method for generating a valid problem puzzle.
The first one is to generate a valid solution puzzle and "kill" certain grid,after that,solve it and check if the puzzle has a solution and is unique.
The second one is to fill certain grid into a empty puzzle with the principle of uniqueness,say filling at least 17 grid into a 9*9 empty puzzle,and check if the puzzle has a solution and is unique,otherwise fill in more grids or change the grid you've just filled.
I want to ask that is there any other efficient method to generate a valid puzzle? |
|
Back to top |
|
|
| Ruud Site Admin
| Joined: 17 Sep 2005 | Posts: 708 | : | Location: Netherlands | Items |
|
Posted: Wed Feb 07, 2007 6:57 pm Post subject: |
|
|
There are 2 additional methods that I've heard of:
1. Solution -> empty -> puzzle
Generate a random solution, then clear the grid and place 17 random digits from the solution into the grid. While the solver reports multiple solutions, keep adding clues. Then minimize the puzzle.
2. Solution -> unavoidable sets -> puzzle
Generate a random solution and find the most common unavoidable sets in this grid. Place the minimum set of clues that cover all sets, then add clues until the puzzle has a single solution. This method is more complex, but on average it will yield puzzles with fewer clues.
Ruud _________________ Meet me at sudocue.net |
|
Back to top |
|
|
| dmkAlex
| Joined: 02 Jun 2007 | Posts: 11 | : | Location: USA | Items |
|
Posted: Sat Jun 02, 2007 2:08 am Post subject: |
|
|
Is there any principle in how to create sudoku puzzle? |
|
Back to top |
|
|
| m_b_metcalf
| Joined: 13 Mar 2006 | Posts: 210 | : | Location: Berlin | Items |
|
Posted: Sat Jun 02, 2007 1:59 pm Post subject: |
|
|
dmkAlex wrote: | Is there any principle in how to create sudoku puzzle? |
Well, either you can create a solution grid, then subtract cells from it until a point is reached where a further subtraction results in there being multiple solutions,
or
you can add compatible clues to an empty grid (at least 17, and eight distinct values) and see whether they represent a puzzle with a single solution.
HTH
Mike Metcalf |
|
Back to top |
|
|
|