in reply to Code for Constraint Satisfaction Problems

implies that the largest possible acceptable set has 32 members.

Update: Ignore or downvote


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re^2: Code for Constraint Satisfaction Problems
by salva (Canon) on Jan 17, 2010 at 16:12 UTC
    The following set contains 128 12-bit integers where w( x ^ y ) >= 5
    31 32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512 544 576 608 640...

    check your program, w(32 ^ 64) is 2 < 5

      Grrr. You're right! There is a big difference between:

      my $n = unpack '%32b*', ( $set[ $x ] ^ $set[ $y ] );

      and

      my $n = unpack '%32b*', pack 'N`', ( $set[ $x ] ^ $set[ $y ] ) +;

      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.