Xilman has asked for the wisdom of the Perl Monks concerning the following question:
I have a fairly typical constraint satisfaction problem (CSP) and I expected to be able to find a Perl module to help me solve it. No such luck --- either it doesn't exist or I haven't yet found the correct set of search terms.
Here is the problem:
For concreteness, let B=12, W=5 and S=20. This is an acceptable set:Find a set of B-bit integers such that: the size of the set is at least S AND for every pair (x, y) where y!=x, of set elements, w(x^y) >= W. Here, w(x) is defined as the number of non-zero bits in x.
because it has 21 values and 21 >= S.{0xF7D, 0x473, 0x585, 0x3EB, 0x22E, 0xADA, 0xDE0, 0x906, 0x1FC, 0x310, 0x6D4, 0x01D, 0xF43, 0xA21, 0xFB6, 0x93B, 0xE8F, 0x448, 0x8E7, 0x6B9, 0x59A}
http://www.win.tue.nl/~aeb/codes/binary-1.html implies that the largest possible acceptable set has 32 members.
A simple-minded approach of choosing random integers in the range 0 ... 0xfff and testing for consistency with previously chosen integers has found sets with 24 members.
Question: can anyone point me to a module / script which can find significantly larger acceptable sets in a reasonable amount of computation. Brute force searching of a (2<<12)<<32 sized space is not reasonable!
Paul
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Code for Constraint Satisfaction Problems
by blokhead (Monsignor) on Jan 16, 2010 at 17:42 UTC | |
Re: Code for Constraint Satisfaction Problems
by jdporter (Paladin) on Jan 17, 2010 at 03:44 UTC | |
Re: Code for Constraint Satisfaction Problems
by andreas1234567 (Vicar) on Jan 16, 2010 at 22:59 UTC | |
Re: Code for Constraint Satisfaction Problems
by BrowserUk (Patriarch) on Jan 17, 2010 at 15:40 UTC | |
by salva (Canon) on Jan 17, 2010 at 16:12 UTC | |
by BrowserUk (Patriarch) on Jan 17, 2010 at 17:16 UTC | |
Re: Code for Constraint Satisfaction Problems
by BrowserUk (Patriarch) on Jan 18, 2010 at 22:42 UTC | |
by salva (Canon) on Jan 19, 2010 at 14:32 UTC |