A robot log can contain many independently generated identifiers without any one record having a large chance of matching a particular earlier identifier. Yet the probability that some pair matches anywhere in the complete collection can become substantial. Those are different questions with different numbers of comparisons.
The birthday model explains that distinction through a declared random experiment. It does not assert that every identifier generator behaves randomly, and it does not turn a short checksum into an identity guarantee. The analysis below uses a deliberately small fictional identifier space so the arithmetic remains inspectable.
Define the random experiment
Suppose a hypothetical logger chooses each record ID independently and uniformly from N = 4,096 possible values. There is no exclusion of previously used values: sampling is with replacement. This is a 12-bit toy space, not a recommendation for an installed robot system.
A collision means that at least two generated records have the same ID, whether or not their payloads match. The probability calculation says nothing about their contents, authentication, or physical meaning. It concerns equality among labels.
For a single pair of independent IDs, the probability of equality is 1/4,096, approximately 0.000244141, or 0.0244141 percent. Keeping that one-pair probability fixed does not keep the probability of any collision fixed when more records are added.
Count the chances to form a pair
Among n records, there are n(n - 1)/2 unordered pairs. Fifty records contain 1,225 pairs; eighty records contain 3,160; one hundred records contain 4,950.
For each pair, define an indicator that is one when its two IDs match and zero otherwise. Its expected value is 1/N. Adding those expected values gives expected number of matching pairs E[C] = n(n - 1)/(2N).
For fifty records, the expectation is approximately 0.299072. For eighty, it is approximately 0.771484. For one hundred, it is approximately 1.208496.
An expectation of 1.208496 matching pairs is not a probability of 120.8496 percent. A single random collection can contain several matching pairs. If three records share one ID, they alone generate three matching pairs. Counting pairs and counting the occurrence of at least one collision are separate statistics.
Compute the complement exactly
The first chosen ID cannot collide with an earlier record. Conditional on no collision so far, the second has probability (N - 1)/N of remaining new. The third then has probability (N - 2)/N, and the pattern continues.
For n no greater than N, the probability of no collision is the product over i from zero through n - 1 of (1 - i/N). The probability of at least one collision is one minus that product. This is equivalent to the factorial expression in RFC4429's birthday appendix.
Using the toy space, fifty records have collision probability approximately 0.2593924, or 25.9392 percent. Eighty have approximately 0.5399981, or 53.9998 percent. One hundred have approximately 0.7042978, or 70.4298 percent.
The result crosses one half while only eighty of 4,096 possible labels have been drawn. The effect does not require filling most of the namespace. Many possible pairs accumulate while each particular pair remains unlikely to match.
Use an approximation with its assumptions
Taking logarithms of the no-collision product gives a sum of log(1 - i/N). When i/N remains small, replace each logarithm by approximately -i/N. Summing gives no-collision probability approximately exp[-n(n - 1)/(2N)].
Therefore approximate collision probability is 1 - exp[-n(n - 1)/(2N)]. It gives approximately 0.2584942 for fifty records, 0.5376737 for eighty, and 0.7013539 for one hundred. Comparing with the exact values above shows the approximation's error in this chosen range.
Setting the approximate probability to one half yields n(n - 1) approximately 2N ln(2). For large N, the corresponding sample scale is approximately square root of 2N ln(2), about 1.1774 times square root of N.
Adding one independent random bit doubles the namespace, so this half-probability sample scale grows by about square root of two. Doubling that sample scale requires about four times the namespace, or two additional independent random bits. These are asymptotic scaling comparisons, not exact small-space thresholds.
Compare a fixed target with any pair
Now change the question. Select one fixed ID before drawing fifty independent values. The probability that at least one of those fifty equals the fixed target is 1 - (1 - 1/N) to the power fifty, approximately 0.0121343.
That is about 1.21343 percent, much smaller than the fifty-record any-pair probability. Each draw has only one target to match. In the any-pair problem, every later record can match any earlier record. A report should retain which event its probability describes.
Check the generator model and namespace scope
The uniformity assumption can be inspected mathematically. If possible ID values have probabilities p1 through pN, an independent pair matches with probability sum of pi squared. Under a uniform distribution this is 1/N; concentration on fewer values increases that pair-match probability.
Independence matters separately. Two processes replaying identical generator state are not described by independent draws, even if each process's individual outputs look well distributed. Likewise, a timestamp or machine field that is constant across a batch does not contribute fresh random choices within that batch.
RFC9562 distinguishes UUID layouts and discusses the scope and consequences of collisions. A UUID value has 128 bits, while UUIDv4 assigns 122 bits to random fields after its fixed version and variant positions. Those layout facts do not certify any particular implementation's entropy or independence.
The original examples were independently evaluated as probability arithmetic, without generating IDs or testing a software library. Retain sample count, effective namespace, randomness assumptions, and the event being counted before interpreting a collision estimate.
Sources checked October 24, 2026: RFC4429, AppendixA, April2006: https://www.rfc-editor.org/rfc/rfc4429.html
RFC9562, May2024: https://www.rfc-editor.org/rfc/rfc9562.html
Illustration note: A generic robot-and-laptop image is a concept illustration. It does not show generated identifiers, a captured collision, or a verified logging implementation.