This page examines variations on the classical Sudoku rules that can used to generate similar, but different, puzzles. It contains the following sections.
The first two rules of the classic Sudoku
can be extended to apply to any sized square grid and puzzles could easily be generated with just these two. Presumably we don't see many of these as they are not considered interesting. The third rule
requires that the sub-sections have the same number of cells as the rows and columns, which means that the overall size of the grid must be a square number, 1, 4, 9, 16, 25, ... The sub-cells will be 1x1, 2x2, 3x3, 4x4, 5x5, etc. Clearly the puzzle where you have to place the number 1 so that it appears in the row, column and sub-cell isn't very interesting, so the simplest puzzle of this kind will be 4x4. Here are two examples
|
|
The solution to the first one is
| 1 | 2 | 4 | 3 |
| 3 | 4 | 2 | 1 |
| 2 | 1 | 3 | 4 |
| 4 | 3 | 1 | 2 |
Here is a 16x16 example, the answer can be found on the solutions page
| H | M | O | N | G | B | ||||||||||
| C | L | D | I | J | |||||||||||
| L | I | P | M | A | F | ||||||||||
| K | F | C | E | ||||||||||||
| P | I | J | O | B | H | ||||||||||
| C | N | M | A | K | F | ||||||||||
| C | D | G | L | ||||||||||||
| E | N | O | F | ||||||||||||
| L | K | B | F | P | E | I | H | ||||||||
| J | D | C | K | O | |||||||||||
| H | P | A | G | E | D | ||||||||||
| I | N | A | J | ||||||||||||
| B | J | A | D | H | M | I | |||||||||
| K | F | E | P | D | |||||||||||
| O | B | P | L | J | |||||||||||
| G | D | N | I | L | P | C |
The supplied code doesn't even attempt to create 25x25 examples.
In the previous section we were constrained to only consider squares where the number of cells in the rows and columns was a square number. This was forced on us because we wanted the sub-cells to be square as well. If we relax rule three to allow rectangular sub-cells we can create puzzles on any sized square grid where the number of cells in a row isn't prime. The source code I supply will generate the following sized puzzles:
| Grid Size | Sub-cell width | Sub-cell height |
| 4 | 2 | 2 |
| 6 | 3 | 2 |
| 8 | 4 | 2 |
| 9 | 3 | 3 |
| 10 | 5 | 2 |
| 12 | 6 | 2 |
| 12 | 4 | 3 |
| 14 | 7 | 2 |
| 16 | 8 | 2 |
| 16 | 4 | 4 |
The list excludes sub-cells like 2x4 as the puzzles are equivalent to 4x2. Here is a 6x6 and an 8x8 example. See the solutions page for the answers.
|
|
And a 10x10
| H | G | C | J | ||||||
| A | F | B | |||||||
| E | H | ||||||||
| G | F | D | |||||||
| B | C | I | E | ||||||
| H | D | ||||||||
| A | B | F | |||||||
| E | J | D | H | ||||||
| G | A | I | H | ||||||
| D | A | C |
As well as the 3 rules above we can also insist that the squares along the two diagonals also contain one of each number. Here is a 6x6 example. There are some 9x9 diagonal puzzles on the examples page.
| 4 | 3 | ||||
| 1 | |||||
| 4 | 6 | ||||
| 2 |
When we started out generating the rectangular sub-cell versions we didn't distinguish between the two possible orientations of the rectangle, as it makes no real difference to the puzzle. It just reflects all the values in the diagonal. A composite puzzle would require the solver to fit the full set of numbers into both types of rectangle.
In the 6x6 example, for instance we might want to include the 6 rows, the 6 columns, the six rectangles in the left-hand grid, the six rectangles in the right-hand grid, and maybe the two diagonals as well.
|
|
|
|
For the 16x16 version we could superimpose the 2x8, the 4x4 and the 8x2 sub-cells. The current code doesn't generate these.
| Visits since June 2005: |