2 ms·
(man, I'd love to go work on this for three years, without worrying about a "customer" or "backwards compatability") > That is, if you have N distinct values,
by gopalv 9y ago
(man, I'd love to go work on this for three years, without worrying about a "customer" or "backwards compatability")
> That is, if you have N distinct values, you can store them using ceil(log(N)/log(2)) bits
Ideally you don't need to do ceil, if you had an low number like 5 items, then it looks like you need 3 bits to store it, but you can store it in 2.4 bits (just pack 10 values into 24 bits instead of 30).
Getting distinct and repeated values by tearing apart data so that you can use these algorithms is something which I could use some papers to refer to.
For instance, here's[1] what we're trying to do with Double encoding loops, but it still suffers from the problems of a car moving from 0.3 -> 0.2 location.
[1] - http://bit.ly/2zt70iL http://bit.ly/2zt70iL