Connecting Tech Pros Worldwide Forums | Help | Site Map

Stuck on a really hard sudoku!

Moderator
 
Join Date: Mar 2006
Posts: 1,103
#1: Jan 16 '09
Hey, are there any sudoku experts out there? Can anyone tell me the next step in solving this sudoku and explain it properly? I've used all the rules I can think of but am now stuck.
Expand|Select|Wrap|Line Numbers
  1. 51--263--
  2. 7264-35-8
  3. 93-5-76--
  4. 395278461
  5. 86--54--9
  6. 47--698-5
  7. -59-41-83
  8. -43--2-5-
  9. -87-35-4-
  10.  

JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: Jan 16 '09

re: Stuck on a really hard sudoku!


A stupid brute force solver solves this one in 0ms.

Expand|Select|Wrap|Line Numbers
  1. +-------+-------+-------+
  2. | 5 1 4 | 8 2 6 | 3 9 7 | 
  3. | 7 2 6 | 4 9 3 | 5 1 8 | 
  4. | 9 3 8 | 5 1 7 | 6 2 4 | 
  5. +-------+-------+-------+
  6. | 3 9 5 | 2 7 8 | 4 6 1 | 
  7. | 8 6 1 | 3 5 4 | 2 7 9 | 
  8. | 4 7 2 | 1 6 9 | 8 3 5 | 
  9. +-------+-------+-------+
  10. | 2 5 9 | 6 4 1 | 7 8 3 | 
  11. | 1 4 3 | 7 8 2 | 9 5 6 | 
  12. | 6 8 7 | 9 3 5 | 1 4 2 | 
  13. +-------+-------+-------+
  14.  
kind regards,

Jos
Moderator
 
Join Date: Mar 2006
Posts: 1,103
#3: Jan 16 '09

re: Stuck on a really hard sudoku!


Thanks to your help I've found that there are at least 2 other solutions.
Expand|Select|Wrap|Line Numbers
  1. +-------+-------+-------+ 
  2. | 5 1 8 | 9 2 6 | 3 7 4 | 
  3. | 7 2 6 | 4 1 3 | 5 9 8 | 
  4. | 9 3 4 | 5 8 7 | 6 1 2 | 
  5. +-------+-------+-------+ 
  6. | 3 9 5 | 2 7 8 | 4 6 1 | 
  7. | 8 6 - | - 5 4 | 7 - 9 | 
  8. | 4 7 - | - 6 9 | 8 - 5 | 
  9. +-------+-------+-------+ 
  10. | 6 5 9 | 7 4 1 | 2 8 3 | 
  11. | 1 4 3 | 8 9 2 | 1 5 7 | 
  12. | 2 8 7 | 6 3 5 | 9 4 6 | 
  13. +-------+-------+-------+
  14.  
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#4: Jan 17 '09

re: Stuck on a really hard sudoku!


Quote:

Originally Posted by jkmyoung View Post

Thanks to your help I've found that there are at least 2 other solutions.

Yup, and that's exactly why trying to compute a solution fails: sometimes you can not compute a single value for a cell, only two or more values are possible. e.g. see an empty sudoku board. A (more or less) brute force approach simply tries a possiblity and when it fails it tries another possibility.

Let's continue this discussion in the original thread in the algorithms section.

kind regards,

Jos
Reply

Tags
algorithm, expert, solve, sudoku