D-left counting bloom filter (2)

Source: Internet
Author: User

I have already introduced D-left hashing in the previous article. I will not talk about it more here. As mentioned above, D-left hashing is used to solve the Load Balancing Problem of hash tables. To understand how D-left hashing solves this problem, let's first look at the absence of D-left hashing. The same hash value is used as the address at the high position as the fingerprint, which means that the same address corresponds to multiple fingerprints. One address corresponds to one bucket, so one bucket needs to store multiple fingerprints. The hash value distribution of a single hash function is uneven, and the load of each bucket is not balanced. If the number of fingerprint files that each bucket can store is fixed, you must allocate the bucket capacity according to the worst case to avoid overflow, which leads to a great waste.

 

After D-left hashing is used, the distribution of fingerprint is relatively balanced, which greatly reduces the waste of space. It turns out that even if a large hash table is allocated, it is difficult to reduce the bucket capacity due to the worst case allocation, and a large amount of space in the hash table is idle. The use of D-left hashing can make the stored information evenly and more compact, so that the same amount of information can be stored in a smaller space. In perfect hashing. as mentioned in the bloom filter article, the D-left counting bloom filter can save at least twice as much space as the counting bloom filter because the load of the counting bloom filter is not balanced, A lot of space is wasted.

 

From another perspective, D-left hashing is actually a perfect hash function. If the original load is not balanced, the collision is very serious. After D-left hashing is used, the collision is greatly reduced. Of course, it cannot completely eliminate collision, so it just simulates the perfect hash function in a way with a low overhead, which can be called almost-perfect hash function.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.