View previous topic :: View next topic |
Author |
Message |
| Lieperik
| Joined: 24 Jul 2005 | Posts: 1 | : | | Items |
|
Posted: Sun Jul 24, 2005 10:04 am Post subject: Unique Sudoku solution |
|
|
I am programming a Sudoku game but run into trouble that users can often solve the game in more than one way.
To avoid this from happening we want to show the numbers which 'could be switched' as the fixed numbers so that the rest of the game can only be solved in one way.
The problem by doing this is that it takes a lot of computation time to calculate whether a Sudoku can be resolved in more than 1 way.
Does anyone has a smart idea on how we can figure out, without consuming too much CPU power, which numbers on a Sudoku may be 'switched'? |
|
Back to top |
|
|
| qbasicmac
| Joined: 26 Jul 2005 | Posts: 27 | : | Location: Washington DC | Items |
|
Posted: Wed Jul 27, 2005 9:26 pm Post subject: |
|
|
I'm not sure why you've focused on "switched".
I presume you generate a solved puzzle and then randomly select some cells to be in the original puzzle. Then you solve it and find more than one solution.
I would just increase the number of original puzzle cells by one and try again. Eventually you will get a unique solution.
Mac |
|
Back to top |
|
|
|