Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

> printSudoku(z)
+-------+-------+-------+
|   9   |       | 7   5 |
|     6 |       |   9   |
| 4 5 3 | 1 7   | 2 8   |
+-------+-------+-------+
|     5 |     7 |   6   |
| 1   9 | 6 8   |       |
|   8   |   3   |     1 |
+-------+-------+-------+
| 7   2 | 5 9   | 4     |
|       |     2 | 6 7   |
|       |   6   |     2 |
+-------+-------+-------+


Yesterday, I was finishing a sudoku grid in the metro and I ended up with four entries a,b,b,a that could be entered in two symmetric ways! Nothing mathematically surprising. However, this never happened to me before and, while it is obviously a possibility, I had not realised that sudoku creators could choose this option… This is not a well-defined question, but how likely is it that one ends up with such an exchange quadruplet (or rather pair of pairs)?! (The above was written using the sudoku R solver, pointed out there.)

Filed under: R, Statistics Tagged: R, sudoku