Thursday, November 03, 2005

Sudoku types

You surely have seen these sudoku puzzles in newspapers: In the original version, it is a 9x9 grid with some numbers inserted. The problem is to fill the grid with number 1 to 9 such that in each row, column and 3x3 block each digit appears exactly once.

In the past I was mildly interested in them, I had done perhaps five or six over several weeks, mostly the ones in Die Zeit. But the last couple of days I was back in the UK where this is really a big thing. And our host clearly is an addict with books all over the house. So I myself did a couple more of them. And indeed, there is something to it.

But what I wanted to point out is that I found several types of ways to approach these puzzles. This starts from "I don't care about puzzles, especially if they are about numbers". This is an excellent attitude because it saves you lots of time. However, sudokus are about permutations of five things and it just happens that they are usually numbers but this is inessentiel in the problem. A similar approach was taken by a famous Cambridge physicist who expressed that he found "solving systems of linear equations" not too entertaining. Well, either he's has a much deeper understanding of sudokus than me or he has not really looked at a single one to see that probably linear equations are of no help at all.

But the main distinction (and that probably tells about your degree of geekiness) is in my mind: How many sudokus do you solve before you write a progam that does it? If the answer is 0 you are really lazy. You could object that if you enjoy solving puzzles why would you delegate that fun to your computer but this just shows that you have never felt the joy of programming. Here is my go at it.

2 comments:

Anonymous said...

Just found this post that you made last year, as a sudoku addict I just need to know did creating your program stop you from doing sudoku or are you still doing them??

Robert said...

It didn't interfer with my fun of solving sudokus by hand at all. I still do them if they come across. However, I mostly enjoy the really hard ones, the easier ones are less of a challenge and I consider them even more a waste of time than the harder ones.