473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Stuck on a really hard sudoku!

jkmyoung
2,057 Expert 2GB
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.  
Jan 16 '09 #1
3 2850
JosAH
11,448 Expert 8TB
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
Jan 16 '09 #2
jkmyoung
2,057 Expert 2GB
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.  
Jan 16 '09 #3
JosAH
11,448 Expert 8TB
@jkmyoung
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
Jan 17 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

761
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer...
59
by: Alan Silver | last post by:
Hello, This is NOT a troll, it's a genuine question. Please read right through to see why. I have been using Vusual Basic and Classic ASP for some years, and have now started looking at...
131
by: pemo | last post by:
Is C really portable? And, apologies, but this is possibly a little OT? In c.l.c we often see 'not portable' comments, but I wonder just how portable C apps really are. I don't write...
56
by: tasteless | last post by:
Hi guys, I need really hard questions (about 10) about PHP programming (some of elements OOP as well, but no MySQL questions - this is different part), this questions needs to be very hard, but...
4
by: hashimtk | last post by:
Hi, i done a sudoku solving program ,and i got solution for easy sudoku, Can u explain any logic to find out medium and hard sudoku.
8
by: jehugaleahsa | last post by:
Hello: When we have a text box that is bound to an int?, the text box will not allow the user to leave the control until it has a valid integer in it. This is actually very bad. If the user...
10
by: doubleac | last post by:
Hi This is the first time for me asking for help in forums on the net. I hope ill make myself understood. And sorry for my bad english. I have 4 classes: Spelare, Händelser, SpelPlan and Start....
38
by: Boon | last post by:
Hello group, I've been toying with a simple sudoku solver. I meant for the code to be short and easy to understand. I figured "brute force is simple" -- who needs finesse, when you've got...
62
jkmyoung
by: jkmyoung | last post by:
Does anyone have some super, super hard Sudoku puzzles? Back in February this year, I had enough time to finally program a Sudoku solver in Java. Right now, I'm looking for solvable puzzles, but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.