by howshaw » Wed Mar 16, 2005 5:48 pm
My program now applies the following algrothim...
1) Look at each cell in the gird and if any are empty then abort the solution.
2) Scan each cell in the gird in order and if a cell contains a single digit then cross that digit out of all the other cells in its row, column and box. Repeat steps 1&2 until the entire grid is scanned without the grid changing. This follows the basic rule of the game.
3) Scan each row and look for a cell that contains a digit that is unique in the row. For example, in a row with three unknown cells, with [1,9], [2,9] and [1,2,6] in them, the 6 is unique. Set the cell to the unique digit (in this case the cell with [1,2,6] in it is set to contain only 6, and then jump back to step 1.
4) Do the step 3 scan again, but this time by columns.
5) Do the step 3 scan again, but this time by boxes.
6) Scan each row and if two cells, each with the same two digits in them are found, then remove those two digits from all the other cells in the row. For example in a row with [1,4], [1,4,5], [1,7,8], [1,4], [4,9] and [2,9] the pair of [1,4] would be detected and the row would be changed to [1,4], [5], [7,8], [1,4], [9] and [2,9]. If any changes are made to the grid in doing this then jump back to step 1.
7) Do the step 6 scan again, but this time by columns.
8) Do the step 6 scan again, but this time by boxes.
9) Finally guess. It is not totally random about its guessing. It tries to find a cell with the fewest number of possible digits in it, in a row, column and box that is the most complete. It sets this cell to the smallest of the allowed digits and recurses back to step 1 (it does not allow nested recursion). If the guess results in a grid with an empty cell then the grid is restored to its state before the guess and the program moves on.
Guessing can be turned off, and without it this method does not lead to a solution for the Times 1st March or 4th March. In fact only one cell is found in the 1st March puzzle. The program produces a log what what it tried and how the cells changed, its too much to post, but I can email it if someone wants to send me a message.
It would be possible to perform the step 6 scan but looking for three occurences of the same triple, four occurences of the same quad. etc, but I have tried it on the 1st March puzzle and it does not seem to help.
The big question is... How did anybody solve the Times 1st March puzzle? What I need is the exact list of steps, whether by hand or software. If there really is a purely logical solution (and I STILL have no evidence that there is) then what is the big secret.