Solving Sudoku with SQL

Solving Sudoku in SQLOkay, time to really geek out. Declarative languages are really the way to go if you're trying to teach a computer how to solve a puzzle, and though Prolog is the king of the declarative playground, it's equally geeky to do it in SQL, and that's what Samuel Aina did. His article Solving Sudoku with SQL describes what his title suggests: finding the unique solution to a Sudoku puzzle using T-SQL in SQL Server 2000. While the code isn't short (compare to, e.g., Chris Neukirchen's Prolog version), it's very clear and well-commented and really shows off the power of declarative programming.

[Via Digg]

Tags: programming, puzzle, puzzles, solver, sql, sudoku, tsql