A compact record filter can answer some membership questions conclusively while leaving others uncertain. In an insert-only Bloom filter, a queried zero bit rules out prior insertion under the declared hash mapping. All queried bits being one means only that the record might have been inserted.

This asymmetric evidence differs from comparing complete record identities. A positive can be assembled from bits set by several unrelated records. The following examples use invented positions in a twelve-bit array, with no real robot log, hash implementation or filtering library executed.

Define the insert-only model

Start with positions zero through eleven all set to zero. Each key maps to two bit positions. Inserting a key sets both positions to one, leaving existing ones unchanged. Querying a key checks whether both mapped positions are one.

Assume insertion and query use the same deterministic mapping and key representation. Bits are not cleared or corrupted. Under those conditions, every inserted key's queried positions remain one. That is the reason this model has no false negatives; it is not a guarantee for arbitrary mutation or incompatible encodings.

Guava's official reference describes approximate containment with one-sided error and its insertion/query contract. Apache Commons' introduction explains bit-vector membership and warns about interpreting common false-positive formulas. The small array and probability calculations below are independently constructed.

Build one complete bit state

Assign four distinct keys A, B, C, and D the position pairs (1,4), (4,7), (2,7), and (9,1), respectively. After their insertion, the set bits are {1,2,4,7,9}. There are five enabled positions, despite eight total bit-setting attempts.

An uninserted key Y mapping to (4,9) returns positive because both positions are set. Neither A, B, C nor D needs to share that whole position pair. This is a false positive assembled from the union of their bits.

An uninserted key Z mapping to (4,10) returns negative because position ten is zero. Within the stated insert-only model, Z was not inserted. A positive and a negative therefore have different logical force.

No count of matching bits recovers the original keys uniquely. Different inserted key collections can produce the same bit state. The array stores a lossy set representation rather than an identity list or a checksum of one complete message.

Why ordinary deletion breaks the guarantee

Suppose someone tries to remove A by clearing its positions one and four. Position four is also needed by B, and position one by D. A later query for B or D can now fail even though that key remains logically present.

The simple bit array has not recorded which inserted keys own each one. Its no-false-negative argument depended on never clearing required bits. Counting or other deletion-supporting variants require additional structure; they are outside this particular model.

Probability requires an additional hash model

The concrete four-key table specified fixed pairs. It did not define a random distribution over hash outcomes, so no universal false-positive frequency follows from that table alone.

For a separate idealized calculation, assume each insertion hash independently selects one of twelve positions uniformly, allowing repeated positions. There are four inserted distinct keys and two such selections per key, hence eight independent bit draws. A new uninserted query uses two independent uniform positions, independent of those draws.

Conditional on a state with B enabled bits, query false-positive probability is (B/12)^2. For the concrete five-bit state, this would be 25/144, approximately 0.173611111, if that additional independent-query model applied. The query positions can coincide; selection is with replacement.

Compute expected occupancy without assuming bit independence

One specified bit remains zero after eight insertion draws with probability a = (11/12)^8. Its probability of being set is 1-a. Summing twelve indicator means gives E[B] = 12(1-a), approximately 6.017637 enabled bits.

This is an ensemble mean over hypothetical insertion outcomes, not the five enabled bits in the one fixed example. Individual bit indicators are not independent: the same eight total draws allocate occupancy across the whole array.

For two specified different bits both to remain zero, probability is b = (10/12)^8. Inclusion-exclusion gives the probability both are set as 1-2a+b. Therefore E[B squared] = 12(1-a) + 12 times 11 times (1-2a+b).

Averaging the conditional query probability produces exact ensemble false-positive probability E[B squared]/144, approximately 0.257671063, under this ideal independent-hash model.

Do not square the mean occupancy silently

Using [E[B]/12]^2 instead gives approximately 0.251471913. The difference is Var(B)/144: the average of a square is not generally the square of an average. This discrepancy exists even though all insertion draws were independent.

The familiar exponential approximation [1-exp(-kn/m)]^k gives approximately 0.236762900 for k = 2, n = 4, and m = 12. It is another quantity here, not the exact finite-bit result. The intentionally small array makes those approximation differences visible.

These values are not predictions for Guava or Apache's actual hash strategy. Real implementations may generate positions differently. Source API semantics and an independently chosen probability model should not be merged into an untested implementation claim.

Retain the one-sided interpretation

As more bits become one, more query patterns can pass. If all twelve bits are set, every possible query passes and this model's false-positive probability is one. The array is still consistent with inserted keys but has lost its ability to rule out absent keys.

An application needing confirmed membership must retain a way to check a positive against its actual record set. The filter alone establishes possible presence, not identity, authenticity, freshness or physical completion. Preserve the bit state, key representation, compatible hash mapping, mutation rules and any probabilistic assumptions with its result.

Sources checked October 24, 2026:

Guava: BloomFilter API: https://guava.dev/releases/snapshot/api/docs/com/google/common/hash/BloomFilter.html

Apache Commons Collections: Bloom Filters Part1, An Introduction: https://commons.apache.org/proper/commons-collections/bloomFilters/intro.html

Concept illustration: A small desktop robot beside a laptop showing a generic workflow provides robotics context for this analytical model. The image does not depict the article's numerical example, a verified experiment, a product specification, or deployment evidence.