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

Re^5: Algorithm to convert combinations to bitstring (size)

by tye (Sage)
on Oct 18, 2006 at 18:50 UTC ( [id://579174]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Algorithm to convert combinations to bitstring (size)
in thread Algorithm to convert combinations to bitstring

That was my alternative (in an update) if K is small (or near N). That uses log2( N**K ) bits.

But what I described above is using base 2. It uses only N bits no matter how large (or small) K is, and the translation doesn't depend on K either. It can describe any subset of your superset, not just subsets of size K.

- tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-19 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found