Sudoku Puzzle Solutions: Methodology of Process



WELCOME TO PUZZLES-ONLINE-NICHE

I wanted to include this section on Sudoku Puzzle Solutions because I believe it would be

beneficial to give some insight on what I like to call the 'The Methodology of Process'.


Whether we realize it or not when we undertake to solve a Sudoku , we are employing a

system of logical steps, to define, or arrive at the solution.

As an avid sudoku puzzle solver for more than 30+ years ( I remember doing Number Place

in the 1980's), I have become so familiar with 'my processes ' to solve the puzzle, it has

become , for lack of a better term, lost in translation.

That is ,until I decided to start this web page, and rediscovered my subconscious tactics.

Funny thing is I didn't realize they actually had names for these processes, so for any

novices let us investigate these now. So here are my methods

Methodology of Process:

(A set of working methods for Sudoku puzzle solutions):

The names of these methods include: Elimination, CRME ( Column-Row-Minigrid Elimination),

Lone Rangers, Twins (sometimes called "Naked Pairs"),Triplets( "Naked"), Quads ("Naked") and

Brute Force.


These are by far the absolute best methods I have found to work and highly recommend for solving

a vast majority of sudoku puzzles.

I now propose to discuss each, in turn briefly , here today.

We begin with the Elimination method.


  • Elimination

The first and most obvious step.

Simply scan your puzzle board and eliminate the obvious.

That is you can first see if there are any rows or columns which have only one possible solution.


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

In the above example we can see that the first row column six has one, and only one possible

solution , "8". See. Eliminate. Simplify.

The above example although serving a purpose, is not a practical solution, mainly

we are not looking at the entire grid.

Aside :Before we proceed I want to also introduce some convenient notation for our puzzle board.

To identify a particular cell, we give it a designator with the ordered pair ( column , row).

Therefore the 1st cell in any Sudoku puzzle is identified by (1,1). and the last (9,9) .

(see diagram below).


Standard 9x9 Sudoku Grid
(1,1) (2,1) (3,1) (4,1) (5,1) (6,1) (7,1) (8,1) (9,1)
(1,2) (2,2) (3,2) (4,2) (5,2) (6,2) (7,2) (8,2) (9,2)
(1,3) (2,3) (3,3) (4,3) (5,3) (6,3) (7,3) (8,3) (9,3)
(1,4) (2,4) (3,4) (4,4) (5,4) (6,4) (7,4) (8,4) (9,4)
(1,5) (2,5) (3,5) (4,5) (5,5) (6,5) (7,5) (8,5) (9,5)
(1,6) (2,6) (3,6) (4,6) (5,6) (6,6) (7,6) (8,6) (9,6)
(1,7) (2,7) (3,7) (4,7) (5,7) (6,7) (7,7) (8,7) (9,7)
(1,8) (2,8) (3,8) (4,8) (5,8) (6,8) (7,8) (8,8) (9,8)
(1,9) (2,9) (3,9) (4,9) (5,9) (6,9) (7,9) (8,9) (9,9)

We take a standard 9x9 puzzle and introduce , for each and every individual cell ( a unique position identifier- as shown ).

Starting with the leftmost position we have assigned it the ordered pair (1,1),[ where the notation (1,1) = ( 1st column,

1st row) ] ; more generally,

we order the pair by letting ( column, row) = ( c, r ).

Therefore, the position of the 5th cell over, 3 rows down can be given by the shorthand: (5th column, 3rd row) = (5, 3).

We shall now adopt that notation for the rest of our discussion.

  • CRME( or Column-Row-Minigrid Elimination):

A more elaborate method for solution would be the column-row-minigrid-elimination process.

For this method we will employ a three tiered attack:

  • 1.scan rows.
  • 2.scan columns.
  • 3.scan local (3x3 minigrid).

We begin by choosing cell (2,1) as a starting point, (denoted by X)-see diagram below).

Employing our 3 tiered attack we scan across row 1 and see the numbers 6, 3, 8, 7,2, therefore we eliminate those from contention.

Standard Sudoku 9x9 Gameboard
6 X 3 8 7 2 xx
7 3 4 xx xx xx xx xx xx
1 8 xx xx xx xx xx xx
xx xx 5 xx xx xx xx xx xx
xx xx xx xx xx xx xx xx xx
xx 9 xx xx xx xx xx xx xx
xx 7 3 xx xx xx xx xx xx
8 2 xx xx xx xx xx xx xx
xx xx 1 xx xx xx xx xx xx

Next we scan down column two and see 3, 8, 9, 7 2. (Eliminate them).

6 X 3 8 7 2 xx
7 3 4 xx xx xx xx xx xx
1 8 xx xx xx xx xx xx
xx xx 5 xx xx xx xx xx xx
xx xx xx xx xx xx xx xx xx
xx 9 xx xx xx xx xx xx xx
xx 7 3 xx xx xx xx xx xx
8 2 xx xx xx xx xx xx xx
xx xx 1 xx xx xx xx xx xx

(Remembering X can only be the numbers 1-9)

Starting Values for X : 1,2, 3, 4, 5, 6, 7, 8, 9


======================================

======================================


(Row scan eliminates 6,3, 8, 7, 2)

Therefore,

X possible (after scanning row1): 1, 4, 5, 9


======================================

======================================



(Column scan eliminates 3, 8, 9, 7, 2)

Therefore,

X possible( after scanning down column two): 1,4,5,6


======================================

======================================


6 X
7 3 4
1 8

Scanning our local ( 3 x 3 ) local grid

We see 1,3,4, 6,7, 8 already entered,

therefore, if we now eliminate 1, 4, 6 , we have

cell(2,1) = 5. [(Enter it in slot (2,1)]

Standard Sudoku 9x9 Gameboard
6 5 3 8 7 2 xx
7 3 4 xx xx xx xx xx xx
1 8 xx xx xx xx xx xx
xx xx 5 xx xx xx xx xx xx
xx xx xx xx xx xx xx xx xx
xx 9 xx xx xx xx xx xx xx
xx 7 3 xx xx xx xx xx xx
8 2 xx xx xx xx xx xx xx
xx xx 1 xx xx xx xx xx xx

  • Lone Rangers:

Simply put a 'Lone Ranger' is a single number out of a possible value in a cell which is the only

one in a given row, column, or sub-grid. In the example below we have a typical row which has

been filled in ( 6, 8, 5, 9, 2, 7 ) , leaving 3 cells (highlighted in blue) with their possible values of 1,3,4.

Looking at the possible values we see 4 is available only once, therefore 4 is a lone ranger.

6

1 3 4

8

5

9

2

7

1 3

1 3

In the above example we consider 4 to be a 'lone ranger' because it appears only once.

As a technique the lone ranger method it is quite useful in helping solve some complicated

sudoku puzzles.

Remember to scan every sub-grid, row and column looking for these lonely fellows,

they often may lead to other methods of solution.

Below are several more examples

Sub-grid Lone Ranger example:

6

245

7

2389

2389

1

345

345

345

245

8

245

7

23

23

1345

6

9

9

3

1

6

4

5

2

8

7

This is a partially filled puzzle, showing the first three rows. We have highlighted the filled in possible values for each of the first three sub-grids.

We want to focus on the third sub-grid :

345

345

345

1345

6

9

2

8

7

For this sub-grid we can see that 1 has only one possible location, therefore by the method of Lone Rangers, we conclude 1 MUST be the value of that cell( to the exclusion of all others).


LONE RANGER: ROW EXAMPLE

5

8

3

146

2

147

467

9

146

167

17

16

5

9

3

2

478

1468

4

9

2

168

167

178

3678

578

13568

39

234

5

7

346

248

1

248

4689

19

6

7

148

14

1248

5

3

489

13

1234

8

1346

5

9

467

247

46

3678

347

46

349

347

5

3489

1

2

1378

1347

9

2

1347

6

348

458

3458

2

5

14

1349

8

14

349

6

7

Again we have filled our puzzle with possible values, and we are scanning each row for possible ' lone rangers'.Let us isolate row 5, to check the cell highlighted in yellow.

ROW 5:

19

6

7

148

14

1248

5

3

489

Of all the possible values in this row 2 appears only once in column 6 (as highlighted above), therefore 2 is the only possible number, discovered by the method of lone rangers.


Our Row 5 now appears as follows:


19

6

7

148

14

2

5

3

489



LONE RANGERS BY COLUMNS:

1

5

8

6

47

379

3479

49

2

39

7

2

3459

1

359

8

459

6

6

349

49

8

2

3579

134579

459

13579

3579

8

45679

1234567

467

23567

145679

4569

1579

357

346

1

3457

9

35678

2

4568

578

579

2

45679

1457

4678

5678

145679

3

15789

8

69

5679

79

3

1

569

2

4

4

1

3

29

5

2689

69

7

89

2

69

5679

79

678

4

3569

1

3589

We are now performing a column scan for possible lone rangers, ( after filling in the possible values of this Sudoku). Column 8 appears to be worth noting.


49


49

459


459

459


459

4569


4569

4568


8

3


3

2


2

7


7

1


1

By performing a column scan we have found the value 8 is a lone ranger in the cell position highlighted in gold above. Thus we write “8” into that location.


  • Twins/Triplets/Quads:

These methods are extensions of the 'lone ranger' method discussed above, except we apply our

testing cells to cells with two pairs and three pairs, and more.

Let us look at the method of twins( also called 'naked pairs') as they apply to sub-grids, rows

and columns. (Note:Twins will allow us to restrict or eliminate possible values for other cells in the grid

(refer to the diagrams below)).

TWINS METHOD:

1248

7

1248

24589

6

89

359

359

359

248

248

3

24589

24589

89

6

7

1

5

9

6

7

3

1

2

4

8






36789









5









36789









2









36789









4




Above we have a partially solved puzzle (with possibles in the highlighted cells). If we focus our attention on the sub-grid (in the middle), we see two cells of particular interest, with possibilities 8, 9 (our twins) . For this particular sub-grid we can now make some observations: (see diagram to the right).


1) because either 8 or 9 must be in those two cells, we can eliminate those values from any other cells in this sub grid as follows:

245

6

89

245

245

89

7

3

1

Note: As shown above, the remaining cells in this sub-grid have only 2,4 or 5 remaining as possibles).

We can apply this to column 6 as follows:

Again by the method of Twins, we can reduce the possibles in the cells , as shown. above .( Eliminating 8 and 9 , leaves only 367 available in column 6 cells).

89

89

1

367

5

367

2

367

4


The triplet ( naked triples) and hence the Quads ( or Naked Quads)process would work similar to

the twins method except we would apply our scanning process to search for triples (or Quads)

in a sub-grid, row and column. We have simple examples below ( side-by-side).

METHOD OF TRIPLES:





2

135 789

135 789


135

4

135 789


135

135

6



Above we are given a sub-grid with the highlighted triple. Similar to twins we are able to eliminate the values in the other cells, ( in this instance creating another triple -789).






2

789

789


135

4

789


135

135

6



METHOD OF QUADS:





2

1357

1357


1357

4

135 789


1357

135 789

6



Above we are given a sub-grid with the highlighted Naked Quads. Similar to triples we are able to eliminate the values in the other cells, ( in this instance creating a twin, 89 in the cells as shown below).






2

1357

1357


1357

4

89


1357

89

6




HIDDEN PAIRS / TRIPLES:

You now know to look for certain patterns of grouped numbers ( lone rangers, naked twins, triples and quads),

this should help you find other combinations like hidden pairs and hidden triples.

In other words you may see a pattern like the one above where we actually uncovered a hidden twin

( the diagram above where we had the quads, the two cells containing 135789 are actually a hidden twin,

because they are the only two cells with 8, and 9 available in that sub-grid ( "....more than one way to

skin a cat" as the saying goes).

You may come across the following a set of two triples( say two cells with 1,2,3) and a third cell which

contains a subset of the triple ( a subset can be 12,13,23 in some order) or a single triple

(again using 123 as our triple example) and two other cells which contain the subset.


To summarize , to solve Sudoku puzzles with any of these methods above one has to be able to recognize

patterns in numbers and scan each sub-grid, row and column, painstakingly removing or eliminating

numbers until one arrives at the correct solution.


BRUTE FORCE:

Is as the name sounds, a less substantial method of solving, but if all else fails........

Brute force may be less about brute, think of it more as a hunch or even an educated guess.

Let us say you have tried all the methods above, and you haven't made any progress,

time to put your old noggin to work.

Review the grid , start with the most probable candidate, that would be the cell with the least amount of possibles.

For example say we find a cell with 6,8 in it.

By the process of Brute force we simply pick one or the other (your choice is arbitrary) and see where

that path leads us. Say we choose 6, then we begin by putting in all the possible values

(Also at this point I would recommend maikng a mental note of your branching off point, because

you may go through many steps and arrive at a dead end), at that point you would backtrack to

your starting point and plug in the other number , in this case 8.

To summarize the Brute Force method may seem less technical than some of the other methods,

but, ( take it from this experienced player), it sometimes works and may even lead to other

methods, like hidden pairs or triples.

  • ADVANCED TECHNIQUES

Below is a discussion of more advanced methods of solving Sudoku puzzles.

These methods we would recommend only if none of the above methods work, as the advanced

methods are usually more involved.and for my tastes more time consuming then even the

Brute Force method.


But if you insist, click on this link to see 'em :

X-Wing, XY-Wing, Swordfish , Color



  • BRUTE FORCE ALGORITHMS: (COMPUTER METHOD)

There are approximately 67,000, 000, 000, 000, 000, 000, 000( YES, that is 6.7 x 10 to the 21st power)

Sudoku puzzle solutions (or game combinations) possible.

Brute-Force algorithms are basically computer programs that will solve Sudoku puzzles.

A good program might be a practical way to solve Sudoku puzzles, (so long as the puzzle is a valid one,

that is one of the 6.7 x 10^ 21 grids).

Basically it is a numbers crunching game,

A brute force algorithm visits the empty cells in some order, filling in digits sequentially from the

available choices, or backtracking (removing failed choices) when stymied. For our purposes

assume a algorithm order of left to right, top to bottom. (The algorithm could, however,

visit the empty cells in any order)

Briefly, a brute force program(or a person doing it manually) would solve a puzzle by placing the

digit "1" in the first cell and checking if it is allowed to be there. If there are no violations

(checking row, column, and box constraints) then the algorithm advances to the next cell, and places

a "1" in that cell. When checking for violations, it is discovered that the "1" is not allowed, so the value is

advanced to a "2". If a cell is discovered where none of the 9 digits is allowed, then the algorithm leaves

that cell blank and moves back to the previous cell. The value in that cell is then incremented by one.

The algorithm is repeated until the allowed value in the 81st cell is discovered. The construction of 81

numbers is parsed to form the 9 x 9 solution matrix.

Most Sudoku puzzles will be solved in just a few seconds with this method, but there are exceptions.


From Sudoku Puzzle Solutions to Sudoku Puzzle

From Sudoku Puzzle Solutions to Puzzle Games Online