What's on your mug?

Definition source

sudoku

A puzzle invented by an American but popularized by the Japanese. The puzzle consists of a 9x9 grid which is partitioned into nine 3x3 boxes. Typically, 20 to 25 of the 81 cells are pre-filled with one numerical digit. The objective is to fill the remaining cells such that each digit (1 through 9) is represented in every row, column and box. Easy to moderate puzzles can be solved via simple elimination. More difficult puzzles require some "what if" propositions to solve. Solving Sudoku by hand is a routine diversion but writing a program to solve or create Sudoku puzzles is a more interesting challenge.

I got a Sudoku book for Christmas and wrote a program that could solve any of the puzzles in under a second.

By AbnormalBoy

sudoku

It's a [9]*[9] matrix with 9 3*3 submatrices. Each submatrix must have [9] numbers from 1-[9] with no repetitions. When [one] combines the 9 submatrices to get a 9*9 supermatrix, each row and column of the supermatrix must have 1, and only 1, instance of the numbers 1-9. So [one] has 9 3*3 matrices, the numbers 1-9 inclusive with no repetitions for each 3*3 matrix. Then combine the 9 3*3 matrices so the supermatrix has numbers 1-9 in each row and each column without repetition..

So here's how you solve 'em.. 1) Go through each 3*3 submatrix, trying to find an obvious digit that fits, from 1-[9].. Each [time] you find an obvious [fit], [one] must go through the entire supermatrix of submatrices again, in the sequence 1-9. When you've exhausted the possibilities, it is [time] to guess. 2) Guess at [one] where a [single] digit must belong to one of 2 positions. Follow step 1, and if you run into an error, that guess was wrong, and the number must rest in the other position. 3) [One] can adopt another strategy.. For instance, if there are 4 digits possible for a space, say, 2,3,4,5... and in another submatrix space, there are only 2 possibilities, say, 2, 3.... then the probability of the 2 being in the space with only 2 choices is larger than the probability of the 2 being in the space with 4 choices... 4) Many times, the puzzle will be lacking in 1 or 2 numbers, with a lot of the other ones. This is meant to confuse you. Do not pay attention to the numbers which are missing and try to fill those in. Instead, when it comes [time] to guess, try to fill a row or column so that the row or column has lots of obvious fill-ins. 5) When you guess, keep track of the number of the guess, [like], "OK, this is the first guess..." then, if you must "second-guess," and that guess is wrong, the first guess was wrong as well... this is why [one] guesses only when there there are only 2 possibilities... 6) I have guessed up to the 8th level, but, as I get better, it only takes me 3 or 4 levels... Ah, [hell], just [Google] for a Sudoku solver !!! I'm sure a million have already been written !! Only takes a bit of linear [algebra] !! Thanks..

This definition is too long for this mug.

Your words will appear here.

Updating preview…