Skip to content

rohitjha/sudoku-dimacs-creator

 
 

Repository files navigation

sudoku-dimacs-creator

Minimum Requirements:

  • Python
  • minisat
  • Bash

First, 'generateSudoku.py' randomly generates the first row, column and main diagonal and stores the result in 'initial.state'. Then, the program 'generate.py' reads 'initial.state' and creates the file 'sudoku.in' in DIMACS format as input for minisat. The program 'show.py' reads minisat's solution from 'sudoku.out' and displays it in a matrix form. This works only if you have installed minisat.

You can call:

$ ./run.sh n r

to solve a n^2 x n^2 Sudoku problem using reduction method r (r = 1 or 2).

About

Generate DIMACS input for MiniSat and solve Sudoku problems of NxN size

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 85.2%
  • Python 13.8%
  • Shell 1.0%