The Shortest Sudoku Solver page has the shortest programs in various languages for solving Sudoku puzzles. He has posted a copy of a C program that I wrote for his page. Can anyone write a shorter version?
July 2006 Archives
Here's how I solve part of the latest Google puzzle.
I wrote a program to search a big word list. Here's the output of the program.
Of course, this produces a huge number of answers to choose from, and almost none of them make sense, so you have to go through the list to find the right answers. I found answers to #1, #3 and #5. The other puzzles have answers that weren't in my word list.
Complete answers are below.
Here's an applet I wrote to play back the solutions for this week's puzzle.
The applet doesn't actually solve the puzzles. I just hardcoded the answers that I swiped from the answers page. I didn't have time to write a full solver. Here's the source.
This is a very clever jigsaw sudoku puzzle. The regions of the puzzles are shaped like US states, and the given letters are the state abbreviations. I wrote a quick program to solve the puzzle. My program isn't that smart. It only uses "single candidate", "single position" and "guessing" techniques to solve the puzzle. A smarter problem would use some other techniques.
Solving it manually, I was able to use some other techniques (naked triple, candidate line, forcing chains, etc.) to solve it. I'd be interested to see if anyone can come up with a solution that doesn't use forcing chains or nishio. I consider both of these a form of guessing and not very elegant.
Here's the program: Download file
Here's the output of the program: Download file
One of my favorite websites, Puzzle.jp, is closing at the end of July. This is normally a subscription site, but they are opening up the members' content to everyone for the last month. Hopefully I can find a similar site to replace it. My favorite puzzle on that site is Slither Link, but I like all the other puzzles, too, with the exception of Kakro, which I've never found very interesting.
