Digit Code Combination Problem Based on real life experience, I just considered the following combinatorial challenge:

In a workplace with currently $n$ employees each employee has its own unique 4-digit code used to pass through certain doors at certain times of day. Tomorrow $r$ new employees will start working there and each must fill in a form suggesting two different 4-digit codes. They have no knowledge of each others codes or the $n$ current employee's codes. When everyone has filed their forms, it is attempted to assign each new employee one of their suggested codes so that all $n+r$ persons working there have unique codes.

For simplicity, let us assume that the new employees choose their two different 4-digit suggestions uniformly at random. Then what is the probability $P(n,r)$ that the workplace is unable to assign unique codes to all the new employees?
 A: Here's a lower bound for $P(n,r)$, for starters. First let's exclude nonsensical and trivial situations: The number of $4$-digit codes is $10^4$. The number of codes in use $n$ is an integer between $0$ and $10^4$. The number of new employees $r$ is an integer between $0$ and $10^4-n$. 
Enumerate the new employees $e_1,\ldots,e_r$. Suppose the workplace is able to assign a unique code to each of the $r$ new employees. Let $(c_1,\ldots,c_r)$ be such an assignment. Then employee $e_i$ has chosen code $c_i$, and some other $c_i'$ which could be any other code. The probability of this happening for all employees is
$$\left(\frac{1}{10^4}\cdot\left(1-\frac{1}{10^4}\right)\right)^r.$$
Summing the probabilities for all valid assignments of codes yields an upper bound of
$$\frac{(10^4-n)!}{(10^4-n-r)!}\cdot\left(\frac{1}{10^4}\cdot\left(1-\frac{1}{10^4}\right)\right)^r,$$
on the probability that there exists a valid assignment of codes. So the probability that the workplace cannot assign a  valid set of codes is at least
$$P(n,r)\geq1-\frac{(10^4-n)!}{(10^4-n-r)!}\cdot\left(\frac{1}{10^4}\cdot\left(1-\frac{1}{10^4}\right)\right)^r.$$
