4 ms·
This is not correct. If a Sudoku puzzle has one and only one solution, brute force can always find it. It is trial-and-error for every single cell and every p
by T-hawk 15y ago
This is not correct. If a Sudoku puzzle has one and only one solution, brute force can always find it. It is trial-and-error for every single cell and every possible value, which is guaranteed to succeed eventually. Sounds crazy for a human, but a 3 GHz computer microprocessor can rip through that in a second or two.
http://en.wikipedia.org/wiki/Sudoku_algorithms#Solving_Sudokus_by_a_brute-force_algorithm http://en.wikipedia.org/wiki/Sudoku_algorithms#Solving_Sudok...
- makomk 15y agoWell, a few seconds unless someone goes and feeds you a worst-case puzzle like the one in that wikipedia page anyway. (Yes, that is an entirely valid sudoku with a unique solution. In theory it can even be solved by hand quite easily by applying a simple set of rules. I checked both of these, though not manually.)