Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > C++ program for solving any 9x9 sudoku.?

Reply
Thread Tools

C++ program for solving any 9x9 sudoku.?

 
 
flplini@i-image.com.tw
Guest
Posts: n/a
 
      10-23-2006
Nowhere in the web have i been able to find a perfect program
in c++. Does any computer buff know it out there?

 
Reply With Quote
 
 
 
 
Clark S. Cox III
Guest
Posts: n/a
 
      10-23-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Nowhere in the web have i been able to find a perfect program
> in c++. Does any computer buff know it out there?


Nope, but it shouldn't be that difficult to write, why don't you give it
a try.

--
Clark S. Cox III
(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Ron Natalie
Guest
Posts: n/a
 
      10-23-2006
(E-Mail Removed) wrote:
> Nowhere in the web have i been able to find a perfect program
> in c++. Does any computer buff know it out there?
>

If you have specific C++ questions ask here.
For SODUKO solving strategies that might be amenable
to coding, google for it...there are at least one or
two sites that I know of.
 
Reply With Quote
 
Martin Steen
Guest
Posts: n/a
 
      10-23-2006
(E-Mail Removed) wrote:
> Nowhere in the web have i been able to find a perfect program
> in c++. Does any computer buff know it out there?
>


I once wrote a program that can solve sudokus. But it's far from
being perfect, so I wouldn't give away the code

Maybe you find something on the www (google for "sudoku solver c++").
There are even sites that can solve sudokus online, but i suppose
they are written in JavaScript, so your computer has to do the work.
http://www.sudokusolver.co.uk

Best regards,
-Martin


 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      10-23-2006
Clark S. Cox III wrote:

> (E-Mail Removed) wrote:
> > Nowhere in the web have i been able to find a perfect program
> > in c++. Does any computer buff know it out there?

>
> Nope, but it shouldn't be that difficult to write, why don't you give
> it a try.


That depends. A brute force one is doable, but coding in a more elegant
way is tougher.

I've been working on one in C, and it's now about as smart as I am at
solving puzzles. At least it got stuck on the hardest test one I had at
the same place I did.

Its methods are pretty much like mine, the biggest difference has to do
with checking for multiples within a block, row, or column. I didn't
come with a smooth way of building those up, so I have an init routine
that builds up all the possible combinations for the nine numbers in
tuples of cardinality 2, 3, or 4. The program uses the resulting table
to do its check.

I have to work up some algorithms based on more elaborate elimination
schemes like X-wing and such. I haven't because I don't understand
those yet




Brian

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solving simple mathematical equation solving speed Lionel Java 14 06-23-2008 08:01 AM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Can any one help with solving this program it just doesnt take probability of the second team Arun Nair Python 3 10-26-2006 01:24 PM
Error Solving Keyvan Jamaleddin VHDL 1 07-07-2005 04:21 PM
Help in solving queries....... Patrick ASP .Net 5 01-27-2005 06:42 AM



Advertisments