New answers tagged

2

Assume you have a good hash function producing an n bit hash code, that is $2^n$ possible values. Assume you are hashing k values, so there are about $k^2/2$ pairs of hash codes that might collide. The probability of a collision is about $k^2 / 2^{n+1}$. By picking a large n, you can make that probability arbitrarily small. Ask a physicist to calculate the ...


1

The first method is the standard one that I've seen. I'm not clear on what the purpose of the second method would be, or even exactly how it works. It's not something I've seen before. I'd suggest you use the first method by default, and if you encounter a situation where it is insufficient or has some problems, post a question asking about the specific ...


Top 50 recent answers are included