← The collection

Bloom Filter.

Insert words into a tiny bit filter and hunt for a false positive.

Interactive experimentintuitiveField note ·
INTERACTIVE EXPERIMENT / P20

Bloom Filter

Insert words into a tiny bit filter and hunt for a false positive.

PLAY & EXPLAIN

A tiny Bloom filter stores 24 bits and sets two deterministic hash positions for each word. Positive matches can be false; unset bits prove absence under this insertion-only implementation.

0: 01: 02: 03: 04: 05: 06: 07: 08: 09: 010: 011: 012: 013: 014: 015: 016: 017: 018: 019: 020: 021: 022: 023: 0

No query yet.

The exact ledger is retained solely to reveal errors. Real compact filters do not store it. These simple hashes are pedagogical, not cryptographic, independent-uniform or suitable for hostile input.

Simple deterministic hashes are not independent-uniform or cryptographic. Deletion, concurrency and hostile input are omitted; this is not a production security or privacy mechanism.

THE SHORT VERSION

Bloom Filter, explained.

A Bloom filter is an approximate membership structure that sets hashed bits on insertion and can return false positives while retaining no false negatives under its stated insertion-only rules.

01 / THE MECHANISM

Why it happens

Each word sets two of twenty-four bits. A query with either bit unset is absent; both set means possibly present. A separate exact teaching ledger exposes false positives without pretending the filter stores it.

A Bloom filter is an approximate membership structure that sets hashed bits on insertion and can return false positives while retaining no false negatives under its stated insertion-only rules.

Read the result

Read a positive result as possibly present, then compare with the exact teaching ledger. An unset query bit can rule out insertion under this implementation.

02 / FOLLOW IT THROUGH

A worked example

Find a positive result for a word never inserted

  1. Insert apple so its two hash positions become set in the twenty-four-bit filter.

  2. Use the false-positive search to locate an uninserted candidate whose two positions are already set.

  3. Query that candidate and compare possibly-present output with the separate exact insertion ledger.

OPTIONAL DEEPER DETAILGo deeper: inside the model

Inside this model

Each word sets two of twenty-four bits. A query with either bit unset is absent; both set means possibly present. A separate exact teaching ledger exposes false positives without pretending the filter stores it.

03 / BEYOND THE EXPERIMENT

Where this idea is useful

A practical use

Use an approximate precheck to avoid unnecessary expensive lookups while retaining a definitive follow-up when needed.

CHECK YOUR INTUITION

A common misconception

THE TEMPTING CONCLUSION

“A positive Bloom-filter answer proves membership.”

THE MORE USEFUL DISTINCTION

Different words can share set bits, so positives require a definitive follow-up when correctness matters. Unset bits establish absence in this insertion-only model.

What this explanation leaves out

  • Simple deterministic hashes are not independent-uniform or cryptographic. Deletion, concurrency and hostile input are omitted; this is not a production security or privacy mechanism.
ONE MORE QUESTION

Does the filter itself remember the exact words?

No. The exact list is retained only for explanation in this activity; it would defeat the compact-filter purpose if treated as part of the filter.

TAKE THE IDEA WITH YOU

Which operation can tolerate an approximate precheck followed by exact verification?

Associated thinkers

Associated withBurton Bloom ↗

Associations marked provisional are awaiting source review.

Further reading

Explore the original research or the teaching reference behind this experiment.