Computer program for solving sudokus by network coloring with a given number of colors
(University of Exeter, Jan Sieber)
The part below uses the mathematical programming environment sage
(www.sagemath.org/). The
cells with the numbered lines are programming code, which will be
executed on the free cloud
service sagecell.sagemath.org/
-
The piece of computer program below is a modification of
the ColorRemaining program
that colors networks by systematically trying all possibilities. The
modification allows for some nodes to have a unchangeable color
assigned by the user. Click 'Execute code' to load this function.
Some other functions that are useful and needed are loaded below (feel free to ignore or explore).
Click 'Execute code' to load these extra functions.
- I have prepared a way to enter started sudoku puzzles in a big
square with a minus (-) at all empty places. Always leave a space
between entries and put each line onto a separate line. The block
with the sudoku needs to be enclosed by three doublequote marks as
the text after sudoku= below.
Click 'Execute code' to run the code.
- Here is a 4x4x4 sudoku
Click 'Execute code' to run the code.
Go back to coloring.