问题
I don't really understand why a bloom filter requires multiple hash functions (say, SHA and MD5).
Why not just make a bigger SHA hash, for example, and then break it up into multiple parts and treat them as separate hashes? Isn't that more efficient in terms of speed?
回答1:
The idea is to use several different but simple hash functions. If you're going to use some cryptographic hash function like SHA or MD5 then you could just vary the input to it. Whether it's more efficient depends how complex your hash functions are.
回答2:
It's called triple/double hashing, it minimizes the chance of collisions, probability of collision occurring with 5 hash functions, is 5 times smaller than with one hash function.
来源:https://stackoverflow.com/questions/6606642/why-does-a-bloom-filter-need-multiple-hash-functions