Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

Any other efficient method?

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Setting sudoku
View previous topic :: View next topic  
Author Message
dixonhsiao

Joined: 28 Jan 2007
Posts: 5
:

Items
PostPosted: Wed Feb 07, 2007 12:39 am    Post subject: Any other efficient method? Reply with quote

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? Confused
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Wed Feb 07, 2007 6:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dmkAlex

Joined: 02 Jun 2007
Posts: 11
:
Location: USA

Items
PostPosted: Sat Jun 02, 2007 2:08 am    Post subject: Reply with quote

Is there any principle in how to create sudoku puzzle?
Back to top
View user's profile Send private message
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Sat Jun 02, 2007 1:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Setting sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron