473,549 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stuck on a really hard sudoku!

jkmyoung
2,057 Recognized Expert Top Contributor
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 2858
JosAH
11,448 Recognized Expert MVP
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 Recognized Expert Top Contributor
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 Recognized Expert MVP
@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
28090
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 completely safe modes. Unsurprisingly, there is a very high failure rate among projects using C++ for modern game development.
59
4945
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 ASP.NET. At first glance, it looks excellent, albeit nothing that couldn't have been done to Classic ASP. I have been through a few tutorials and was...
131
6038
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 portable C code - *not only* because, in a 'C sense', I
56
2940
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 the experienced senior PHP developer should answered on it. I've already searched in google and google groups archive but without any good...
4
1777
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
8218
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 wants to remove the value, they can't anymore. They can't even leave the form! They are being forced to enter 0 or some other bogus value. The weird...
10
1627
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. In the class "Händelser" a random message apperas, if the players land on a couple of specific squares. A message is supposed to change the...
38
6346
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 muscle, right? :-) http://en.wikipedia.org/wiki/Sudoku Thus, the strategy is to test every legal "move" and to backtrack when stuck. A recursive...
62
12152
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 ones that my program cannot solve. However, most hard puzzles in the newspapers are solved within 2-3 cycles so far. The ones I've found on google...
0
7541
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7734
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7979
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7497
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7826
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5385
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1960
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1074
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
781
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.