Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 scrutinizing the Monastery: (5)
As of 2015-07-05 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls