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   

Canonicalization and redundance reduction

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

Joined: 24 Jun 2005
Posts: 2
:

Items
PostPosted: Fri Jun 24, 2005 9:32 am    Post subject: Canonicalization and redundance reduction Reply with quote

When generating puzzles, I suspect there might be an advantage in trying to parameterize the possible space of puzzles, at least to some degree.

One strategy of getting there (if at all possible; although NP completeness should not nescessarily prevent a neat enumeration of the space of possible puzzles), may be to find methods of canonicalization and reduction of the redundance, that is: Equivalent puzzles should have the same representation, and the representation should not contain more information than strictly required.

The fundamental observation is that the numbers 1-N are arbitrary, and that relabeling them will yield an equivalent puzzle. Thus, my first proposition is to assume that the first row (or column, or block; row is somewhat arbitrary) always consists of the numbers 1-N. If not, relabel the puzzle so that they do (this may easily be done by considering the first row as a translation lookup table indexed from 1-N).

Then the diagonals. There is no dependence between blocks which are positioned diagonally in relation to each other, and thus we have relational position information that is irrelevant to the structure of the puzzle. Is there some neat graph structure that will remove this redundance?

Finally: The soduko.com solver page works by entering the first five numbers in a puzzle. Is this sound? The first five numbers cannot possibly enumerate all valid puzzles? (If they do, there should be ample potential for reduction! Smile
Back to top
View user's profile Send private message
j0rg3n

Joined: 24 Jun 2005
Posts: 2
:

Items
PostPosted: Fri Jun 24, 2005 10:27 am    Post subject: An idea for the graph structure Reply with quote

The graph structure is a multigraph, same as suggested in the solution thread.

It consists of N nodes (9 in the standard case), and each row, column and block is represented as an acyclic subgraph, which must connect all the nodes (include all the numbers).

The rules for the edges, is that the first three nodes must be the same in the r1 and b11 paths, and the first three nodes in the c1 path must match the first, fourth and seventh nodes in the b11 path, and so forth for the other columns, blocks and rows (This connects them as in the regular grid.)

The image below displays a partial graph for the partial grid

Code:
123 456 789
456
789

2
3
5

6
8
9





An improvement would be a more compact representation of the rules, that is, which nodes must be the same in which paths. Could this be encapsulated in some sort of subgraph/clustering?
Back to top
View user's profile Send private message
Agent Allen

Joined: 01 Oct 2005
Posts: 34
:

Items
PostPosted: Sat Oct 01, 2005 3:47 pm    Post subject: sudoku.com only solves Pappacom puzzles Reply with quote

j0rg3n you said,
Quote:

Finally: The soduko.com solver page works by entering the first five numbers in a puzzle. Is this sound?

And you're right to be suprised Wink .
The page explicity mentions puzzles in 'your newspaper or magazine' and says it only works for genuine Confused 'pappacom' puzzles.
I think its just a database of pappacom puzzles in circulation.
Tiny bit pointless if you ask me given the ready availability of universal solvers.
There are officially bzillions of solutions and even 9^5 (59049) isn't going to come close. Given any single solution you can generate a class of 9! (362880) which means some of those must share their first 5 cells and be equally soluable under the same puzzle mask.
_________________
Agent A
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Setting 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