# A Number Theory(Or rather Probability) Problem

Will anyone in the Brilliant community please help me in the following problem???It came in a test i gave:

If $$n$$ integers taken at random are multiplied together, then what is the probability that the last digit of the product is one of $$1,3,7$$ and $$9$$?

Note by Krishna Jha
5 years ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Basically you can't have a number that ends in 2,4,6,8,0, since that would make the product even, and you can't have a number ending in 5 since the last digit will automatically be 5 or 0. That leaves us with 1,3,7,9 as the possible last digits (We see that with numbers ending in 1,3,7,9, no matter what combination, the product will always end in 1,3,7 or 9).

1,3,7,9 are 4 numbers out of 10 possible ending digits. 4/10 = 2/5

So if n is 1, there's 2/5 chance to satisfy. If n is 2, there's 2/5 chance for the first number to satisfy the condition and another 2/5 chance for the second one to satisfy, giving us (2/5)^2.
Making n larger will just give us more 2/5 chances, which we will multiply to what we already previously have. Therefore, the answer is (2/5)^n

- 5 years ago

Note that the product of n integers is 1,3,7, or 9 mod 10 iff none of the integers is either even or divisible by 5. The probability that an integer is not even nor divisible by 5 is 2/5, so the probability that all n of them satisfy this is (2/5)^n

- 5 years ago

Running this through excel I get:

For $$n=2$$

Chances for $$0$$ through $$9$$: $$\frac{27}{100} \frac{4}{100} \frac{12}{100} \frac{4}{100} \frac{12}{100} \frac{9}{100} \frac{12}{100} \frac{4}{100} \frac{12}{100} \frac{4}{100}$$

For $$n=3$$

Chances for $$0$$ through $$9$$: $$\frac{427}{1000} \frac{16}{1000} \frac{112}{1000} \frac{16}{1000} \frac{112}{1000} \frac{61}{1000} \frac{112}{1000} \frac{16}{1000} \frac{112}{1000} \frac{16}{1000}$$

So the required chance is;

$$\frac{4}{10}$$ $$(n=1)$$

$$\frac{16}{100}$$ $$(n=2)$$

$$\frac{64}{1000}$$ $$(n=3)$$

This leads me to believe that the required chance is $$(\frac{4}{10})^n=(\frac{2}{5})^n$$ for any $$n$$.

- 5 years ago

I agree that the answer they probably are looking for is (2/5)^n. But there is a problem with the question; it does not say what the probability distribution is. For a finite set you could default to the uniform distribution. For a infinite set this does not work, as each number should have the same probability and the sum of all probabilities should equal 1. The question can also be fixed by limiting n to integers greater then 0 and smaller then or equal to some large multiple of 10.

- 5 years ago

You should take the interpretation that the last digit is $$i$$ with probability $$\frac{1}{10}$$.

Staff - 5 years ago

- 5 years ago

4/10=2/5 implies (2/5)^n

- 5 years ago