Hot on HuffPost Tech:

See More Stories
Free Switched iPhone app - try it now!
AOL Tech

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

Add your comments

Please keep your comments relevant to this blog entry. Email addresses are never displayed, but they are required to confirm your comments.

When you enter your name and email address, you'll be sent a link to confirm your comment, and a password. To leave another comment, just use that password.

To create a live link, simply type the URL (including http://) or email address and we will make it a live link for you. You can put up to 3 URLs in your comments. Line breaks and paragraphs are automatically converted — no need to use <p> or <br /> tags.