3 ms·
This is fascinating in its own right, of course, but I was indeed referring to a literal finite lookup table, by appeal to the finitude of the 9x9 problem class
by Twisol 7y ago
This is fascinating in its own right, of course, but I was indeed referring to a literal finite lookup table, by appeal to the finitude of the 9x9 problem class only. You give a useful strategy for compacting the size of the lookup table though!
(And really, isn't a function just a compressed lookup table? Often trading time for size.)
Another theoretically interesting way to shrink the lookup table is to reduce all grids to the set of essentially different grids -- see Wikipedia for the details [0]. The upshot is a reduction in size to "only" 5,472,730,538 grids. You can then scan the set for a grid matching your input clues -- though, as noted, this trades time for size.
[0] https://en.wikipedia.org/wiki/Mathematics_of_Sudoku#Enumerating_essentially_different_Sudoku_solutions https://en.wikipedia.org/wiki/Mathematics_of_Sudoku#Enumerat...