Default User
2006-05-10 21:09:05 UTC
I'm working on a Sudoku solver (everybody else is doing it, I just want
to be popular). If you aren't familiar with the game, be warned that
I'm assuming some familiarity. Also, I know there are web forums
dealing specifically with this topic, but I don't like web forums that
much and I don't want to go around joining stuff.
Right now I'm looking at eliminating possibles by identifying multiples
of some cardinality in a block, row, or column. For ease of display,
I'll use columns.
Let's assume a cardinality of three (triples). Some are easy to
identify, like:
149
14
49
Here, all you have to do is find one tuple that has a number of
elements that matches the cardinality you're looking for, then check
all other possibles that have the same number of elements or fewer to
see if those possibles are a subset of the first.
The tricky one is something like:
19
14
49
That still forms a 149 triple, but how to identify it? A real brute
force method is to form every possible n-tuple for the available
possibles, but that's not elegant and would be rather wasteful.
Any ideas? I googled a bit and didn't find a good answer to my
question, but if someone has a web site that discusses this question,
that would be helpful.
Brian
to be popular). If you aren't familiar with the game, be warned that
I'm assuming some familiarity. Also, I know there are web forums
dealing specifically with this topic, but I don't like web forums that
much and I don't want to go around joining stuff.
Right now I'm looking at eliminating possibles by identifying multiples
of some cardinality in a block, row, or column. For ease of display,
I'll use columns.
Let's assume a cardinality of three (triples). Some are easy to
identify, like:
149
14
49
Here, all you have to do is find one tuple that has a number of
elements that matches the cardinality you're looking for, then check
all other possibles that have the same number of elements or fewer to
see if those possibles are a subset of the first.
The tricky one is something like:
19
14
49
That still forms a 149 triple, but how to identify it? A real brute
force method is to form every possible n-tuple for the available
possibles, but that's not elegant and would be rather wasteful.
Any ideas? I googled a bit and didn't find a good answer to my
question, but if someone has a web site that discusses this question,
that would be helpful.
Brian
--
If televison's a babysitter, the Internet is a drunk librarian who
won't shut up.
-- Dorothy Gambrell (http://catandgirl.com)
If televison's a babysitter, the Internet is a drunk librarian who
won't shut up.
-- Dorothy Gambrell (http://catandgirl.com)