Contents cannot be rendered at this time; please try again later
We can find a solution:
In[3]:=
SolveSudoku
[sud]
Out[3]=
Contents cannot be rendered at this time; please try again later
This does not automatically mean that the sudoku has exactly one solution. If we want to be sure, we have to look for two solutions, using backtracking:
In[4]:=
SolveSudoku
str,
MaxSolutions
2
SolveSudoku
::steps
:Theresultwasfoundin73steps.
Out[4]=
Contents cannot be rendered at this time; please try again later
This is a list with only one solution, so the solution is unique.
We can solve the empty sudoku:
In[1]:=
SolveSudoku
StringJoin[Table["0",81]],
MaxSolutions
4
SolveSudoku
::steps
:Theresultwasfoundin52steps.
Out[1]=
Contents cannot be rendered at this time; please try again later
,
Contents cannot be rendered at this time; please try again later
,
Contents cannot be rendered at this time; please try again later
,
Contents cannot be rendered at this time; please try again later
The next sudoku has 16 clues. Since for a standard sudoku at least 17 clues are required for a unique solution, this sudoku may have none or more than one solution.