Hacker News new | past | comments | ask | show | jobs | submit login

Note the minimum number of bits is ceil(n*log2(n)). This seems to achieve nlog2(n)+O(n).



Technically, the lower bound is log2(n!), which is slightly less than n * log2(n).

According to the table of experimental results, the algorithm described in this paper and two of its competitors can all do better than n * log2(n) bits.


Ah yes log2(n!) is O(n.log2(n)) bits, not actually n.log2(n) bits. From Stirling's approximation* it seems it's more like n.log2(n)-n+O(log2(n)) bits.

https://en.wikipedia.org/wiki/Stirling%27s_approximation




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: