3 ms·
Their prose description of a bloom filter firstly has a significant flaw, and secondly falls victim to what I believe is a fallacy in many discussions about blo
by natch 6y ago
Their prose description of a bloom filter firstly has a significant flaw, and secondly falls victim to what I believe is a fallacy in many discussions about bloom filters.
The flaw is that they do not specify that the size of the bit array should be a prime number. This omission alone is astounding. To be fair, they state that they assume the bits from the hash functions are randomly distributed over the bit vector, so with this assumption they skate past this issue even though they have apparently missed that crucial detail of part of how it is accomplished. One wonders if they were unaware.
The fallacy imho, but this is where I depart from the community, thus imho, so take me with a grain of salt if you wish, is that you don’t need multiple independent hash functions. You just need multiple inputs. For example instead of hashing the word “salad” three times, just hash the tokens salad1, salad2, and salad3. If your hash function is worth its salt (npi) then you will be just fine.
- gopiandcode 6y agoThis is a good point about practical implementations of hashing based randomization - incorrect table sizes can invalidate assumptions about uniformity and cause guarantees to fail. However, this work was primarily about the theoretical analysis of these data structures, which presupposes that we already have a means of generating uniformly randomly distributed bits over the table space, hence the lack of discussion about table sizes.