[Math] Probability that product of any four natural numbers is divisible by 5

probability

Given any four randomly chosen natural numbers (not mentioned if the numbers taken are distinct or not) what is the probability that their product is divisible by 5?

My answers:

  • The numbers chosen will either be of the form $5k$ or $5k+1$ or $5k+2$ or $5k+3$ or $5k+4$ ($k$ is a natural number.). Since each of the form is equally likely to occur (I just feel they will be equally likely and don't know the proof) therefore the probability is $1-P(\text{none of the numbers is divisible by 5})=1-(4/5)^4$.

    Is my answer along with justification correct?

  • Now let us consider the question in a different way. Let the product of the numbers be $x$. Since $x$ is equally likely to be of form $5k$ or $5k+1$ or $5k+2$ or $5k+3$ or $5k+4$ (Is it?) therefore answer is $4/5$.

Obviously at least one of the two methods posted answer above is wrong. Which one is it? If both are wrong kindly tell the answer along with justification.

PS the question is from my guide book IIT JEE Mathematics: 35 Years Chapterwise Solved Papers 2013 – 1979

Best Answer

There are two ways to get the correct solution. The easier way is to consider the set $\left\{\left[5k\right],\left[5k+1\right],\left[5k+2\right],\left[5k+3\right],\left[5k+4\right]\right\}$ of congruence classes modulo $5$ (where $\left[5k\right]$ simply denotes the class with representative of the form $5k$ for an integer $k$, and so on). The probability that you would pick any one of these classes is $\frac{1}{5}$. Thus, the probability that you would pick the class $\left[5k\right]$ is $\frac{1}{5}$. The probability that you will not pick this class is $1-\frac{1}{5}=\frac{4}{5}$. The probability that you would pick $4$ classes that are each not $\left[5k\right]$ is $\left(\frac{4}{5}\right)^{4}=\frac{256}{625}$. Therefore, the probability that you will have a product divisible by $5$ is equivalent to saying that at least one class is $\left[5k\right]$, which has probability $1-\frac{256}{625}=\frac{369}{625}$.

The second method, which is more popular when such classes are not possible, is to take probabilities over the integers in the interval $\left[1,n\right]$, and look at the behavior of these probabilities as $n\to\infty$. Though this is not needed here, it is a good technique to know.