

Binom Bijection - Storing k-Subsets Efficiently - volkergrabsch
http://www.profv.de/Binom_Bijection/

======
bumbledraven
It's odd that in listing the ways to store a choice of 40 numbers from the set
{1..100} the paper doesn't mentioning the traditional approach of using a
string of 100 bits. Bit _n_ is set to 1 if _n_ is in the subset, and 0
otherwise. This is damn close to the theoretical optimum of 94 bits, and way
simpler.

~~~
volkergrabsch
Thanks for the hint! I really forgot that one. I just added it to the
presentation. In addition, I adjusted the example to "30 of 100" as this
better reflects the average case. ("40 of 100" was too close to the
pathological corner case "50 of 100").

------
cperciva
The author has a rather narrow definition of "efficient". Yes, he uses close
to the minimum number of bits of storage... but his encoding scheme is
_horribly_ slow -- encoding takes O(k^2 log n) time, and decoding using the
presented algorithm takes O(k^2 n log n) time.

~~~
volkergrabsch
Yes, I meant just space efficiency. It might be handy if you have many subsets
(e.g. a solution space) you need to store in memory or on disk.

I'm still looking for a faster algorithm that reaches the optimal space
efficiency.

------
zaphar
I know this isn't a discussion of his subject matter but I love his
presentation format.

~~~
carbocation
I was thinking the exact same thing. This is a rare example of an appropriate
use of the PowerPoint medium.

~~~
volkergrabsch
More exactly, it's the "beamer" package of LaTeX, not PowerPoint.

