Hacker News new | ask | show | jobs
by gren 4107 days ago
Is there any statistical/probabilistic explanation of why the answer is almost 100'000 ?
2 comments

If you approximate the positions of the pin numbers as independent exponential distributions with parameter λ = 1/10000. Then the expected value of the maximum is the sum of 10000/k for k = 1 to 10000 [1], which is approximately 1000*(log(1000)+γ) with γ = 0.57721... [2]. This gives the following values for the expected number of digits needed to get all k-digit pin numbers:

k | n

------------

4 | 97,875.6

5 | 1,209,014.1

6 | 14,392,726.2

7 | 166,953,113.2

8 | 1,899,789,640.9

Which agrees reasonably well with the actual values, at least those found so far.

[1] http://math.stackexchange.com/questions/80475/kth-order-stat... [2] https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_const...

Probably, since five digits requires 1,369,560 decimals and six digits 14,118,307.

Each extra digit seems to require ~ ten times as many decimals.