Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Possible? Sure.

Brute-force solution is to consider all possible arrangements of numbers 1-9 in a 9x9 grid, filter that down to those that match the conditions of a completed grid, then iterate over the list of possible completed grid, for each grid find all possible arrangements of missing numbers, filter over those arrangements for those that can be solved, which means calculating whether there exists a solution from the available information, etc.

I didn't say efficient.



A cursory search indicates that there are 6670903752021072936960 distinct 9x9 sudoku. That's a whole lot of cycles and a bit of a storage issue.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: