Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Powerset short-circuit optimization

by jimt (Chaplain)
on Oct 25, 2006 at 21:27 UTC ( #580656=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    For set A B C, you can enumerate the powerset in binary:
    ...
    0001   D
    0000
    
  2. or download this
    
    (for ABC)
    ...
    Have we seen C before? YES - return 2
    Have we seen D before? No? D == slot 3
    
  3. or download this
    
    By using a dead bit for A, we actually have this:
    ...
    0001   D
    0000
    
  4. or download this
    
    11111111111111111111111111  invalid
    ...
    00000000000000000000000010  invalid
    00000000000000000000000001  valid (z)
    
  5. or download this
    
    From up above, set (z)
    ...
    0001    D    (0001 & 0010 == 0)
    0000 ()        (0000 & 0010 == 0)
    
  6. or download this
    
    use strict;
    ...
    
    print "TOTAL CALLS $calls\n";
    
  7. or download this
    
    #!/usr/bin/perl
    ...
        @skippers{@future_skippers} = (1) x @future_skippers;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://580656]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-07-25 02:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls