Surprising sudoku

> 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 by Dirk Eddelbuettel.)

Update: It took silly me a while to spot the single wrong entry! Here is the exact solution provided by sudoku:

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

3 Responses to “Surprising sudoku”

  1. Thanks for referring to my prior sudoku post, but please cite it correctly as http://dirk.eddelbuettel.com/blog/2010/02/25#sudoko_solvers

    Thanks, Dirk

  2. This is usually a sign that there is a mistake elsewhere on the grid, that is if it is a well formed sudoku. Every time this has happened to me I found a mistake, which doesn’t mean it can’t happen but it is probably more likely since sudoku is usually advertised as having a single solution…

    • I agree that this should be the sign of a mistake but in the current case the four remaining entries were in (7,6), (7,8), (9,6) and (9,8) and accepted both solutions! Ooops…I just found the two one’s in the same column, my mistake!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 671 other followers