Number of 6-digit positive integers with restriction

566 Views Asked by At

How many six-digit positive integers are there in which the first and last digits are the same?

Attempt: I know the number of 6-digit integers to be $9*10^5$. The first spot can only be numbers from {1,2,..,9} which limits the numbers for the last spot to be from the same set {1,2..,9}. Would the solution then be: $9^2*10^4 $?

5

There are 5 best solutions below

0
On

There are $9$ possibilities for the first digit, $10$ possibilities for the second digit, $10$ possibilities for the third digit, $10$ possibilities for the fourth digit, $10$ possibilities for the fifth digit, and $1$ possibility for the sixth digit (once the first digit is determined, so is the last). Multiply those numbers to get the answer.

0
On

The first digit has 9 choices.(1-9) Each of the middle digit has 10 choices(0-9) The last digit has no choices(it has to be the same as the first digit.) So there are total 9*10^4 numbers.

0
On

When doing a combinatorics and you say "We have $k$ chooses for the first thingy, and then for the second thingy we...." It is assumed you are counting you options after you have fixed the first thingy.

There are $9$ choices for the first digit. And there are $9$ choices for the last digit. But it should be very clear they are NOT independent! Whatever the choice of the first digit is, the last digit must be exactly the same.

So although there are $9$ choices for the first digit once that digit has been determined there is only ONE choice for the last digit; it must be what you chose for the first.

So the answer is $9*10^4*1= 9*10^4$.

Alternatively you could simply say "we have $5$ choices to make. The first and last digit can be from $9$ options. And the remaing $4$ are from $10$ options." So the answer is $9*10^4$.

0
On

Excluding 0 from the first digit, you have 9 possibilities for the first digit and thus only 1 for the last. The rest are free for any number. \begin{array}{|c|c|c|c|c|c|} \hline 9 & 10 & 10 & 10 & 10 & 1 \\ \hline \end{array} The answer is $1*9*10^4$.

0
On

First fix the first and last digit. That's $\binom{9}{1}$. The remaining 4 can be any of the 10 digits. That gives $10^4$. Multiplying the two you get: $\binom{9}{1}10^4$.

You can read this as "for any identical first and last digit I have $10^4$ ways to construct the number.