Jungle Footprint Filter
The ranger has room for only twelve memory lanterns. Build a tiny, speedy filter that can tell whether an animal is definitely new or may have passed before.
π§ Before we start
At the volcano, you kept an exact journal of every update. Today, memory is tiny, so you will use a Bloom filter: each animal lights two shared positions. It saves space and answers quicklyβbut βmaybe seenβ is a clue, not proof.
Stamp two animals into tiny memory
Tap Toucan and Jaguar. Each animal follows two fixed trail maps, so it always lights the same two lantern positions.
Ask the filter: new or maybe seen?
If either mapped lantern is dark, the animal is definitely new. If both are lit, the filter can only say maybe seen.
Unmask a false positive
Frog maps to lanterns 2 and 10. Toucan lit one; Jaguar lit the other. Predict what the filter says, then check the exact field notebook.
Reduce collisions for a busy jungle
More animals are arriving. Choose the filter that gives their trail positions more room and makes accidental overlaps less likely.
6 lanterns
Crowded positions overlap often.
12 lanterns
More room spreads the same animals out.
π What you learned
- A Bloom filter is a compact structure for fast membership checks.
- Each item maps to several shared memory positions.
- One dark position means an item is definitely not stored.
- All positions lit means maybe storedβnot definitely stored.
- Collisions can create false positives, but not false negatives for added items.
- A larger filter gives items more room and usually reduces collisions.