0% found this document useful (0 votes)
107 views6 pages

Sudoku Larry

Sudoku Laaaarry

Uploaded by

albarbob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views6 pages

Sudoku Larry

Sudoku Laaaarry

Uploaded by

albarbob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 6

SudokuLarry.

xls See revision, copyright, and instructions below 0 bad set(s)


1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
Column counts: number of times a position's number appears in a Possibility List in this column
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
Column availability: still can be used in this column somewhere
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9
Column constants for use in Possibility List formulas
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6 4 5 6
7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9 7 8 9

Revision history: Revision LJK07, 3/24/06, Lawrence J. Krakauer, "[email protected]"


Revision LJK08, 7/15/08: Changed e-mail address
Add additional revision lines here if you alter this spreadsheet, e.g. "Revision XYZ01"

Revisions LJK01-LJK08 copyright 2005-2006, Lawrence J. Krakauer. Permission is granted


to freely copy and distribute this spreadsheet as long as this copyright notice is maintained.
To print a solution or partial solution on this spreadsheet, select the "Sheet2" tab, below.
Instructions for spreadsheet SudokuLarry.xls, page 1 of 2
Original author Lawrence J. Krakauer, e-mail [email protected]
Send me e-mail with any comments, and I'll try to respond
I can't guarantee the spreadsheet is error-free.
Click on the "Sheet2" tab below for a printable copy of the problem as solved so far.
That sheet also provides space for you to type notes before printing it out.
In addition, the rows and columns are lettered/numbered for easy reference.

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.

Instructions for spreadsheet SudokuLarry.xls, page 2 of 2

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.

But there's another way, although it is a bit dangerous:


Be sure you SAVED the basic spreadsheet before you started!
Unprotect the sheet: Tools >> Protection >> Unprotect sheet
Select the numbers that you want to eliminate from the Possibility Lists, and hit "Delete".
Re-protect the sheet (Tools >> Protection >> Protect sheet), and continue working.
But once you do the above, you've destroyed this copy of the spreadsheet for future use!

Philosophy: Is using this spreadsheet "cheating"?


Not from my point of view. All it's doing is constraint propagation, and helping to search
for places in which a number appears in only one Possibility List in a row, column, or box.
These are the purely mechanical parts of solving a Sudoku problem. Sometimes I still do
puzzles by hand, and just use the spreadsheet to check my work for errors.
If you think it's "cheating", well, just don't use it.
I've never found a Sudoko puzzle I couldn't solve with the aid of this spreadsheet. Have fun!
Row cnts Available Answer check array 1=bad row Row constants
9 9 9 1 2 3 0 1 2 3
9 9 9 4 5 6 0 4 5 6
9 9 9 7 8 9 0 7 8 9
9 9 9 1 2 3 0 1 2 3
9 9 9 4 5 6 0 4 5 6
9 9 9 7 8 9 0 7 8 9
9 9 9 1 2 3 0 1 2 3
9 9 9 4 5 6 0 4 5 6
9 9 9 7 8 9 0 7 8 9
9 9 9 1 2 3 For bigger copy, see Sheet2 1 2 3
9 9 9 4 5 6 1=bad column 4 5 6
9 9 9 7 8 9 0 0 0 0 0 0 0 0 0 7 8 9
9 9 9 1 2 3 1=bad box 1 2 3
9 9 9 4 5 6 0 0 0 "bad" = numbers 4 5 6
9 9 9 7 8 9 0 0 0 repeated in a row, 7 8 9
9 9 9 1 2 3 0 0 0 column, or box 1 2 3
9 9 9 4 5 6 4 5 6
9 9 9 7 8 9 Box counts 7 8 9
9 9 9 1 2 3 9 9 9 9 9 9 9 9 9 1 2 3
9 9 9 4 5 6 9 9 9 9 9 9 9 9 9 4 5 6
9 9 9 7 8 9 9 9 9 9 9 9 9 9 9 7 8 9
9 9 9 1 2 3 9 9 9 9 9 9 9 9 9 1 2 3
9 9 9 4 5 6 9 9 9 9 9 9 9 9 9 4 5 6
9 9 9 7 8 9 9 9 9 9 9 9 9 9 9 7 8 9
9 9 9 1 2 3 9 9 9 9 9 9 9 9 9 1 2 3
9 9 9 4 5 6 9 9 9 9 9 9 9 9 9 4 5 6
9 9 9 7 8 9 9 9 9 9 9 9 9 9 9 7 8 9

Counts of numbers entered Total


1 2 3 4 5 6 7 8 9 entered:
0 0 0 0 0 0 0 0 0 0 0
1 2 3 4 5 6 7 8 9

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

Spreadsheet "SudokuLarry.xls", printed copy of solution, or partial solution.

Counts of numbers entered


1 2 3 4 5 6 7 8 9
0 0 0 0 0 0 0 0 0

Total entered: 0

Notes:

You might also like