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
In reply to Code for Constraint Satisfaction Problems by Xilman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |