by bhaavan · 9y ago · 0 comments
The paper which showed that the general case of Sudoku is NP-complete was apparently this one [1] (Linked from wikipedia)
[1] http://www-imai.is.s.u-tokyo.ac.jp/~yato/data2/SIGAL87-2.pdf
https://en.m.wikipedia.org/wiki/Mathematics_of_Sudoku#Enumer...
But you don't. Even what you might call "brute force" Sudoku solvers start from the given hints in the puzzle, which reduce the search space considerably. Given a set of Sudoku hints with a unique solution, you won't need "years or eons" with even a very simple solver.
A normal "very simple" solver of the kind you're talking about will solve the solution very quickly, in seconds or less, and it will also not be a constant time algorithm.
Generation of all possible boards is little more complex but I can hardly see how it could take "eons" - with proper implementation (Apache Spark :P ) and reasonably powerful hardware (1000 CPU core cluster, ha! ha! ha!) it should run under 1 day and take just little over 13 TB of disk/RAM space :).
Anyway, we are in agreement that enumerating all boards would be quite inefficient.