The bottom layer is called a bit vector or a binary bit array, the data bit stored in the non-0 or 1.
By hash function element is mapped onto the corresponding bit position, and this position is set to 1. The hash (element) = 2:
When you want to query whether there is an element, the first element by a hash function mapping obtained bit position, and then determines the position of this bit is 0 or 1, if it is 0, then this element certainly does not exist, if it is 1, then the elements do not really exist (do you remember Daming Lake, the classic line: hash值相等,不一定是同一个对象;同一个对象,hash值一定相等).
III. Disadvantage Bloom filter
真假难辨
Indeed shortcomings
Explanation
solve
Miscarriage of justice
Get an element in the bit position, when the judge found that this position is 1, but in fact this element does not exist
Separate storage element may be a miscarriage of justice
Delete wrong
Two or more elements mapped to the same bit position, you want to delete a time, the 1 to 0, leading to other elements also finished