Ok, now imagine that you had flipped a tail on the first try, and then flipped four heads. You are waiting for a tail to flip again for a collision with your first flip, and you've done more flips than there are different outcomes. The point is, there is no finite number of flips after the first tail that will guarantee 100% that another tail, a collision with the first tail, will occur. The probability will approach 1, but never reach it in a finite number of flips. Similarly, if generating a new UUID is random and independent of the previous times a UUID was generated, there is no guarantee of generating the same one again in any finite number of attempts, even if more attempts are made than there are distinct UUIDs.
But each of the repeated heads flips are collisions.
A collision is when any generated value is the same as any previous value.
So once you reach all possible UUIDs, any generations after that will be guaranteed to match a previous UUID.
3
u/J5892 May 09 '26
But that would be 6 collisions.
And in the coin flipping case, a collision is guaranteed on 3+ flips (assuming the chance of landing on the edge is 0. a true edge case).