Ryan Davis wrote in post #1061877:
> Also... smells like homework.
>
> But if not, it reminds me of this article:
>
>
http://highscalability.com/blog/2012/4/5/big-data-counting-how-to-count-a-billion-distinct-objects-us.html

Hi,

Whether it is a homework or not, it is a very realistic problem that we
may encounter in our daily programming.

The article is about using probabilistic algorithms with some level of
error.  I think we all assumed that the original poster wants an error
of zero.  (If the problem could not be solved using several gigabytes of
RAM, or if the computation time took too long, then probabilistic
algorithms ought to be considered.)

Regards,

Bill

-- 
Posted via http://www.ruby-forum.com/.