|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^5: Algorithm to convert combinations to bitstring (size)by tye (Sage) |
| on Oct 18, 2006 at 14:50 UTC ( [id://579174]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
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
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||