Sudoku Larry
Sudoku Larry
Instructions:
This spreadsheet can help solve "Sudoku" puzzles, in which a 9 X 9 grid must be filled in such that
every row, every column, and every heavily outlined 3 X 3 "box" contains the digits 1 through 9
exactly once. The spreadsheet handles the mechanics of the constraint propagation.
In this spreadsheet, each "entry" in the Sudoku grid is represented by a lightly outlined set of
12 spreadsheet cells, 4 wide by 3 high. To fill in an entry, put a number into the middle cell
of the leftmost column (which has a lightly colored background). The nine cells in the
other columns of that entry are that entry's "Possibility List", showing which numbers
can still possibly be placed in that entry, based on the other entries that have been set.
Once you fill in a value, the number you enter is struck out of the Possibility List everywhere
in that entry's row, column, and 3 X 3 box. Thus the spreadsheet does all the "bookkeeping"
needed to see what numbers are still possible in each entry.
When only one possibility remains in an entry, a blue "S" appears in that entry's upper-left-hand cell.
For example:
S In this example, the only remaining possibility
6 for this entry is a "6", so you can put a "6"
into the cell under the "S".
The S (for "Set") is to make it easy to find entries that have been determined by the constraints.
But they must still be set by hand - the spreadsheet will not set them for you automatically
Additional important information is provided in the "Row counts", computed in columns AL, AM, and AN.
These reveal counts of how often each number appears in the Possibility Lists of each row
The thing to look for there are any counts of "1".
For example, suppose the range AL2:AN4 contains: 9 9 6 Positions: 1 2 3
3 4 1 4 5 6
2 5 4 7 8 9
The "1" in the "6" position (second row, third over) means a "6" is possible
only in ONE entry in that row. Scan the row to find a "6" in a Possibility List.
There may be other numbers in the Possibility List for that entry, but you can fill that
entry in with a "6", because this is the ONLY entry in that row that can be a "6",
and there MUST be a "6" somewhere in that row.
Similarly, there are "Column counts" in the rows 30, 31, and 32
and the range AT20:BB28 gives count information for each "box" (the "Box counts").
A magenta X in the lower-left cell of an entry means a contradiction has been encountered:
that entry has not been set, but the Possibility List is empty.
A red "XXX" in cells AB1:AD1 indicates an error (a number appears twice in a row, column, or box).
If so, the number in cell AF1 tells how many such sets have a duplicate,
and the numbers in BD2:BD10, AT12:BB12, and AT14:AV16
show which row, column, or box, respectively, have errors.
Some tips:
The spreadsheed is protected. You can enter numbers only in the cells with colored backgrounds.
A "Tab" will advance from one unprotected cell to the next, in lexical order.
I copy the spreadsheet to a file with a new name before using it, so I don't have to later clear all the entries.
To clear a single entry, select the cell with a colored background, and hit "Delete".
Putting text such as a space into that cell will not "clear" it (from the point of view of the formulas).
Backtracking: There's another reason for saving the entire spreadsheet under a new name:
If you get to a point where you can't make any further deductions,
you can save the entire sheet to preserve your position, and then guess at an entry with only
two possibilities. If that leads to a dead end, exit without saving, reload, and take the other path.
In hard problems, you may have to make multiple guesses - keep track of where you've been
Advanced techniques: Suppose a row (or column or box) has the following property:
2 2 2 2 3 2
4 6 6 5 5 9 4 5 6 4 5 6
7 7 7 8 8 7 7
Note that both the first and third entries from the left contain ONLY the two numbers 2 and 7.
It follows that one of those entries must contain the 2, and the other the 7. Why?
Because if a 2 or a 7 were anywhere else in the row, you wouldn't be able to fill both these entries.
So you know these entries contain the 2 and 7, although you don't yet know which is which.
This means that you can strike from the Possibility Lists all the numbers I've highlighted below:
2 2 2 2 3 2
4 6 6 5 5 9 4 5 6 4 5 6
7 7 7 8 8 7 7
(and for that matter, 2 or 7 in any Possibility List in the BOX containing the 2-7 possibilities).
How can we strike things from the Possibility List? Those cells contain formulas, and are protected.
You can just keep it in your head that these possibilities are not really valid.
Or, you can print out the sheet, and cross them off.
A A
B B
C C
D D
E E
F F
G G
H H
I I
1 2 3 4 5 6 7 8 9
Total entered: 0
Notes: