Blossom Bloom Filter
The moon festival gate has thousands of flower passes to check. Build a tiny, lightning-fast memory that can reject strangers instantlyโand learn why every possible match still needs proof.
๐ง Before we start
Robot Memory Recycler used markers to remember reachable objects. Today, a Bloom filter uses several hash paths to mark a tiny bit garden. It answers โdefinitely absentโ or โpossibly presentโ without storing every full item.
Build the blossom memory
Arrange the visual instruction cards. Each new pass must travel through both hash paths before their bit locations are switched on.
Plant three festival passes
Add Sakura, Koi, and Lantern. Watch two deterministic hash paths choose bit locations. Shared locations stay on instead of storing duplicates.
Ask the two-part question
Query Koi and Crane. If even one required bit is dark, the item is definitely absent. If every required bit glows, the item is only possibly present.
Catch a false positive
Moon was never added, but its two hash paths land on bits already lit by other passes. Decide how a secure gate should handle this possible match.
already lit bits 1 + 5
also checks 1 + 5
๐ What you learned
- A Bloom filter is a compact probabilistic data structure for membership checks.
- Each added item follows multiple deterministic hash paths and switches on several bits.
- Items may share bits, so the filter uses much less memory than a full source set.
- One dark required bit proves an item is definitely absent.
- All required bits glowing means only possibly present.
- Shared hash locations can create a false positive, but added items do not become false negatives.
- Systems verify possible matches against the real source before making a high-trust decision.