Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

Sudoku diagonal???

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku
View previous topic :: View next topic  
Author Message
Armageddon

Joined: 16 Mar 2006
Posts: 2
:

Items
PostPosted: Thu Mar 16, 2006 6:34 pm    Post subject: Sudoku diagonal??? Reply with quote

hi, i have a problem...
this sudoku must be solved with the numbers in the diagonal 1-9,too.
i tried it many times but cant find a solution...

plz help
Back to top
View user's profile Send private message
Ruud
Site Admin
Joined: 17 Sep 2005
Posts: 708
:
Location: Netherlands

Items
PostPosted: Thu Mar 16, 2006 7:38 pm    Post subject: Reply with quote

Hi,

how far did you get?

When you are stuck in a sudoku, it is a good idea to ask other people to help you, but we can help you better if we know where you are stuck.

I will tell you how to solve this puzzle completely, but do not scroll down and read the last chapter!

The first 2 digits can be placed without any trouble:

Code:
.------------------------.------------------------.------------------------.
| 1567    156789  2      | 18      18      3      | 4       1678    16     |
| 167     1678    3      | 4       2       9      | 5       1678    16     |
| 4       18      18     | 5       7       6      | 23      1238    9      |
:------------------------+------------------------+------------------------:
| 9       124567  1457   | 1367    1456    2457   | 2367    123567  8      |
| 12567   1245678 14578  | 13678   145689  2457   | 23679   1235679 12356  |
| 3       125678  1578   | 1678    15689   257    | 2679    125679  4      |
:------------------------+------------------------+------------------------:
| 8       45      45     | 2       3       1      | 69      4569    7      |
| 257     23457   6      | 9       45      8      | 1       2345    235    |
| 1257    123457  9      | 67      456     457    | 8       23456   2356   |
'------------------------'------------------------'------------------------'

Please note the pair of {1,8} in row 1, confined to 2 cells, and a similar pair in row 3. There is also a pair {4,5} in row 7. These lead to the following eliminations and placements:

Code:
.------------------------.------------------------.------------------------.
| 5       9       2      | 18      18      3      | 4       7       6      |
| 67      67      3      | 4       2       9      | 5       8       1      |
| 4       18      18     | 5       7       6      | 23      23      9      |
:------------------------+------------------------+------------------------:
| 9       124567  1457   | 1367    1456    2457   | 2367    12356   8      |
| 1267    1245678 14578  | 13678   145689  2457   | 23679   123569  235    |
| 3       125678  1578   | 1678    15689   257    | 2679    12569   4      |
:------------------------+------------------------+------------------------:
| 8       45      45     | 2       3       1      | 69      69      7      |
| 27      237     6      | 9       45      8      | 1       2345    235    |
| 127     1237    9      | 67      456     457    | 8       2345    235    |
'------------------------'------------------------'------------------------'


At this point, we need to use the diagonals. Eliminate all candidates in the diagonal cells that are already present in those diagonals.

This leads us here:

Code:
.------------------------.------------------------.------------------------.
| 5       9       2      | 18      18      3      | 4       7       6      |
| 67      67      3      | 4       2       9      | 5       8       1      |
| 4       18      18     | 5       7       6      | 23      23      9      |
:------------------------+------------------------+------------------------:
| 9       124567  1457   | 1367    1456    2457   | 2367    12356   8      |
| 1267    1245678 14578  | 13678   149     2457   | 23679   123569  235    |
| 3       125678  1578   | 17      15689   27     | 2679    12569   4      |
:------------------------+------------------------+------------------------:
| 8       45      45     | 2       3       1      | 69      69      7      |
| 27      237     6      | 9       45      8      | 1       234     235    |
| 127     1237    9      | 67      456     457    | 8       2345    23     |
'------------------------'------------------------'------------------------'


Now there is only a single candidate for digit 8 in the diagonal that runs from top-left to right-bottom. Because it is one of a pair, the other cell in that pair can also be placed:

Code:
.---------------------.---------------------.---------------------.
| 5      9      2     | 18     18     3     | 4      7      6     |
| 67     67     3     | 4      2      9     | 5      8      1     |
| 4      1      8     | 5      7      6     | 23     23     9     |
:---------------------+---------------------+---------------------:
| 9      24567  1457  | 1367   1456   2457  | 2367   12356  8     |
| 1267   245678 1457  | 13678  149    2457  | 23679  123569 235   |
| 3      25678  157   | 17     15689  27    | 2679   12569  4     |
:---------------------+---------------------+---------------------:
| 8      45     45    | 2      3      1     | 69     69     7     |
| 27     237    6     | 9      45     8     | 1      234    235   |
| 127    237    9     | 67     456    457   | 8      2345   23    |
'---------------------'---------------------'---------------------'


Box 7 has a single candidate for 1 in r9c1.
Eliminate 1 from the remainder of that diagonal to reveal a naked 7.
This forces a 2 in r6c6. Clear the diagonal of 2 to reveal a naked 3 in r9c9.

From then on, the puzzle can be solved a long way with singles only, upto this point:

Code:
.---------------.---------------.---------------.
| 5    9    2   | 18   18   3   | 4    7    6   |
| 6    7    3   | 4    2    9   | 5    8    1   |
| 4    1    8   | 5    7    6   | 23   23   9   |
:---------------+---------------+---------------:
| 9    46   147 | 13   16   5   | 2367 1236 8   |
| 2    68   17  | 138  19   4   | 3679 1369 5   |
| 3    568  15  | 7    1689 2   | 69   169  4   |
:---------------+---------------+---------------:
| 8    45   45  | 2    3    1   | 69   69   7   |
| 7    3    6   | 9    5    8   | 1    4    2   |
| 1    2    9   | 6    4    7   | 8    5    3   |
'---------------'---------------'---------------'


A 3 in r4c4 can be eliminated due to the diagonal, leaving a single 1.
A few rounds of singles brings you to the final decision:

Code:
.---------.---------.---------.
| 5  9  2 | 8  1  3 | 4  7  6 |
| 6  7  3 | 4  2  9 | 5  8  1 |
| 4  1  8 | 5  7  6 | 23 23 9 |
:---------+---------+---------:
| 9  4  7 | 1  6  5 | 23 23 8 |
| 2  8  1 | 3  9  4 | 7  6  5 |
| 3  6  5 | 7  8  2 | 9  1  4 |
:---------+---------+---------:
| 8  5  4 | 2  3  1 | 6  9  7 |
| 7  3  6 | 9  5  8 | 1  4  2 |
| 1  2  9 | 6  4  7 | 8  5  3 |
'---------'---------'---------'


Now check the diagonal to see what goes where.

Ruud.
_________________
Meet me at sudocue.net
Back to top
View user's profile Send private message Visit poster's website
elroy

Joined: 16 Mar 2006
Posts: 6
:

Items
PostPosted: Thu Mar 16, 2006 7:52 pm    Post subject: Reply with quote

Not sure I understand -- If its a valid Sudoku (with but one unique solution) the diagonals would fall in automatically without regarding them, so are the diagonals an additonal clue to HELP solve it? -- otherwise, accepting them as an additional rule simply seems to complicate the normal logical Soduko processes unnecessarily..

But I'm no expert
elroy

[edit] Looks like this was premature - Raud came in (above) at same time I was submitting.


Last edited by elroy on Thu Mar 16, 2006 7:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
Armageddon

Joined: 16 Mar 2006
Posts: 2
:

Items
PostPosted: Thu Mar 16, 2006 7:59 pm    Post subject: Reply with quote

wow thx...
i've found my faults...but i wasn't wrong at all i had just one logical mistake..
thank you
Quote:
Not sure I understand -- If its a valid Sudoku (with but one unique solution) the diagonals would fall in automatically without regarding them, so are the diagonals an additonal clue to HELP solve it? -- otherwise, accepting them as an additional rule simply seems to complicate the normal logical Soduko processes unnecessarily..

i thought so, too
Back to top
View user's profile Send private message
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Thu Mar 16, 2006 8:30 pm    Post subject: Reply with quote

elroy wrote:
Not sure I understand -- If its a valid Sudoku (with but one unique solution) the diagonals would fall in automatically without regarding them, so are the diagonals an additonal clue to HELP solve it? -- otherwise, accepting them as an additional rule simply seems to complicate the normal logical Soduko processes unnecessarily..


Yes, and it's called an X-sudoku. Christoher Monckton has published a book of them. The additional constraint is not necessarily a help in finding a solution. It is usually used to reduce the number of givens and hence to increase the difficulty of finding the solution. I have generated some that have only 15 givens (note that rows 2 and 6 and column 3 are empty):

Code:

  8                       
                           
                 6  4     9
  4                 8  1   
           3     5         
                           
                       3  7
     6           9  5     
              4           


Regards,

Mike Metcalf
Back to top
View user's profile Send private message
Guepardo

Joined: 14 Jan 2007
Posts: 5
:

Items
PostPosted: Mon Jan 15, 2007 2:48 pm    Post subject: Reply with quote

Yeah! It's very clear now, good explication!
Back to top
View user's profile Send private message Send e-mail
Nathan

Joined: 22 Jan 2008
Posts: 6
:

Items
PostPosted: Tue Jan 22, 2008 10:42 am    Post subject: Reply with quote

huh?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Solving sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron