Probability – Distributing Numbers to Satisfy Given Condition

combinatoricsdiscrete mathematicselementary-number-theoryprobability

When I read a math book by myself, I have encounter with a question. I tried to solve it but my answer seems wrong according to my sense. Moreover, there is not any answer key because of the question number is even.

The question roughly says that we want to disperse two primes for each person in the world.Moreover, those primes must exactly have the length of a hundred.Each person must get distinct numbers to be secured. We also assume that the primes numbers selected randomly. Then, what is the probability of being non-secured ?
(Assume that eight billion people live in world).

What I did: I firstly calculated the number of primes with length of a hundred using prime number theorem s.t $$\pi(10^{100})-\pi(10^{99})=\frac{10^{100}}{\ln(10^{100})}-\frac{10^{99}}{\ln(10^{99})} \approx3.9 \times10^{97}$$

So, the total answer is all – secured situation: $$1-\frac{\binom{39 \times 10^{96}}{2}\binom{(39 \times 10^{96})-2}{2}…\binom{(39 \times 10^{96})-{16,000,000,000}}{2}}{(39 \times 10^{96})^{8,000,000,000}}$$

However, the result would be big . According to my friends, the probability of being non-secured must be very small. Can you help me ?

Best Answer

I will assume that each person in the world receives two prime numbers, each uniformly and independently chosen from the set of $100$-digit primes. To be considered secure, all of the $16$ billion primes generated must be different from each other. No two people may share a prime (or two primes), and no person may receive two equal primes, else the entire system is not secure.


There are threetwo huge problems with your calculation.

  1. The denominator should be $$(3.9\times 10^{97})^{\color{blue}{2\times }(8\text{ billion})}.$$This is because you are choosing $16$ billion primes numbers, two for each person. Already, you were off by a factor of $(3.9\times 10^{97})^{8\times 10^9}$.

  2. Let $n=3.9\times 10^{97}$ be the number of primes, and let $k=8\times 10^9$ be the number of people. The numerator should be $$ n(n-1)\cdot (n-2)(n-3)\cdot \ldots \cdot(n-2k+2)(n-2k+1)=\frac{n!}{(n-2k)!} $$ Instead, what you had was $$\binom{n}2\binom{n-2}2\cdots \binom{n-2k+2}2=\frac{n!}{(n-2k)!\color{red}{2^k}}.$$ Essentially, in the denominator, you were imagining each person received an ordered pair of prime numbers, while in the numerator, you were assuming each person receives an unordered pair of prime numbers. For probability calculations, you need to be consistent about these things.

With $n$ and $k$ defined as in (2.), the probability that all $16$ billion of the prime numbers are different is $$ P(\text{secure}) = \frac{n!}{(n-2k)! n^{2k}} $$ Using the method in this answer of mine, you can show that $$ P(\text{secure})=\frac{n!}{(n-2k)!n^{2k}} \approx \exp\left(-\frac{2k^2}{n}\right)\approx 1, $$ so you are almost certainly secure. Note that $k^2$ is ridiculously small compared to $n$, which means $\exp\left(-\frac{2k^2}{n}\right)=\exp(\text{tiny})\approx e^0= 1$.

Related Question