Problem of the Week - Sino Canada School

Problem of the Week
Problem E and Solution
Top Spot
Problem
A palindrome is a word or phrase which reads the same frontwards and
backwards. “I prefer pi” is an excellent example of a palindrome phrase.
Several other examples are contained in the problem. Numbers which remain
the same when the digits are reversed are also considered to be palindromes.
For example, 1287821, 4554 and 7 are palindromic numbers. Hannah and
Habibah have a special interest in palindromic numbers. Determine, for them,
the probability that a positive integer less than 1 000 000 is a palindrome and
rise to the challenge of “Top Spot”.
Solution
Since we are talking about positive integers, we will use the set of natural
numbers. In the solution, when we refer to the numbers we are referring to
natural numbers. The largest number we can consider is 999 999 and the
smallest number is 1. There are, therefore, 999 999 possible numbers to
consider.
In determining the number of palindromes, we will consider cases. We will look
at six cases: from one-digit numbers to six-digit numbers.
1. One-digit numbers
Every one-digit number from 1 to 9 is a palindrome. Each of these
numbers reads the same when reversed. There are 9 one-digit palindromes.
2. Two-digit numbers
We are looking for two-digit numbers whose first digit and last digit are
the same. Each of these numbers is of the form aa, where a is a digit from
1 to 9. Therefore, there are 9 possibilities for a and it follows that there
are 9 two-digit palindromes.
3. Three-digit numbers
We are looking for three-digit numbers whose first digit and last digit are
the same. Each of these numbers is of the form aba, where a is a digit
from 1 to 9 and b is a digit from 0 to 9. There are 9 choices for a and for
each of these choices, there are 10 choices for b. Therefore, there are
9 × 10 = 90 three-digit palindromes.
4. Four-digit numbers
We are looking for four-digit numbers whose first digit and last digit are
the same, and whose second and third digits are the same. Each of these
numbers is of the form abba, where a is a digit from 1 to 9 and b is a digit
from 0 to 9. It does not take too much to see that the number of
four-digit palindromes is the same as the number of three-digit
palindromes. Therefore, there are 9 × 10 = 90 four-digit palindromes.
5. Five-digit numbers
We are looking for five-digit numbers whose first digit and last digit are
the same, and whose second and fourth digits are the same. Each of these
numbers is of the form abcba, where a is a digit from 1 to 9, b is a digit
from 0 to 9 and c is a digit from 0 to 9. There are 9 choices for a. For
each of these choices for a, there are 10 choices for b, giving a total of 90
numbers of the form ab ba. For each of these 90 possibilities, there are 10
choices for c. This gives a total of 90 × 10 = 900 possibilities for abcba.
That is, there are 900 five-digit palindromes.
6. Six-digit numbers
We are looking for six-digit numbers of the form abccba, where a is a digit
from 1 to 9, b is a digit from 0 to 9 and c is a digit from 0 to 9. The
argument in this case is identical to the argument in the five-digit case.
That is, the number of six-digit palindromes is the same as the number of
five-digit palindromes. Therefore, there are 900 six-digit palindromes.
To determine the total number of palindromes less than 1 000 000, we add the
totals from each of the cases. There are 9 + 9 + 90 + 90 + 900 + 900 = 1 998
palindromes less than 1 000 000.
The probability is calculated by dividing the number of palindromes by 99 999,
the number of natural numbers less than 1 000 000. So the probability that a
1 998
2
that a natural number less than 1 000 000 is a palindrome is 999
999 = 1 001 . This
corresponds to approximately a 0.2% chance.