Sudoku Solver
I am writing a program to solve Sudoku Puzzles.
This thread will contatin my progress throughout the project and hold any questions and replies.
Doogledude123 45 Posting Whiz
Recommended Answers
Jump to PostJust because Soduku is displayed in a 2D grid that doesn't mean you have to store it internally like that. And there are very good reasons why you shoudn't.
You have 81 cells. You want to look at groups of cells like {1,2,3,4,5,6,7,8,9} - a "horizontal row", or {1,10,19...} - …
Jump to PostallRCBs lists the cells that are part of each row/col/block. The members of the arrays are cell numbers.
The cells array holds the actual numbers 1-9 (or "empty").To understand why, just compare the incomplete code in your part 2 with the code in my last post. All I need …
Jump to PostHi Hiroshe
I think you may be over-elaborating this. Discussion of execution scaling would be appropriate to a project of "arbitrary sized games like sudoku", but I don't think that's what DoogleDude had in mind.
The game of Sudoku has a board of exactly 81 cells, which are considered in …
Jump to PostI wonder if I didn't explain my original proposal very well because it imposes zero overhead on changing cell values. At the risk of boring everybody (stop reading here if you like!) I'll go through it with greater care:
The game requires us to store 81 numbers, grouped in 27 …
Jump to PostYes. I assume you are thinking of variable-sized boards as having more blocks of the same size? If so, checking the rows/cols may be O(sqrt(n)), but checking the 3x3 is O(1). But anyway, I was only thinking of the standard game.
I did think that for re-checking after adding/changing a …
All 19 Replies
Doogledude123 45 Posting Whiz
Doogledude123 45 Posting Whiz
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
peter_budo commented: Well put +15
Doogledude123 45 Posting Whiz
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Hiroshe 499 Posting Whiz in Training
Hiroshe 499 Posting Whiz in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Hiroshe 499 Posting Whiz in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Hiroshe 499 Posting Whiz in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Doogledude123 45 Posting Whiz
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Doogledude123 45 Posting Whiz
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Doogledude123 45 Posting Whiz
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.