A huge service can waste time searching a database for things that were never stored.
| PLAIN/TEXT |
TRANSMISSION: DAILY ● |
|
| ISSUE 47/456 · COMPUTER SCIENCE |
~4 MIN |
FOUNDATION / DATA STRUCTURES · READING DATE 2026-11-17 · NOVEMBER 2026 — THE SYSTEMS AROUND YOU
The tiny list that can say maybe, but knows no
START HERE
A service may need to check whether it has seen a web address before. A Bloom filter is a small stored pattern used to check whether an item is definitely absent or possibly present. It saves space by allowing some false alarms instead of storing every original item.
|
/ WHY NOW
A huge service can waste time searching a database for things that were never stored. A cheap preliminary check can rule out many of those searches without needing a second complete copy of the data.
|
/ THE IDEA
The filter contains numbered switches, initially all zero. Several hash rules turn an item into switch positions. Adding the item sets those positions to one. Checking repeats the same rules: a zero means the item could not have been added. All ones means only maybe. Other items might have set the same positions. This overlap is the source of false positives. A standard filter does not simply clear switches when removing an item, because those switches may also represent other stored items.
THE FORMAL IDEA
any required bit = 0 → absent; all required bits = 1 → maybe
| A bit is a stored value read as 0 or 1. | | A hash rule maps an item to a position. The same item must always use the same rules and positions. The check describes membership evidence, not certainty in both directions. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Number eight bits 1–8 from left: 00000000. Add A at positions 1 and 4 → 10010000. Add B at positions 4 and 7 → 10010010. Query C at positions 2 and 7: bit 2 is 0 → definitely absent. Change query to D at positions 1 and 7: both are 1 → maybe, although D was never added.
|
The second query demonstrates an actual false positive: two existing items jointly create the required pattern. Software then performs the authoritative database lookup rather than treating maybe as permission or proof.
/ SO WHAT?
The trade-off is valuable when avoiding unnecessary expensive lookups matters more than a few extra checks. As more switches become one, false positives become more common. Increasing the filter’s size for the same number of items usually reduces that overlap.
ONE CAVEAT |
| The no-false-negative property assumes correct insertion and querying with an intact standard filter. Data loss, mismatched rules or unsafe deletion can break it. |
KEEP THIS
Shared marks can prove something was never recorded, while a matching pattern may still need confirmation.
|
NEXT: Why a smaller camera opening can soften a photo
|
|
HARD IDEAS. PLAIN TEXT.
You are receiving this because you asked for one clear computer-science or physics idea each day.
UNSUBSCRIBE · VIEW IN BROWSER Plain/Text / Brickston Consulting · 30 N Gould St Ste N, Sheridan, WY 82801 US · knowledge@plaintext.click
|
|