STEM Interactive Visual Learning Program at TEC-Bridge AI
Counter Bloom Filter extends standard Bloom Filter by using counters instead of bits, enabling deletions.
Key Characteristics:
How it Works: To add an element, hash it with k different hash functions to get k array positions, then increment those counters. To remove, decrement the counters. To test membership, check if all k counters are greater than 0.
Advantage over Standard Bloom Filter: Supports deletions without rebuilding the entire filter.
| Operation | Time |
|---|---|
| Add | O(k) |
| Remove | O(k) |
| Test | O(k) |
| Space | O(m × log c) |
k = hash functions, m = array size, c = max counter value
| Aspect | Standard | Counter |
|---|---|---|
| Storage | Bits | Counters |
| Deletions | No | Yes |
| Memory | Lower | Higher |
| Overflow | No | Possible |