Hello.

08 August 2005

Dashboard and Sudoku puzzles

I finally upgraded to OS X 10.4. So now I've gotten a chance to play around with the overhyped features, Dashboard and Spotlight.

I don't really use spotlight, I suppose I just keep my files in good order. It doesn't excite me.

Dashboard I thought would be a waste of CPU and time. But I've found so many fun things to with it, including check weather maps, NASA news feeds, translation services, seeing who is on AIM, checking gasoline prices, sun spot trackers, hurricane trackers, and so much more. It's like a shiny toy.

One of my favourite widgets is a Sudoku game. Unfortunately, I noticed while running "top", that it was the only widget hogging CPU while not active. I browsed the source (hey, kids, did you know all these widgets are written in javascript? Unlike programming for the dock, which you have to learn ObjectiveC for) and couldn't figure out what it was doing, but my javascript is very rusty.

A better Sudoku program is Sudoku Susser, which doesn't just give you random puzzles, but actually "susses" out the solution to these puzzles. The documentation for this program alone is worth downloading the program for, and then it shows you all these crazy methods of solving these puzzles. If you feed it a difficult puzzle, it will give you some detailed log files, for example:
* There is a "Fishy Cycle" in the puzzle, as follows:

{R1} -- R1C2 -- (C2) -- R3C2 -- {R3}
{R3} -- R3C6 -- (C6) -- R8C6 -- {R8}
{R8} -- R8C7 -- (C7) -- R1C7 -- {R1}

Each of the "vertex groups" (shown in {braces}) has only 2 squares that can contain a <4>. Such squares are called "conjugate pairs".

These squares are the "link squares", and the possibility they share is the "link number".

Vertex groups are linked together by "edge groups" (shown in (parentheses)). An edge group shares link squares with the two vertexes that it links.

A Fishy Cycle is a loop around the puzzle, such that each vertex in the loop is visited only once, each link square is used only once, and each edge is used only once. Also, the vertexes of a fishy cycle cannot appear as edges in the cycle.

In a fishy cycle, it is impossible for the link number to appear in any of the edge groups except in the link squares. So we can remove it if it appears in any of the other squares in the group!

Beautiful female Sudoku maniacs should be aware that if you kiss a geeky mathematician, they are pathetically grateful, and will tell you lots of stuff like this.
I find it odd that every newspaper I've seen with Sudoku puzzles asserts that there is no math involved.

Also, I should note that I've stayed up until 2:00AM trying to come up with a nice Sudoku puzzle to share with you. There is a huge difficulty in making a puzzle that isn't too hard and isn't too easy. I apologize for not including any Fishy Cycles in this puzzle. Here is the progress so far, and it hasn't been tested for perfection yet.



If you find the solution, send me an email. I'm going to bed now.

0 Comments:

Post a Comment

<< Home