Skip to main content
OlympiadHQ

Browse · MathNet

Print

HongKong 2022-23 IMO Selection Tests

Hong Kong 2022 counting and probability

Problem

A 'palindrome' is a positive integer which reads the same from left to right as from right to left, such as and . Someone wrote down a five-digit palindrome and then removed a digit of to obtain a four-digit positive integer (that does not start with ). How many possible values of are there?
Solution
Answer:

Note that is of the form with nonzero, so is of the form , , , or . The second, third and fourth cases can be combined, so we are down to three types of possible values of :

Type I — Equal thousands digit and tens digit, with nonzero unit digit;

Type II — Equal thousands digit and unit digit;

Type III — Equal hundreds digit and unit digit.

There are possibilities of Type I (9 choices for the common thousands and tens digit, 10 choices for the hundreds digit and 9 choices for the unit digit), and similarly possibilities for each of Type II and Type III. However,

90 numbers are of both Types I and II (those of the form with nonzero);

81 numbers are of both Types I and III (those of the form with both and nonzero);

90 numbers are of both Types II and III (those of the form with nonzero);

* 9 numbers are of all three types (, , ..., ).

By the inclusion-exclusion principle, the answer is .
Final answer
2358

Techniques

Inclusion-exclusion