general solution

Advanced methods and approaches for solving Sudoku puzzles

general solution

Postby Guest » Sat May 21, 2005 12:15 pm

I first heard about sudoku yesterday and after the first try I developped a pen and paper algorithm which solves any solvable sudoku without needing higher brain functions.

first step:
subdivide each field of a 9x9 sudoku grid into 9 squares (3x3). each of these subfields is used to represent a digit from 1 to 9, choose a numbering convention for the subfields, like


a cross in a subfield signifies that the corresponding digit cannot appear in this field.


(this field can be 3,5,6,7 or 9, but not 1,2,4 or 8)

second step: translate the sudoku into the new form.
For each supplied digit, fill the subfields not corresponding to the digit.
for example, 5 becomes


Definition: zone of influence: each field has a zone of influence, in the traditional sudoku these are the associated row, column and block (variants could define other zones of influence)


- choose a field with a single empty subfield.
- draw a zero in this empty subfield (zero is used to remember that the influence of this field has been computed, once and for all).
- in this field's zone of influence, add a cross in the same subfield of all other fields.

until the puzzle is solved.

(that works if you make no mistake, and the initial conditions determine a single solution)

the solved grid ooks like this

xx0 xxx x0x xxx
xxx x0x xxx xx0
xxx xxx xxx xxx etc...

last, translate the solution to numbers again

3 5 2 6 etc...

kind regards,
Dominik Schlaefli

Postby lunababy_moonchild » Sat May 21, 2005 3:37 pm


Could you put that into layman's terms please?

Posts: 659
Joined: 23 March 2005

Postby Guest » Sat May 21, 2005 5:52 pm

Only works for the easy ones
Posts: 312
Joined: 25 November 2005

Postby lunababy_moonchild » Sat May 21, 2005 6:02 pm

I could be wrong here but upon second look that could be what's referred to elsewhere on this site as carpet-bombing i.e. you put every available number in every box and then eliminate from there, which only works - generally speaking - with easy ones.

I just didn't understand your explanation, that's all. I wasn't making a sarcastic comment:)

Posts: 659
Joined: 23 March 2005

Postby Guest » Sun May 22, 2005 1:26 am

I came across sudoku for the first time yesterday and did much the same thing. Then I wrote a small computer program to do it for me. Trouble is, it only works for easy puzzles. It solved the May one on this website in about a zillionth of a second but it is stumped by harder ones. My challenge is to adapt the program to solve them too. Might still be at it in ten years ...

Postby Guest » Tue May 24, 2005 8:19 am

It can work if you then look for pairs of numbers within the boxes or along lines, then eliminate those numbers from the rest of the box or row

Postby simes » Tue May 24, 2005 8:50 am

Pairs will help, but it's still not enough to solve all puzzles - not even those that don't require T&E.

More advanced techniques are required for the more difficult puzzles - lookup triplets, xwings, swordfish, nishio.
Posts: 324
Joined: 11 March 2005
Location: UK

Return to Advanced solving techniques