Tuesday 22 February 2022

Pattern Repetition in Sudoku Puzzles

There seems to be pattern repetition in all standard sudoku puzzles. You can see what I mean in the answer to puzzle 644, which I published recently:

There is a 7 and 3 at the top of column 1. There is another 7 and 3 at the bottom of column 2 and the last 7 and 3 is in the middle of column 3.

The same goes for 8 and 2. They appear to the left of row 4, in the centre of row 5 and to the right of row 6.

You don't have to look very carefully to see that this pattern repetition covers the whole puzzle.

However, sometimes this pattern repetition goes too far (IMHO). You can see what I mean in the solution below. I created it recently but will not be using it to produce a puzzle:

1, 6 and 8 appear together to the left of row 7, in the middle of row 8 and to the right of row 9.

2, 7 and 9 are similarly repeated, as are 3, 4 and 5.

3, 8 and 9 appear at the top of column 7, in the centre of column 8 and at the bottom of column 9.

2, 4 and 6 are repeated in the same way, as are 1, 5 and 7.

I first noticed this in one of my puzzles some time ago and assumed my creation program had a bug. Further investigation showed that puzzles with solutions like this are used widely.

Personally I don't like it and up to now I have checked for pattern repetition like this before using a solution on my blog.

This has been possible because I only post puzzles from time to time.

However, for some time now I have been looking into the technology behind publishing a paperback book of puzzles. The idea of having to check a large number of puzzles before using them does not appeal to me. I have now changed my puzzle creation program to check for this type of pattern repetition and backtrack whenever it is present in the solution.

No comments:

Post a Comment