by adrae5df · 11y ago · 0 comments
With 2¹³² possible values, if identifiers were randomly generated at the rate of one million per second for the next 300 years the chance of a collision would be roughly 1 in six billion.
I tries using the formula for the Birthday problem, but the values are too large.
Although I got ~43 years using the one from https://en.wikipedia.org/wiki/Birthday_attack#Source_code_ex...
julia> birthday(prob, vals) = sqrt(2 * vals * -log1p(-prob))
birthday (generic function with 1 method)
julia> iters = birthday(1/6e9, 2.0^132)
1.3471597122821932e15
julia> iters / 1e6 / 60 / 60 / 24 / 365
42.718154245376496