Bloom Filter

A Bloom filter tests whether an element belongs to a set. The note calls it a probabilistic structure, suited to fast checks and low memory use. A "no" answer is certain. A "yes" answer can be wrong. Several hash functions map one element onto several bits. The basic version cannot delete an item exactly.

The applications listed here are membership checks in other systems. They include caching, spam detection, search engines, distributed databases, packet routing, and DNS query filtering. The same list adds duplicate detection, content filtering, some cryptographic uses, and password breach detection.

Overview

A Bloom filter is a probabilistic data structure that tests whether an element belongs to a set. It is especially useful in applications that need fast checks and low memory usage.

Characteristics

  1. No false negatives: if the Bloom filter says an element is not in the set, it is definitely not there
  2. False positives are possible: if the Bloom filter says an element is in the set, it might be wrong
  3. Uses multiple hash functions to map one element to several bits
  4. Does not support exact deletion (in the basic version)

Common Applications

  1. Caching
  2. Spam detection systems
  3. Search engines and distributed databases
  4. Packet routing in networks
  5. DNS query filtering
  6. Duplicate detection and removal
  7. Approximate membership queries
  8. Content filtering in anti-abuse systems
  9. Some applications in cryptography
  10. Password breach detection

See also: Data Structures Overview · Big O Notation