Skip to content

hkociemba/sudokuNxM

Repository files navigation

sudokuNxM Solver and Generator

The NxM-Sudoku is a generalization of the standard 3x3 Sudoku with 9 squares of size 3x3 and a total of 81 cells. In the general case we have N*M rectangles of size NxM and a total of (N*M)2 cells.

Though there are standard Sudokus which are almost impossible to solve only with logical reasoning by humans, from a computational point of view solving a standard Sudoku is almost trivial. Since the general problem is NP-complete finding a solution gets more demanding for larger grids.

We choose an approach where we simplify the given NxM-Sudoku as far as possible using "human" methods like hidden and naked singles and tuples, block-line interaction etc. and transform the remaining problem into a boolean satisfiability problem. We then use Sat4J for solving.

Besides solving of Sudokus the program also includes features like generating Sudokus, testing for unique solutions etc.

About

Solve and generate Sudokus with variable boxsizes up to 20x20 ( 400 x 400 sudoku ).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages