The number of 5-digit numbers using $1,2,3,4,5 $

120 Views Asked by At

The number of 5-digit numbers using $1,2,3,4,5$ where each digit is distinct and $1$ should not be in 1st position and $5$ should not be in last position ?


I tried like this :

1st position can have $4$ numbers and similarly, last position can have $3$ numbers. Now, Middle 3 elements can be filled in $3,2$ and $1$ respectively.

Total Numbers can be $3*4*3*2*1$ = $72$

1

There are 1 best solutions below

6
On BEST ANSWER

I think that is better to consider all arrangements and quit the ones you don't want. There are $5\times 4\times 3\times 2\times 1=120$ arrangements with the numbers $1,2,3,4,5$.

  • Quit the numbers that are with the $1$ in the first position. There are $24$ (the other four numbers could be anywhere)

  • Quit the numbers that are with the $5$ in the last position. There are $24$ (the other four numbers could be anywhere)

  • Now notice that I quit twice the numbers that have the $1$ in the first position and the $5$ in the last position, so sum the numbers that have the $1$ in the first position and the $5$ in the last position, that are $6$.

Now sum them and quit it to $120$:

$$120-48+6=100-22=80-2=78$$