A number is randomly selected from the set , and a number is randomly selected from . What is the probability that has a units digit of ?
- A)
- B)
- C)
- D)
- E)
Answer
E
Key insight
Only the last digit of m matters: 1 always works, 5 never, 9 needs an even exponent, 3 and 7 need a multiple of 4.
Solution
There are equally likely pairs . The last digit of depends only on the last digit of , so look at each on its own.
- List the last digits of small powers.
| last digit of | |||||
|---|---|---|---|---|---|
The patterns repeat, so:
- last digit : always ends in ;
- last digit or : ends in exactly when is a multiple of ;
- last digit : never ends in ;
- last digit : ends in exactly when is even.
2. Count the useful values of . From to there are numbers. Of these, are even, and are multiples of : .
3. Count favorable pairs for each .
- : all values of .
- : values.
- : values.
- : values.
- : values.
4. Add and divide. favorable pairs out of , so the probability is .
The answer is .
Why this works
Last digits of powers repeat in a short cycle (at most long), so whether ends in depends only on where falls in that cycle. The range to is exactly numbers, which is five full cycles of , so the counts come out evenly. Different last digits have different cycles, so handle each separately and add.
The trap
Assuming every base repeats every 4 steps the same way and answering 1/4, or miscounting how many multiples of 4 lie between 1999 and 2018 (there are 5).
Concise solution
There are equally likely pairs . The units digit of depends only on the units digit of , so handle each separately. The values of form a complete block of consecutive integers, containing even numbers and multiples of ().
- : units digit for every . favorable.
- : units digits of cycle ; we need . favorable.
- : always ends in . favorable.
- : cycles ; need . favorable.
- : cycles ; need even. favorable.
Total favorable pairs: , so the probability is .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 12: Introduction to Modular Arithmetic
- Introduction to Counting & Probability, Chapter 7: Introduction to Probability
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
Techniques
Split into exhaustive cases and handle each · Compute small cases, spot the pattern, generalize