|6><6||3><2||6 (2><3 layout)||1,2,3,4,5,6|
The elegance and intrigue of the puzzle comes from
Sudoku by Hand
Spreadsheets as an aid
Permutations: A step to a simple program
Each row, column and region has the same digits in various orders.
These are called permutations.
The ideal program would read something like:
Ideally the perm statement would either test a known list, or fill in blanks in a list, and it should, if necessary try other permutations in turn until they fit.
Prolog makes this trivial.
Prolog is a useful prototyping tool.
I like to have fashionable examples in my CSci320 class.
I developed one from the first Harry Potter book.
You can express the problem in Prolog language and it will search for a solution.
Sudoku Simply Solved
As I expected this work well with small (4><4) examples
[ ../cs320/prolog/sudoku4.plg ]
I knew it would need optimization to tackle a 9><9 problem.
No longer simple: [ ../cs320/prolog/sudoku9.plg ]
It still takes hours to run.
Sudoku Slowly Solved
The reason is simple.
Often simple solutions are not feasible.
(Fast solutions to sudoku): Dr. Kerstin Voigt's work: [ seminar.html ]
(sudoku seminar plan): [ sudoku.html ]
(Wikipedia): A social encyclopedia [ http://www.wikipedia.org/ ]
(Notes on the mathematics of Sudoku): demonstration of MATHS [ ../maths/ ] in action [ sudoku.maths.html ]
. . . . . . . . . ( end of section Sudoku Solving with a Computer) <<Contents | End>>