1

I am trying to calculate how many randomly generated ids I need to produce for there to be a 1% probability I get a duplicate id.

There are $2^{128}$ possible ids.

I understand this is just the birthday problem with a big number:

$0.01=1-\frac{\operatorname{nPr}\left(2^{128},x\right)}{2^{128x}}$

However, I don't know how to solve this algebraically. I cannot plug in values for x and compute the probability because $2^{128}!$ is too large to handle.

Can you show me how to solve this algebraically, or get the numbers small enough to compute? If neither is possible, then how can I get an estimate?

  • For what it's worth, I originally considered using logarithms. However $2^{(128)} \approx (10)^{(39)}$ is such a large number that, after thinking about it, I question this approach. Consequently, after leaving several comments, I deleted them. – user2661923 May 28 '21 at 01:34
  • $3.419952072579840648562326367\cdot 10^{36}$ connections roughly – Roddy MacPhee May 29 '21 at 19:31
  • @RoddyMacPhee that looks bigger than $2^{128}$ - I would have thought something like $2.6 \times 10^{18}$ was more plausible – Henry Jul 26 '21 at 13:14
  • Probably messed up the math. Thinking of other problems. – Roddy MacPhee Jul 26 '21 at 13:20
  • @RoddyMacPhee so very roughly you need to double your number and take the square root to get mine – Henry Jul 26 '21 at 13:20

0 Answers0