Sudoku solver

From Opasnet
Revision as of 13:52, 23 September 2012 by Jouni (talk | contribs) (first draft based on own thinking)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



Question

How to describe a sudoku and the sudoku rules in Opasnet so that it can be solved automatically?

Answer

You need the following tables.

Hypotheses
Cell Result Description
Row: All; Column: All 1,2,3,4,5,6,7,8,9 For all row and column locations it applies that the plausible hypotheses are a single integer between 1 and 9 (unless more information is available).


Area descriptions
Row Column Area
1 1 A
1 2 A
1 3 A
1 4 B
2 1 A
4 1 D
9 9 I


Rules of exclusion when comparing two cells.
Property1 Condition1 Property2 Condition2 Rule Description
Row Same Column Different Same integer not allowed Two cells with the same row and different column are not allowed to have the same integer.
Row Different Column Same Same integer not allowed Two cells with the different row and same column are not allowed to have the same integer.
Area Same Column Different Same integer not allowed Two cells with the same area and different column are not allowed to have the same integer.
Area Same Row Different Same integer not allowed Two cells with the same area and different row are not allowed to have the same integer.
The sudoku data (this example is "the most difficult sudoku in the world")
Row Column
1 2 3 4 5 6 7 8 9
1 8
2 3 6
3 7 9 2
4 5 7
5 4 5 7
6 1 3
7 1 6 8
8 8 5 1
9 9 4


Rationale

Dependencies

Formula

See also

Keywords

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>