How many 5-digit numbers can be formed such that they read the same way from either of the side (that is the number should be palindrome)?

My approach:

$S = \{0,1,2,3,4,5,6,7,8,9\}$

From the set all the numbers can be selected for:

$position 1 = 10 $, $position 2 = 10 $, $position 3 = 9 $ since we are looking for a palindrome

$ = 10^2.9$ ways palindrome $5$ digit numbers can be formed.

Is this approach and answer correct?

  • 1
    $\begingroup$ There is 9 choices for first (or last) digit in 5-digit number, because number cannot start from zero. Why do you have 9 choices for position3? $\endgroup$ Jun 15, 2022 at 12:43

3 Answers 3


The number is correct , but not the argument :

  • For the FIRST digit, we have $9$ possible choices since this digit cannot be $0$
  • For the second and third , we have $10$ choices.
  • The first three digits already determine the $5$-digit palindrome.

Your answer is correct, but your approach is not clear since you didn't define the positions clearly.

I'm answering the question by assuming the representation of the palindromic numbers in decimal numerals.

This is the image for the position of the digits I used in my answer.

Now, for the first digit (i.e., for the position $1$), we can choose any $9$ digits except $0$ since we cannot use $0$ for the fifth digit (position $5$), otherwise it would be essentially a $4$-digit number. By choosing for the first digit, we're done with the fifth digit since the digit we choose for the first digit will be same for the fifth digit because we're looking for the $5$-digit palindromic numbers.

For the second digit (position $2$), we can choose any $10$ digits since it doesn't affect the total number of digits of the $5$-digit numbers. Hence we're done with the fourth digit (position $4$).

Since the position $3$ is self-palindromic in a $5$-digit number, we can choose any $10$ digits for the third digit (position $3$).

We've no other choices left. Therefore, we've $9×10×10$ or $900$ $5$-digit palindromic numbers.


Let $a_1a_2a_3a_4a_5$ be a 5-digit number.

  • Three are 9 ways to fill $a_1$ slot because $0$ cannot be used here.
  • There are 10 ways to fill the $a_2$ slot.
  • There are 10 ways to fill the $a_3$ slot (the middle slot).
  • There is only 1 way to fill the $a_4$ slot.
  • There is only 1 way to fill the $a_5$ slot.

It becomes much easier for us to understand these 5 points by drawing a tree diagram.

enter image description here

By using multiplication principle, there are $9\times10\times10\times1\times1 =900$ 5-digit palindromic numbers.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .