it is converted to an Exact Cover Problem
to enforce a cell with a clue, it will set to 0 all the others column constraints relative to that specific grid cell.
So basically is reducing for each clue a number of 32 ones
- 36 are total for 9 values for each grid position
The unique solution is composed by 81 elements, each of them is composed by 4 values representing the row of those 4 columns:
give them in ascending order, the first value represent the cell constraints from which would be simple recovering the row and column value of the grid just by doing an integer division and getting the remainder.
the value at that point can be retrieved by one of the other 3 values by inverting their position.
For consistency it is enforced a check among the value returned.
No real need of it
-XX:+UseG1GC
-XX:+UseConcMarkSweepGC
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
- n-Queens problem
- generalize sudoku
- solve with integer programming
- use C/C++ scala native dlx algorithm