On an airplane ride recently when I ran across a Sudoku puzzle in the local newspaper…. Seemed easy enough… the first few rows and columns went easily enough, but boy it got harder at the end.  The rules are very simple…

 

Fill in the 9x9 grid so that

         every row,

         every column, and

         every 3 x 3 box

   contains the digits 1 through 9.

The grid is initialized with a few values that are not changeable making it a bit harder…

 

Here is the example I worked…   You can only change the 0’s…

 

9 0 6   5 0 7   0 2 0

                  8 0 0   0 0 0   3 7 0

                  0 0 0   3 0 2   0 0 0

 

                  0 6 0   0 0 0   0 0 2

                  0 9 0   0 7 0   0 4 0

                  2 0 0   0 0 0   0 9 0

 

                  0 0 0   4 0 3   0 0 0

                  0 1 3   0 0 0   0 0 4

                  0 4 0   1 0 5   2 0 7

On the 4th time I changed a value in a box, I thought this was an excellent job for a computer!  So I pulled out my laptop and banged out  the core of a solution relatively quickly... another hour of clean up and I have this solution… It is neither the best code, nor optimal solution, but it does solve the puzzles faster than I can ;-).  

 

I’d love to see other’s solutions as well…    Here is one