How can I create a valid sudoku puzzle?
Question asked by: knowitall
Become a Member! It's Free >>>
There are many ways to do this. Usually you start with a valid solution and work backwards.
To get a valid solution you need 1 - 9 in each row and column and 3 x 3 once only.
A simple way to do this is to take a random order of 1 - 9 and place in the first column. Then shift the array one value each time; take the fourth and seventh shift in columns 2,3; the 2,5,8 shift in columns 4,5,6 and the 3,6,9 in 7,8,9.
Take out a selection of numbers, perhaps symmetrically. If you take out cell 23 take out the cell 23 from the end too to get the symmetry.
Then go through and see if you can get back to the same solution without guesses. If you can means there is one unique solution as you have not had to guess, therefore could not have made a different move at each stage. Thus you have a valid sudoku puzzle.
By: Unknown Average rating for this answer is 4 / 5Rate Answer
Share on Facebook:
valid  sudoku  puzzle  create
More Questions:What Is A Split Decision Crossword?
What Is Jigsaw Sudoku?
Which Came First The Chicken Or The Egg?
What Is The Countdown Conundrum?
What Is An Isosudoku?