Bloom Filters
It turns out that even though a classic bit vector can’t store strings compactly, a similar data structure called a Bloom filter can. The Bloom filter, named after its inventor, Burton Bloom, has been put to widespread use in all sorts of applications ever since the 1970s.
A Bloom filter is a space-efficient data structure used for storing a set. It’s a variation of the bit vector, but can be used to store all sorts of data, not only a small range of integers. To make this work, Bloom filters make use of Monte Carlo principles, as you’ll soon see.
To make it a tad easier to understand how Bloom filters work, I’m going to first introduce a similar but simpler data structure, which I call the Gloom filter. Please don’t ever use ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access