A bit array + k hash functions. Insert sets k bits; a query checks k bits. A 0 bit means definitely absent (no false negatives); all 1s means probably present (maybe a false positive).
| Operation | Time | Notes |
|---|---|---|
| Insert | O(k) | set k bits from k hashes |
| Query (might-contain) | O(k) | check k bits; early-exit on first 0 |
| Delete | unsupported | shared bits → use counting Bloom filter |
| Space | O(m) bits | ~10·n bits for 1% FPR |
| Optimal k | (m/n)·ln2 | array half full of 1s |
| FPR p | (1−e^(−kn/m))^k | rises with n, falls with m |
| Sizing m | −n·ln p / (ln2)² | from target FPR p |